/* Auth + legacy dark UI — aligned with RadarNet main app */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');
@import url('a11y.css');

:root {
    --bg: #0b1220;
    --surface: #0f172a;
    --panel: #0f172a;
    --panel-2: #101b34;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #22304a;
    --primary: #135bec;
    --primary-10: rgba(19, 91, 236, 0.16);
    --primary-20: rgba(19, 91, 236, 0.28);
    --danger: #f87171;
    --success: #4ade80;
    /* legacy aliases */
    --teal: #3b82f6;
    --teal-2: #2563eb;
    --blue-1: #135bec;
    --blue-2: #0f4ed4;
    --purple: #7c3aed;
}

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

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Public Sans', ui-sans-serif, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    position: relative;
}

body.auth-page {
    --bg: #f3faec;
    --surface: #ffffff;
    --text: #271f3f;
    --muted: #645a78;
    --border: #ded6e8;
    --border-control: #85779d;
    --primary: #4f3488;
    --primary-hover: #3f286e;
    --primary-10: rgba(79, 52, 136, 0.10);
    --primary-20: rgba(79, 52, 136, 0.20);
    --danger: #b42318;
    --success: #166534;
    background: var(--bg);
    color: var(--text);
}

body.auth-page::before {
    display: none;
}

/* Keep the backdrop as a single fixed layer (prevents tiling/seams as content height changes) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(19, 91, 236, 0.22), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(59, 130, 246, 0.12), transparent 55%),
        var(--bg);
    background-repeat: no-repeat;
}

.container {
    width: min(1280px, 96vw);
    margin: 18px auto 40px;
}

/* Global search bar: sticky below topbar, hides when user scrolls down */
.search-bar-wrap {
    position: sticky;
    top: 54px; /* below topbar */
    z-index: 40;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.97));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.search-bar-wrap.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(900px, 92vw);
    margin: 0 auto;
    padding: 0 16px;
}

.search-bar__label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}

.search-bar__input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 6, 14, 0.4);
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.search-bar__input::placeholder {
    color: var(--muted);
}

.search-bar__input:focus {
    border-color: rgba(29, 214, 182, 0.6);
    box-shadow: 0 0 0 3px rgba(29, 214, 182, 0.15);
}

