/* =====================================================================
   Muqera Sign — design system
   Original identity: indigo → violet accents on a calm slate canvas.
   No external fonts, icon packs or CDNs: everything is self-hosted so the
   app renders identically behind a strict Content-Security-Policy.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
    /* Brand */
    --indigo-950: #1e1b4b;
    --indigo-900: #312e81;
    --indigo-800: #3730a3;
    --indigo-700: #4338ca;
    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    --violet-600: #7c3aed;
    --violet-500: #8b5cf6;

    /* Neutrals */
    --slate-950: #0b1220;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-150: #eef2f7;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;

    /* Semantics */
    --success: #047857;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --danger-border: #fecdca;
    --info: #1d4ed8;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* Surfaces */
    --surface: #ffffff;
    --surface-2: var(--slate-50);
    --surface-3: var(--slate-100);
    --canvas: #f5f7fb;
    --border: #e3e8ef;
    --border-strong: var(--slate-300);

    /* Text */
    --ink: var(--slate-900);
    --ink-2: var(--slate-700);
    --ink-3: var(--slate-500);
    --ink-4: var(--slate-400);

    /* Sidebar (dark) */
    --nav-bg: #12172e;
    --nav-bg-2: #171d38;
    --nav-ink: #c7cffa;
    --nav-ink-dim: #8b93c4;
    --nav-active: rgba(129, 140, 248, 0.16);
    --nav-border: rgba(148, 163, 184, 0.14);

    /* Shape */
    --radius-sm: 7px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-brand: 0 10px 24px -8px rgba(79, 70, 229, 0.45);

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --font-serif: Georgia, "Times New Roman", serif;

    --sidebar-w: 258px;
    --topbar-h: 62px;
    --page-max: 1320px;

    --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.28);
}

/* ---------------------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    margin: 0 0 .4em;
    color: var(--slate-900);
    font-weight: 660;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

h1 { font-size: 1.62rem; }
h2 { font-size: 1.24rem; }
h3 { font-size: 1.06rem; }
h4 { font-size: .96rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--indigo-700); text-decoration: none; }
a:hover { color: var(--indigo-800); text-decoration: underline; }

img, svg, canvas { display: block; max-width: 100%; }
svg { flex: none; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .25em; }

hr, .divider {
    height: 1px;
    margin: 18px 0;
    border: 0;
    background: var(--border);
}

::selection { background: rgba(99, 102, 241, 0.22); }

:focus-visible {
    outline: 2px solid var(--indigo-600);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 10px 16px;
    background: var(--indigo-700);
    color: #fff;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--slate-300) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------------
   3. Typography helpers
   --------------------------------------------------------------------- */
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -0.01em; }
.small { font-size: .855rem; }
.muted { color: var(--ink-3); }
.strong { font-weight: 640; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--indigo-600);
    margin-bottom: 6px;
}

.req { color: var(--danger); font-weight: 600; }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--ink-3); line-height: 1.5; }

/* ---------------------------------------------------------------------
   4. Layout shell
   --------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }

.shell__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w);
}

.page {
    flex: 1;
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 26px 30px 40px;
}

.page-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 30px 26px;
    font-size: .78rem;
    color: var(--ink-4);
}
.page-foot__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Page header */
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.page-head h1 { margin: 0; }
.page-head__title { min-width: 0; }
.page-head__sub {
    margin-top: 6px;
    max-width: 62ch;
    color: var(--ink-3);
    font-size: .875rem;
    line-height: 1.6;
}
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Grids */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.grid--sidebar-left { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Spacing utilities */
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 28px; }

/* ---------------------------------------------------------------------
   5. Sidebar
   --------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: linear-gradient(178deg, var(--nav-bg) 0%, var(--nav-bg-2) 62%, #131833 100%);
    color: var(--nav-ink);
    border-right: 1px solid rgba(15, 23, 42, .5);
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 180px;
    background: radial-gradient(120% 100% at 8% 0%, rgba(99, 102, 241, 0.24) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}
.sidebar__brand:hover { text-decoration: none; color: #fff; }
.sidebar__mark { filter: drop-shadow(0 6px 14px rgba(79, 70, 229, .45)); }
.sidebar__wordmark { display: flex; flex-direction: column; min-width: 0; }
.sidebar__name {
    font-size: .98rem;
    font-weight: 680;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
}
.sidebar__tag {
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--nav-ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__close { display: none; color: var(--nav-ink); margin-left: auto; }

.sidebar__nav {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-group__label {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--nav-ink-dim);
    padding: 0 10px 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius);
    color: var(--nav-ink);
    font-size: .855rem;
    font-weight: 520;
    text-decoration: none;
    position: relative;
    transition: background .14s ease, color .14s ease;
}
.nav-link svg { color: var(--nav-ink-dim); transition: color .14s ease; }
.nav-link:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #fff;
    text-decoration: none;
}
.nav-link:hover svg { color: #c7d2fe; }
.nav-link.is-active {
    background: var(--nav-active);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.28);
}
.nav-link.is-active svg { color: #a5b4fc; }
.sidebar__collapse {
    display: none;
    color: var(--nav-ink-dim);
    margin-left: auto;
    margin-right: 2px;
}
.sidebar__collapse:hover { color: #fff; }

/* Desktop rail. The label text stays in the DOM for screen readers and for the
   native tooltip, so collapsing never removes information — it only hides it. */
@media (min-width: 1024px) {
    .sidebar__collapse { display: grid; }
    body.sidebar-collapsed { --sidebar-w: 78px; }
    body.sidebar-collapsed .sidebar__wordmark,
    body.sidebar-collapsed .nav-group__label,
    body.sidebar-collapsed .nav-link span:not(.nav-badge),
    body.sidebar-collapsed .sidebar__card span:not(.sidebar__card-icon),
    body.sidebar-collapsed .sidebar__meta { display: none; }
    body.sidebar-collapsed .sidebar__nav { padding-left: 10px; padding-right: 10px; gap: 12px; }
    body.sidebar-collapsed .nav-link { justify-content: center; padding: 10px 0; }
    body.sidebar-collapsed .nav-link.is-active::before { left: -10px; }
    body.sidebar-collapsed .nav-badge {
        position: absolute;
        top: 3px;
        right: 6px;
        min-width: 16px;
        padding: 0 4px;
        font-size: .6rem;
    }
    body.sidebar-collapsed .sidebar__card { justify-content: center; padding: 10px 0; }
    body.sidebar-collapsed .sidebar__collapse { margin: 0 auto; }
    body.sidebar-collapsed .sidebar__collapse svg { transform: rotate(180deg); }
    body.sidebar-collapsed .sidebar__head { justify-content: center; }
}
.sidebar__head { flex-wrap: nowrap; }

.nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--indigo-400, #818cf8), var(--violet-500));
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--indigo-600);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
}

