/* Modern Login Page - VCC Node */
/* Keeps maroon/silver branding with modern styling */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 20px;
}

.LogonContent {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, #2d2d44 0%, #1e1e2f 100%);
    border-radius: 20px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.LogonHeader {
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    padding: 30px 20px;
    text-align: center;
    border-bottom: 3px solid rgba(192, 192, 192, 0.3);
}

.LogonHeader h1 {
    color: #e8e8e8;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.LogonHeader .subtitle {
    color: rgba(192, 192, 192, 0.8);
    font-size: 0.85em;
    margin-top: 8px;
    font-weight: 400;
}

#LogonMessage {
    text-align: center;
    padding: 16px 20px;
    min-height: 52px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#LogonMessage.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

#LogonMessage.success {
    color: #51cf66;
    background: rgba(81, 207, 102, 0.1);
}

#Logon {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(192, 192, 192, 0.9);
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.15);
    background: #fff;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder {
    color: #999;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select:disabled {
    background-color: rgba(200, 200, 200, 0.9);
    color: #666;
    cursor: not-allowed;
}

.form-group select[multiple] {
    height: auto;
    min-height: 100px;
    padding: 10px;
    background-image: none;
}

.form-group select[multiple] option {
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.form-group select[multiple] option:checked {
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    color: white;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.checkbox-group label {
    color: rgba(192, 192, 192, 0.9);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.checkbox-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.checkbox-wrapper .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    border-color: #8b0000;
}

.checkbox-wrapper .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}

/* Trainee row */
#traineeRow {
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#traineeRow label {
    display: block;
    color: rgba(192, 192, 192, 0.9);
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Submit button */
#LogonButtons {
    margin-top: 25px;
}

#submitButton {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    color: #e8e8e8;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

#submitButton:hover:not(:disabled) {
    background: linear-gradient(135deg, #a00000 0%, #6c0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

#submitButton:active:not(:disabled) {
    transform: translateY(0);
}

#submitButton:disabled {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 20px;
    color: rgba(192, 192, 192, 0.4);
    font-size: 0.8em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .LogonContent {
        border-radius: 15px;
    }

    .LogonHeader {
        padding: 25px 15px;
    }

    .LogonHeader h1 {
        font-size: 1.3em;
    }

    #Logon {
        padding: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group select {
        padding: 12px 14px;
    }
}

/* Legacy table support (hidden) */
#Logon table {
    display: none;
}
