:root {
    --ink: #12161d;
    --ink-2: #1a2029;
    --ink-text: #aeb6c4;
    --ink-text-dim: #7b8494;

    --bg: #f4f6f8;
    --paper: #ffffff;
    --line: #e4e7ec;
    --line-soft: #eef1f4;

    --text: #191e28;
    --muted: #697182;

    --accent: #2f6df6;
    --accent-weak: #ecf1ff;
    --accent-ink: #1b47b0;

    --ember: #e05a11;
    --ember-weak: #fceadd;
    --ember-ink: #b3450c;

    --green: #23924a;
    --green-weak: #e6f5ec;

    --amber: #b7791f;
    --amber-weak: #fbf1dd;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(16, 22, 34, .05), 0 1px 3px rgba(16, 22, 34, .04);
    --sidebar-w: 236px;

    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ Shell */

.shell { display: flex; min-height: 100vh; }

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

.page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 32px 64px;
}

/* --------------------------------------------------------------- Sidebar */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--ink);
    color: var(--ink-text);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 6px 8px 20px;
}

.brand__mark {
    font-size: 22px;
    line-height: 1;
    color: var(--accent);
    transform: translateY(1px);
}

.brand__text { display: flex; flex-direction: column; }

.brand__name {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.brand__sub {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-text-dim);
}

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }

.nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    color: var(--ink-text);
    font-weight: 500;
    transition: background .12s ease, color .12s ease;
}

.nav__item:hover { background: var(--ink-2); color: #fff; }

.nav__item.is-active { background: var(--ink-2); color: #fff; }

.nav__item.is-active .nav__icon { color: var(--accent); }

.nav__icon { color: var(--ink-text-dim); flex: none; }

.sidebar__foot { margin-top: auto; padding: 12px 10px 4px; }

.sidebar__hint {
    font-size: 11px;
    color: var(--ink-text-dim);
    letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(244, 246, 248, .86);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
    padding: 12px 32px;
}

.global-search {
    position: relative;
    max-width: 460px;
}

.global-search__icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.global-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font: inherit;
    color: var(--text);
}

.global-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-weak);
}

/* ----------------------------------------------------------------- Flash */

.flash-stack { max-width: 1120px; margin: 14px auto -6px; padding: 0 32px; }