.sidebar__foot {
    position: relative;
    z-index: 1;
    padding: 12px;
    border-top: 1px solid var(--nav-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar__card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(124, 58, 237, .16));
    border: 1px solid rgba(129, 140, 248, .3);
    color: #eef2ff;
    text-decoration: none;
    transition: transform .14s ease, border-color .14s ease;
}
.sidebar__card:hover { text-decoration: none; color: #fff; transform: translateY(-1px); border-color: rgba(165, 180, 252, .55); }
.sidebar__card-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    flex: none;
}
.sidebar__card span strong { display: block; font-size: .83rem; font-weight: 620; }
.sidebar__card span small { display: block; font-size: .72rem; color: #b9c2f5; }

.sidebar__meta { display: flex; gap: 6px; padding: 0 2px; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

/* ---------------------------------------------------------------------
   6. Topbar
   --------------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--topbar-h);
    padding: 0 30px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar__menu { display: none; }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.global-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 420px;
}
.global-search__icon {
    position: absolute;
    left: 11px;
    color: var(--ink-4);
    pointer-events: none;
}
.global-search input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--ink);
    font: inherit;
    font-size: .855rem;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.global-search input::placeholder { color: var(--ink-4); }
.global-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--indigo-500);
    box-shadow: var(--focus-ring);
}
.global-search__kbd {
    position: absolute;
    right: 9px;
    min-width: 20px;
    padding: 1px 5px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    background: #fff;
    color: var(--ink-4);
    font-family: var(--font-mono);
    font-size: .68rem;
    text-align: center;
}

.topbar__sign { position: relative; }

/* ---------------------------------------------------------------------
   7. Buttons
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--ink-2);
    font: inherit;
    font-size: .855rem;
    font-weight: 580;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn[disabled], .btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: linear-gradient(180deg, var(--indigo-600), var(--indigo-700));
    color: #fff;
    box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--indigo-500), var(--indigo-600)); color: #fff; }

.btn--secondary {
    background: #fff;
    border-color: var(--border-strong);
    color: var(--ink-2);
    box-shadow: var(--shadow-xs);
}
.btn--secondary:hover { background: var(--surface-2); border-color: var(--slate-400); color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }

.btn--danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.btn--danger:hover { background: #fee4e2; border-color: #fda29b; color: #912018; }

.btn--danger-solid {
    background: linear-gradient(180deg, #d92d20, var(--danger));
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(180, 35, 24, .6);
}
.btn--danger-solid:hover { background: linear-gradient(180deg, #f04438, #c01c10); color: #fff; }

.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: #046c4e; color: #fff; }

.btn--sm { height: 30px; padding: 0 10px; font-size: .8rem; border-radius: 6px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: .925rem; border-radius: var(--radius); }
.btn--block { width: 100%; }
.btn--pill { border-radius: var(--radius-pill); }

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.icon-btn__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    font-size: .63rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

/* ---------------------------------------------------------------------
   8. Dropdowns
   --------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
    min-width: 232px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: dropdown-in .14s ease-out;
}
.dropdown__panel--wide { width: 340px; padding: 0; overflow: hidden; }
.dropdown__panel[hidden] { display: none; }

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: .8rem;
    font-weight: 640;
    color: var(--ink);
}

.dropdown__list { max-height: 340px; overflow-y: auto; padding: 4px; }

.dropdown__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 8px;
}
.dropdown__identity strong { display: block; font-size: .855rem; color: var(--ink); }
.dropdown__identity span { display: block; font-size: .765rem; color: var(--ink-3); }

.dropdown__divider { height: 1px; margin: 5px 4px; background: var(--border); }

.dropdown__item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: .85rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.dropdown__item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.dropdown__item svg { color: var(--ink-4); }
.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-bg); color: #912018; }
.dropdown__item--danger svg { color: currentColor; }
.dropdown__form { margin: 0; }

.dropdown__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 16px;
    color: var(--ink-4);
    font-size: .83rem;
}

.notification-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    text-decoration: none;
    transition: background .12s ease;
}
.notification-item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.notification-item.is-unread { background: rgba(99, 102, 241, .045); }
.notification-item__dot {
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--slate-300);
}
.notification-item__dot--success { background: var(--success); }
.notification-item__dot--warning { background: var(--warning); }
.notification-item__dot--danger,
.notification-item__dot--error { background: var(--danger); }
.notification-item__dot--info { background: var(--indigo-500); }
.notification-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notification-item__body strong { font-size: .82rem; font-weight: 620; color: var(--ink); }
.notification-item__body span { font-size: .78rem; color: var(--ink-3); line-height: 1.45; }
.notification-item__body time { font-size: .71rem; color: var(--ink-4); margin-top: 2px; }

.profile-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px 4px 4px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease;
}
.profile-btn:hover { background: var(--surface-2); border-color: var(--border); }
.profile-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.profile-btn__name { font-size: .815rem; font-weight: 620; color: var(--ink); }
.profile-btn__role { font-size: .69rem; color: var(--ink-3); }
.profile-btn__chevron { color: var(--ink-4); }

/* ---------------------------------------------------------------------
   9. Avatars
   --------------------------------------------------------------------- */
.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--indigo-600);
    color: #fff;
    font-size: .74rem;
    font-weight: 680;
    letter-spacing: .01em;
    flex: none;
    user-select: none;
}
.avatar--sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar--lg { width: 44px; height: 44px; font-size: .92rem; }
.avatar--xl { width: 60px; height: 60px; font-size: 1.1rem; }

/* ---------------------------------------------------------------------
   10. Cards
   --------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card--flush { padding: 0; }
.card--interactive { transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease; }
.card--interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-strong); }

.card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, var(--surface-2));
}
.card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .905rem;
    font-weight: 640;
    color: var(--ink);
}
.card__title svg { color: var(--indigo-600); }
.card__title .count {
    margin-left: 2px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--ink-3);
    font-size: .71rem;
    font-weight: 650;
}
.card__sub { margin-top: 3px; font-size: .795rem; color: var(--ink-3); }
.card__body { padding: 18px; }
.card__body--tight { padding: 12px 18px; }
.card__foot {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   11. Stats
   --------------------------------------------------------------------- */
