@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --auth-bg: #f7f9fc;
    --auth-surface: rgba(255, 255, 255, 0.88);
    --auth-surface-solid: #ffffff;
    --auth-surface-soft: #f8fafc;
    --auth-text: #1f2937;
    --auth-heading: #111827;
    --auth-muted: #6b7280;
    --auth-muted-soft: #9ca3af;
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-primary-soft: rgba(37, 99, 235, 0.08);
    --auth-primary-border: rgba(37, 99, 235, 0.16);
    --auth-border: #e5e7eb;
    --auth-border-soft: #eef2f7;
    --auth-danger: #dc2626;
    --auth-info-bg: #eff6ff;
    --auth-info-border: #dbeafe;
    --auth-radius-sm: 10px;
    --auth-radius-md: 14px;
    --auth-radius-lg: 18px;
    --auth-shadow: 0 18px 45px rgba(15, 23, 42, 0.075);
    --auth-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.055);
}

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

html {
    scroll-behavior: smooth;
}

body.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.075), transparent 28%),
        radial-gradient(circle at 86% 24%, rgba(14, 165, 233, 0.07), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, var(--auth-bg) 100%);
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
}

a {
    color: var(--auth-primary);
    text-decoration: none;
}

a:hover {
    color: var(--auth-primary-hover);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.is-hidden,
.block-fields.d-none {
    display: none !important;
}

.block-fields {
    display: contents;
}

/* ==============================
   TOPBAR
============================== */
.auth-topbar {
    position: fixed;
    top: 18px;
    left: 28px;
    right: 28px;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    pointer-events: none;
}

.auth-brand-logo {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    height: 48px;
    pointer-events: auto;
}

.auth-brand-logo img {
    display: block;
    width: auto;
    height: 48px;
    max-width: 150px;
    object-fit: contain;
}

.top-nav-toggle {
    position: relative;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    width: 212px;
    height: 44px;
    padding: 4px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--auth-shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: auto;
}

.nav-toggle-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    border-radius: 999px;
    color: var(--auth-muted);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.nav-toggle-btn:hover {
    color: var(--auth-heading);
}

.nav-toggle-btn.active {
    color: var(--auth-primary);
}

.toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 1;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease;
}

.top-nav-toggle[data-active="daftar"] .toggle-thumb {
    transform: translateX(100%);
}

.theme-toggle-btn {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #475569;
    box-shadow: var(--auth-shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    pointer-events: auto;
    transition: 0.2s ease;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.theme-toggle-btn:hover {
    border-color: var(--auth-primary-border);
    color: var(--auth-primary);
    transform: translateY(-1px);
}

/* ==============================
   LAYOUT
============================== */
.hero-layout {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 74px 24px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-layout-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.left-card-wrapper,
.left-card-wrapper-wide {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-wrapper,
.auth-wrapper-wide {
    width: 100%;
    max-width: 720px;
    animation: authFadeUp 0.4s ease both;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   CARD
============================== */
.auth-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    padding: 24px 26px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--auth-radius-lg);
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.7), rgba(14, 165, 233, 0.46));
}

.auth-choice-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px !important;
}

.registration-form-panel {
    max-width: 720px;
    margin: 0 auto;
}

/* ==============================
   TYPOGRAPHY
============================== */
.auth-title {
    margin: 0 0 6px;
    color: var(--auth-heading);
    font-size: clamp(1.25rem, 1.8vw, 1.58rem);
    font-weight: 650;
    line-height: 1.26;
    letter-spacing: -0.025em;
    text-align: center;
}

.auth-subtitle {
    max-width: 560px;
    margin: 0 auto 15px;
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

.auth-title + .auth-subtitle.mb-3 {
    margin-bottom: 14px !important;
}

.form-label,
.auth-label {
    display: block;
    margin-bottom: 6px !important;
    color: #374151;
    font-size: 0.77rem;
    font-weight: 600;
    line-height: 1.35;
}

.text-danger {
    color: var(--auth-danger) !important;
}

.text-muted.fw-semibold {
    color: #374151 !important;
    font-size: 0.86rem;
    font-weight: 600 !important;
}

strong,
.fw-bold,
.fw-semibold {
    font-weight: 600 !important;
}

small {
    font-weight: 400;
}

/* ==============================
   CHOICE PANEL
============================== */
.auth-choice-clean-head {
    margin-bottom: 18px;
    text-align: center;
}

.register-choice-clean-list {
    display: grid;
    gap: 12px;
}

.register-choice-clean-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--auth-text);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
    transition: 0.2s ease;
}

