* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a4d8f;
    --secondary-color: #2c6cb7;
    --accent-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 30px;
    text-align: center;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.logo-placeholder i {
    font-size: 40px;
}

.logo-section h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.5;
    margin-bottom: 5px;
}

.subtitle-small {
    font-size: 12px;
    opacity: 0.9;
}

.form-section {
    padding: 30px;
}

.role-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    border: 2px solid var(--light-color);
    background: var(--white);
    color: var(--dark-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tab-btn i {
    font-size: 20px;
}

.tab-btn:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.login-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.login-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-form h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(44, 108, 183, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 43px;
    background: none;
    border: none;
    color: var(--dark-color);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login i {
    margin-right: 8px;
}

.attempts-info {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--danger-color);
    font-weight: 600;
}

.footer {
    text-align: center;
    color: var(--white);
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.9;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--white);
    margin-top: 15px;
    font-size: 16px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: var(--white);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.show {
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }

    .logo-section {
        padding: 30px 20px;
    }

    .form-section {
        padding: 20px;
    }

    .tab-btn {
        font-size: 11px;
        padding: 10px 5px;
    }

    .tab-btn i {
        font-size: 18px;
    }
}

/* Form hint styling */
.form-hint {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}