.search-bar__btn {
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(29, 214, 182, 0.5);
    background: rgba(29, 214, 182, 0.15);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.search-bar__btn:hover {
    background: rgba(29, 214, 182, 0.25);
    border-color: rgba(29, 214, 182, 0.7);
}

/* Main layout: table left, filters sidebar right */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 14px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Filters sidebar: right, slides to narrow strip when collapsed so table expands */
.filters-sidebar {
    flex-shrink: 0;
    width: 260px;
    position: sticky;
    top: 80px;
    overflow: hidden;
    transition: width 0.3s ease-out;
}

.filters-sidebar.filters-sidebar--collapsed {
    width: 44px;
}

.filters-sidebar__toggle {
    width: 100%;
    min-width: 44px;
    cursor: pointer;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: padding 0.2s ease, border-radius 0.2s ease;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__toggle {
    justify-content: center;
    padding: 12px 8px;
    border-radius: 10px 0 0 10px;
}

.filters-sidebar__toggle-icon {
    display: none;
    width: 20px;
    height: 20px;
    color: currentColor;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__toggle .filters-sidebar__toggle-text {
    display: none;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__toggle .filters-sidebar__toggle-icon {
    display: block;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__toggle::after {
    content: none;
}

.filters-sidebar__toggle:hover {
    border-color: rgba(29, 214, 182, 0.4);
    background: rgba(29, 214, 182, 0.08);
}

.filters-sidebar__toggle::after {
    content: "▼";
    font-size: 10px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__toggle::after {
    transform: none;
}

.filters-sidebar__panel {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.55);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.filters-sidebar.filters-sidebar--collapsed .filters-sidebar__panel {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

.filters {
    margin: 14px 0 14px;
}

.filters__form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.55);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.filters-sidebar .filters__form {
    flex-direction: column;
    align-items: stretch;
}

.filters-sidebar .filters__actions {
    margin-left: 0;
}

.field {
    display: grid;
    gap: 6px;
    min-width: 180px;
}

.field__label {
    font-size: 12px;
    color: rgba(229, 231, 235, 0.78);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 700;
}

.field__control {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(3, 6, 14, 0.35);
    color: rgba(229, 231, 235, 0.92);
    outline: none;
}

/* Field control wrap (e.g. password visibility toggle) */
.field__control-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field__control--with-toggle {
    padding-inline-end: 44px;
}

.field__toggle {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 10px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(229, 231, 235, 0.85);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.field__toggle:hover {
    background: var(--primary-10);
    color: rgba(229, 231, 235, 0.95);
}

.field__toggle:focus {
    outline: none;
}

.field__toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.field__toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.field__toggle--active {
    color: var(--primary);
}

/* Do not use appearance:none on type=date — it removes the calendar control in Chromium */
.field__control:not(.field__control--date) {
    appearance: none;
}

.field__control:focus {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 3px var(--primary-10);
}

/* Native calendar glyph is dark; invert so it reads as light on the dark field */
.field__control--date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    padding: 6px;
    margin-left: 4px;
    filter: invert(1) brightness(1.15);
}

.field__control--date::-webkit-calendar-picker-indicator:hover {
    filter: invert(1) brightness(1.4);
}

.filters__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.btn {
    cursor: pointer;
    border: 1px solid var(--primary-20);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-family: inherit;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:hover {
    background: #0f4ed4;
    border-color: #0f4ed4;
    box-shadow: 0 0 0 3px var(--primary-10);
}

.btn--ghost {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.25);
}

.btn--ghost:hover {
    border-color: rgba(124, 58, 237, 0.40);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
    background: rgba(124, 58, 237, 0.16);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(30, 79, 180, 0.95), rgba(24, 59, 134, 0.9));
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.topbar__title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.topbar__meta {
    color: rgba(229, 231, 235, 0.85);
    font-size: 13px;
    margin-top: 2px;
}

.topbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
}

.pill:hover {
    border-color: rgba(29, 214, 182, 0.45);
    box-shadow: 0 0 0 3px rgba(29, 214, 182, 0.15);
}

.table-wrap {
    background: linear-gradient(180deg, rgba(16, 27, 52, 0.9), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

table.results-table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(6px);
    color: rgba(229, 231, 235, 0.92);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sortable-th {
    white-space: nowrap;
}

a.th-sort {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

a.th-sort:hover {
    color: var(--teal);
}

.sort-indicator {
    font-size: 12px;
    color: var(--teal);
}

.sortable-th .sort-arrow {
    margin-left: 4px;
}

.sort-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 14px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.sort-arrow:hover {
    color: var(--teal);
    background: rgba(29, 214, 182, 0.15);
}

th, td {
    padding: 12px 12px;
    text-align: left;
    vertical-align: top;
}

tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 16, 31, 0.12);
}

tbody tr:nth-child(2n) {
    background: rgba(16, 27, 52, 0.25);
}

tbody tr:hover {
    background: rgba(29, 214, 182, 0.08);
}

td.title-cell {
    font-weight: 600;
    color: rgba(229, 231, 235, 0.96);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: rgba(229, 231, 235, 0.86);
    font-size: 13px;
}

.link {
    color: #93c5fd;
    font-weight: 600;
    text-decoration: none;
}

.link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

button.pdf-btn {
    cursor: pointer;
    border: 1px solid rgba(29, 214, 182, 0.45);
    background: rgba(29, 214, 182, 0.12);
    color: rgba(229, 231, 235, 0.95);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
}

button.pdf-btn:hover {
    border-color: rgba(29, 214, 182, 0.8);
    box-shadow: 0 0 0 3px rgba(29, 214, 182, 0.14);
    background: rgba(29, 214, 182, 0.18);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(3, 6, 14, 0.72);
    backdrop-filter: blur(4px);
}
.modal-content {
    background: linear-gradient(180deg, rgba(16, 27, 52, 0.96), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    margin: 6vh auto;
    padding: 18px 18px 10px;
    width: min(920px, 92vw);
    max-height: 86vh;
    overflow: auto;
    box-shadow: 0 18px 64px rgba(0, 0, 0, 0.55);
}
#close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    color: rgba(229, 231, 235, 0.85);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

#close:hover {
    background: rgba(124, 58, 237, 0.18);
    color: rgba(229, 231, 235, 0.98);
}

#modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#modal-table th {
    text-align: left;
    color: rgba(229, 231, 235, 0.9);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    padding: 10px 10px;
}

#modal-table td {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 10px 10px;
    color: rgba(229, 231, 235, 0.9);
}

#modal-table pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(3, 6, 14, 0.35);
    color: rgba(229, 231, 235, 0.9);
}

/* Auth pages */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 32px;
}

.auth-brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.auth-brand__logo .material-symbols-outlined {
    font-size: 22px;
}

.auth-brand__name {
    font-size: 21px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0;
}

.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
    grid-template-areas: "form story";
    direction: ltr;
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.auth-form-pane {
    grid-area: form;
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(32px, 6vw, 72px);
    background: var(--surface);
}

.auth-card {
    width: min(448px, 100%);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    text-align: right;
    color: var(--text);
    line-height: 1.18;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0 0 24px;
    font-size: 16px;
    color: var(--muted);
    text-align: right;
    line-height: 1.45;
}

.auth-subtitle--email {
    margin-top: -12px;
    direction: ltr;
    text-align: right;
    word-break: break-word;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-page .field {
    gap: 8px;
    min-width: 0;
}

.auth-page .field__label {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.auth-page .field__control {
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-control);
    background: #fbfafc;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.auth-page .field__control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 52, 136, 0.16);
    background: var(--surface);
}

.auth-page .field__control--with-toggle {
    padding-inline-end: 48px;
}

.auth-page .field__toggle {
    color: var(--muted);
    border-radius: 8px;
}

.auth-page .field__toggle:hover {
    background: var(--primary-10);
    color: var(--primary);
}

.auth-page .field__toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.auth-page .field__toggle--active {
    color: var(--primary);
}

.auth-actions {
    margin-top: 4px;
}

.auth-actions .btn {
    width: 100%;
    min-height: 50px;
    border-radius: 10px;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(79, 52, 136, 0.18);
    font-size: 15px;
}

.auth-actions .btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(79, 52, 136, 0.16);
}

.auth-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.auth-page .link {
    color: var(--primary);
    font-weight: 700;
}

.auth-footer-links {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 48px;
    color: var(--muted);
    font-size: 13px;
}

.auth-messages {
    margin-bottom: 16px;
}

.auth-message {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-message--error {
    background: rgba(180, 35, 24, 0.10);
    border: 1px solid rgba(180, 35, 24, 0.28);
    color: var(--danger);
}

.auth-message--success {
    background: rgba(22, 101, 52, 0.10);
    border: 1px solid rgba(22, 101, 52, 0.26);
    color: var(--success);
}

.password-requirements {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.password-requirements li {
    padding: 2px 0;
}

.password-requirements li.met {
    color: var(--success);
}

.password-requirements li.met::before {
    content: "✓ ";
}

.field__hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

.auth-story {
    grid-area: story;
    direction: rtl;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(40px, 7vw, 88px);
    background:
        radial-gradient(circle at 76% 28%, rgba(255, 255, 255, 0.20), transparent 32%),
        radial-gradient(circle at 18% 82%, rgba(243, 250, 236, 0.20), transparent 36%),
        linear-gradient(145deg, #5f3fa0 0%, #4f3488 54%, #34215f 100%);
    color: #ffffff;
}

.auth-story::before {
    content: "";
    position: absolute;
    width: min(760px, 68vw);
    aspect-ratio: 1;
    inset-inline-end: -22%;
    inset-block-end: -18%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 62px),
        radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 58%);
    opacity: 0.52;
}

.auth-story__content {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
}

.auth-story__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-story__chip .material-symbols-outlined {
    font-size: 19px;
}

.auth-story__radar {
    position: relative;
    width: min(320px, 64vw);
    aspect-ratio: 1;
    margin: 48px 0 42px auto;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, rgba(255, 255, 255, 0.36) 0 1px, transparent 1px 48px),
        radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
}

.auth-story__radar::before,
.auth-story__radar::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.30);
}