button.register-choice-clean-item {
    appearance: none;
    -webkit-appearance: none;
}

.register-choice-clean-item:hover,
.register-choice-clean-item:focus-visible {
    color: var(--auth-text);
    border-color: var(--auth-primary-border);
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
    outline: none;
}

.register-choice-clean-left {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.register-choice-clean-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    font-size: 0.98rem;
}

.register-choice-clean-text {
    min-width: 0;
}

.register-choice-clean-text strong {
    display: block;
    margin-bottom: 3px;
    color: var(--auth-heading);
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.register-choice-clean-text small {
    display: block;
    color: var(--auth-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.register-choice-clean-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--auth-surface-soft);
    color: var(--auth-muted-soft);
    font-size: 0.76rem;
    transition: 0.2s ease;
}

.register-choice-clean-item:hover .register-choice-clean-action {
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    transform: translateX(2px);
}

.auth-choice-clean-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--auth-border-soft);
    color: var(--auth-muted);
    font-size: 0.84rem;
    font-weight: 400;
    text-align: center;
}

.auth-choice-clean-note a,
.switch-account-link,
.auth-footer-link a {
    color: var(--auth-primary);
    font-weight: 600;
}

/* ==============================
   FORM SECTION
============================== */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px !important;
}

.auth-card .row {
    --bs-gutter-x: 0.95rem;
    --bs-gutter-y: 0.8rem;
}

.auth-card .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.9rem;
}

.auth-card .row.g-3 {
    --bs-gutter-x: 0.9rem;
    --bs-gutter-y: 0.75rem;
}

.auth-card .row > div[class*="col-"],
.auth-card .row > .block-fields > div[class*="col-"] {
    margin-bottom: 0 !important;
}

.row.g-3 > .col-12:first-child .form-section-header,
.row.g-4 > .col-12:first-child .form-section-header {
    margin-top: 0;
}

.form-section-header span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}

.form-section-header .line {
    flex: 1;
    height: 1px;
    background: var(--auth-border-soft);
}

/* ==============================
   FORM FIELDS
============================== */
.form-control,
.auth-input,
.form-select {
    width: 100%;
    min-height: 40px !important;
    padding: 8px 12px !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 11px !important;
    background-color: #ffffff !important;
    color: var(--auth-text) !important;
    font-size: 0.86rem !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 40px !important;
    padding: 8px 12px !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 11px !important;
    background-color: #ffffff !important;
    color: var(--auth-text) !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control::placeholder,
.auth-input::placeholder {
    color: var(--auth-muted-soft);
    font-weight: 400;
}

.form-control:focus,
.auth-input:focus,
.form-select:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: rgba(37, 99, 235, 0.48) !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08) !important;
    outline: none !important;
}

.form-control.is-invalid,
.was-validated .form-control:invalid,
.form-select.is-invalid,
.was-validated .form-select:invalid {
    border-color: var(--auth-danger) !important;
}

.invalid-feedback {
    margin-top: 4px;
    color: var(--auth-danger);
    font-size: 0.72rem;
    font-weight: 500;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* Select2 */
.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection--single {
    display: flex !important;
    align-items: center !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    width: 100%;
    color: var(--auth-text) !important;
    font-size: 0.84rem;
    font-weight: 400;
}

.select2-container--bootstrap-5 .select2-selection__placeholder {
    color: var(--auth-muted-soft) !important;
    font-weight: 400;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    right: 10px !important;
}

.select2-dropdown {
    border: 1px solid var(--auth-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    border: 1px solid var(--auth-border) !important;
    border-radius: 9px !important;
    padding: 8px 10px !important;
    font-size: 0.84rem;
    outline: none !important;
}

.select2-results__option {
    padding: 9px 11px !important;
    font-size: 0.84rem;
    font-weight: 400;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--auth-primary) !important;
    color: #ffffff !important;
}

/* ==============================
   ALERTS
============================== */
.alert {
    border-radius: 14px !important;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.55;
}

.alert strong {
    font-weight: 600 !important;
}

.auth-info-alert-custom {
    position: relative;
    margin-bottom: 14px;
    padding: 12px 38px 12px 14px;
    border: 1px solid var(--auth-info-border);
    border-left: 3px solid rgba(37, 99, 235, 0.55);
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.82);
    color: #1e3a8a;
    box-shadow: none;
}

