/* style.css – login page with mobile-friendly top-right toast */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.login-body {
    background-image: url('https://images.unsplash.com/photo-1523050854058-8df90110c7f1?w=1600&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeInBody 0.8s ease-out;
    position: relative;
}

.login-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.login-wrapper {
    max-width: 460px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@keyframes fadeInBody {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ===== DEPARTMENT LOGO ===== */
.dept-logo-large {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem 1rem 1.5rem;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideDownLogo 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
    width: 100%;
    justify-content: center;
}

@keyframes slideDownLogo {
    0% { opacity: 0; transform: translateY(-30px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 100, 50, 0.25);
    transition: transform 0.3s ease;
    background: #1a8a4e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dept-logo-large:hover .logo-icon {
    transform: rotate(-8deg) scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a3d2a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.logo-dept {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a8a4e;
    letter-spacing: 0.3px;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 2.5rem;
    padding: 2.5rem 2.2rem 2rem;
    box-shadow: 0 20px 60px -16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    animation: slideUpCard 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) 0.15s both;
}

@keyframes slideUpCard {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.login-header h2 i {
    color: #1a8a4e;
}

.login-header p {
    color: #3a5a3a;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a4a2a;
    margin-bottom: 0.4rem;
}

.form-group label i {
    color: #1a8a4e;
    width: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border: 2px solid #e8f0ea;
    border-radius: 16px;
    font-size: 0.95rem;
    background: #f8fcf9;
    transition: all 0.3s ease;
    color: #1a2a1a;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1a8a4e;
    box-shadow: 0 0 0 4px rgba(26, 138, 78, 0.08);
    background: white;
}

.input-wrapper input::placeholder {
    color: #8aaa9a;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #5a8a6a;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper input:focus ~ .input-icon {
    color: #1a8a4e;
}

.toggle-password {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: #5a8a6a;
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1rem;
    transition: all 0.25s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #1a8a4e;
    background: rgba(26, 138, 78, 0.06);
}

.toggle-password i {
    font-size: 1rem;
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.2rem 0 1.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #1a4a2a;
    cursor: pointer;
    position: relative;
    padding-left: 0.2rem;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #8aaa9a;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #1a8a4e;
    border-color: #1a8a4e;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.6rem;
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 138, 78, 0.15);
}

.forgot-link {
    color: #1a8a4e;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border-bottom: 2px solid transparent;
}

.forgot-link:hover {
    color: #0a6b3a;
    border-bottom-color: #1a8a4e;
}

/* ===== LOGIN BUTTON ===== */
.login-btn-submit {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(145deg, #0a6b3a, #1e9c5a);
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 8px 24px rgba(0, 100, 50, 0.2);
}

.login-btn-submit:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 100, 50, 0.3);
    background: linear-gradient(145deg, #0a6b3a, #1e9c5a);
}

.login-btn-submit:active {
    transform: scale(0.96);
}

.login-btn-submit i {
    transition: transform 0.3s ease;
}

.login-btn-submit:hover i {
    transform: translateX(4px);
}

/* ===== REGISTER PROMPT ===== */
.register-prompt {
    text-align: center;
    margin-top: 1.5rem;
}

.register-prompt p {
    font-size: 0.85rem;
    color: #3a5a3a;
}

.register-prompt a {
    color: #1a8a4e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    border-bottom: 2px solid transparent;
}

.register-prompt a:hover {
    color: #0a6b3a;
    border-bottom-color: #1a8a4e;
}

/* ===== BACK LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.25s ease;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.back-link:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(-4px);
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-4px);
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    color: white;
    font-size: 0.75rem;
    opacity: 0.8;
    animation: fadeInFooter 1s ease-out 0.5s both;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInFooter {
    0% { opacity: 0; }
    100% { opacity: 0.8; }
}

.login-footer i {
    color: #1a8a4e;
    margin-right: 4px;
}

/* ===== TOAST NOTIFICATIONS - MOBILE FRIENDLY ===== */
.custom-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    z-index: 9999;
    max-width: 420px;
    min-width: 280px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    color: #1a2a1a;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    transform: translateX(100px) scale(0.8);
    border-left: 5px solid #1a8a4e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    cursor: default;
    touch-action: manipulation;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.custom-toast.hide {
    opacity: 0;
    transform: translateX(100px) scale(0.8);
}

.custom-toast.success {
    border-left-color: #1a8a4e;
}

.custom-toast.error {
    border-left-color: #c55a0a;
}

.custom-toast.info {
    border-left-color: #1a8a4e;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
}

.toast-content i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-content .toast-icon-success {
    color: #1a8a4e;
}

.toast-content .toast-icon-error {
    color: #c55a0a;
}

.toast-content .toast-icon-info {
    color: #1a8a4e;
}

.toast-message {
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: #8a8a8a;
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.toast-close:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #1a8a4e;
    border-radius: 0 0 0 16px;
    transition: width 0.1s linear;
    width: 100%;
}

.toast-progress.error {
    background: #c55a0a;
}

/* ===== RESPONSIVE - MOBILE TOAST ===== */
@media (max-width: 600px) {
    .custom-toast {
        top: 0.8rem;
        right: 0.8rem;
        left: 0.8rem;
        max-width: none;
        min-width: auto;
        padding: 0.7rem 1rem;
        border-radius: 12px;
        transform: translateY(-30px) scale(0.9);
        border-left-width: 4px;
    }

    .custom-toast.show {
        transform: translateY(0) scale(1);
    }

    .custom-toast.hide {
        transform: translateY(-30px) scale(0.9);
    }

    .toast-message {
        font-size: 0.85rem;
    }

    .toast-content i {
        font-size: 1.1rem;
    }

    .toast-close {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        padding: 0.2rem;
    }

    .toast-progress {
        height: 2px;
    }
}

@media (max-width: 500px) {
    .login-wrapper {
        gap: 1.5rem;
    }

    .dept-logo-large {
        padding: 0.8rem 1.2rem;
        border-radius: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }

    .logo-name {
        font-size: 1.4rem;
    }

    .logo-dept {
        font-size: 0.65rem;
    }

    .login-card {
        padding: 1.8rem 1.2rem 1.5rem;
        border-radius: 2rem;
    }

    .login-header h2 {
        font-size: 1.4rem;
    }

    .login-header p {
        font-size: 0.8rem;
    }

    .input-wrapper input {
        padding: 0.65rem 0.8rem 0.65rem 2.4rem;
        font-size: 0.9rem;
    }

    .input-icon {
        left: 0.8rem;
        font-size: 0.8rem;
    }

    .form-options {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }

    .login-btn-submit {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .register-prompt p {
        font-size: 0.8rem;
    }

    .back-link {
        color: white;
        background: rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 380px) {
    .dept-logo-large {
        flex-direction: column;
        text-align: center;
    }

    .logo-text {
        align-items: center;
    }
}

/* Touch-friendly for mobile */
@media (hover: none) {
    .toast-close {
        padding: 0.6rem;
        width: 40px;
        height: 40px;
    }
}