* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --brand-blue-top: #0d2792;
    --brand-blue-bottom: #036ca0;
    --ink-strong: #121212;
    --ink-soft: #666e7d;
    --line-blue: #8ea8dc;
    --field-bg: #f8faff;
    --action-blue: #080b86;
}

body {
    min-height: 100vh;
    font-family: "DM Sans", sans-serif;
    background: #eef2f7;
    color: var(--ink-strong);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 45% 55%;
}

.brand-panel {
    background: linear-gradient(180deg, var(--brand-blue-top) 0%, var(--brand-blue-bottom) 100%);
    color: #fff;
    padding: 24px 26px 14px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.home-link {
    align-self: flex-start;
    color: #ffffff;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    opacity: 0.96;
    transform: translate(-4px, -8px);
}

.home-link svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.brand-content {
    width: min(520px, 90%);
    margin: auto;
}

.hand-image {
    width: min(310px, 70vw);
    display: block;
    margin: 0 auto 0;
    object-fit: contain;
    transform: translateX(-14px);
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.25));
}

.brand-title {
    font-family: "Eczar", serif;
    font-size: clamp(1.4rem, 4.1vw, 3.7rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    text-align: center;
}

.brand-tagline {
    margin-top: 2px;
    font-family: "Grey Qo", cursive;
    font-size: clamp(3.5rem, 3.9vw, 3.25rem);
    text-align: center;
    line-height: 1;
}

.brand-description {
    margin-top: calc(54px + 4vh);
    font-size: clamp(0.84rem, 1vw, 1.12rem);
    line-height: 1.4;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.brand-footer {
    margin-top: auto;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    opacity: 0.98;
}

.brand-footer a {
    position: relative;
    color: #fff;
    text-decoration: none;
}

.brand-footer a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.brand-footer a:hover::after,
.brand-footer a:focus-visible::after {
    transform: scaleX(1);
}

.form-panel {
    background: #fbfdff;
    display: grid;
    place-items: center;
    padding: 24px;
}

.form-wrap {
    --form-content-width: 92%;
    width: min(560px, 100%);
    margin-top: 26px;
}

.school-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    width: var(--form-content-width);
    margin-left: auto;
    margin-right: auto;
}

.school-logo {
    width: 42px;
    height: 46px;
    object-fit: contain;
}

.school-logo[src$="BIIS.png"] {
    transform: scale(1.08);
    transform-origin: center;
}

.school-name {
    font-family: "Figtree", sans-serif;
    font-size: clamp(1rem, 1.42vw, 1.7rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.school-subtitle {
    font-family: "DM Sans", sans-serif;
    font-size: 0.88rem;
    color: #636c7a;
    margin-top: 2px;
}

.form-wrap h2 {
    font-family: "Figtree", sans-serif;
    font-size: clamp(1.35rem, 1.85vw, 2rem);
    margin-bottom: 3px;
    font-weight: 700;
    width: var(--form-content-width);
    margin-left: auto;
    margin-right: auto;
}

.form-subtitle {
    color: #3d4452;
    margin-bottom: 30px;
    font-size: 1rem;
    width: var(--form-content-width);
    margin-left: auto;
    margin-right: auto;
}

.login-form {
    width: var(--form-content-width);
    max-width: 500px;
    margin: 0 auto;
}

.login-form label {
    display: block;
    color: #374151;
    margin-bottom: 0.375rem;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: 13px;
}

.required {
    color: #d70000;
}

.input-shell {
    margin-top: 0;
    margin-bottom: 18px;
    min-height: 54px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    transition: all 0.2s;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.input-shell:focus-within {
    border-color: #00088d;
    box-shadow: 0 0 0 2px rgba(0, 8, 141, 0.2);
}

.input-shell svg {
    width: 20px;
    height: 20px;
    fill: #97a1af;
    flex: 0 0 auto;
}

.field-icon.material-symbols-outlined {
    font-size: 22px;
    color: #97a1af;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    flex: 0 0 auto;
}

.input-shell input {
    width: 100%;
    border: 0;
    outline: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    background: transparent;
}

.input-shell input::placeholder {
    color: #a3aabc;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.eye-btn {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    align-items: center;
    justify-content: center;
    color: #8d95a3;
}

.toggle-eye-icon.material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}

.login-form label,
.sign-in-btn {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.sign-in-btn {
    font-family: "Figtree", sans-serif;
    width: 100%;
    margin-top: 4px;
    height: 52px;
    border: 0;
    border-radius: 7px;
    background: var(--action-blue);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
}

.sign-in-btn:hover {
    filter: brightness(1.08);
}

.login-message {
    overflow-wrap: break-word;
    word-break: break-word;
}

.support-line {
    text-align: center;
    margin-top: 14px;
    color: #687181;
    font-size: 0.92rem;
    width: var(--form-content-width);
    margin-left: auto;
    margin-right: auto;
}

.support-line a {
    color: #3d56c4;
    text-decoration: none;
}

.privacy-modal-open {
    overflow: hidden;
}

.privacy-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.privacy-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.privacy-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 18, 48, 0.62);
    backdrop-filter: blur(6px);
}

.privacy-modal__dialog {
    position: relative;
    width: min(1020px, 100%);
    max-height: min(88vh, 840px);
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(231, 236, 247, 0.9);
    box-shadow: 0 30px 80px rgba(9, 20, 61, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
    outline: none;
}

.privacy-modal__close {
    position: absolute;
    top: 20px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
}

.privacy-modal__hero {
    padding: 26px 88px 28px 36px;
    background: linear-gradient(135deg, #0d2792 0%, #036ca0 100%);
    color: #ffffff;
}

.privacy-modal__hero h2 {
    font-family: "Figtree", sans-serif;
    font-size: clamp(2rem, 3.3vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.privacy-modal__intro {
    margin-top: 10px;
    max-width: 760px;
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
}

.privacy-modal__body {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    gap: 26px;
    padding: 28px 26px 28px 26px;
    background: #fffdf8;
}

.privacy-modal__toc {
    align-self: start;
    padding: 16px 19px 10px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.12);
}

.privacy-modal__toc-title {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: "DM Sans", sans-serif;
    color: #1a1a1a;
}

.privacy-modal__toc-links {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.privacy-modal__toc-link {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 12px 12px;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    background: #ffffff;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.privacy-modal__toc-link::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #2b43a4;
}

.privacy-modal__toc-link:hover,
.privacy-modal__toc-link:focus-visible,
.privacy-modal__toc-link.is-active {
    background: #09177a;
    color: #ffffff;
    box-shadow: 0 4px 16px 0 rgba(9, 23, 122, 0.13);
}

.privacy-modal__toc-link:hover::before,
.privacy-modal__toc-link:focus-visible::before,
.privacy-modal__toc-link.is-active::before {
    color: #ffffff;
}

.privacy-policy {
    padding: 0 6px 0 0;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.privacy-policy::-webkit-scrollbar {
    width: 10px;
}

.privacy-policy::-webkit-scrollbar-track {
    background: transparent;
}

.privacy-policy::-webkit-scrollbar-thumb {
    background: #1e34bb;
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.privacy-policy {
    scrollbar-color: #1e34bb transparent;
    scrollbar-width: thin;
}

.privacy-policy__section + .privacy-policy__section {
    margin-top: 16px;
}

.privacy-policy__section {
    padding: 22px 24px 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #dbe7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.privacy-policy__section-head {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.privacy-policy__section-index {
    min-width: 50px;
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eaf1ff;
    font-size: 0.95rem;
    letter-spacing: 0;
    font-weight: 700;
    color: #2b43a4;
    text-transform: none;
}

.privacy-policy__section h3 {
    margin-top: 0;
    font-family: "Figtree", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #21316c;
}

.privacy-policy__section p,
.privacy-policy__list {
    color: #6a7898;
    line-height: 1.6;
    font-size: 0.94rem;
}

.privacy-policy__list {
    padding-left: 20px;
}

.privacy-policy__list li + li {
    margin-top: 12px;
}

.privacy-policy__list strong {
    color: #2f3d61;
}

.privacy-modal__note {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #dbe7ff;
    color: #52627f;
    line-height: 1.6;
}

.privacy-modal__note a {
    color: #1f2795;
    font-weight: 700;
}

@media (max-width: 1060px) {
    .login-page {
        display: block;
        position: relative;
    }

    .brand-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        min-height: auto;
        background: transparent;
        pointer-events: none;
        z-index: 10;
    }

    .home-link {
        pointer-events: auto;
        color: black;
        margin-right: auto;
        transform: none;
    }

    .brand-content,
    .brand-footer {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        align-items: center;
    }

    .form-wrap {
        transform: scale(1.05);
    }
}

@media (max-width: 820px) {
    .privacy-modal {
        padding: 12px;
    }

    .privacy-modal__dialog {
        max-height: 90vh;
        border-radius: 24px;
    }

    .privacy-modal__hero {
        padding: 24px 66px 20px 20px;
    }

    .privacy-modal__body {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .privacy-modal__toc {
        padding: 18px 16px;
    }

    .privacy-modal__toc-links {
        grid-template-columns: 1fr;
    }

    .privacy-policy {
        padding-right: 2px;
    }

    .privacy-policy__section {
        padding: 18px;
    }

    .privacy-policy__section-head {
        align-items: flex-start;
    }

    .privacy-policy__section h3 {
        font-size: 0.96rem;
    }
}

@media (max-width: 580px) {
    .brand-panel {
        padding: 16px;
    }

    .form-panel {
        padding: 18px 14px;
    }

    .form-wrap {
        margin-top: 12px;
        transform: none;
    }

    .school-name {
        font-size: 1rem;
    }

    .school-subtitle {
        font-size: 0.75rem;
    }

    .form-wrap h2 {
        font-size: 1.7rem;
    }

    .sign-in-btn {
        font-size: 0.98rem;
        height: 50px;
    }
}
