﻿:root {
    --auth-bg: #050816;
    --auth-bg-2: #091224;
    --auth-surface: rgba(9, 16, 31, 0.72);
    --auth-surface-strong: rgba(12, 21, 40, 0.86);
    --auth-line: rgba(255, 255, 255, 0.09);
    --auth-line-strong: rgba(255, 255, 255, 0.16);
    --auth-text: #eef4ff;
    --auth-muted: #9caecb;
    --auth-cyan: #67e8f9;
    --auth-blue: #60a5fa;
    --auth-violet: #8b5cf6;
    --auth-emerald: #34d399;
    --auth-red: #ef4444;
    --auth-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --auth-radius-xl: 28px;
    --auth-radius-lg: 22px;
    --auth-radius-md: 18px;
}

html,
body {
    min-height: 100%;
}

body.auth-shell {
    position: relative;
    margin: 0;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 15% 20%, rgba(103, 232, 249, 0.10), transparent 26%),
        radial-gradient(circle at 85% 10%, rgba(139, 92, 246, 0.15), transparent 24%),
        radial-gradient(circle at 50% 80%, rgba(96, 165, 250, 0.10), transparent 25%),
        linear-gradient(180deg, #040713 0%, #07101f 52%, #030711 100%);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 36%, transparent 88%);
    opacity: 0.28;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(38px);
    opacity: 0.65;
}

.auth-orb-1 {
    width: 320px;
    height: 320px;
    left: 4%;
    top: 8%;
    background: rgba(103, 232, 249, 0.18);
}

.auth-orb-2 {
    width: 360px;
    height: 360px;
    right: 4%;
    top: 12%;
    background: rgba(139, 92, 246, 0.20);
}

.auth-orb-3 {
    width: 260px;
    height: 260px;
    left: 45%;
    bottom: 5%;
    background: rgba(96, 165, 250, 0.16);
}

.auth-header,
.auth-main,
.auth-footer {
    position: relative;
    z-index: 1;
}

.auth-header {
    padding: 22px 0 0;
}

.auth-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--auth-line);
    border-radius: 22px;
    background: rgba(8, 14, 28, 0.55);
    backdrop-filter: blur(16px);
    box-shadow: var(--auth-shadow);
}

.auth-brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-text);
}

.auth-brand:hover {
    color: var(--auth-text);
}

.auth-brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-cyan), var(--auth-violet));
    color: #08111f;
    font-weight: 800;
    box-shadow: 0 0 24px rgba(103, 232, 249, 0.28);
}

.auth-brand-word {
    font-family: 'Pacifico', cursive;
    font-size: 1.45rem;
    line-height: 1;
    color: #ffffff;
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-user-chip {
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 28px 0 34px;
}

.auth-stage {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: stretch;
}

.auth-story-panel,
.auth-card {
    border: 1px solid var(--auth-line);
    background: linear-gradient(180deg, rgba(12, 21, 40, 0.72), rgba(7, 12, 24, 0.82));
    backdrop-filter: blur(18px);
    box-shadow: var(--auth-shadow);
}

.auth-story-panel {
    border-radius: var(--auth-radius-xl);
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 620px;
}

.auth-story-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(103, 232, 249, 0.25);
    background: rgba(103, 232, 249, 0.08);
    color: #d9faff;
    font-size: 0.84rem;
    margin-bottom: 20px;
}

.auth-story-title {
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 18px;
    max-width: 620px;
}