.flash {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.flash--success { background: var(--green-weak); color: #196b37; border-color: #c4e6d0; }
.flash--error   { background: var(--ember-weak); color: #a5410c; border-color: #f4cdb4; }

/* ------------------------------------------------------------- Page head */

.page-head { margin-bottom: 20px; }

.page-head__title { font-size: 22px; }

.page-head__sub { margin: 3px 0 0; color: var(--muted); }

.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--accent); }
.crumbs .dot { margin: 0 6px; color: var(--line); }

/* ----------------------------------------------------------------- Tiles */

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.tile {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .12s ease, transform .12s ease;
}

.tile:hover { border-color: #cfd6e0; transform: translateY(-1px); }

.tile__value {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.tile__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.tile--accent { background: var(--ink); border-color: var(--ink); }
.tile--accent .tile__value { color: #fff; }
.tile--accent .tile__label { color: var(--ink-text); }

/* ---------------------------------------------------------------- Panels */

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.panel__title { font-size: 14px; letter-spacing: 0.01em; }

.panel__link { color: var(--accent); font-weight: 500; font-size: 13px; }
.panel__link:hover { color: var(--accent-ink); }

.panel__count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 20px;
}

.pad { padding: 16px 18px; }

/* ---------------------------------------------------------------- Tables */

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

.table thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
    padding: 11px 18px;
    border-bottom: 1px solid var(--line-soft);
    background: #fbfbfc;
}

.table tbody td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }

.cell--tight { white-space: nowrap; width: 1%; }

.row-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.row-link:hover { color: var(--accent); }

.link { color: var(--accent); }
.link:hover { color: var(--accent-ink); text-decoration: underline; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.avatar {
    width: 26px; height: 26px;
    flex: none;
    border-radius: 7px;
    background: var(--accent-weak);
    color: var(--accent-ink);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.avatar--lg { width: 52px; height: 52px; border-radius: 12px; font-size: 17px; }

.pip {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}
.pip--customer { background: var(--green); }

/* ------------------------------------------------------------- Tags/chips */

.tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.tag--customer { background: var(--green-weak); color: #176435; }
.tag--muted    { background: var(--bg); color: var(--muted); }
.tag--lead     { background: var(--accent-weak); color: var(--accent-ink); }
.tag--trial    { background: var(--amber-weak); color: var(--amber); }
.tag--high     { background: var(--ember-weak); color: #a5410c; }
.tag--info     { background: var(--green-weak); color: #176435; }
.tag--normal   { background: var(--bg); color: var(--muted); }

.chip-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent);
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
}
.chip-link:hover { border-color: var(--accent); background: var(--accent-weak); }

/* -------------------------------------------------------- Movement cards */

.move-list { display: flex; flex-direction: column; }
.move-list--roomy .move { padding-top: 16px; padding-bottom: 16px; }

.move {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px 14px 20px;
    border-bottom: 1px solid var(--line-soft);
}
.move:last-child { border-bottom: 0; }

.move__rail {
    position: absolute;
    left: 0; top: 10px; bottom: 10px;
    width: 3px;
    border-radius: 3px;
    background: var(--line);
}
.move--high .move__rail { background: var(--ember); }
.move--info .move__rail { background: var(--green); }

.move__body { flex: 1; min-width: 0; }

.move__top {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}

.move__person { font-weight: 600; font-size: 15px; }
.move__person:hover { color: var(--accent); }

.move__route {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.move__arrow { color: var(--muted); flex: none; }
.move--high .move__arrow { color: var(--ember); }

.org-chip {
    font-size: 13px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 7px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    color: var(--text);
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.org-chip:hover { border-color: #cfd6e0; }
.org-chip--customer {
    background: var(--green-weak);
    border-color: #cbe8d5;
    color: #176435;
}
.org-chip--empty { color: var(--muted); font-style: italic; }

.move__meta { margin-top: 7px; font-size: 12px; color: var(--muted); }
.move__meta .dot { margin: 0 4px; }

.move__actions { display: flex; gap: 8px; flex: none; }

/* --------------------------------------------------------------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 15px;
    border-radius: 9px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.btn--ghost {
    background: var(--paper);
    color: var(--text);
    border-color: var(--line);
}
.btn--ghost:hover { background: var(--bg); border-color: #cfd6e0; }

.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

/* ---------------------------------------------------------------- Filters */

.filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filters__search { flex: 1 1 240px; }
.filters__search input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font: inherit;
}
.filters__search input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-weak);
}

.field { display: flex; flex-direction: column; gap: 5px; }

.field__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
}

.field select {
    height: 38px;
    padding: 0 30px 0 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23697182' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 10px center;
    font: inherit;
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
    min-width: 120px;
}

.filters__actions { display: flex; gap: 8px; }

/* ------------------------------------------------------------ Pagination */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.pager__btn {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    font-weight: 500;
    color: var(--text);
}
.pager__btn:hover:not(.is-disabled) { border-color: var(--accent); color: var(--accent); }
.pager__btn.is-disabled { color: var(--muted); opacity: .5; cursor: default; }

.pager__status { font-size: 13px; color: var(--muted); font-family: var(--mono); }

/* ------------------------------------------------------------------ Tabs */

.tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: #eceef2;
    border-radius: 10px;
    margin-bottom: 18px;
}

.tabs__item {
    padding: 7px 15px;
    border-radius: 7px;
    font-weight: 500;
    font-size: 13px;
    color: var(--muted);
}
.tabs__item:hover { color: var(--text); }
.tabs__item.is-active { background: var(--paper); color: var(--text); box-shadow: var(--shadow); }

/* --------------------------------------------------------------- Profile */

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.profile-head__name { font-size: 24px; }
.profile-head__links { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }

.cols {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    align-items: start;
}

.col-side, .col-main { min-width: 0; }

.current { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.current:last-child { border-bottom: 0; }
.current__org { font-weight: 600; font-size: 15px; margin-right: 8px; }
.current__org:hover { color: var(--accent); }
.current__title { margin: 8px 0 0; color: var(--muted); }

.deets { margin: 12px 0 0; display: flex; flex-direction: column; gap: 9px; }
.deets.pad { margin: 0; padding: 16px 18px; }
.deets > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.deets dt { color: var(--muted); }
.deets dd { margin: 0; text-align: right; word-break: break-word; }

.notes { padding: 16px 18px; color: #39404d; margin: 0; }

.plain-list { list-style: none; margin: 0; padding: 8px 0; }
.plain-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 18px;
}

/* -------------------------------------------------------------- Timeline */

.timeline { list-style: none; margin: 0; padding: 8px 18px 16px; }

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 14px;
    padding: 12px 0 12px 16px;
    border-left: 2px solid var(--line);
}
.timeline__item:last-child { padding-bottom: 4px; }

.timeline__item::before {
    content: "";
    position: absolute;
    left: -6px; top: 18px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--line);
}
.timeline__item.is-current { border-left-color: var(--accent); }
.timeline__item.is-current::before { background: var(--accent); border-color: var(--accent); }

.timeline__span {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    padding-top: 1px;
}

.timeline__org { font-weight: 600; }
.timeline__org:hover { color: var(--accent); }
.timeline__title { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ Empty/state */

.empty { padding: 34px 18px; text-align: center; }
.empty__title { margin: 0; font-weight: 600; }
.empty__body { margin: 6px auto 0; color: var(--muted); max-width: 420px; }

.state-page { text-align: center; padding: 80px 20px; }
.state-page__code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.state-page__title { font-size: 26px; margin: 6px 0 8px; }
.state-page__body { color: var(--muted); margin: 0 auto 22px; max-width: 440px; }

/* ---------------------------------------------------------- Focus/access */

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 900px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
    .cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
        gap: 6px;
        overflow-x: auto;
    }
    .brand { padding: 0 12px 0 4px; }
    .brand__sub { display: none; }
    .nav { flex-direction: row; margin-top: 0; }
    .nav__item span:not(.nav__icon) { display: none; }
    .nav__item { padding: 9px; }
    .sidebar__foot { display: none; }
    .main { margin-left: 0; }
    .topbar, .page, .flash-stack { padding-left: 16px; padding-right: 16px; }
    .move { flex-direction: column; align-items: flex-start; }
    .move__actions { width: 100%; }
}