.stat {
    position: relative;
    padding: 16px 16px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.stat__icon {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(99, 102, 241, .1);
    color: var(--indigo-600);
}
.stat__label {
    font-size: .775rem;
    font-weight: 560;
    color: var(--ink-3);
    letter-spacing: .01em;
    padding-right: 38px;
}
.stat__value {
    margin-top: 6px;
    font-size: 1.72rem;
    font-weight: 680;
    letter-spacing: -0.03em;
    color: var(--slate-900);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.stat__meta { margin-top: 3px; font-size: .745rem; color: var(--ink-4); }
.stat__delta { display: inline-flex; align-items: center; gap: 3px; font-size: .745rem; font-weight: 600; }
.stat__delta--up { color: var(--success); }
.stat__delta--down { color: var(--danger); }

a.stat { color: inherit; text-decoration: none; transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease; }
a.stat:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--indigo-200, #c7d2fe); }

.stat--accent { background: linear-gradient(150deg, #fff 0%, #f5f3ff 100%); border-color: #ddd6fe; }
.stat--warn { background: linear-gradient(150deg, #fff 0%, #fffbeb 100%); border-color: var(--warning-border); }
.stat--danger { background: linear-gradient(150deg, #fff 0%, #fef3f2 100%); border-color: var(--danger-border); }
.stat--success { background: linear-gradient(150deg, #fff 0%, #ecfdf5 100%); border-color: var(--success-border); }

/* ---------------------------------------------------------------------
   12. Badges, pills, status
   --------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--slate-700);
    font-size: .72rem;
    font-weight: 620;
    line-height: 1.6;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge--plain { background: transparent; border-color: var(--border-strong); }

.badge--success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge--warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge--danger  { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge--info    { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge--neutral { background: var(--surface-3); color: var(--slate-600); border-color: var(--slate-200); }
.badge--brand   { background: #eef2ff; color: var(--indigo-700); border-color: #c7d2fe; }
.badge--plain.badge--success { background: transparent; }
.badge--plain.badge--warning { background: transparent; }
.badge--plain.badge--danger  { background: transparent; }
.badge--plain.badge--info    { background: transparent; }

.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--ink-2);
    font-size: .735rem;
    font-weight: 560;
    white-space: nowrap;
}
.pill--dark { background: rgba(148, 163, 184, .16); color: var(--nav-ink); }
.pill--outline { background: transparent; border: 1px solid var(--border-strong); }

/* ---------------------------------------------------------------------
   13. Tables
   --------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .865rem;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    color: var(--ink-3);
    font-size: .715rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}
.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--ink-2);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.is-selected { background: rgba(99, 102, 241, .05); }
.table--compact tbody td { padding: 9px 14px; }
.table--compact thead th { padding: 8px 14px; }

.table a { font-weight: 560; }
.cell-strong { color: var(--ink); font-weight: 600; }
.cell-sub { margin-top: 2px; font-size: .765rem; color: var(--ink-4); }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .btn + .btn { margin-left: 4px; }
.cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.cell-actions { text-align: right; }

.table-row--link { cursor: pointer; }

/* ---------------------------------------------------------------------
   14. Forms
   --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; min-width: 0; }
.field--grow { flex: 1; }
.field--full { grid-column: 1 / -1; }

.label {
    display: block;
    margin-bottom: 5px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-2);
}

.input, .select, .textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .875rem;
    line-height: 1.45;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.textarea { min-height: 92px; resize: vertical; }
.select {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.input:hover, .select:hover, .textarea:hover { border-color: var(--slate-400); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: var(--focus-ring);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:disabled, .select:disabled, .textarea:disabled {
    background: var(--surface-3);
    color: var(--ink-3);
    cursor: not-allowed;
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
    border-color: var(--danger-border);
    background: #fffbfb;
}
.input.is-invalid:focus, .textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .16); }

.input--sm { min-height: 32px; padding: 5px 9px; font-size: .83rem; }

.field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: var(--danger);
    font-size: .79rem;
    font-weight: 520;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--tight { gap: 10px 12px; }

.checkbox, .radio {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .86rem;
    color: var(--ink-2);
    cursor: pointer;
    line-height: 1.55;
}
.checkbox input, .radio input {
    flex: none;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--indigo-600);
    cursor: pointer;
}

.checkbox--card {
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: border-color .14s ease, background .14s ease;
}
.checkbox--card:hover { border-color: var(--indigo-300, #a5b4fc); background: #fbfbff; }
.checkbox--card:has(input:checked) {
    border-color: var(--indigo-500);
    background: #f5f3ff;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .18);
}

.filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.filters .field { min-width: 130px; }

.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .input { flex: 1; }

/* Toggle password button */
.field--password { position: relative; }
.field--password .input { padding-right: 42px; }
.field--password .toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-4);
    cursor: pointer;
}
.field--password .toggle-password:hover { background: var(--surface-3); color: var(--ink-2); }

/* OTP */
.otp-input-row { display: flex; gap: 9px; justify-content: space-between; margin: 18px 0 20px; }
.otp-digit {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 1.32rem;
    font-weight: 620;
    text-align: center;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.otp-digit:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: var(--focus-ring);
    background: #fbfbff;
}
.otp-digit.is-filled { border-color: var(--indigo-400, #818cf8); background: #f8f7ff; }
.otp-digit.is-error { border-color: var(--danger-border); background: #fffbfb; }

/* ---------------------------------------------------------------------
   15. Alerts
   --------------------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .865rem;
    line-height: 1.6;
}
.alert:last-child { margin-bottom: 0; }
.alert__icon { flex: none; margin-top: 1px; }
.alert__body { flex: 1; min-width: 0; }
.alert__title { margin-bottom: 3px; font-weight: 640; color: inherit; }
.alert__list { margin: 6px 0 0; padding-left: 18px; }
.alert__close {
    flex: none;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: -2px -4px 0 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    opacity: .55;
    cursor: pointer;
}
.alert__close:hover { opacity: 1; background: rgba(15, 23, 42, .06); }

.alert--success { background: var(--success-bg); border-color: var(--success-border); color: #065f46; }
.alert--success .alert__icon { color: var(--success); }
.alert--warning { background: var(--warning-bg); border-color: var(--warning-border); color: #92400e; }
.alert--warning .alert__icon { color: var(--warning); }
.alert--error, .alert--danger { background: var(--danger-bg); border-color: var(--danger-border); color: #912018; }
.alert--error .alert__icon, .alert--danger .alert__icon { color: var(--danger); }
.alert--info { background: var(--info-bg); border-color: var(--info-border); color: #1e40af; }
.alert--info .alert__icon { color: var(--info); }

/* ---------------------------------------------------------------------
   16. Tabs
   --------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--ink-3);
    font: inherit;
    font-size: .855rem;
    font-weight: 560;
    text-decoration: none;
    white-space: nowrap;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color .14s ease, border-color .14s ease;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--indigo-700); border-bottom-color: var(--indigo-600); font-weight: 620; }
.tab .count {
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    color: var(--ink-3);
    font-size: .7rem;
    font-weight: 650;
}
.tabs--pill { border-bottom: 0; gap: 6px; }
.tabs--pill .tab { border-radius: var(--radius-pill); border: 1px solid transparent; margin-bottom: 0; padding: 6px 13px; }
.tabs--pill .tab.is-active { background: #eef2ff; border-color: #c7d2fe; }

/* ---------------------------------------------------------------------
   17. Pagination
   --------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    font-size: .8rem;
    color: var(--ink-3);
}
.pagination__links { display: flex; align-items: center; gap: 4px; }
.page-link {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-2);
    font-size: .8rem;
    font-weight: 560;
    text-decoration: none;
}
.page-link:hover { background: var(--surface-2); border-color: var(--slate-400); text-decoration: none; color: var(--ink); }
.page-link.is-active { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }
.page-link.is-disabled { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------------
   18. Description lists
   --------------------------------------------------------------------- */
.dl {
    display: grid;
    grid-template-columns: minmax(96px, 34%) 1fr;
    gap: 8px 14px;
    margin: 0;
    font-size: .865rem;
}
.dl dt { color: var(--ink-3); font-weight: 520; }
.dl dd { margin: 0; color: var(--ink); word-break: break-word; }
.dl--stack { display: block; }
.dl--stack dt { margin-top: 10px; }
.dl--stack dt:first-child { margin-top: 0; }
.dl--stack dd { margin-top: 2px; }
.dl--wide { grid-template-columns: minmax(130px, 26%) 1fr; }

/* ---------------------------------------------------------------------
   19. Empty states
   --------------------------------------------------------------------- */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 46px 24px;
    text-align: center;
}
.empty__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 6px;
    border-radius: 14px;
    background: var(--surface-3);
    color: var(--ink-4);
}
.empty h3 { margin: 0; font-size: .95rem; }
.empty p { margin: 0; max-width: 42ch; font-size: .845rem; color: var(--ink-3); }

/* ---------------------------------------------------------------------
   20. Breadcrumbs
   --------------------------------------------------------------------- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: .78rem;
    color: var(--ink-4);
}
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--indigo-700); }
.breadcrumbs__sep { color: var(--slate-300); }
.breadcrumbs__current { color: var(--ink-2); font-weight: 560; }

/* ---------------------------------------------------------------------
   21. Toasts
   --------------------------------------------------------------------- */
.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-lg);
    font-size: .845rem;
    color: var(--ink-2);
    animation: toast-in .18s ease-out;
}
.toast--success { border-color: var(--success-border); }
.toast--error { border-color: var(--danger-border); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   22. Auth layout (split screen)
   --------------------------------------------------------------------- */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: 100vh;
    background: var(--surface);
}

.auth__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px clamp(24px, 6vw, 76px);
}
.auth__inner { width: 100%; max-width: 392px; margin: 0 auto; }

.auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 34px;
    color: var(--slate-900);
    text-decoration: none;
}
.auth__brand:hover { text-decoration: none; }
.auth__brand-name { font-size: 1.02rem; font-weight: 680; letter-spacing: -0.01em; }
.auth__brand-tag {
    display: block;
    font-size: .66rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--ink-4);
}

.auth__title { font-size: 1.6rem; letter-spacing: -0.022em; margin-bottom: 6px; }
.auth__sub { color: var(--ink-3); font-size: .89rem; margin-bottom: 26px; line-height: 1.6; }

.auth__form { display: flex; flex-direction: column; gap: 14px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth__foot { margin-top: 26px; font-size: .83rem; color: var(--ink-3); }
.auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--ink-4);
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.auth__divider::before, .auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px clamp(28px, 5vw, 64px);
    color: #e8eaff;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(124, 58, 237, .5) 0%, transparent 55%),
        radial-gradient(100% 80% at 0% 100%, rgba(67, 56, 202, .55) 0%, transparent 60%),
        linear-gradient(155deg, #1a1b3d 0%, #21245a 45%, #191b36 100%);
    overflow: hidden;
}
.auth__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 100%);
    pointer-events: none;
}
.auth__aside > * { position: relative; z-index: 1; }
.auth__eyebrow {
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 14px;
}
.auth__pitch { font-size: 1.72rem; line-height: 1.28; font-weight: 640; color: #fff; letter-spacing: -0.02em; max-width: 22ch; }
.auth__lede { margin-top: 14px; max-width: 40ch; color: #c3caf7; font-size: .9rem; line-height: 1.65; }

.auth__points { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; }
.auth__point { display: flex; gap: 11px; align-items: flex-start; }
.auth__point-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    background: rgba(165, 180, 252, .16);
    border: 1px solid rgba(165, 180, 252, .26);
    color: #c7d2fe;
}
.auth__point strong { display: block; font-size: .855rem; color: #fff; font-weight: 600; }
.auth__point span { display: block; font-size: .8rem; color: #b3bcf0; line-height: 1.55; }

.auth__seal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, .28);
    border: 1px solid rgba(165, 180, 252, .22);
    color: #d4d9fb;
    font-size: .755rem;
    width: fit-content;
}

/* ---------------------------------------------------------------------
   23. Signing portal layout
   --------------------------------------------------------------------- */
.signing-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); }

.signing-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px clamp(16px, 4vw, 40px);
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.signing-top__brand { display: flex; align-items: center; gap: 10px; color: var(--slate-900); text-decoration: none; }
.signing-top__brand span { font-weight: 660; font-size: .95rem; }
.signing-top__meta { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.signing-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px clamp(16px, 4vw, 40px);
    background: linear-gradient(180deg, #fff, var(--surface-2));
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.signing-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    color: var(--ink-4);
    white-space: nowrap;
}
.signing-step__num {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--ink-3);
    font-size: .72rem;
    font-weight: 700;
}
.signing-step.is-active { background: #eef2ff; color: var(--indigo-700); font-weight: 600; }
.signing-step.is-active .signing-step__num { background: var(--indigo-600); color: #fff; }
.signing-step.is-done { color: var(--success); }
.signing-step.is-done .signing-step__num { background: var(--success-bg); color: var(--success); }
.signing-step__bar { width: 22px; height: 1px; background: var(--border-strong); flex: none; }

.signing-body { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 44px; }
.signing-foot {
    padding: 16px clamp(16px, 4vw, 40px) 26px;
    text-align: center;
    font-size: .765rem;
    color: var(--ink-4);
    line-height: 1.7;
}

.sign-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }

/* Document shell */
.doc-shell {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    max-height: 74vh;
    overflow: auto;
}
.doc-shell--flush { padding: 0; }
.doc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}
.doc-meta-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: .75rem;
    color: var(--ink-3);
}

