/* ========================================
   OASIS - SIGN-IN PAGES, shared by the portal sign-in masters:
   - StudentLogin.Master: frmLanding, frmYcmouStudentLogin, frmYcmouLogin,
     frmYcmouStufp, frmYcmouSchangePassword
   - AdminLogin.Master: frmYcmouAdminLogin (University and Regional Centre staff)
   Same palette and components as Login.css.
   ======================================== */

:root {
    --teal-900: #173430;
    --teal-800: #1f4540;
    --teal-700: #2d5550;
    --teal-600: #3d7069;
    --teal-100: #dcebe8;
    --teal-50: #eff6f4;
    --maroon: #9e3a31;
    --maroon-dark: #7f2e27;
    --gold: #f3c46b;
    --amber-bg: #fff6e0;
    --amber-line: #f1dca9;
    --amber-text: #5e4300;
    --amber-icon: #b7791f;
    --ink: #1c2a28;
    --muted: #5a6b68;
    --placeholder: #8a9a97;
    --line: #e2e9e7;
    --line-strong: #cfdad7;
    --field: #f7faf9;
    --surface: #ffffff;
    --page: #f5f8f7;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(23, 52, 48, 0.06), 0 1px 3px rgba(23, 52, 48, 0.08);
    --shadow-card: 0 8px 24px rgba(23, 52, 48, 0.1);
    --ring: 0 0 0 3px rgba(61, 112, 105, 0.2);
    --font: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: 0.2s ease;
}

/* ========================================
   BASE
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--page);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    /* Google Translate pushes the body down; keep it in place */
    top: 0 !important;
    position: static !important;
}

h1, h2, h3, h4, h5, h6, p, ul {
    margin: 0;
}

#Form1 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--teal-700);
}

a:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid var(--amber-icon);
    outline-offset: 2px;
}

/* ========================================
   UTILITY BAR (help line)
   ======================================== */

.utility-bar {
    background: var(--teal-900);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
}

.utility-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 24px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.utility-item {
    color: inherit;
    text-decoration: none;
}

.utility-item i {
    margin-right: 6px;
    color: var(--gold);
}

.utility-bar a {
    color: #fff;
    text-decoration: none;
}

.utility-bar a:hover {
    text-decoration: underline;
}

.utility-hours {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: relative;
    z-index: 2;
    background: var(--surface);
    border-bottom: 3px solid var(--teal-600);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo-link {
    display: block;
    flex-shrink: 1;
    min-width: 0;
}

.site-logo {
    display: block;
    height: auto;
    max-height: 68px;
    max-width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    color: var(--teal-700);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--teal-700);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--ease);
}

.btn-home:hover {
    background: var(--teal-800);
    color: #fff;
}

/* Google Translate gadget */
#google_translate_element {
    flex-shrink: 0;
}

#google_translate_element .goog-te-gadget-simple {
    display: inline-flex !important;
    align-items: center;
    padding: 7px 12px !important;
    background: var(--surface) !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: 999px !important;
    font-family: var(--font) !important;
    font-size: 0.8125rem !important;
    line-height: 1.2;
}

#google_translate_element .goog-te-gadget-simple a,
#google_translate_element .goog-te-gadget-simple span {
    color: var(--teal-700) !important;
    text-decoration: none !important;
}

.goog-te-gadget-icon,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

/* ========================================
   MAIN: the page's form card, centred on the page background
   ======================================== */

.auth-main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    padding: 48px 0;
}

.auth-inner {
    display: flex;
    justify-content: center;
}

/* ========================================
   FORM CARD
   ======================================== */

.login-box {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.login-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

/* OASIS header, the same on every student card */
.panel-header {
    padding: 26px 28px 22px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(135deg, var(--teal-800) 0%, var(--teal-600) 100%);
    color: #fff;
    text-align: center;
}

.panel-title {
    /* padding balances the trailing letter-spacing so the word stays centred */
    padding-left: 0.2em;
    color: #fff;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1.1;
}

.panel-subtitle {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
}

.panel-subtitle::before {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin: 0 auto 10px;
    border-radius: 2px;
    background: var(--gold);
}

.panel-body {
    padding: 24px 28px 26px;
}

/* Page title row under the OASIS header */
.panel-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.panel-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 1.125rem;
}