.auth-story-title span {
    display: block;
    background: linear-gradient(90deg, #ffffff, #8ae8ff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-story-text {
    margin: 0 0 28px;
    color: var(--auth-muted);
    line-height: 1.8;
    max-width: 580px;
    font-size: 1.02rem;
}

.auth-story-cards {
    display: grid;
    gap: 14px;
}

.auth-story-card {
    padding: 18px 18px;
    border-radius: 18px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
}

.auth-story-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.auth-story-card span {
    color: var(--auth-muted);
    font-size: 0.94rem;
}

.auth-programme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.auth-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-tag-blue {
    background: rgba(96, 165, 250, 0.16);
    color: #d7e9ff;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.auth-tag-purple {
    background: rgba(139, 92, 246, 0.16);
    color: #ece0ff;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.auth-crest-wrap {
    margin-top: 28px;
}

.auth-crest {
    height: 72px;
    width: auto;
    display: block;
    opacity: 0.95;
}

.auth-card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    border-radius: var(--auth-radius-xl);
    padding: 34px;
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-kicker {
    color: var(--auth-cyan);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.auth-title {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.75;
}

.auth-form .form-floating > label {
    color: #8ea4c7;
}

.auth-input,
.form-check-input {
    border-color: var(--auth-line-strong);
}

.auth-input.form-control {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-line-strong);
    border-radius: 16px;
    min-height: 58px;
}

.auth-input.form-control::placeholder {
    color: transparent;
}

.auth-input.form-control:focus {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(103, 232, 249, 0.45);
    box-shadow: 0 0 0 0.22rem rgba(103, 232, 249, 0.14);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-text);
    -webkit-box-shadow: 0 0 0 1000px rgba(18, 27, 46, 1) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    border: 0;
    background: transparent;
    color: var(--auth-cyan);
    font-weight: 700;
    font-size: 0.86rem;
    padding: 4px 6px;
}

.auth-password-toggle:hover {
    color: #a5f3fc;
}

.auth-password-toggle:focus {
    outline: none;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.form-check-input {
    background-color: rgba(255,255,255,0.06);
}

.form-check-input:checked {
    background-color: var(--auth-cyan);
    border-color: var(--auth-cyan);
}

.form-check-label {
    color: var(--auth-muted);
}

.auth-inline-link {
    color: var(--auth-cyan);
    text-decoration: none;
    font-size: 0.94rem;
}

.auth-inline-link:hover {
    color: #b7f8ff;
    text-decoration: underline;
}

.auth-btn {
    border-radius: 16px;
    font-weight: 700;
    min-height: 48px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
}

.auth-btn-primary {
    color: #07111f;
    background: linear-gradient(135deg, var(--auth-cyan), var(--auth-blue));
    border: none;
    box-shadow: 0 14px 36px rgba(103, 232, 249, 0.22);
}

.auth-btn-primary:hover,
.auth-btn-primary:focus {
    color: #07111f;
    background: linear-gradient(135deg, var(--auth-cyan), var(--auth-blue));
}

.auth-btn-secondary {
    color: var(--auth-text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--auth-line);
}

.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
    color: var(--auth-text);
    background: rgba(255,255,255,0.08);
    border-color: rgba(103, 232, 249, 0.22);
}

.auth-btn-ghost {
    color: var(--auth-text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--auth-line);
}

.auth-btn-ghost:hover,
.auth-btn-ghost:focus {
    color: var(--auth-text);
    background: rgba(255,255,255,0.08);
}

.auth-btn-danger {
    color: #fff;
    background: var(--auth-red);
    border: 1px solid var(--auth-red);
}

.auth-btn-danger:hover,
.auth-btn-danger:focus {
    color: #fff;
    background: #dc2626;
    border-color: #dc2626;
}

.auth-btn-linklike {
    color: var(--auth-muted);
    background: transparent;
    border: 1px solid transparent;
}

.auth-btn-linklike:hover,
.auth-btn-linklike:focus {
    color: var(--auth-text);
    background: rgba(255,255,255,0.04);
    border-color: var(--auth-line);
}

.auth-divider {
    position: relative;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid var(--auth-line);
    transform: translateY(-50%);
}

.auth-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 14px;
    color: var(--auth-muted);
    background: rgba(10, 18, 34, 0.95);
    font-size: 0.92rem;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 0.94rem;
}

.auth-alert-success {
    color: #d1fae5;
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.22);
}

.auth-alert-info {
    color: #dbeafe;
    background: rgba(96, 165, 250, 0.10);
    border-color: rgba(96, 165, 250, 0.22);
}

.auth-alert-danger {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.22);
}

.auth-validation-summary {
    color: #fecaca;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.22);
    font-size: 0.92rem;
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 18px 0 24px;
}

.auth-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--auth-muted);
    font-size: 0.92rem;
}

.auth-footer-link {
    color: var(--auth-cyan);
    text-decoration: none;
}

.auth-footer-link:hover {
    color: #b7f8ff;
    text-decoration: underline;
}

/* SweetAlert polish */
.swal2-popup {
    border-radius: 22px !important;
}

.swal2-actions {
    gap: 0.5rem !important;
}