/* ============================================================ Additions:
   auth, user menu, and the import workflow.
   ========================================================================= */

/* Buttons */
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--block { width: 100%; }

/* Generic field input (login) — mirrors .filters__search input */
.field__input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper);
    font: inherit;
    color: var(--text);
}
.field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-weak);
}

/* ---------------------------------------------------------------- Sign in */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(47,109,246,0.10), transparent 60%),
        var(--bg);
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px 26px 30px;
}
.auth-card__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
}
.auth-card__title { font-size: 20px; margin: 0 0 4px; }
.auth-card__sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------------- User menu */
.userbox {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
}
.userbox__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.userbox__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.userbox__name { color: #eef1f6; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox__email { color: rgba(224,229,238,0.55); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox__logout { margin-left: auto; }
.iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(224,229,238,0.7);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.iconbtn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ---------------------------------------------------------------- Import */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.panel--pad { padding: 18px 20px 20px; }

.upload { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 26px 16px;
    border: 1.5px dashed #c6cdd8;
    border-radius: 12px;
    background: var(--bg);
    text-align: center;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-weak); }
.dropzone input[type=file] {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.dropzone__icon { font-size: 24px; color: var(--accent); line-height: 1; }
.dropzone__text { font-weight: 600; font-size: 14px; }
.dropzone__hint { color: var(--muted); font-size: 12px; }

.cols-list { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.cols-list li { font-size: 13px; color: var(--text); }
.cols-list code {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: 1px 6px;
}
.req {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ember);
    font-weight: 700;
    margin-left: 4px;
}

/* Preview summary strip */
.imp-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.imp-summary__item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    font-size: 13px;
    color: var(--muted);
}
.imp-summary__n { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--text); }
.imp-summary__item--move { border-color: var(--ember-weak); background: var(--ember-weak); color: #a5410c; }
.imp-summary__item--move .imp-summary__n { color: #a5410c; }
.imp-summary__item--invalid { border-color: #f0c9c0; background: #fcefeb; color: #a5410c; }

/* Row outcome badges */
.imp-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
    background: var(--bg);
    color: var(--muted);
}
.imp-badge--new     { background: var(--accent-weak); color: var(--accent-ink); }
.imp-badge--move    { background: var(--ember-weak); color: #a5410c; }
.imp-badge--update  { background: var(--amber-weak); color: var(--amber); }
.imp-badge--dup     { background: var(--bg); color: var(--muted); }
.imp-badge--invalid { background: #fcefeb; color: #a5410c; }

.pill {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    margin-left: 5px;
    vertical-align: middle;
}
.pill--faint { background: var(--bg); color: var(--muted); border: 1px solid var(--line-soft); }

.commit-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.tag--alert { background: var(--ember-weak); color: #a5410c; }

/* Utilities */
.small { font-size: 12px; }
.text-alert { color: var(--ember); font-weight: 600; }
.cell--right { text-align: right; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================ Person edit form */
.profile-head__id { min-width: 0; }
.profile-head__edit { margin-left: auto; flex: 0 0 auto; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-section { padding: 18px 20px 20px; }
.form-section .panel__title { margin-bottom: 4px; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
}
.field--full { grid-column: 1 / -1; }
/* a standalone full-width field outside the grid still needs top spacing */
.form-section > .field--full { margin-top: 14px; }

.field__textarea {
    height: auto;
    padding: 9px 12px;
    line-height: 1.5;
    resize: vertical;
    font: inherit;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
}