.auth-info-alert-custom strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1d4ed8;
    font-size: 0.84rem;
}

.auth-info-alert-custom span {
    display: block;
    margin-top: 3px;
    color: #334155;
    font-size: 0.81rem;
    line-height: 1.45;
}

.alert-danger {
    border-color: rgba(220, 38, 38, 0.14) !important;
    background: rgba(254, 242, 242, 0.88) !important;
    color: #991b1b !important;
}

.alert ul {
    padding-left: 1.05rem;
}

.btn-close {
    transform: scale(0.82);
}

/* ==============================
   CHECKBOX & LINKS
============================== */
.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
}

.auth-checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    border-radius: 5px;
    accent-color: var(--auth-primary);
}

.auth-checkbox-label a {
    color: var(--auth-primary);
    font-weight: 600;
}

.auth-footer-link {
    margin-top: 12px;
    color: var(--auth-muted);
    font-size: 0.84rem;
    font-weight: 400;
    text-align: center;
}

.auth-label-link,
.auth-link-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0 !important;
    background: transparent !important;
    color: var(--auth-muted) !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-label-link:hover,
.auth-link-button:hover {
    color: var(--auth-primary) !important;
}

.auth-back-row {
    margin-top: 12px;
    text-align: center;
}

/* ==============================
   CLOSE BUTTON
============================== */
.auth-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--auth-surface-soft);
    color: var(--auth-muted-soft);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    text-decoration: none;
}

.auth-close-btn:hover {
    background: var(--auth-danger);
    color: #ffffff;
    transform: scale(1.05);
}

body.auth-page[data-bs-theme="dark"] .auth-close-btn,
body.auth-page.dark .auth-close-btn,
body.auth-page.theme-dark .auth-close-btn {
    background: rgba(30, 41, 59, 0.72);
}

body.auth-page[data-bs-theme="dark"] .auth-close-btn:hover,
body.auth-page.dark .auth-close-btn:hover,
body.auth-page.theme-dark .auth-close-btn:hover {
    background: var(--auth-danger);
    color: #ffffff;
}

/* ==============================
   BUTTONS
============================== */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 11px 22px rgba(37, 99, 235, 0.18);
    transition: 0.2s ease;
}

.auth-btn:hover:not(:disabled) {
    color: #ffffff;
    background: linear-gradient(135deg, var(--auth-primary-hover) 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.auth-btn:disabled {
    background: #cbd5e1;
    color: #f8fafc;
    box-shadow: none;
    cursor: not-allowed;
}

hr {
    border-color: var(--auth-border-soft);
    opacity: 1;
}

/* ==============================
   DARK MODE
============================== */
body.auth-page[data-bs-theme="dark"],
body.auth-page.dark,
body.auth-page.theme-dark {
    --auth-bg: #0f172a;
    --auth-surface: rgba(15, 23, 42, 0.82);
    --auth-surface-solid: #111827;
    --auth-surface-soft: #1e293b;
    --auth-text: #e5e7eb;
    --auth-heading: #f8fafc;
    --auth-muted: #a0aec0;
    --auth-muted-soft: #64748b;
    --auth-border: rgba(148, 163, 184, 0.2);
    --auth-border-soft: rgba(148, 163, 184, 0.12);
    color: var(--auth-text);
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.18), transparent 30%),
        radial-gradient(circle at 86% 24%, rgba(14, 165, 233, 0.12), transparent 30%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}

body.auth-page[data-bs-theme="dark"] .top-nav-toggle,
body.auth-page[data-bs-theme="dark"] .theme-toggle-btn,
body.auth-page.dark .top-nav-toggle,
body.auth-page.dark .theme-toggle-btn,
body.auth-page.theme-dark .top-nav-toggle,
body.auth-page.theme-dark .theme-toggle-btn {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.74);
    color: #e5e7eb;
}