.doc-paper {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 46px clamp(20px, 5vw, 56px) 54px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    font-family: var(--font-serif);
    font-size: 13.6px;
    line-height: 1.78;
    color: #1b2432;
}
.doc-paper h1 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.doc-paper h2 {
    font-family: var(--font-sans);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    margin: 22px 0 7px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}
.doc-paper h3 { font-family: var(--font-sans); font-size: .86rem; margin: 16px 0 5px; }
.doc-paper p { margin: 0 0 9px; }
.doc-paper .doc-meta {
    font-family: var(--font-sans);
    font-size: .75rem;
    color: var(--ink-3);
    text-align: center;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.doc-paper ul, .doc-paper ol { margin: 0 0 10px; padding-left: 20px; }
.doc-paper table { width: 100%; border-collapse: collapse; margin: 14px 0; font-family: var(--font-sans); font-size: .8rem; }
.doc-paper table th, .doc-paper table td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; vertical-align: top; }
.doc-paper table th { background: var(--surface-2); font-weight: 640; }
.doc-paper strong { font-weight: 700; color: #0f1a2b; }
.doc-paper .sig-block { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; font-family: var(--font-sans); }
.doc-paper .sig-line { border-top: 1px solid #94a3b8; padding-top: 6px; font-size: .78rem; color: var(--ink-3); }
.doc-paper .sig-img { max-height: 54px; margin-bottom: 4px; }

/* Signature pad */
.signature-pad {
    position: relative;
    height: 190px;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(45deg, #f8fafc 0 10px, #fff 10px 20px);
    overflow: hidden;
    touch-action: none;
    cursor: crosshair;
}
.signature-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.signature-pad__baseline {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 46px;
    border-bottom: 1px solid var(--slate-300);
    pointer-events: none;
}
.signature-pad__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--ink-4);
    font-size: .9rem;
    letter-spacing: .04em;
    pointer-events: none;
    transition: opacity .16s ease;
}
.signature-pad.is-drawn .signature-pad__placeholder { opacity: 0; }
.signature-pad.is-invalid { border-color: var(--danger-border); background: #fffbfb; }

/* ---------------------------------------------------------------------
   24. Timeline (audit & activity)
   --------------------------------------------------------------------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 1.5px;
    background: linear-gradient(180deg, var(--border) 0%, var(--border) 88%, transparent 100%);
}
.timeline__item { position: relative; padding: 0 0 16px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
    position: absolute;
    left: -22px;
    top: 3px;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--slate-300);
    color: transparent;
}
.timeline__dot--success { border-color: var(--success); }
.timeline__dot--warning { border-color: var(--warning); }
.timeline__dot--danger { border-color: var(--danger); }
.timeline__dot--info { border-color: var(--indigo-500); }
.timeline__title { font-size: .855rem; font-weight: 560; color: var(--ink); }
.timeline__meta { margin-top: 2px; font-size: .755rem; color: var(--ink-4); }
.timeline__desc { margin-top: 3px; font-size: .82rem; color: var(--ink-2); line-height: 1.55; }

/* ---------------------------------------------------------------------
   25. Party / signer list
   --------------------------------------------------------------------- */
.party {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.party:last-child { border-bottom: 0; }
.party__main { flex: 1; min-width: 0; }
.party__name { font-size: .87rem; font-weight: 600; color: var(--ink); }
.party__meta { margin-top: 1px; font-size: .775rem; color: var(--ink-3); }
.party__badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.party-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .8fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.party-row + .party-row { margin-top: 10px; }
.party-row__number {
    display: none;
}
.party-row__remove {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink-3);
    cursor: pointer;
}
.party-row__remove:hover { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }

/* ---------------------------------------------------------------------
   26. Progress / trends
   --------------------------------------------------------------------- */
.progress {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    overflow: hidden;
}
.progress__bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--indigo-500), var(--violet-500));
    transition: width .3s ease;
}
.progress__bar--success { background: linear-gradient(90deg, #10b981, var(--success)); }
.progress--thin { height: 4px; }

.trend {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 140px;
    padding-top: 8px;
}
.trend__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.trend__bars { display: flex; align-items: flex-end; gap: 3px; height: 108px; }
.trend__bar {
    width: 11px;
    min-height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--indigo-500), var(--indigo-700));
}
.trend__bar--alt { background: linear-gradient(180deg, #34d399, var(--success)); }
.trend__label { font-size: .7rem; color: var(--ink-4); white-space: nowrap; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--ink-3); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch { width: 9px; height: 9px; border-radius: 3px; background: var(--indigo-600); }
.legend__swatch--alt { background: var(--success); }

/* ---------------------------------------------------------------------
   27. Checklist
   --------------------------------------------------------------------- */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.checklist__item { display: flex; gap: 9px; align-items: flex-start; font-size: .845rem; color: var(--ink-2); }
.checklist__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
}
.checklist__icon--pending { background: var(--surface-3); color: var(--ink-4); }
.checklist__icon--warn { background: var(--warning-bg); color: var(--warning); }

/* ---------------------------------------------------------------------
   28. Error pages
   --------------------------------------------------------------------- */
.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
    background:
        radial-gradient(90% 70% at 50% 0%, #eef2ff 0%, transparent 60%),
        var(--canvas);
}
.error-page__inner {
    width: 100%;
    max-width: 560px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 38px clamp(22px, 5vw, 46px) 32px;
}
.error-page__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--slate-900);
    font-weight: 660;
    font-size: .95rem;
    text-decoration: none;
}
.error-page__brand img { border-radius: 8px; }
.error-page__code {
    font-size: 3.4rem;
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(135deg, var(--indigo-700), var(--violet-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.error-page__eyebrow {
    margin-top: 10px;
    font-size: .71rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--indigo-600);
}
.error-page__title { margin-top: 8px; font-size: 1.32rem; }
.error-page__body { margin-top: 8px; color: var(--ink-3); font-size: .89rem; line-height: 1.65; }
.error-page__notice { margin-top: 12px; font-size: .795rem; color: var(--ink-4); line-height: 1.6; }
.error-page__actions { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.error-page__foot {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: .735rem;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.error-page__detail {
    margin-top: 20px;
    text-align: left;
    border: 1px solid var(--danger-border);
    border-radius: var(--radius);
    background: #fffbfb;
    overflow: hidden;
}
.error-page__detail-title {
    padding: 8px 12px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.error-page__trace {
    margin: 0;
    padding: 12px;
    max-height: 260px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: .72rem;
    line-height: 1.55;
    color: var(--slate-700);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------------------------------------------------------------------
   29. Misc components
   --------------------------------------------------------------------- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kv { min-width: 0; }
.kv__label { font-size: .735rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); }
.kv__value { margin-top: 3px; font-size: .89rem; color: var(--ink); word-break: break-word; }

.hash {
    display: block;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: .735rem;
    line-height: 1.6;
    color: var(--slate-700);
    word-break: break-all;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.file-row:last-child { border-bottom: 0; }
.file-row__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 9px;
    background: #eef2ff;
    color: var(--indigo-700);
}
.file-row__main { flex: 1; min-width: 0; }
.file-row__name { font-size: .855rem; font-weight: 570; color: var(--ink); word-break: break-word; }
.file-row__meta { margin-top: 1px; font-size: .745rem; color: var(--ink-4); }

.callout {
    padding: 13px 15px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: .845rem;
    color: var(--ink-2);
    line-height: 1.6;
}
.callout--brand { background: #f5f3ff; border-color: #ddd6fe; }
.callout__title { font-weight: 640; color: var(--ink); margin-bottom: 3px; }

.steps { display: flex; flex-direction: column; gap: 2px; counter-reset: step; }
.steps__item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 10px 0;
}
.steps__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--indigo-700);
    font-size: .74rem;
    font-weight: 700;
}
.steps__body { font-size: .855rem; color: var(--ink-2); line-height: 1.6; }
.steps__body strong { color: var(--ink); }

.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }

.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row .hash { flex: 1; }
.copy-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-3);
    cursor: pointer;
}
.copy-btn:hover { color: var(--indigo-700); border-color: var(--indigo-500); }