.intro-title {
    color: var(--teal-900);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
}

.intro-text {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.45;
}

.panel-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center;
}

.panel-foot a {
    font-weight: 600;
    text-decoration: none;
}

.panel-foot a:hover {
    text-decoration: underline;
}

/* ========================================
   FIELDS
   ======================================== */

.login-panel .input-group {
    display: block;
    margin: 0 0 18px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.label-icon {
    color: var(--teal-600);
    font-size: 0.875rem;
}

.input-box,
.input-box-with-btn {
    position: relative;
}

.input-box-with-btn {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.icon-left {
    position: absolute;
    left: 15px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--placeholder);
    font-size: 0.9375rem;
    pointer-events: none;
}

.text-input,
.text-input-flex {
    width: 100%;
    height: 48px;
    padding: 0 46px 0 42px;
    font-family: var(--font);
    /* 16px: smaller text makes iOS Safari zoom the page when the field is focused */
    font-size: 1rem;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.text-input-flex {
    flex: 1;
    width: auto;
    min-width: 0;
    padding-right: 14px;
}

.text-input::placeholder,
.text-input-flex::placeholder {
    color: var(--placeholder);
    font-size: 0.875rem;
}

.text-input:hover,
.text-input-flex:hover {
    border-color: #b7c7c3;
}

.text-input:focus,
.text-input-flex:focus {
    background: var(--surface);
    border-color: var(--teal-600);
    box-shadow: var(--ring);
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--ease), background-color var(--ease);
}

.password-toggle:hover {
    color: var(--teal-700);
    background: var(--teal-50);
}

/* ========================================
   LINKS
   ======================================== */

.link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: -4px 0 20px;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.panel-link:hover {
    text-decoration: underline;
}

.link-left {
    color: var(--teal-700);
}

.link-right {
    color: var(--maroon);
}

/* ========================================
   BUTTONS
   ======================================== */

.signin-button {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--teal-700);
    border: 1px solid var(--teal-700);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(45, 85, 80, 0.25);
    cursor: pointer;
    transition: background-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.signin-button:hover {
    background: var(--teal-800);
    border-color: var(--teal-800);
    box-shadow: 0 8px 20px rgba(45, 85, 80, 0.32);
    transform: translateY(-1px);
}

.signin-button:active {
    transform: translateY(0);
}

/* Secondary actions: Edit PRN, Back */
.btn-edit,
.btn-secondary-action {
    color: var(--teal-700);
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: none;
}

.btn-edit:hover,
.btn-secondary-action:hover {
    color: var(--teal-800);
    background: var(--teal-50);
    border-color: var(--teal-600);
    box-shadow: none;
}

.btn-primary-action {
    background: var(--teal-700);
}

.inline-button {
    flex: 0 0 auto;
    min-width: 112px;
    height: 48px;
    padding: 0 18px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    background: var(--teal-700);
    border: 0;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--ease);
}

.inline-button:hover:not(:disabled):not(.disabled-btn) {
    background: var(--teal-800);
}

.inline-button:disabled,
.inline-button.disabled-btn {
    color: #fff;
    background: #b5c4c1;
    cursor: not-allowed;
}

/* OTP Submit */
.inline-button.btn-submit {
    background: var(--maroon);
}

.inline-button.btn-submit:hover:not(:disabled):not(.disabled-btn) {
    background: var(--maroon-dark);
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.button-row .signin-button {
    flex: 1;
}

.reset-section {
    margin-bottom: 4px;
}

/* ========================================
   LANDING: "Have you already registered?"
   ======================================== */

.question-section {
    margin-bottom: 22px;
    text-align: center;
}

.question-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 1.375rem;
}

.question-text {
    color: var(--teal-900);
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.35;
}

.question-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.875rem;
}

/* One row per answer: icon, explanation, button */
.choice-list {
    display: grid;
    gap: 12px;
}