body.auth-page[data-bs-theme="dark"] .toggle-thumb,
body.auth-page.dark .toggle-thumb,
body.auth-page.theme-dark .toggle-thumb {
    background: #1e293b;
}

body.auth-page[data-bs-theme="dark"] .nav-toggle-btn.active,
body.auth-page[data-bs-theme="dark"] .nav-toggle-btn:hover {
    color: #f8fafc;
}

body.auth-page[data-bs-theme="dark"] .auth-card,
body.auth-page.dark .auth-card,
body.auth-page.theme-dark .auth-card {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.82);
}

body.auth-page[data-bs-theme="dark"] .register-choice-clean-item,
body.auth-page.dark .register-choice-clean-item,
body.auth-page.theme-dark .register-choice-clean-item {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(30, 41, 59, 0.72);
}

body.auth-page[data-bs-theme="dark"] .register-choice-clean-item:hover,
body.auth-page.dark .register-choice-clean-item:hover,
body.auth-page.theme-dark .register-choice-clean-item:hover {
    background: rgba(30, 41, 59, 0.92);
}

body.auth-page[data-bs-theme="dark"] .form-label,
body.auth-page.dark .form-label,
body.auth-page.theme-dark .form-label,
body.auth-page[data-bs-theme="dark"] .text-muted.fw-semibold {
    color: #e5e7eb !important;
}

body.auth-page[data-bs-theme="dark"] .form-control,
body.auth-page[data-bs-theme="dark"] .auth-input,
body.auth-page[data-bs-theme="dark"] .form-select,
body.auth-page[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
body.auth-page.dark .form-control,
body.auth-page.dark .form-select,
body.auth-page.theme-dark .form-control,
body.auth-page.theme-dark .form-select {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background-color: rgba(15, 23, 42, 0.72) !important;
    color: #f8fafc !important;
}

body.auth-page[data-bs-theme="dark"] .form-control:focus,
body.auth-page[data-bs-theme="dark"] .form-select:focus,
body.auth-page[data-bs-theme="dark"] .select2-container--bootstrap-5.select2-container--focus .select2-selection,
body.auth-page[data-bs-theme="dark"] .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: rgba(96, 165, 250, 0.52) !important;
    background-color: #0f172a !important;
}