.segmented { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--surface-3); gap: 2px; }
.segmented__item {
    padding: 5px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-3);
    font: inherit;
    font-size: .8rem;
    font-weight: 560;
    cursor: pointer;
    text-decoration: none;
}
.segmented__item:hover { text-decoration: none; color: var(--ink); }
.segmented__item.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

/* ---------------------------------------------------------------------
   30. Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--sidebar { grid-template-columns: minmax(0, 1fr); }
    .grid--sidebar-left { grid-template-columns: minmax(0, 1fr); }
    .sign-layout { grid-template-columns: minmax(0, 1fr); }
    .doc-shell { max-height: none; }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-102%);
        transition: transform .2s ease;
        box-shadow: var(--shadow-lg);
    }
    .shell__main { margin-left: 0; }
    .sidebar__close { display: grid; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
    .topbar__menu { display: grid; }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__aside { display: none; }
}

@media (max-width: 820px) {
    .page { padding: 20px 16px 34px; }
    .topbar { padding: 0 16px; gap: 8px; }
    .page-foot { padding: 14px 16px 22px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
    .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .party-row { grid-template-columns: minmax(0, 1fr); }
    .global-search { max-width: none; }
    .topbar__cta span { display: none; }
    .topbar__cta { width: 36px; padding: 0; }
    .profile-btn__text { display: none; }
    .doc-paper { padding: 28px 18px 34px; font-size: 13px; }
    .doc-paper .sig-block { grid-template-columns: minmax(0, 1fr); }
    .trend { height: auto; }
    .card__head { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    /* Two compact stat cards per row keeps the dashboard scannable on phones
       instead of one very tall column. */
    .grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .grid--stats .stat { padding: 13px 14px; }
    .grid--stats .stat__value { font-size: 1.35rem; }
    .grid--stats .stat__meta { font-size: .72rem; }
    .grid--stats .stat__icon { width: 30px; height: 30px; }
    .global-search { display: none; }
    .page-head__title h1 { font-size: 1.4rem; }
    .dropdown__panel--wide { width: min(340px, calc(100vw - 32px)); right: -46px; }
    .page-head__actions { width: 100%; }
    .page-head__actions .btn { flex: 1; }
    .pagination { flex-direction: column; align-items: flex-start; }
    .otp-input-row { gap: 6px; }
    .otp-digit { height: 48px; font-size: 1.12rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .sidebar, .topbar, .page-foot, .tabs, .page-head__actions, .btn, .signing-steps { display: none !important; }
    .shell__main { margin: 0; }
    .doc-shell { max-height: none; padding: 0; border: 0; background: #fff; }
    .doc-paper { box-shadow: none; border: 0; max-width: none; }
}

/* ---------------------------------------------------------------------
   31. Component aliases used by the auth, breadcrumb and signing shells
   --------------------------------------------------------------------- */
.auth__brand-name small {
    display: block;
    margin-top: 1px;
    font-size: .665rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-4);
}