.auth-story__radar::after {
    transform: rotate(90deg);
}

.auth-story__radar-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f3faec;
    box-shadow: 0 0 0 10px rgba(243, 250, 236, 0.14);
    inset-inline-start: 34%;
    inset-block-start: 30%;
}

.auth-story__radar-sweep {
    position: absolute;
    inset: 50% 50% auto auto;
    width: 42%;
    height: 2px;
    transform-origin: left center;
    transform: rotate(32deg);
    background: linear-gradient(90deg, rgba(243, 250, 236, 0.92), transparent);
}

.auth-story__title {
    margin: 0;
    max-width: 560px;
    font-size: clamp(32px, 4.4vw, 52px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-story__text {
    margin: 18px 0 0;
    max-width: 460px;
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

@media (prefers-reduced-motion: reduce) {
    .auth-story__radar-sweep {
        display: none;
    }
}

@media (max-width: 860px) {
    .auth-container {
        display: block;
        min-height: 100vh;
        direction: rtl;
    }

    .auth-form-pane {
        min-height: 100vh;
        padding: 28px 20px;
    }

    .auth-story {
        display: none;
    }

    .auth-brand {
        margin-bottom: 28px;
    }

    .auth-title {
        font-size: 30px;
    }

    .auth-footer-links {
        margin-top: 36px;
    }
}

/* User badge and logout */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.4);
    font-size: 13px;
}

.role-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-pill--system_administrator {
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.5);
}

.role-pill--internal_operator {
    background: rgba(29, 214, 182, 0.2);
    border: 1px solid rgba(29, 214, 182, 0.4);
}

.role-pill--internal_read_only {
    background: rgba(154, 167, 191, 0.2);
    border: 1px solid rgba(154, 167, 191, 0.4);
}

.role-pill--customer {
    background: rgba(14, 116, 144, 0.15);
    border: 1px solid rgba(14, 116, 144, 0.35);
}

/* Admin add-user section */
.admin-add-user {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 27, 52, 0.6), rgba(15, 23, 42, 0.7));
}

.admin-add-user__form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.admin-add-user__form .field {
    margin: 0;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: help;
    position: relative;
}

.info-icon:hover {
    color: var(--teal);
    background: rgba(29, 214, 182, 0.2);
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-line;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
    min-width: 200px;
}

.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.admin-add-user__form .btn {
    align-self: end;
}

.btn--danger {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.btn--danger:hover {
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.25);
}

/* Loading bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: rgba(29, 214, 182, 0.2);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.loading-bar.is-active {
    opacity: 1;
}

.loading-bar.is-active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--teal);
    animation: loading-bar 1.2s ease-in-out infinite;
}

@keyframes loading-bar {
    0% { left: -30%; }
    100% { left: 100%; }
}