div:where(.swal2-container) .swal2-popup {
    background: #0d1528 !important;
    color: #eef4ff !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
}

div:where(.swal2-container) .swal2-confirm,
div:where(.swal2-container) .swal2-cancel {
    border-radius: 14px !important;
    font-weight: 700 !important;
}



.auth-institution-block {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.auth-crest-shell {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07));
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 10px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.12);
}

.auth-crest {
    width: 64px;
    height: auto;
    display: block;
    object-fit: contain;
    opacity: 1;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}

.auth-institution-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.auth-institution-kicker {
    color: var(--auth-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-institution-name {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-institution-subtitle {
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-story-footer-note {
    margin-top: 28px;
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 460px;
}

/* Register page */
.auth-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-choice-card {
    display: block;
    height: 100%;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

    .auth-choice-card:hover {
        transform: translateY(-2px);
        border-color: rgba(103, 232, 249, 0.22);
        background: rgba(255, 255, 255, 0.06);
    }

    .auth-choice-card strong {
        display: block;
        color: #ffffff;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .auth-choice-card span {
        display: block;
        color: var(--auth-muted);
        line-height: 1.65;
        font-size: 0.92rem;
    }

.auth-choice-input:checked + .auth-choice-card {
    border-color: rgba(103, 232, 249, 0.35);
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: 0 12px 30px rgba(103, 232, 249, 0.10);
}

.auth-section-panel {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.03);
}

.auth-section-head {
    margin-bottom: 18px;
}

.auth-section-kicker {
    color: var(--auth-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.auth-section-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
}

.auth-section-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.auth-help-text {
    color: var(--auth-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.auth-form .form-text {
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.auth-input.form-select {
    color: var(--auth-text);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-line-strong);
    border-radius: 16px;
    min-height: 58px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238ea4c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

    .auth-input.form-select:focus {
        color: var(--auth-text);
        background-color: rgba(255, 255, 255, 0.07);
        border-color: rgba(103, 232, 249, 0.45);
        box-shadow: 0 0 0 0.22rem rgba(103, 232, 249, 0.14);
    }

    .auth-input.form-select option {
        color: #0f172a;
    }

.auth-input[readonly] {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.04);
    opacity: 1;
    cursor: default;
}

@media (max-width: 767.98px) {
    .auth-choice-grid {
        grid-template-columns: 1fr;
    }

    .auth-section-panel {
        padding: 18px;
        border-radius: 20px;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .auth-stage {
        grid-template-columns: 1fr;
    }

    .auth-story-panel {
        min-height: auto;
        padding: 26px;
    }

    .auth-card {
        max-width: none;
        padding: 26px;
    }
}

@media (max-width: 575.98px) {
    .auth-header {
        padding-top: 16px;
    }

    .auth-header-inner {
        padding: 12px 14px;
    }

    .auth-main {
        padding: 20px 0 24px;
    }

    .auth-story-panel,
    .auth-card {
        border-radius: 22px;
        padding: 20px;
    }

    .auth-story-title {
        font-size: 2rem;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-crest {
        height: 54px;
    }

    .auth-institution-block {
        display: flex;
        align-items: center;
        gap: 18px;
        margin-bottom: 24px;
        padding: 18px 20px;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 22px;
        background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }

    .auth-crest-shell {
        flex: 0 0 auto;
        width: 96px;
        height: 96px;
        display: grid;
        place-items: center;
        border-radius: 22px;
        background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07));
        border: 1px solid rgba(255,255,255,0.16);
        box-shadow: 0 10px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.12);
    }

    .auth-crest {
        width: 64px;
        height: auto;
        display: block;
        object-fit: contain;
        filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
    }

    .auth-institution-copy {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .auth-institution-kicker {
        color: var(--auth-cyan);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .auth-institution-name {
        color: #ffffff;
        font-size: 1.15rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .auth-institution-subtitle {
        color: var(--auth-muted);
        font-size: 0.92rem;
        line-height: 1.5;
    }


}

@media (max-width: 767.98px) {
    .auth-institution-block {
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .auth-crest-shell {
        width: 78px;
        height: 78px;
        border-radius: 18px;
    }

    .auth-crest {
        width: 52px;
    }

    .auth-institution-name {
        font-size: 1rem;
    }

    .auth-institution-subtitle {
        font-size: 0.86rem;
    }
}