.auth__headline {
    font-size: 1.85rem;
    line-height: 1.24;
    font-weight: 650;
    letter-spacing: -0.022em;
    color: #fff;
    max-width: 24ch;
    margin: 0 0 12px;
}

.auth__aside .auth__sub {
    margin: 0;
    max-width: 44ch;
    color: #c3caf7;
    font-size: .9rem;
    line-height: 1.68;
}

.auth__aside .auth__points { margin-top: 30px; }
.auth__aside .auth__point { align-items: center; }
.auth__aside .auth__point svg { color: #a5b4fc; flex: none; }
.auth__aside .auth__point span { font-size: .845rem; color: #c3caf7; line-height: 1.6; }

.auth__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(165, 180, 252, .18);
    font-size: .755rem;
    color: #9aa4dd;
}

/* Auth panel copy */
.auth .sub {
    margin: 0 0 22px;
    font-size: .875rem;
    line-height: 1.65;
    color: var(--ink-3);
}
.auth .text-center { text-align: center; }
.auth__demo {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-size: .8rem;
    color: var(--ink-2);
    line-height: 1.65;
}
.auth__demo strong { color: var(--ink); }
.auth__demo code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: .75rem;
}

/* Breadcrumbs */
.breadcrumbs .sep { color: var(--slate-300); }
.breadcrumbs .current { color: var(--ink-2); font-weight: 560; }
.breadcrumbs svg { color: var(--ink-4); }

/* Sidebar group wrapper */
.nav-group { display: flex; flex-direction: column; gap: 1px; }

/* Signing portal shell (class names used by layouts/signing.php) */
.signing { min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); }

.signing__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 13px clamp(16px, 4vw, 40px);
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.signing__bar a { color: var(--slate-900); }
.signing__bar-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: .79rem;
    color: var(--ink-3);
}

.signing__body {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px clamp(16px, 4vw, 40px) 46px;
}

