/* ===================================
   CSS VARIABLES - COLOR PALETTE
   =================================== */
   :root {
    --forest-green: #3d5a3d;
    --deep-blue: #2b4a7c;
    --accent-gold: #c9a961;
    --cream: #f8f6f2;
    --charcoal: #2a2a2a;
    --soft-white: #ffffff;
}

/* ===================================
   GLOBAL RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================
   BODY & BACKGROUND
   =================================== */
body {
    font-family: 'Work Sans', sans-serif;
    background-image: url('../images/panpacific_background.jpg'); /* Campus background image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #4a7c7c; /* Fallback */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 180, 200, 0.7) 0%, rgba(120, 200, 180, 0.7) 100%);
    z-index: 1;
}

/* Blur effect */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(3px);
    z-index: 2;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 30px) scale(1.05); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================================
   LOGIN CONTAINER & CARD
   =================================== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: slideUp 0.8s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* ===================================
   LOGO & TITLE SECTION
   =================================== */
.logo-container {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.logo-container img {
    width: 160px;
    height: auto;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.system-title {
    font-family: 'Work Sans', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 24px;
    letter-spacing: 0px;
}

.system-subtitle {
    display: none;
}

/* ===================================
   FORM ELEMENTS
   =================================== */
.form-heading {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
    animation: slideUp 0.8s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }

label { display: none; }

.input-wrapper {
    position: relative;
    width: 100%;
}

/* ===================================
   INPUT FIELDS
   =================================== */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: var(--charcoal);
}

/* Padding for password field for toggle button */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 48px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--forest-green);
    box-shadow: 0 0 0 3px rgba(61, 90, 61, 0.08);
}

input::placeholder { color: #999; }

/* ===================================
   PASSWORD TOGGLE BUTTON (UPDATED)
   =================================== */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer; /* Hand cursor */
    color: #888;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    outline: none; /* No focus box */
}

.password-toggle:hover {
    color: var(--forest-green);
}

.password-toggle i {
    pointer-events: none;
}

/* ===================================
   REMEMBER & FORGOT PASSWORD
   =================================== */
.remember-forgot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 14px;
    animation: slideUp 0.8s ease-out 0.3s backwards;
}

.remember-me { display: none; }

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--forest-green);
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.forgot-password {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 13px;
}

.forgot-password:hover { color: var(--charcoal); }

/* ===================================
   LOGIN BUTTON
   =================================== */