.choice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    transition: border-color var(--ease), background-color var(--ease);
}

.choice:hover {
    border-color: var(--teal-100);
    background: var(--surface);
}

.choice-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 1.0625rem;
}

.choice-new .choice-icon {
    background: #fbeeec;
    color: var(--maroon);
}

.choice-text {
    flex: 1;
    min-width: 0;
}

.choice-title {
    display: block;
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
}

.choice-hint {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.choice-button {
    flex: 0 0 auto;
    min-width: 104px;
    height: 42px;
    padding: 0 18px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.btn-yes {
    color: #fff;
    background: var(--teal-700);
    border: 1px solid var(--teal-700);
}

.btn-yes:hover {
    background: var(--teal-800);
    border-color: var(--teal-800);
}

.btn-no {
    color: var(--maroon);
    background: var(--surface);
    border: 1px solid var(--maroon);
}

.btn-no:hover {
    color: #fff;
    background: var(--maroon);
}

/* ========================================
   REGISTRATION / OTP
   ======================================== */

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
}

.section-divider::before,
.section-divider::after,
.or-divider::before,
.or-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section-title {
    color: var(--teal-800);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.info-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    border-radius: var(--radius-sm);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-700);
    font-size: 0.8125rem;
    font-weight: 600;
}

.info-value {
    color: var(--teal-900);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timer-message {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 14px;
    padding: 10px 14px;
    background: var(--amber-bg);
    border: 1px solid var(--amber-line);
    border-radius: var(--radius-sm);
    color: var(--amber-text);
    font-size: 0.8125rem;
}

.timer-message i {
    color: var(--amber-icon);
}

.timer-value {
    padding: 2px 8px;
    background: var(--surface);
    border: 1px solid var(--amber-line);
    border-radius: 6px;
    color: var(--amber-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   CHANGE PASSWORD NOTE
   ======================================== */

.info-box {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--amber-bg);
    border: 1px solid var(--amber-line);
    border-radius: var(--radius-sm);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--amber-text);
    font-size: 0.875rem;
}

.info-header i {
    color: var(--amber-icon);
}

.info-content {
    color: var(--ink);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.info-content strong {
    color: var(--maroon);
    font-weight: 600;
}

/* ========================================
   SWEETALERT2
   ======================================== */

.swal2-popup {
    font-family: var(--font) !important;
    border-radius: var(--radius) !important;
}

.swal2-title {
    color: var(--teal-900) !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

.swal2-html-container {
    font-size: 0.9375rem !important;
}

.swal2-confirm {
    border-radius: 999px !important;
    padding: 0.6rem 1.75rem !important;
    font-weight: 600 !important;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--teal-900);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    text-align: center;
    padding: 24px 0;
}

.site-footer p + p {
    margin-top: 6px;
}

.site-footer a {
    color: var(--gold);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 991.98px) {
    .utility-inner {
        justify-content: center;
    }

    .auth-main {
        padding: 32px 0 40px;
    }
}

@media (max-width: 767.98px) {
    .utility-inner {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }

    .portal-badge {
        display: none;
    }

    .site-logo {
        max-height: 54px;
    }

    .header-actions {
        gap: 8px;
    }
}

@media (max-width: 575.98px) {
    .wrap {
        padding: 0 16px;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .auth-main {
        padding: 20px 0 28px;
    }

    .panel-header {
        padding: 22px 20px 18px;
    }

    .panel-title {
        font-size: 1.625rem;
    }

    .panel-body {
        padding: 20px 20px 22px;
    }

    .input-box-with-btn {
        flex-direction: column;
    }

    .input-box-with-btn .icon-left {
        top: 24px;
    }

    .text-input-flex {
        width: 100%;
        flex: 0 0 48px;
    }

    .inline-button {
        width: 100%;
    }

    .button-row {
        flex-direction: column;
    }
}

@media (max-width: 479.98px) {
    .choice {
        flex-wrap: wrap;
    }

    .choice-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .signin-button:hover {
        transform: none;
    }
}