.signing__steps {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow-x: auto;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    color: var(--ink-4);
    white-space: nowrap;
}
.step__num {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--ink-3);
    font-size: .72rem;
    font-weight: 700;
}
.step.is-active { background: #eef2ff; color: var(--indigo-700); font-weight: 620; }
.step.is-active .step__num { background: var(--indigo-600); color: #fff; }
.step.is-done { color: var(--success); }
.step.is-done .step__num { background: var(--success-bg); color: var(--success); }
.step__sep { width: 18px; height: 1px; background: var(--border-strong); flex: none; }

/* Party rows (agreements show/dashboard) */
.party-row__main { flex: 1; min-width: 0; }
.party-row__name { font-size: .87rem; font-weight: 600; color: var(--ink); }
.party-row__meta { margin-top: 1px; font-size: .775rem; color: var(--ink-3); word-break: break-word; }

/* Extra badges and buttons */
.badge--muted { background: var(--surface-3); color: var(--slate-600); border-color: var(--slate-200); }
.btn--navy {
    background: linear-gradient(180deg, #16305a, #0b2545);
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(11, 37, 69, .7);
}
.btn--navy:hover { background: linear-gradient(180deg, #1c3d70, #10305a); color: #fff; }

/* ---------------------------------------------------------------------
   32. Settings, branding & installer surfaces
   --------------------------------------------------------------------- */

/* Inputs with an attached action button */
.input-group { display: flex; gap: 8px; align-items: stretch; flex-wrap: nowrap; }
.input-group__btn {
    flex: 0 0 auto;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--ink-2);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.input-group__btn:hover { background: var(--surface-3); border-color: var(--slate-400); }
.input-group .input[type="color"],
.color-input {
    flex: 0 0 54px;
    padding: 3px;
    min-height: 40px;
    cursor: pointer;
    border-radius: var(--radius-md);
}
.input--file { padding: 7px 9px; font-size: .78rem; }

/* Definition lists used across settings/diagnostics */
.detail-list { margin: 0; display: grid; gap: 10px; }
.detail-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px dashed var(--border);
}
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { font-size: .78rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.detail-list dd { margin: 0; font-size: .86rem; color: var(--ink); text-align: right; word-break: break-word; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-list a.badge { text-decoration: none; }

/* Search result preview */
.serp {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    background: var(--surface);
}
.serp__url { font-size: .74rem; color: var(--success); margin-bottom: 3px; word-break: break-all; }
.serp__title { font-size: 1rem; color: #1a0dab; line-height: 1.3; margin-bottom: 4px; }
.serp__desc { font-size: .8rem; color: var(--ink-2); line-height: 1.55; }
.serp__image {
    margin-top: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    min-height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--surface-2);
    color: var(--ink-3);
    font-size: .78rem;
}
.serp__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Branding asset grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.brand-slot {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.brand-slot__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand-slot__title { font-size: .82rem; font-weight: 650; color: var(--ink); }
.brand-slot__preview {
    display: grid;
    place-items: center;
    min-height: 82px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background:
        linear-gradient(45deg, #eef1f6 25%, transparent 25%) 0 0/16px 16px,
        linear-gradient(-45deg, #eef1f6 25%, transparent 25%) 0 8px/16px 16px,
        linear-gradient(45deg, transparent 75%, #eef1f6 75%) 8px -8px/16px 16px,
        linear-gradient(-45deg, transparent 75%, #eef1f6 75%) -8px 0/16px 16px,
        #ffffff;
}
.brand-slot__preview.is-dark { background: #0f172a; }
.brand-slot__preview img { max-width: 100%; max-height: 66px; object-fit: contain; display: block; }
.brand-slot__fallback {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink-3);
    text-align: center;
}
.brand-slot__meta { font-size: .72rem; color: var(--ink-3); line-height: 1.5; min-height: 2.4em; }
.brand-slot__form { display: flex; gap: 6px; align-items: center; }
.brand-slot__form .input--file { flex: 1; min-width: 0; }

/* Brand preview panel */
.brand-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}
.brand-preview__bar { display: block; height: 6px; background: linear-gradient(90deg, var(--indigo-900), var(--indigo-600), var(--violet-500)); }
.brand-preview__row { display: flex; align-items: center; gap: 12px; padding: 16px 16px 10px; }
.brand-preview__mark { display: block; }
.brand-preview__name { font-size: .92rem; font-weight: 700; letter-spacing: -.01em; }
.brand-preview__tag { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.brand-preview__buttons { display: flex; gap: 8px; padding: 0 16px 16px; }

/* Brand marks rendered as <img> keep their intrinsic aspect ratio */
img.brand-mark { display: block; object-fit: contain; }
.sidebar__brand img.brand-mark { border-radius: 8px; }

/* Plain (installer / locked) pages */
.plain-page { min-height: 100vh; background: var(--canvas); display: grid; place-items: center; padding: 32px 16px; }
.plain-page__inner { width: 100%; }

@media (max-width: 720px) {
    .input-group { flex-wrap: wrap; }
    .input-group .input { min-width: 0; }
    .brand-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ */
/* 33. Small shared helpers                                            */
/* ------------------------------------------------------------------ */
.text-danger { color: var(--danger); }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* 34. Company identity & signature settings                           */
/* ------------------------------------------------------------------ */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list--tight { gap: 6px; }
.list > li {
    position: relative; padding-left: 18px; font-size: .845rem; color: var(--ink-2); line-height: 1.55;
}
.list > li::before {
    content: ""; position: absolute; left: 4px; top: .5em; width: 5px; height: 5px;
    border-radius: 50%; background: var(--primary, #4338CA); opacity: .7;
}
.asset-preview {
    display: flex; align-items: center; justify-content: center;
    min-height: 110px; padding: 16px; border: 1px dashed var(--border, #D7E0EC);
    border-radius: 10px; background:
        linear-gradient(45deg, #eef1f7 25%, transparent 25%, transparent 75%, #eef1f7 75%) 0 0/16px 16px,
        linear-gradient(45deg, #eef1f7 25%, #fff 25%, #fff 75%, #eef1f7 75%) 8px 8px/16px 16px;
}

/* ------------------------------------------------------------------ */
/* 35. Signature method switcher & previews                            */
/* ------------------------------------------------------------------ */
.segmented {
    display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px;
    background: var(--surface-3, #F1F4F9); border-radius: 10px; max-width: 100%; overflow-x: auto;
}
.segmented__item {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
    border: 0; border-radius: 7px; background: transparent; cursor: pointer;
    font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-3, #55637A);
    white-space: nowrap; transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.segmented__item:hover { color: var(--ink, #0B2545); }
.segmented__item.is-active {
    background: #fff; color: var(--ink, #0B2545); box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}
.typed-signature-input { font-size: 1.05rem; }
.typed-signature-preview {
    min-height: 74px; display: flex; align-items: center; padding: 8px 18px;
    font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
    font-size: 2rem; color: #0C1E3C; border-bottom: 1px solid var(--border, #D7E0EC);
    overflow-wrap: anywhere;
}
.typed-signature-preview:empty::after {
    content: "Your typed signature preview"; font-family: inherit; font-size: .85rem;
    color: var(--ink-4, #8A96A8); font-style: italic;
}

/* Touch-friendly signing on small screens */
@media (max-width: 640px) {
    .signature-pad { min-height: 190px; }
    .segmented { width: 100%; }
    .segmented__item { flex: 1 1 auto; justify-content: center; }
}

/* ---------------------------------------------------------------------
   32. Sign-in surface (premium indigo)
   ---------------------------------------------------------------------
   Used only by layouts/auth.php and its views. Everything is CSS: no image,
   no web font, no animation library. Motion is limited to a single entrance
   and is switched off entirely under prefers-reduced-motion.
   --------------------------------------------------------------------- */
.login-body {
    margin: 0;
    min-height: 100vh;
    background: #14123a;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 10px 16px;
    background: #fff;
    color: var(--indigo-900);
    border-radius: 0 0 10px 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

.login-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 12% 8%, #2f2a86 0%, rgba(47, 42, 134, 0) 58%),
        radial-gradient(110% 80% at 92% 10%, rgba(124, 58, 237, .55) 0%, rgba(124, 58, 237, 0) 60%),
        radial-gradient(90% 70% at 50% 108%, rgba(79, 70, 229, .45) 0%, rgba(79, 70, 229, 0) 65%),
        linear-gradient(160deg, #17153f 0%, #1d1a52 46%, #131233 100%);
}

.login-canvas__orb {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(46px);
    opacity: .55;
    will-change: transform;
}
.login-canvas__orb--a {
    width: 46vmax;
    height: 46vmax;
    top: -16vmax;
    left: -10vmax;
    background: radial-gradient(circle, rgba(139, 92, 246, .75) 0%, rgba(139, 92, 246, 0) 68%);
    animation: login-drift-a 26s ease-in-out infinite alternate;
}
.login-canvas__orb--b {
    width: 40vmax;
    height: 40vmax;
    bottom: -18vmax;
    right: -12vmax;
    background: radial-gradient(circle, rgba(99, 102, 241, .7) 0%, rgba(99, 102, 241, 0) 70%);
    animation: login-drift-b 32s ease-in-out infinite alternate;
}
.login-canvas__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(80% 65% at 50% 30%, #000 10%, transparent 100%);
    -webkit-mask-image: radial-gradient(80% 65% at 50% 30%, #000 10%, transparent 100%);
}

@keyframes login-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
}
@keyframes login-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.04); }
    to   { transform: translate3d(-3vmax, -4vmax, 0) scale(1); }
}
@keyframes login-rise {
    from { opacity: 0; transform: translate3d(0, 14px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------------------------------------------------------------- story rail */
.login-story {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 56px clamp(28px, 5vw, 72px);
    color: #e9e8ff;
}

.login-story__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}
.login-story__logo:hover { text-decoration: none; }

.login-story__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
}

.login-story__mark {
    display: block;
    flex: none;
    border-radius: 11px;
    filter: drop-shadow(0 8px 16px rgba(76, 29, 149, .45));
}

.login-story__wordmark {
    display: flex;
    flex-direction: column;
    font-size: 1.02rem;
    font-weight: 680;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.login-story__wordmark small {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #b9b7f0;
}

.login-story__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 54ch;
}

.login-story__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #c7c4ff;
}
.login-story__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, .18);
}
.login-story__headline {
    margin: 0;
    font-size: clamp(1.9rem, 2.6vw, 2.6rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
    font-weight: 660;
    color: #fff;
    max-width: 19ch;
}
.login-story__lede {
    margin: 16px 0 0;
    max-width: 46ch;
    font-size: .93rem;
    line-height: 1.7;
    color: #c3c1f2;
}
.login-story__points {
    list-style: none;
    margin: 34px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
    max-width: 46ch;
}
.login-story__points li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    font-size: .86rem;
    line-height: 1.6;
    color: #c8c6f5;
}
.login-story__points strong {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: 2px;
}
.login-story__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #c4b5fd;
}
.login-story__foot {
    margin: 0;
    font-size: .76rem;
    color: #9c9ad0;
}

/* -------------------------------------------------------------------- panel */
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 28px 18px 32px;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 452px;
    background: rgba(255, 255, 255, .985);
    color: var(--ink-1);
    border-radius: 20px;
    padding: 30px 26px 26px;
    box-shadow:
        0 1px 2px rgba(16, 12, 60, .18),
        0 28px 60px -24px rgba(12, 8, 48, .75);
    animation: login-rise .5s cubic-bezier(.22, 1, .36, 1) both;
}

.login-card__mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-weight: 680;
    font-size: .98rem;
    letter-spacing: -0.01em;
    color: var(--indigo-900);
}

.login-head { margin-bottom: 20px; }
.login-head__eyebrow {
    margin: 0 0 6px;
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--indigo-600);
    font-weight: 650;
}
.login-head__title {
    margin: 0;
    font-size: 1.72rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--slate-950);
}
.login-head__sub {
    margin: 8px 0 0;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--ink-3);
}

.login-error {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: 11px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: .85rem;
    line-height: 1.5;
}
.login-error__icon { display: grid; place-items: center; }

.login-form { display: grid; gap: 16px; }

.login-field { display: grid; gap: 7px; }
.login-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.login-field__label {
    font-size: .8rem;
    font-weight: 620;
    color: var(--slate-800);
}
.login-field__link {
    font-size: .79rem;
    font-weight: 600;
    color: var(--indigo-600);
    text-decoration: none;
}
.login-field__link:hover { text-decoration: underline; }

.login-field__control { position: relative; }
.login-field__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    display: grid;
    place-items: center;
    pointer-events: none;
}
.login-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px 12px 40px;
    border-radius: 11px;
    border: 1px solid var(--slate-200);
    background: #fff;
    color: var(--slate-900);
    font-size: .95rem;
    line-height: 1.3;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.login-input::placeholder { color: var(--slate-400); }
.login-input:hover { border-color: var(--slate-300); }
.login-input:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.login-input.is-invalid { border-color: #f87171; }
.login-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, .2); }
.login-input--password { padding-right: 46px; }

.login-reveal {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--slate-500);
    cursor: pointer;
}
.login-reveal:hover { background: var(--slate-100); color: var(--slate-800); }
.login-reveal:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 1px; }

.login-field__error {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    font-size: .79rem;
    color: #b91c1c;
    line-height: 1.45;
}

.login-challenge { display: grid; gap: 8px; }

.login-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    margin-top: 2px;
    padding: 13px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--indigo-600) 0%, var(--violet-600) 100%);
    color: #fff;
    font-size: .95rem;
    font-weight: 640;
    letter-spacing: -0.005em;
    cursor: pointer;
    box-shadow: 0 12px 24px -12px rgba(79, 70, 229, .85);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-submit:hover { filter: brightness(1.06); box-shadow: 0 16px 28px -14px rgba(79, 70, 229, .9); }
.login-submit:active { transform: translateY(1px); }
.login-submit:focus-visible { outline: 3px solid rgba(167, 139, 250, .75); outline-offset: 2px; }
.login-submit[aria-busy="true"], .login-submit:disabled { cursor: progress; filter: saturate(.9); }
.login-submit__arrow { display: inline-grid; place-items: center; transition: transform .15s ease; }
.login-submit:hover .login-submit__arrow { transform: translateX(2px); }

.login-submit__label {
    display: inline-block;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-submit__spinner {
    display: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: login-spin .7s linear infinite;
}
.login-submit[aria-busy="true"] .login-submit__spinner { display: inline-block; }
.login-submit[aria-busy="true"] .login-submit__arrow { display: none; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.login-submit-hint {
    margin: -4px 0 0;
    min-height: 1.1em;
    font-size: .79rem;
    color: var(--slate-500);
    text-align: center;
}

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: var(--slate-400);
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    background: var(--slate-200);
}

.login-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: #fff;
    color: var(--slate-800);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.login-google:hover {
    border-color: var(--slate-300);
    background: var(--slate-50);
    text-decoration: none;
}
.login-google:focus-visible { outline: 3px solid rgba(99, 102, 241, .45); outline-offset: 2px; }
.login-google-hint {
    margin: 10px 0 0;
    font-size: .765rem;
    line-height: 1.5;
    color: var(--slate-500);
    text-align: center;
}

.login-help {
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--slate-150);
    font-size: .785rem;
    line-height: 1.55;
    color: var(--slate-500);
    text-align: center;
}

.login-panel__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: .755rem;
    color: #a9a7d8;
    text-align: center;
    max-width: 452px;
}

.login-card .auth__demo {
    margin-top: 18px;
    background: var(--slate-50);
    border: 1px dashed var(--slate-200);
    color: var(--slate-700);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: .8rem;
    line-height: 1.6;
}

/* ---------------------------------------------------------------- responsive */
@media (min-width: 900px) {
    .login-shell { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); }
    .login-story { display: flex; }
    .login-panel { padding: 48px clamp(28px, 5vw, 68px); }
    .login-card { padding: 36px 34px 30px; }
    .login-card__mobile-brand { display: none; }
}

@media (min-width: 1280px) {
    .login-card { max-width: 470px; }
}

@media (max-width: 420px) {
    .login-card { padding: 24px 18px 20px; border-radius: 16px; }
    .login-head__title { font-size: 1.5rem; }
    .login-input, .login-submit, .login-google { min-height: 50px; font-size: .95rem; }
}

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-card { animation: none; }
    .login-canvas__orb { animation: none; }
    .login-submit, .login-submit__arrow, .login-input, .login-google { transition: none; }
    .login-submit[aria-busy="true"] .login-submit__spinner { animation-duration: 1.6s; }
}

/* ------------------------------------------------------------------ avatars */
.avatar--image {
    object-fit: cover;
    background: var(--slate-100);
    border-radius: 50%;
    padding: 0;
}
.avatar-editor {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.avatar-editor__preview {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-sunken, #eef1f7);
}
.avatar-editor__preview img,
.avatar-editor__preview .avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 1.6rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .16);
}
@media (max-width: 560px) {
    .avatar-editor { grid-template-columns: minmax(0, 1fr); }
    .avatar-editor__preview { justify-items: start; }
}