.login-button {
    width: 100%;
    padding: 14px;
    background: var(--forest-green);
    color: var(--soft-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(61, 90, 61, 0.3);
    animation: slideUp 0.8s ease-out 0.4s backwards;
    position: relative;
    margin-top: 8px;
}

.login-button:hover {
    background: #2d4a2d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(61, 90, 61, 0.4);
}

.login-button:active { transform: translateY(0); }

/* Loading state */
.login-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-button.loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ===================================
   DIVIDER & SIGNUP LINK
   =================================== */
.divider { display: none; }

.signup-link {
    text-align: center;
    font-size: 13px;
    color: #666;
    animation: fadeIn 1s ease-out 0.6s backwards;
    margin-top: 16px;
}

.signup-link a {
    color: var(--charcoal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link a:hover { color: var(--forest-green); }

select { display: none; }

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
/* Landscape Phones */
@media (max-width: 768px) and (orientation: landscape) {
    body { overflow-y: auto; }
    .login-container { padding: 15px; margin: 20px auto; }
    .login-card { padding: 30px 28px; }
    .logo-container img { width: 120px; }
    .system-title { font-size: 20px; margin-bottom: 16px; }
    .form-heading { font-size: 18px; margin-bottom: 20px; }
}

/* Tablets */
@media (max-width: 768px) {
    .login-container { max-width: 90%; padding: 15px; }
    .login-card { padding: 35px 30px; }
    .system-title { font-size: 22px; }
    .logo-container img { width: 140px; }
}

/* Smartphones Portrait */
@media (max-width: 500px) {
    .login-container { max-width: 95%; padding: 12px; }
    .login-card { padding: 32px 24px; border-radius: 16px; }
    .system-title { font-size: 20px; margin-bottom: 20px; }
    .logo-container { margin-bottom: 24px; }
    .logo-container img { width: 130px; margin-bottom: 12px; }
    .form-heading { font-size: 18px; margin-bottom: 20px; }
    
    input[type="text"], input[type="password"], input[type="email"] {
        font-size: 16px; padding: 13px 15px;
    }
    
    .input-wrapper input[type="password"],
    .input-wrapper input[type="text"] { padding-right: 45px; }
    .login-button { padding: 13px; font-size: 15px; }
    .forgot-password { font-size: 12px; }
}

/* Small Phones */
@media (max-width: 380px) {
    .login-container { padding: 10px; max-width: 98%; }
    .login-card { padding: 28px 20px; border-radius: 14px; }
    .logo-container img { width: 110px; margin-bottom: 10px; }
    .system-title { font-size: 18px; margin-bottom: 18px; }
    .logo-container { margin-bottom: 20px; }
    .form-heading { font-size: 16px; margin-bottom: 18px; }
    
    input[type="text"], input[type="password"], input[type="email"] {
        padding: 12px 14px; font-size: 16px; border-radius: 6px;
    }
    
    .form-group { margin-bottom: 16px; }
    .login-button { padding: 12px; font-size: 15px; border-radius: 6px; }
    .password-toggle { right: 12px; font-size: 16px; }
    .remember-forgot { margin-top: 12px; font-size: 13px; }
    .forgot-password { font-size: 12px; }
}

/* Very Small Phones */
@media (max-width: 320px) {
    .login-container { padding: 8px; }
    .login-card { padding: 24px 16px; border-radius: 12px; }
    .logo-container img { width: 100px; margin-bottom: 8px; }
    .system-title { font-size: 16px; margin-bottom: 16px; }
    .logo-container { margin-bottom: 16px; }
    .form-heading { font-size: 15px; margin-bottom: 16px; }
    
    input[type="text"], input[type="password"], input[type="email"] {
        padding: 11px 12px; font-size: 16px;
    }
    
    .form-group { margin-bottom: 14px; }
    .login-button { padding: 11px; font-size: 14px; margin-top: 6px; }
    .password-toggle { right: 10px; font-size: 15px; }
}

/* Short Landscape */
@media (max-height: 600px) and (orientation: landscape) {
    body { overflow-y: auto; align-items: flex-start; padding: 20px 0; }
    .login-container { margin: 20px auto; }
    .login-card { padding: 20px 24px; }
    .logo-container { margin-bottom: 12px; }
    .logo-container img { width: 80px; margin-bottom: 6px; }
    .system-title { font-size: 16px; margin-bottom: 12px; }
    .form-heading { font-size: 15px; margin-bottom: 12px; }
    .form-group { margin-bottom: 12px; }
    
    input[type="text"], input[type="password"], input[type="email"] {
        padding: 10px 12px;
    }
    .login-button { padding: 10px; margin-top: 4px; }
    .remember-forgot { margin-top: 8px; }
}

/* Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-card { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
}

/* Touch Targets */
@media (hover: none) and (pointer: coarse) {
    .password-toggle { padding: 8px; min-width: 44px; min-height: 44px; }
    .forgot-password { padding: 8px 4px; display: inline-block; }
    .login-button { min-height: 48px; }
}

/* Notch Support */
@supports (padding: max(0px)) {
    .login-container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
/* ===================================
   FORGOT PASSWORD MODAL
   =================================== */
.fp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.fp-modal-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.fp-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.fp-close-btn:hover { color: var(--charcoal); }

.fp-msg {
    text-align: center;
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
    font-weight: 500;
}
.fp-msg.success { color: #27ae60; }
.fp-msg.error   { color: #e74c3c; }

@media (max-width: 480px) {
    .fp-modal-card { padding: 28px 20px 22px; }
}