body.auth-page[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
body.auth-page[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__placeholder {
    color: #e5e7eb !important;
}

body.auth-page[data-bs-theme="dark"] .select2-dropdown,
body.auth-page.dark .select2-dropdown,
body.auth-page.theme-dark .select2-dropdown {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827 !important;
}

body.auth-page[data-bs-theme="dark"] .select2-results__option {
    color: #e5e7eb !important;
}

body.auth-page[data-bs-theme="dark"] .auth-info-alert-custom,
body.auth-page.dark .auth-info-alert-custom,
body.auth-page.theme-dark .auth-info-alert-custom {
    border-color: rgba(59, 130, 246, 0.2);
    border-left-color: rgba(96, 165, 250, 0.62);
    background: rgba(30, 41, 59, 0.72);
    color: #bfdbfe;
}

body.auth-page[data-bs-theme="dark"] .auth-info-alert-custom strong,
body.auth-page[data-bs-theme="dark"] .auth-info-alert-custom span {
    color: #bfdbfe;
}

body.auth-page[data-bs-theme="dark"] .alert-danger,
body.auth-page.dark .alert-danger,
body.auth-page.theme-dark .alert-danger {
    border-color: rgba(248, 113, 113, 0.22) !important;
    background: rgba(127, 29, 29, 0.28) !important;
    color: #fecaca !important;
}

body.auth-page[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
    .auth-topbar {
        top: 12px;
        left: 14px;
        right: 14px;
        grid-template-columns: auto 1fr auto;
        gap: 9px;
    }

    .auth-brand-logo,
    .auth-brand-logo img {
        height: 40px;
    }

    .auth-brand-logo img {
        max-width: 105px;
    }

    .top-nav-toggle {
        width: min(208px, 100%);
        height: 40px;
    }

    .nav-toggle-btn {
        font-size: 0.8rem;
    }

    .theme-toggle-btn {
        width: 40px;
        height: 40px;
    }

    .hero-layout {
        padding: 70px 14px 24px;
    }

    .auth-card,
    .auth-choice-card,
    .auth-login-card {
        padding: 22px !important;
        border-radius: 16px;
    }

    .auth-card .row,
    .auth-card .row.g-3,
    .auth-card .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.7rem;
    }

    .auth-title {
        font-size: 1.28rem;
    }

    .auth-subtitle {
        margin-bottom: 13px;
        font-size: 0.86rem;
    }

    .register-choice-clean-item {
        gap: 12px;
        padding: 14px;
        border-radius: 14px;
    }

    .register-choice-clean-left {
        gap: 11px;
    }

    .register-choice-clean-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .register-choice-clean-text strong {
        font-size: 0.9rem;
    }

    .register-choice-clean-text small {
        font-size: 0.76rem;
    }

    .register-choice-clean-action {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .form-section-header {
        margin: 16px 0 10px !important;
    }

    .form-section-header span {
        font-size: 0.68rem;
        padding: 5px 9px;
    }

    .form-control,
    .auth-input,
    .form-select,
    .select2-container--bootstrap-5 .select2-selection {
        min-height: 40px !important;
        font-size: 0.84rem !important;
    }

    .auth-btn {
        min-height: 42px;
        font-size: 0.84rem;
    }
}

@media (max-width: 430px) {
    .auth-topbar {
        left: 10px;
        right: 10px;
        gap: 7px;
    }

    .auth-brand-logo,
    .auth-brand-logo img {
        height: 34px;
    }

    .auth-brand-logo img {
        max-width: 78px;
    }

    .top-nav-toggle {
        width: min(196px, calc(100vw - 106px));
        min-width: 168px;
        height: 38px;
    }

    .nav-toggle-btn {
        font-size: 0.75rem;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .hero-layout {
        padding: 66px 10px 22px;
    }

    .auth-card,
    .auth-choice-card,
    .auth-login-card {
        padding: 20px !important;
    }

    .auth-card .row,
    .auth-card .row.g-3,
    .auth-card .row.g-4 {
        --bs-gutter-y: 0.65rem;
    }

    .form-label,
    .auth-label {
        margin-bottom: 5px !important;
    }

    .form-control,
    .auth-input,
    .form-select,
    .select2-container--bootstrap-5 .select2-selection {
        min-height: 39px !important;
        padding: 8px 11px !important;
    }

    .register-choice-clean-item {
        padding: 13px;
    }

    .register-choice-clean-action {
        display: none;
    }

    .auth-info-alert-custom {
        padding-right: 36px;
    }
}

/* ==============================
   SAVED ACCOUNT PROFILE CARD
============================== */
.profile-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--auth-surface-soft);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin: 0;
    overflow: hidden;
}

.profile-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: var(--auth-surface);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.profile-avatar {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--auth-primary);
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    text-transform: uppercase;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.profile-card:hover .profile-avatar {
    transform: scale(1.05) rotate(-3deg);
    background: linear-gradient(135deg, var(--auth-primary), #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
    border-color: transparent;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.remove-account-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    opacity: 0.6;
}

.profile-card:hover .remove-account-btn {
    opacity: 1;
}

.remove-account-btn:hover {
    color: #ef4444;
    background: #fef2f2;
    transform: scale(1.1);
}

.auth-password-toggle { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 0.25rem; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s; border-radius: 50%; }
.auth-password-toggle:hover { color: var(--auth-primary); background: rgba(32, 107, 196, 0.05); }
.auth-input-group { position: relative; }

.auth-login-card {
    padding: 30px 28px !important;
    border-radius: 18px !important;
}

@media (max-width: 768px) {
    .auth-login-card {
        padding: 20px !important;
    }
}
