/* --- Core Variables --- */
        :root {
            --primary-green: #138b5f;       
            --dark-green: #0a5438;          /* Darker green for the spinner */
            --primary-gold: #d98218;        
            --dark-gold: #a66210;           /* Darker gold for the spinner */
            --bg-color: #d8d8d8;            
            --card-bg: #ffffff;
            --border-color: #d1d1d1;
            --icon-bg: #f5f5f5;
            --text-gray: #888888;
            --text-dark: #333333;
        }

        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: var(--bg-color);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden; /* Prevent scrolling during loading */
        }

        /* --- Full Screen Preloader --- */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--card-bg);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
        }

        /* Large Rotating Arrows */
        .big-spinner-container {
            width: 90px;
            height: 90px;
            animation: spin-smooth 1.5s cubic-bezier(0.4, 0.1, 0.4, 1) infinite;
            filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.1));
            margin-bottom: 20px;
        }

        .preloader-text {
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 3px;
            text-transform: uppercase;
            animation: pulse-text 1.5s infinite;
        }

        .text-green { color: var(--dark-green); }
        .text-gold { color: var(--dark-gold); }

        @keyframes spin-smooth {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes pulse-text {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        /* --- Login Card Container --- */
        .login-card {
            background-color: var(--card-bg);
            width: 100%;
            max-width: 420px;
            padding: 40px 50px;
            box-sizing: border-box;
            border-top: 4px solid var(--primary-gold);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            opacity: 0; /* Hidden initially, revealed by JS */
            transform: translateY(20px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }

        .login-card.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* --- Faint Watermark Logo --- */
        .watermark {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 250px;
            height: 250px;
            background-image: url('../assets/rockview-university-cover.jfif'); 
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.05; 
            pointer-events: none;
            z-index: 0;
        }

        /* --- Header Typography --- */
        .header-section {
            text-align: center;
            position: relative;
            z-index: 1;
            margin-bottom: 35px;
        }

        .header-section h1 {
            color: var(--primary-green);
            font-size: 28px;
            font-weight: 900;
            margin: 0;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .header-section h2 {
            color: var(--primary-gold);
            font-size: 18px;
            font-weight: 800;
            margin: 0;
            letter-spacing: 4px;
            text-transform: uppercase;
        }

        .header-section p {
            color: #999;
            font-size: 11px;
            font-weight: 700;
            margin: 10px 0 0 0;
            letter-spacing: 1px;
            text-transform: uppercase;
        }

        /* --- Form Elements --- */
        .login-form {
            position: relative;
            z-index: 1;
        }

        .input-group {
            display: flex;
            border: 1px solid var(--border-color);
            margin-bottom: 15px;
            background-color: var(--card-bg);
            border-radius:0;
            transition: border-color 0.3s;
        }

        .input-group:focus-within {
            border-color: var(--primary-green);
        }

        .icon-box {
            background-color: var(--icon-bg);
            border-right: 1px solid var(--border-color);
            padding: 12px 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
        }

        .input-field {
            flex: 1;
            border: none;
            padding: 12px 15px;
            outline: none;
            font-size: 14px;
            color: var(--text-dark);
            background: transparent;
        }

        .input-field::placeholder {
            color: #b0b0b0;
        }
        
        select.input-field {
            cursor: pointer;
            appearance: auto;
            color: var(--text-gray);
        }

        select.input-field:focus, select.input-field:valid {
            color: var(--text-dark);
        }

        .toggle-password {
            padding: 12px 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
            cursor: pointer;
            background: transparent;
        }

        .toggle-password:hover {
            color: var(--text-dark);
        }

        /* --- Secure Login Button & Animation --- */
        .btn-submit {
            width: 100%;
            background-color: var(--primary-green);
            color: #ffffff;
            border: none;
            padding: 15px;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 1px;
            cursor: pointer;
            text-transform: uppercase;
            margin-top: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: background-color 0.2s;
        }

        .btn-submit:hover {
            background-color: #0f724d;
        }

        .btn-submit:disabled {
            background-color: #8bbfa9;
            cursor: not-allowed;
        }
        
        .btn-spinner {
            animation: spin-smooth 1s linear infinite;
            display: none; 
        }

        /* --- Footer Note --- */
        .surveillance-note {
            text-align: right;
            margin-top: 20px;
            font-size: 12px;
            color: var(--text-gray);
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 5px;
            position: relative;
            z-index: 1;
        }

        /* --- SVG Icon Sizing --- */
        svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }
        
        .stroke-icon {
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

/* Authentication-page support; core visual rules above match the supplied reference. */
* { box-sizing: border-box; }
html { display: block; min-height: 100%; height: auto; }
body { min-height: 100vh; height: auto; width: 100%; padding: 32px 16px; }
[hidden] { display: none !important; }
.login-card { flex-shrink: 0; }
html:not(.js) .login-card.is-preparing { opacity: 1; transform: none; }
.big-spinner-container svg { display: block; width: 100%; height: 100%; fill: none; animation: none; }
.form-message { padding: 12px; border-radius:0; background: #fff2ef; color: #8d2c1d; font-size: 13px; line-height: 1.5; margin: 0 0 18px; overflow-wrap: anywhere; }
.form-message.success { background: #eaf6ef; color: #095335; }
.form-message.info { background: #f3f5f7; color: #374151; }
.form-links { display: flex; justify-content: center; margin-top: 22px; font-size: 13px; }
.help { font-size: 12px; line-height: 1.6; color: #666; margin: -8px 0 20px; }
.btn-submit.busy .btn-spinner { display: block; }
.btn-submit:disabled { background-color: #8bbfa9; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--primary-gold); outline-offset: 3px; }
@media (max-width: 520px) { body { padding: 24px 14px; } .login-card { padding: 32px 24px; } .header-section h1 { font-size: 25px; } }

/* Refined form typography and spacing, retaining the reference palette and card. */
.login-page-card { max-width: 460px; padding: 42px 48px 34px; }
.login-page-card .header-section { margin: -42px -48px 27px; padding: 0 0 17px; }
.brand-cover-frame { position: relative; width: 100%; height: 82px; overflow: hidden; background: #eaf1ec; }
.brand-cover { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.brand-cover-frame::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--dark-green), var(--primary-green) 55%, var(--primary-gold)); }
.login-page-card .system-name { max-width: 100%; margin: 15px auto 0; padding: 0 20px; color: var(--dark-green); font-size: 12px; font-weight: 800; line-height: 1.45; letter-spacing: 1.15px; text-transform: uppercase; }
.login-page-card .system-name::before, .login-page-card .system-name::after { content: ''; display: inline-block; width: 20px; height: 1px; margin: 0 9px 4px; background: var(--primary-gold); }
.login-page-card .header-section h1 { font-size: 28px; letter-spacing: 2.2px; line-height: 1.15; }
.login-page-card .header-section h2 { margin-top: 2px; font-size: 17px; letter-spacing: 3.5px; line-height: 1.2; }
.login-page-card .header-section p { margin-top: 9px; letter-spacing: 1.2px; }
.login-page-card .page-title { text-align: center; color: var(--text-dark); font-size: 21px; font-weight: 800; margin: 0 0 9px; }
.login-page-card .page-title::after { content: ''; display: block; width: 38px; height: 2px; margin: 9px auto 0; background: var(--primary-gold); }
.login-page-card .description { text-align: center; color: #626b65; font-size: 12.5px; line-height: 1.55; margin: 0 0 22px; padding: 10px 12px; border-left: 3px solid var(--primary-gold); background: #f5f7f5; }
.login-page-card form > label { display: block; margin: 0 0 7px; color: #4b514d; font-size: 12px; line-height: 1.35; font-weight: 700; letter-spacing: .15px; }
.login-page-card .input-group { min-height: 44px; margin-bottom: 17px; border-radius:0; }
.login-page-card .icon-box { width: 46px; flex: 0 0 46px; padding: 11px 13px; }
.login-page-card .input-field { min-height: 42px; padding: 11px 13px; font-size: 13px; }
.login-page-card .toggle-password { border: 0; border-left: 1px solid var(--border-color); padding: 0 13px; color: var(--dark-green); font: 700 11px "Segoe UI",Roboto,Arial,sans-serif; letter-spacing: .4px; text-transform: uppercase; }
.login-page-card .toggle-password:hover { color: var(--dark-gold); background: #fafafa; }
.login-page-card .btn-submit { min-height: 46px; margin-top: 2px; padding: 14px; letter-spacing: 1.1px; }
.login-page-card .form-links { margin-top: 19px; font-weight: 650; }
.form-links a { color: var(--dark-green); text-decoration-color: var(--primary-gold); text-underline-offset: 3px; }
.form-links a:hover { color: var(--dark-gold); }
.surveillance-note { justify-content: center; margin-top: 17px; padding-top: 12px; border-top: 1px solid #ececec; color: #777; font-size: 11px; }
.login-page-card .watermark { pointer-events: none; }
.login-page-card .watermark { background-image: url('../assets/rockview-university-cover.jfif'); background-size: contain; background-position: center; background-repeat: no-repeat; opacity: .045; }
@media (max-width: 520px) { .login-page-card { max-width: 460px; padding: 34px 25px 28px; } .login-page-card .header-section { margin: -34px -25px 23px; } .brand-cover-frame { height: 76px; } .login-page-card .system-name { font-size: 11px; letter-spacing: .8px; } .login-page-card .system-name::before, .login-page-card .system-name::after { width: 12px; margin-left: 5px; margin-right: 5px; } }
