/* ============================================================
   OwndUp Lists — bespoke design system
   Warm, bright, ally tone. One accent (lime), ink as workhorse.
   ============================================================ */

:root {
    /* Warm neutral palette */
    --ov-bg: #F6F1E7;
    --ov-bg-tint: #F1EADC;
    --ov-cream: var(--ov-bg); /* alias: warm page ground / light text on dark */
    --ov-cream-2: var(--ov-bg-tint); /* alias */
    --ov-surface: #FFFFFF;
    --ov-surface-2: #FBF7EF;
    --ov-paper: var(--ov-surface); /* alias: elevated card/panel surface */
    --ov-ink: #1B1A17;
    --ov-ink-soft: #35322C;
    --ov-ink-2: var(--ov-ink-soft); /* alias: lifted dark surface (dark theme) */
    --ov-muted: #5F5C54;
    --ov-faint: #8C877C;
    --ov-line: #E7E0D0;
    --ov-line-strong: #D8CFBB;
    --ov-line-2: var(--ov-line-strong); /* alias: stronger divider/border */
    /* Signature lime accent */
    --ov-lime: #B7E42F;
    --ov-lime-deep: #97C21C;
    --ov-lime-ink: #2C3A05;
    --ov-lime-soft: #EEF6D6;
    --ov-lime-soft-line: #DDEBB2;
    /* Status hues */
    --ov-amber: #E4A62F;
    --ov-amber-soft: #FBEFD3;
    --ov-amber-ink: #6B4A08;
    --ov-rose: #D6604A;
    --ov-coral: var(--ov-rose); /* alias: danger hue */
    --ov-rose-soft: #FADDD6;
    --ov-rose-ink: #7A2416;
    --ov-sky: #4C86C0;
    --ov-sky-soft: #DDEAF6;
    --ov-sky-ink: #245581;
    --ov-sky-soft-line: #C4DAEE;
    --ov-amber-soft-line: #F0DCA8;
    --ov-rose-soft-line: #F2C6BC;
    /* Teal — SharePoint / synced surfaces */
    --ov-teal-ink: #0B5C5E;
    --ov-teal-soft-line: #BEDFDC;
    /* Gold — fired/attention badge */
    --ov-gold-soft: #F7DD95;
    --ov-gold-ink: #5C3D05;
    --ov-gold-line: #E7C067;
    /* Warning brown — invited/pending, stat warnings */
    --ov-warn-ink: #8A5A12;
    --ov-warn-mid: #B98030;
    --ov-warn-strong: #C77B17;
    /* True danger red (distinct from the rose danger hue) */
    --ov-danger: #B3261E;
    /* Geometry */
    --ov-r-sm: 8px;
    --ov-r: 12px;
    --ov-r-md: var(--ov-r); /* alias */
    --ov-radius: var(--ov-r); /* alias */
    --ov-r-lg: 16px;
    --ov-radius-lg: var(--ov-r-lg); /* alias */
    --ov-r-pill: 999px;
    /* Shadows (warm, soft) */
    --ov-shadow-sm: 0 1px 2px rgba(43, 38, 28, 0.06), 0 1px 3px rgba(43, 38, 28, 0.05);
    --ov-shadow: 0 4px 16px rgba(43, 38, 28, 0.08), 0 1px 3px rgba(43, 38, 28, 0.06);
    --ov-shadow-lg: 0 18px 48px rgba(43, 38, 28, 0.16), 0 4px 12px rgba(43, 38, 28, 0.08);
    --ov-ring: 0 0 0 3px rgba(151, 194, 28, 0.35);
    /* Spacing scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ov-ink);
    background: radial-gradient(1200px 600px at 100% -10%, rgba(183, 228, 47, 0.10), transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(228, 166, 47, 0.08), transparent 55%), var(--ov-bg);
    background-attachment: fixed;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
}

h1 {
    font-size: 1.9rem;
    line-height: 1.15;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.05rem;
}

p {
    margin: 0;
}

a {
    color: var(--ov-lime-deep);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

::selection {
    background: var(--ov-lime);
    color: var(--ov-lime-ink);
}

/* Native form controls follow the design system: lime accent for checkboxes,
   radios, range and progress; light color-scheme so date/time pickers render
   warm-neutral instead of the browser's default blue chrome. */
input[type="checkbox"], input[type="radio"] {
    accent-color: var(--ov-lime-deep);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

input[type="date"], input[type="datetime-local"], input[type="time"],
input[type="month"], input[type="week"], input[type="number"] {
    color-scheme: light;
}

/* Icons scale with surrounding text by default; specific rules below override where needed. */
svg.icon {
    width: 1.2em;
    height: 1.2em;
    flex: none;
    vertical-align: -0.15em;
}

/* Headings are focused programmatically after navigation (FocusOnNavigate); no focus ring. */
h1:focus, h2:focus, h3:focus, [tabindex="-1"]:focus {
    outline: none;
}

/* Section-heading icons sit just above the muted accent. */
.section-head h2 svg {
    color: var(--ov-lime-deep);
}

/* ---------- App shell ---------- */

.app-shell {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    height: 62px;
    padding: 0 var(--sp-6);
    background: rgba(251, 247, 239, 0.82);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--ov-line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
    font-size: 1.02rem;
}

    .brand:hover {
        text-decoration: none;
    }

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, var(--ov-lime), var(--ov-lime-deep));
    color: var(--ov-lime-ink);
    box-shadow: var(--ov-shadow-sm);
}

    .brand-mark svg {
        width: 17px;
        height: 17px;
    }

.brand small {
    display: block;
    font-weight: 500;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ov-faint);
    margin-top: -2px;
}

.topbar-spacer {
    flex: 1 1 0;
    min-width: var(--sp-4);
}

/* ── Account / user menu (top-right dropdown) ── */
.user-menu { position: relative; margin-left: 6px; flex: none; }
.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 5px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ov-ink);
    cursor: pointer;
    font: inherit;
}
.user-trigger:hover { background: color-mix(in srgb, var(--ov-ink) 5%, transparent); }
.user-trigger .icon { width: 15px; height: 15px; color: var(--ov-muted); }
.user-name {
    font-size: 14px; font-weight: 600; max-width: 150px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.avatar {
    display: inline-grid; place-items: center; flex: none;
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(150deg, var(--ov-lime), var(--ov-lime-deep));
    color: var(--ov-lime-ink, #0E0F11);
    font-weight: 700; font-size: 12px; letter-spacing: .01em;
    box-shadow: var(--ov-shadow-sm);
}
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }
/* A synced row whose SharePoint item was deleted but is kept because it still carries reminders. */
.grid-table tr.row-orphan > td { background: color-mix(in srgb, var(--ov-rose) 8%, transparent); }
.grid-table tr.row-orphan > td:first-child { box-shadow: inset 3px 0 0 var(--ov-rose); }

.menu-backdrop { position: fixed; inset: 0; z-index: 60; }
.menu-pop {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 61;
    min-width: 250px;
    background: var(--ov-paper);
    border: 1px solid var(--ov-line);
    border-radius: 14px;
    box-shadow: 0 22px 44px -22px rgba(14,15,17,.28), 0 6px 16px -8px rgba(14,15,17,.12);
    padding: 6px;
}
.menu-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 10px 12px; margin-bottom: 6px;
    border-bottom: 1px solid var(--ov-line);
}
.menu-id { min-width: 0; }
.menu-id strong { display: block; font-size: 14px; color: var(--ov-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-id small { display: block; font-size: 12px; color: var(--ov-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; box-sizing: border-box;
    padding: 9px 10px; border-radius: 9px;
    appearance: none; border: none; background: transparent; font: inherit; text-align: left;
    font-size: 14px; color: var(--ov-ink); text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: color-mix(in srgb, var(--ov-ink) 5%, transparent); text-decoration: none; }
.menu-item .icon { width: 16px; height: 16px; color: var(--ov-muted); }
.menu-item.danger, .menu-item.danger .icon { color: var(--ov-danger); }
.menu-sep { height: 1px; background: var(--ov-line); margin: 6px 4px; }

/* ── Notification dropdown ── */
.notif-list {
    max-height: min(60vh, 460px);
    overflow-y: auto;
    display: flex; flex-direction: column;
    /* offset the menu-pop padding so the scrollbar sits at the edge */
    margin: 0 -6px -6px; padding: 0 6px 6px;
}
.notif-item {
    flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 12px 10px;
    border-radius: 0;
    line-height: 1.35;
}
.notif-item + .notif-item { border-top: 1px solid var(--ov-line); }
.notif-item.is-unread { box-shadow: inset 3px 0 0 var(--ov-lime); }
.notif-item small { display: block; }

@media (max-width: 640px) {
    .user-name { display: none; }
}

/* ── Inline alerts (form errors / success) ── */
.alert {
    padding: 10px 14px;
    border-radius: var(--ov-r-sm);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 14px;
    border: 1px solid transparent;
}
.alert-error {
    background: color-mix(in srgb, var(--ov-rose) 12%, var(--ov-surface));
    border-color: color-mix(in srgb, var(--ov-rose) 34%, transparent);
    color: color-mix(in srgb, var(--ov-rose) 72%, var(--ov-ink));
}
.alert-success {
    background: color-mix(in srgb, var(--ov-lime-deep) 16%, var(--ov-surface));
    border-color: color-mix(in srgb, var(--ov-lime-deep) 34%, transparent);
    color: var(--ov-ink);
}
.alert-warning {
    background: color-mix(in srgb, var(--ov-amber) 14%, var(--ov-surface));
    border-color: color-mix(in srgb, var(--ov-amber) 40%, transparent);
    color: var(--ov-amber-ink);
}

/* ── Account + Team pages ── */
.acc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-5);
    align-items: start;
}
@media (max-width: 720px) {
    .acc-grid { grid-template-columns: 1fr; }
}
.acc-card { padding: var(--sp-5); display: flex; flex-direction: column; gap: 14px; }

/* Identity hero on the account page */
.acc-hero {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-6);
    margin-bottom: var(--sp-5);
    background: linear-gradient(135deg, var(--ov-lime-soft), var(--ov-surface) 70%);
    border: 1px solid var(--ov-lime-soft-line);
}
.acc-hero-avatar {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: var(--ov-r-pill);
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--ov-lime-ink);
    background: linear-gradient(150deg, var(--ov-lime), var(--ov-lime-deep));
    box-shadow: var(--ov-shadow-sm);
}
.acc-hero-id { min-width: 0; flex: 1; }
.acc-hero-name {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ov-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acc-hero-email {
    color: var(--ov-muted);
    font-size: 0.94rem;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.acc-hero-chips {
    display: flex;
    gap: var(--sp-2);
    margin-top: 12px;
    flex-wrap: wrap;
}
.acc-hero-actions { flex: none; }
@media (max-width: 560px) {
    .acc-hero { flex-wrap: wrap; padding: var(--sp-5); }
    .acc-hero-actions { width: 100%; }
    .acc-hero-actions .btn { width: 100%; justify-content: center; }
}
.acc-card h2 { font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-meta { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.acc-meta > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc-meta dt { font-size: 0.86rem; color: var(--ov-muted); }
.acc-meta dd { margin: 0; font-weight: 600; }

/* Team member rows */
.member-list { display: flex; flex-direction: column; }
.member-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--ov-line);
}
.member-row:last-child { border-bottom: 0; }
.member-id { min-width: 0; flex: 1; }
.member-id strong { display: block; font-size: 0.94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-id small { display: block; font-size: 0.8rem; color: var(--ov-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .member-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.chip.chip-invited { background: color-mix(in srgb, var(--ov-warn-strong) 16%, var(--ov-surface)); color: var(--ov-warn-ink); }
.chip.chip-you { background: var(--ov-bg-tint); color: var(--ov-muted); }

/* Members list: search toolbar + pager */
.members-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}
.member-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--ov-bg-tint);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-pill);
    min-width: 220px;
    flex: 1 1 220px;
    max-width: 320px;
    color: var(--ov-faint);
    transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease), background 0.14s var(--ease);
}
.member-search:focus-within {
    border-color: var(--ov-lime-deep);
    box-shadow: var(--ov-ring);
    background: var(--ov-surface);
}
.member-search .icon, .member-search svg { width: 15px; height: 15px; flex: none; }
.member-search-input {
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    color: var(--ov-ink);
    width: 100%;
    outline: none;
}
.member-search-input::placeholder { color: var(--ov-faint); }

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--ov-line);
}
.pager-info { font-size: 0.82rem; color: var(--ov-muted); }
.pager-btns { display: inline-flex; gap: var(--sp-1); }
.pager-btns .btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }

.team-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--sp-5);
    align-items: start;
    margin-bottom: var(--sp-5);
}
@media (max-width: 860px) { .team-cols { grid-template-columns: 1fr; } }

/* Full-width stacked team sections with uniform vertical rhythm. */
.team-stack {
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}
.team-stack > .solo-banner { margin-bottom: 0; }

.solo-banner {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: var(--sp-5);
    background: color-mix(in srgb, var(--ov-lime) 10%, var(--ov-surface));
    border-color: color-mix(in srgb, var(--ov-lime-deep) 25%, transparent);
}
.solo-mark {
    flex: none; width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--ov-lime); color: var(--ov-ink);
}
.solo-mark .icon { width: 22px; height: 22px; }
.solo-banner h2 { margin: 0 0 4px; }

.select-sm { padding: 5px 10px; font-size: 0.82rem; width: auto; }

/* Shared-list indicator on the overview cards */
.lc-shared { display: inline-flex; align-items: center; gap: 4px; color: var(--ov-muted); }
.lc-shared .icon, .lc-shared svg { width: 13px; height: 13px; }

/* Shared-with summary on the list detail header: stacked avatars + role breakdown */
.list-share { display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 0; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-sm {
    width: 27px; height: 27px; font-size: 10.5px;
    border: 2px solid var(--ov-surface);
    box-shadow: none;
}
.avatar-stack .avatar-sm:not(:first-child) { margin-left: -9px; }
.avatar-owner  { background: linear-gradient(150deg, var(--ov-lime), var(--ov-lime-deep)); color: var(--ov-lime-ink, #0E0F11); }
.avatar-editor { background: color-mix(in srgb, var(--ov-lime) 50%, #FFFFFF); color: var(--ov-ink); }
.avatar-viewer { background: color-mix(in srgb, var(--ov-muted) 34%, #FFFFFF); color: var(--ov-ink); }
.avatar-more   { background: var(--ov-bg-tint); color: var(--ov-muted); font-weight: 600; }
.list-share-text {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.86rem; color: var(--ov-muted);
}
.list-share-text .icon, .list-share-text svg { width: 14px; height: 14px; }

/* Share dialog "add member" row */
.share-add { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ov-line); }
.share-add h3 { font-size: 0.9rem; font-weight: 700; margin: 0 0 10px; }
.share-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-add-row .select { flex: 1 1 160px; width: auto; }

.topnav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
}

.navlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--ov-r-pill);
    color: var(--ov-muted);
    font-weight: 550;
    font-size: 0.92rem;
    transition: background 0.16s var(--ease), color 0.16s var(--ease);
    position: relative;
}

    .navlink:hover {
        background: var(--ov-bg-tint);
        color: var(--ov-ink);
        text-decoration: none;
    }

    .navlink.active {
        background: var(--ov-ink);
        color: #fff;
    }

        .navlink.active .icon {
            color: var(--ov-lime);
        }

    .navlink svg {
        width: 17px;
        height: 17px;
    }

.count-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--ov-r-pill);
    background: var(--ov-rose);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.navlink.active .count-badge {
    background: var(--ov-lime);
    color: var(--ov-lime-ink);
}

.main {
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: var(--sp-7) var(--sp-6) var(--sp-8);
}

/* ---------- Buttons ---------- */

.btn {
    --btn-bg: var(--ov-surface);
    --btn-fg: var(--ov-ink);
    --btn-line: var(--ov-line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--ov-r-pill);
    border: 1px solid var(--btn-line);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.12s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}

    .btn:hover {
        box-shadow: var(--ov-shadow-sm);
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: none;
        box-shadow: var(--ov-ring);
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        box-shadow: none;
    }

.btn-primary {
    --btn-bg: linear-gradient(150deg, var(--ov-lime), var(--ov-lime-deep));
    --btn-fg: var(--ov-lime-ink);
    --btn-line: transparent;
    box-shadow: var(--ov-shadow-sm);
}

    .btn-primary:hover {
        box-shadow: var(--ov-shadow);
    }

.btn-ink {
    --btn-bg: var(--ov-ink);
    --btn-fg: #fff;
    --btn-line: transparent;
}

    .btn-ink:hover {
        --btn-bg: #2a2822;
    }

.btn-ghost {
    --btn-bg: transparent;
    --btn-line: transparent;
    color: var(--ov-muted);
}

    .btn-ghost:hover {
        --btn-bg: var(--ov-bg-tint);
        color: var(--ov-ink);
    }

.btn-danger {
    --btn-bg: transparent;
    --btn-fg: var(--ov-rose-ink);
    --btn-line: var(--ov-rose-soft);
}

    .btn-danger:hover {
        --btn-bg: var(--ov-rose-soft);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.84rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ov-faint);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.14s var(--ease), color 0.14s var(--ease), transform 0.12s var(--ease);
}

    .btn-icon:hover {
        background: var(--ov-bg-tint);
        color: var(--ov-ink);
    }

    .btn-icon:active {
        transform: translateY(1px);
    }

    .btn-icon:focus-visible {
        outline: none;
        box-shadow: var(--ov-ring);
    }

    .btn-icon svg {
        width: 17px;
        height: 17px;
    }

    .btn-icon.on {
        color: var(--ov-lime-deep);
        background: var(--ov-lime-soft);
    }

    .btn-icon.danger:hover {
        background: var(--ov-rose-soft);
        color: var(--ov-rose-ink);
    }

/* ---------- Cards & sections ---------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
    flex-wrap: wrap;
}

    .page-head .lede {
        color: var(--ov-muted);
        margin-top: 6px;
        font-size: 0.98rem;
    }

.eyebrow {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ov-faint);
}

.section {
    margin-top: var(--sp-7);
}

.section-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}

    .section-head h2 {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .section-head .count {
        color: var(--ov-faint);
        font-weight: 550;
        font-size: 0.95rem;
    }

    .section-head .spacer {
        flex: 1;
    }

.card {
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-lg);
    box-shadow: var(--ov-shadow-sm);
}

.grid {
    display: grid;
    gap: var(--sp-4);
}

.grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* List row (dashboard) — a calm, scannable row: icon tile -> name + meta -> status chip.
   Mirrors the marketing hero mock's row language (.ov-src / .ov-ownrow) so the app reads
   as one product with the site. Full-width single-column stack, not a card grid. */
.list-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-lg);
    box-shadow: var(--ov-shadow-sm);
    cursor: pointer;
    text-align: left;
    transition: transform 0.16s var(--ease), box-shadow 0.18s var(--ease), border-color 0.16s var(--ease);
}

    .list-card:hover {
        transform: translateY(-1px);
        box-shadow: var(--ov-shadow);
        border-color: var(--ov-lime-soft-line);
        text-decoration: none;
    }

    .list-card:focus-visible {
        outline: none;
        box-shadow: var(--ov-ring);
    }

    .list-card .lc-icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        display: grid;
        place-items: center;
        background: var(--ov-lime-soft);
        color: var(--ov-lime-deep);
        border: 1px solid var(--ov-lime-soft-line);
        flex: none;
    }

        .list-card .lc-icon svg {
            width: 20px;
            height: 20px;
        }

    /* Title + meta stacked; takes the free space and ellipsizes before the side cluster. */
    .list-card .lc-main {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        flex: 1;
    }

    .list-card .lc-name {
        min-width: 0;
        font-weight: 600;
        font-size: 1rem;
        letter-spacing: -0.01em;
        color: var(--ov-ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Right-aligned cluster: shared avatars + a single reminder status chip + a nav chevron. */
    .list-card .lc-side {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: none;
    }

    /* Faint chevron signals the whole row is a link; it firms up and nudges on hover. */
    .list-card .lc-go {
        display: inline-flex;
        color: var(--ov-line-strong);
        transition: color 0.16s var(--ease), transform 0.16s var(--ease);
    }

        .list-card .lc-go svg {
            width: 18px;
            height: 18px;
        }

    .list-card:hover .lc-go {
        color: var(--ov-lime-deep);
        transform: translateX(2px);
    }

.lc-edit-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    flex: none;
    color: var(--ov-faint);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.14s var(--ease), background 0.14s var(--ease), color 0.14s var(--ease);
}

.list-card:hover .lc-edit-btn {
    opacity: 1;
}

.lc-edit-btn:hover {
    background: var(--ov-bg-tint);
    color: var(--ov-ink);
}

.lc-edit-btn svg {
    width: 13px;
    height: 13px;
}

.lc-edit-input {
    width: 100%;
    font-family: inherit;
    font-weight: 650;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    color: var(--ov-ink);
    border: none;
    border-bottom: 2px solid var(--ov-lime-deep);
    background: transparent;
    padding: 0 0 2px;
    outline: none;
}

.list-card.editing {
    cursor: default;
}

    .list-card.editing:hover {
        transform: none;
        box-shadow: var(--ov-shadow-sm);
        border-color: var(--ov-line);
    }

/* Inline list-title edit (detail page) */
.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

    .title-row h1 {
        margin: 0;
    }

.title-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: none;
    background: transparent;
    flex: none;
    color: var(--ov-faint);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.14s var(--ease), background 0.14s var(--ease), color 0.14s var(--ease);
}

.title-row:hover .title-edit-btn {
    opacity: 1;
}

.title-edit-btn:hover {
    background: var(--ov-bg-tint);
    color: var(--ov-ink);
}

.title-edit-btn svg {
    width: 17px;
    height: 17px;
}

.title-edit-input {
    display: block;
    margin-top: 6px;
    width: 100%;
    max-width: 560px;
    font-family: inherit;
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
    border: none;
    border-bottom: 2px solid var(--ov-lime-deep);
    background: transparent;
    padding: 0 2px 3px;
    outline: none;
}

/* Touch devices have no hover: keep inline-edit affordances always visible and finger-sized. */
@media (hover: none) {
    .group-edit-btn, .lc-edit-btn, .title-edit-btn {
        opacity: 1;
        width: 40px;
        height: 40px;
    }

        .group-edit-btn svg, .lc-edit-btn svg, .title-edit-btn svg {
            width: 16px;
            height: 16px;
        }
}

.list-card .lc-meta {
    color: var(--ov-faint);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .list-card .lc-meta .dot {
        width: 3px;
        height: 3px;
        border-radius: 50%;
        background: var(--ov-line-strong);
        flex: none;
    }

/* Reminder status chip — inline on the right of the row (was an absolute corner badge).
   Neutral by default; gold when a reminder has fired and wants attention. */
.list-card .lc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--ov-r-pill);
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--ov-bg-tint);
    color: var(--ov-muted);
    border: 1px solid var(--ov-line);
    white-space: nowrap;
}

    .list-card .lc-badge svg {
        width: 12px;
        height: 12px;
    }

    .list-card .lc-badge.fired {
        background: var(--ov-gold-soft);
        color: var(--ov-gold-ink);
        border-color: var(--ov-gold-line);
    }

/* SharePoint-linked list: the teal SharePoint logo marks it on the dashboard. The tile stays on the
   surface colour so the logo's tile-fill (also --ov-paper) masks the petal behind it seamlessly. */
.list-card .lc-icon.sp {
    background: var(--ov-paper);
    color: var(--ov-teal-ink);
    border-color: var(--ov-teal-soft-line);
}

    .list-card .lc-icon.sp .sp-logo {
        width: 24px;
        height: 24px;
    }

/* Reusable SharePoint mark. Inherits colour from its context via currentColor. */
.sp-logo {
    width: 20px;
    height: 20px;
    flex: none;
}

/* Last-synced indicator next to the Refresh button on a linked list's detail page. */
.sp-sync-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 550;
    color: var(--ov-teal-ink);
    white-space: nowrap;
}

    .sp-sync-meta .sp-logo {
        width: 16px;
        height: 16px;
    }

    /* Behind / never refreshed — amber nudge. */
    .sp-sync-meta.stale {
        color: var(--ov-amber-ink);
    }

/* Recent strip */
.recent-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 1fr);
    gap: var(--sp-3);
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

/* Quiet secondary quick-access: flatter than the primary list rows so the two tiers read
   as a clear hierarchy (glanceable jump-back-in strip on top, the real lists below). */
.recent-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--ov-surface-2);
    border: 1px solid transparent;
    border-radius: var(--ov-r);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.14s var(--ease);
}

    .recent-chip:hover {
        background: var(--ov-surface);
        border-color: var(--ov-lime-soft-line);
        transform: translateY(-1px);
        text-decoration: none;
    }

    .recent-chip .rc-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        background: var(--ov-bg-tint);
        color: var(--ov-muted);
        flex: none;
    }

        .recent-chip .rc-icon svg {
            width: 16px;
            height: 16px;
        }

    .recent-chip .rc-name {
        font-weight: 600;
        font-size: 0.92rem;
        color: var(--ov-ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .recent-chip .rc-when {
        color: var(--ov-faint);
        font-size: 0.78rem;
    }

/* Group header */
.group-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

    .group-title .g-dot {
        width: 9px;
        height: 9px;
        border-radius: 3px;
        background: var(--ov-lime);
    }

.group-edit-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--ov-faint);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.14s var(--ease), background 0.14s var(--ease), color 0.14s var(--ease);
}

.group-title:hover .group-edit-btn {
    opacity: 1;
}

.group-edit-btn:hover {
    background: var(--ov-bg-tint);
    color: var(--ov-ink);
}

.group-edit-btn.danger {
    color: var(--ov-rose);
}

    .group-edit-btn.danger:hover {
        background: color-mix(in srgb, var(--ov-rose) 12%, transparent);
        color: var(--ov-rose);
    }

/* Button icons follow their button's own colour, not the lime section-heading
   rule (.section-head h2 svg) — so the trash reads red and the pencil muted. */
.section-head .group-edit-btn svg {
    color: currentColor;
}

.group-edit-btn svg {
    width: 14px;
    height: 14px;
}

.group-edit-input {
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
    border: none;
    border-bottom: 2px solid var(--ov-lime-deep);
    background: transparent;
    padding: 0 2px 3px;
    outline: none;
    min-width: 220px;
}

/* Drag-to-reorder */
.list-card[draggable="true"] {
    cursor: pointer;
}

.list-card.dragging {
    opacity: 0.4;
}

.list-card.drag-over {
    outline: 2px dashed var(--ov-lime-deep);
    outline-offset: 3px;
    border-color: transparent;
}

/* ---------- Chips / pills ---------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--ov-r-pill);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--ov-bg-tint);
    color: var(--ov-ink-soft);
    border: 1px solid var(--ov-line);
}

    .chip svg {
        width: 13px;
        height: 13px;
    }

    .chip.lime {
        background: var(--ov-lime-soft);
        color: var(--ov-lime-ink);
        border-color: var(--ov-lime-soft-line);
    }

    .chip.amber {
        background: var(--ov-amber-soft);
        color: var(--ov-amber-ink);
        border-color: var(--ov-amber-soft-line);
    }

    .chip.rose {
        background: var(--ov-rose-soft);
        color: var(--ov-rose-ink);
        border-color: var(--ov-rose-soft-line);
    }

    .chip.sky {
        background: var(--ov-sky-soft);
        color: var(--ov-sky-ink);
        border-color: var(--ov-sky-soft-line);
    }

    .chip.plain {
        background: transparent;
    }

/* ---------- Inputs ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field > label {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--ov-ink-soft);
    }

    .field .hint {
        font-size: 0.78rem;
        color: var(--ov-faint);
    }

/* Inline checkbox / radio label — one class instead of repeated inline flex styles. */
.check-row {
    display: flex;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

.check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--ov-ink-soft);
    cursor: pointer;
}

.input, .select, .textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.94rem;
    color: var(--ov-ink);
    background: var(--ov-surface);
    border: 1px solid var(--ov-line-strong);
    border-radius: var(--ov-r-sm);
    transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

    .input::placeholder {
        color: var(--ov-faint);
    }

    .input:focus, .select:focus, .textarea:focus {
        outline: none;
        border-color: var(--ov-lime-deep);
        box-shadow: var(--ov-ring);
    }

.select {
    appearance: none;
    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='%235F5C54' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 34px;
    cursor: pointer;
}

/* ---------- Dialog ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(27, 26, 23, 0.42);
    backdrop-filter: blur(3px);
    display: grid;
    place-items: center;
    padding: var(--sp-5);
    animation: overlay-in 0.18s var(--ease);
}

@keyframes overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dialog {
    width: 100%;
    max-width: 460px;
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-lg);
    box-shadow: var(--ov-shadow-lg);
    animation: dialog-in 0.2s var(--ease);
    overflow: hidden;
}

    .dialog.wide {
        max-width: 560px;
    }

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-5) var(--sp-5) var(--sp-3);
}

    .dialog-head .d-title {
        font-weight: 650;
        font-size: 1.12rem;
        letter-spacing: -0.01em;
    }

    .dialog-head .d-sub {
        color: var(--ov-muted);
        font-size: 0.88rem;
        margin-top: 3px;
    }

    .dialog-head .btn-icon {
        margin-left: auto;
    }

.dialog-body {
    padding: var(--sp-2) var(--sp-5) var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5);
    background: var(--ov-surface-2);
    border-top: 1px solid var(--ov-line);
}

/* ---------- Table (list detail) ---------- */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Keep horizontal panning of a wide table from dragging the whole page. */
    overscroll-behavior-x: contain;
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-lg);
    background: var(--ov-surface);
    box-shadow: var(--ov-shadow-sm);
}

table.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ov-muted);
    background: var(--ov-surface-2);
    padding: 12px 14px;
    border-bottom: 1px solid var(--ov-line);
    white-space: nowrap;
}

    .grid-table thead th .th-inner {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .grid-table thead th .type-glyph {
        color: var(--ov-faint);
        display: inline-flex;
    }

        .grid-table thead th .type-glyph svg {
            width: 14px;
            height: 14px;
        }

    .grid-table thead th.col-tools {
        width: 88px;
        text-align: right;
    }

    .grid-table thead th.col-add {
        width: 52px;
    }

.grid-table tbody td {
    padding: 0;
    border-bottom: 1px solid var(--ov-line);
    vertical-align: middle;
}

.grid-table tbody tr:last-child td {
    border-bottom: none;
}

.grid-table tbody tr:hover {
    background: var(--ov-surface-2);
}

.row-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    padding-right: 8px;
}

.addcol-btn {
    width: 100%;
    height: 100%;
    min-height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--ov-faint);
    display: grid;
    place-items: center;
    transition: color 0.14s var(--ease), background 0.14s var(--ease);
}

    .addcol-btn:hover {
        color: var(--ov-lime-deep);
        background: var(--ov-lime-soft);
    }

/* Footer cell spans the whole table width, so its bar (top border + fill) stays
   continuous beneath the rows no matter how far the table is scrolled sideways. */
.table-foot-cell {
    padding: 0;
    border-top: 1px solid var(--ov-line);
    border-bottom: none;
    background: var(--ov-surface-2);
}

.table-foot {
    display: flex;
    padding: 10px 12px;
    /* Keep the "add row" button pinned to the visible left edge during horizontal scroll. */
    position: sticky;
    left: 0;
    width: max-content;
}

/* ---------- SuperAdmin (platform) tables ---------- */

/* The base grid-table zeros td padding for the inline cell editor; restore it for read-only data tables. */
.grid-table.sa-table tbody td {
    padding: 11px 14px;
    white-space: nowrap;
    font-size: 0.9rem;
}
.grid-table.sa-table tbody td .chip { margin-right: 4px; }

.sa-link { color: var(--ov-lime-deep); font-weight: 600; text-decoration: none; }
.sa-link:hover { text-decoration: underline; }

.sa-mono {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    color: var(--ov-muted);
}

.sa-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--ov-muted);
    text-decoration: none;
}
.sa-back:hover { color: var(--ov-ink); }
.sa-back svg { width: 15px; height: 15px; }

/* ---------- Cell editors ---------- */

.cell {
    display: block;
}

.cell-input {
    width: 100%;
    min-width: 120px;
    padding: 12px 14px;
    font: inherit;
    font-size: 0.92rem;
    color: var(--ov-ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    transition: box-shadow 0.14s var(--ease), background 0.14s var(--ease);
}

    .cell-input::placeholder {
        color: var(--ov-faint);
    }

    .cell-input:hover {
        background: rgba(151, 194, 28, 0.06);
    }

    .cell-input:focus {
        outline: none;
        background: var(--ov-surface);
        box-shadow: inset 0 0 0 2px var(--ov-lime-deep);
    }

    .cell-input.num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

.cell-date {
    color-scheme: light;
}

.cell-longtext {
    resize: vertical;
    min-height: 42px;
    line-height: 1.45;
    font: inherit;
}

.cell-amount {
    display: flex;
    align-items: center;
}

    .cell-amount .cell-affix {
        padding-left: 14px;
        color: var(--ov-faint);
        font-size: 0.92rem;
    }

    .cell-amount .cell-input {
        min-width: 90px;
        padding-left: 4px;
    }

.cell-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
}

    .cell-link a {
        font-weight: 550;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cell-link .cell-input {
        padding: 4px 8px;
    }

.empty-dash {
    color: var(--ov-faint);
    padding: 12px 14px;
    display: block;
}

/* ---------- Alerts ---------- */

.alert-row {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--ov-line);
}

    .alert-row:last-child {
        border-bottom: none;
    }

    .alert-row .a-icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        display: grid;
        place-items: center;
        flex: none;
    }

    .alert-row.fired .a-icon {
        background: var(--ov-amber-soft);
        color: var(--ov-amber-ink);
        border: 1px solid var(--ov-amber-soft-line);
    }

    .alert-row.upcoming .a-icon {
        background: var(--ov-bg-tint);
        color: var(--ov-muted);
        border: 1px solid var(--ov-line);
    }

    .alert-row.handled .a-icon {
        background: var(--ov-bg-tint);
        color: var(--ov-faint);
        border: 1px solid var(--ov-line);
    }

    .alert-row.handled .a-title {
        color: var(--ov-muted);
    }

.handled-card {
    background: var(--ov-surface-2);
}

.alert-row .a-main {
    flex: 1;
    min-width: 0;
}

.alert-row .a-title {
    font-weight: 600;
}

.alert-row .a-sub {
    color: var(--ov-muted);
    font-size: 0.86rem;
    margin-top: 2px;
}

    .alert-row .a-sub b {
        color: var(--ov-ink-soft);
        font-weight: 600;
    }

.alert-row .a-side {
    text-align: right;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

    /* Fired reminders: a quiet amber text label, not a filled pill, so it doesn't
       compete with the green "Afhandelen" action or double up on the amber bell tile. */
    .alert-row .a-fired-status {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--ov-amber-ink);
    }

.alert-row .a-click {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 6px 8px;
    margin: -6px -8px;
    border-radius: 10px;
    transition: background 0.14s var(--ease);
}

    .alert-row .a-click:hover {
        background: var(--ov-bg-tint);
    }

.alert-row .a-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 4px;
}

    .alert-row .a-actions .btn-icon {
        width: 32px;
        height: 32px;
    }

/* Phones: the row is a horizontal flex where .a-side and .a-actions are
   flex:none, so on a narrow screen they hold their width and crush .a-main
   down to almost nothing — the title then wraps one word per line. Let the
   row wrap so the title keeps the first line (beside the icon) at full width,
   and the status + action buttons drop onto their own lines below. */
@media (max-width: 640px) {
    .alert-row {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: var(--sp-4);
    }

    /* Icon (40px) + the row's column gap (sp-4 = 16px) = 56px; the title fills
       the rest of line 1 and forces the side/actions blocks to wrap below. */
    .alert-row .a-main,
    .alert-row .a-click {
        flex: 1 1 calc(100% - 56px);
    }

    .alert-row .a-side {
        flex-basis: 100%;
        text-align: left;
        align-items: flex-start;
    }

    .alert-row .a-actions {
        flex-basis: 100%;
        flex-wrap: wrap;
        padding-left: 0;
        gap: 8px;
    }

    /* Comfortable tap targets now the buttons have room to breathe. */
    .alert-row .a-actions .btn-sm {
        padding: 8px 14px;
    }
}

/* ---------- Empty states ---------- */

.empty {
    text-align: center;
    padding: var(--sp-7) var(--sp-5);
    border: 1px dashed var(--ov-line-strong);
    border-radius: var(--ov-r-lg);
    background: rgba(255,255,255,0.4);
}

    .empty .e-icon {
        width: 52px;
        height: 52px;
        margin: 0 auto var(--sp-4);
        border-radius: 15px;
        display: grid;
        place-items: center;
        background: var(--ov-lime-soft);
        color: var(--ov-lime-deep);
    }

        .empty .e-icon svg {
            width: 26px;
            height: 26px;
        }

    .empty h3 {
        margin-bottom: 6px;
    }

    .empty p {
        color: var(--ov-muted);
        max-width: 380px;
        margin: 0 auto var(--sp-5);
    }

/* ---------- Toasts ---------- */

.toast-host {
    position: fixed;
    bottom: var(--sp-5);
    right: var(--sp-5);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--ov-ink);
    color: #fff;
    border-radius: var(--ov-r);
    box-shadow: var(--ov-shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    animation: toast-in 0.24s var(--ease);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.toast .t-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    flex: none;
}

.toast.success .t-icon {
    background: var(--ov-lime);
    color: var(--ov-lime-ink);
}

.toast.info .t-icon {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.toast .t-icon svg {
    width: 14px;
    height: 14px;
}

/* ---------- Utilities ---------- */

.stack {
    display: flex;
    flex-direction: column;
}

.row-flex {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.wrap {
    flex-wrap: wrap;
}

.muted {
    color: var(--ov-muted);
}

.faint {
    color: var(--ov-faint);
}

.nums {
    font-variant-numeric: tabular-nums;
}

.spacer {
    flex: 1;
}

/* Segmented control (offset presets, unit) */
.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    background: var(--ov-bg-tint);
    border-radius: var(--ov-r-pill);
    border: 1px solid var(--ov-line);
    flex-wrap: wrap;
}

    .segmented button {
        border: none;
        background: transparent;
        cursor: pointer;
        font: inherit;
        font-weight: 600;
        font-size: 0.84rem;
        color: var(--ov-muted);
        padding: 6px 14px;
        border-radius: var(--ov-r-pill);
        transition: background 0.14s var(--ease), color 0.14s var(--ease), box-shadow 0.14s var(--ease);
    }

        .segmented button:hover {
            color: var(--ov-ink);
        }

        .segmented button.sel {
            background: var(--ov-surface);
            color: var(--ov-ink);
            box-shadow: var(--ov-shadow-sm);
        }

/* ---------- New-list source chooser + Excel import ---------- */

.source-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sp-2);
    width: 100%;
    margin-bottom: var(--sp-5);
}

@media (max-width: 480px) {
    .source-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
}

    .source-tabs button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 7px;
        padding: 14px 6px;
        border: 1px solid var(--ov-line);
        border-radius: var(--ov-r);
        background: var(--ov-surface);
        color: var(--ov-muted);
        font: inherit;
        font-weight: 600;
        font-size: 0.82rem;
        white-space: nowrap;
        cursor: pointer;
        transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), transform 0.05s var(--ease);
    }

        .source-tabs button:hover {
            border-color: var(--ov-lime-deep);
            color: var(--ov-ink);
        }

        .source-tabs button:active {
            transform: translateY(1px);
        }

        .source-tabs button.sel {
            border-color: var(--ov-lime-deep);
            background: var(--ov-lime-soft);
            color: var(--ov-lime-ink);
        }

    .source-tabs .icon {
        width: 20px;
        height: 20px;
    }

/* ---- Template gallery + preview (Sjabloon tab) ---- */
.tpl-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .tpl-gallery {
        grid-template-columns: 1fr;
    }
}

.tpl-card {
    display: flex;
    gap: 12px;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-md);
    background: var(--ov-surface);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

    .tpl-card:hover {
        border-color: var(--ov-lime-deep);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .tpl-card:active {
        transform: translateY(1px);
    }

.tpl-emoji {
    font-size: 1.5rem;
    line-height: 1.2;
    flex: none;
}

.tpl-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tpl-name {
    font-weight: 650;
    color: var(--ov-ink);
}

.tpl-desc {
    font-size: 0.84rem;
    color: var(--ov-muted);
    line-height: 1.35;
}

.tpl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--ov-faint);
}

    .tpl-meta .tpl-rem {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--ov-lime-ink);
    }

    .tpl-meta .icon {
        width: 13px;
        height: 13px;
    }

.tpl-preview-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--sp-4);
}

.tpl-preview-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    color: var(--ov-ink);
}

.tpl-preview-note {
    font-size: 0.84rem;
    color: var(--ov-muted);
    margin: 6px 0 12px;
    line-height: 1.4;
}

.tpl-rem-inline {
    display: inline-flex;
    vertical-align: middle;
    color: var(--ov-lime-ink);
}

    .tpl-rem-inline .icon {
        width: 13px;
        height: 13px;
    }

.tpl-preview-scroll {
    overflow-x: auto;
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-md);
}

.tpl-preview-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.82rem;
}

    .tpl-preview-table th {
        text-align: left;
        vertical-align: bottom;
        padding: 10px 12px;
        border-bottom: 1px solid var(--ov-line);
        white-space: nowrap;
        background: var(--ov-surface-2, var(--ov-surface));
    }

    .tpl-preview-table td {
        padding: 9px 12px;
        color: var(--ov-faint);
        white-space: nowrap;
    }

.tpl-th-top {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ov-ink);
    font-weight: 600;
}

    .tpl-th-top .type-glyph .icon {
        width: 14px;
        height: 14px;
        color: var(--ov-faint);
    }

.tpl-req {
    color: var(--ov-rose-ink, #c0392b);
    font-weight: 700;
}

.tpl-th-type {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--ov-faint);
    white-space: normal;
    max-width: 220px;
}

/* File picker drop zone */
.import-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 28px 20px;
    border: 1.5px dashed var(--ov-line-strong);
    border-radius: var(--ov-r-lg);
    background: var(--ov-surface-2);
    cursor: pointer;
    transition: border-color 0.14s var(--ease), background 0.14s var(--ease);
}

    .import-drop:hover {
        border-color: var(--ov-lime-deep);
        background: var(--ov-lime-soft);
    }

    .import-drop.busy {
        cursor: progress;
        opacity: 0.7;
    }

    .import-drop .icon {
        width: 26px;
        height: 26px;
        color: var(--ov-muted);
    }

.import-drop-title {
    font-weight: 600;
    color: var(--ov-ink);
}

.import-drop-hint {
    font-size: 0.82rem;
    color: var(--ov-faint);
    max-width: 34ch;
}

/* Visually hidden native input covering the drop zone. */
.import-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.import-error {
    margin-top: var(--sp-3);
    padding: 10px 12px;
    border-radius: var(--ov-r-sm);
    background: var(--ov-rose-soft);
    color: var(--ov-rose-ink);
    font-size: 0.86rem;
}

.import-summary {
    margin-top: var(--sp-2);
    font-size: 0.9rem;
    color: var(--ov-ink-soft);
}

    .import-summary .import-warn {
        display: block;
        margin-top: 4px;
        color: var(--ov-amber-ink);
        font-size: 0.82rem;
    }

.import-cols {
    margin-top: var(--sp-4);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r);
    overflow: hidden;
}

.import-cols-head {
    padding: 10px 12px;
    background: var(--ov-bg-tint);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ov-muted);
}

.import-col-list {
    max-height: 320px;
    overflow-y: auto;
}

.import-col-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: var(--sp-2);
    padding: 8px 12px;
    border-top: 1px solid var(--ov-line);
}

.import-col-list .import-col-row:first-child {
    border-top: none;
}

.import-reset {
    margin-top: var(--sp-3);
}

/* ---------- Global search (command palette) ---------- */

.search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    max-width: 40vw;
    padding: 8px 10px 8px 13px;
    background: var(--ov-surface);
    border: 1px solid var(--ov-line-strong);
    border-radius: var(--ov-r-pill);
    color: var(--ov-faint);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}

    .search-trigger:hover {
        border-color: var(--ov-lime-soft-line);
        box-shadow: var(--ov-shadow-sm);
        background: var(--ov-surface);
    }

    .search-trigger:focus-visible {
        outline: none;
        box-shadow: var(--ov-ring);
    }

    .search-trigger svg {
        width: 16px;
        height: 16px;
        color: var(--ov-muted);
    }

    .search-trigger .st-label {
        flex: 1;
        text-align: left;
    }

.kbd {
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--ov-bg-tint);
    color: var(--ov-muted);
    border: 1px solid var(--ov-line);
    box-shadow: 0 1px 0 var(--ov-line-strong);
}

.overlay.top {
    align-items: flex-start;
    padding-top: 12vh;
    height: 100vh;
}

.palette {
    width: 100%;
    max-width: 580px;
    background: var(--ov-surface);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-r-lg);
    box-shadow: var(--ov-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: dialog-in 0.18s var(--ease);
}

.palette-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 18px;
    border-bottom: 1px solid var(--ov-line);
}

    .palette-input > svg {
        width: 19px;
        height: 19px;
        color: var(--ov-faint);
        flex: none;
    }

.palette-field {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    color: var(--ov-ink);
}

    .palette-field::placeholder {
        color: var(--ov-faint);
    }

.palette-body {
    max-height: 54vh;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
}

.palette-group {
    margin-bottom: 6px;
}

.palette-label {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ov-faint);
    padding: 10px 12px 6px;
}

.palette-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    color: var(--ov-ink);
}

    .palette-item .pi-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        flex: none;
        display: grid;
        place-items: center;
        background: var(--ov-bg-tint);
        color: var(--ov-muted);
    }

        .palette-item .pi-icon svg {
            width: 16px;
            height: 16px;
        }

    .palette-item .pi-main {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .palette-item .pi-primary {
        font-weight: 600;
        font-size: 0.94rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .palette-item .pi-secondary {
        font-size: 0.8rem;
        color: var(--ov-faint);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .palette-item .pi-enter {
        color: var(--ov-faint);
        opacity: 0;
        flex: none;
    }

        .palette-item .pi-enter svg {
            width: 15px;
            height: 15px;
        }

    .palette-item.sel {
        background: var(--ov-lime-soft);
    }

        .palette-item.sel .pi-icon {
            background: var(--ov-lime);
            color: var(--ov-lime-ink);
        }

        .palette-item.sel .pi-enter {
            opacity: 1;
            color: var(--ov-lime-deep);
        }

.palette-empty {
    text-align: center;
    color: var(--ov-muted);
    padding: var(--sp-7) var(--sp-5);
}

    .palette-empty svg {
        width: 26px;
        height: 26px;
        color: var(--ov-faint);
        margin-bottom: 10px;
    }

    .palette-empty p {
        color: var(--ov-muted);
    }

.palette-foot {
    display: flex;
    gap: var(--sp-4);
    padding: 10px 16px;
    border-top: 1px solid var(--ov-line);
    background: var(--ov-surface-2);
    font-size: 0.78rem;
    color: var(--ov-faint);
}

    .palette-foot span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

/* Row highlight when arriving from search */
@keyframes row-flash {
    0% {
        background: var(--ov-lime);
    }

    100% {
        background: transparent;
    }
}

.grid-table tbody tr.flash {
    animation: row-flash 1.8s var(--ease);
}

@media (max-width: 860px) {
    .search-trigger .st-label, .search-trigger .kbd {
        display: none;
    }

    .search-trigger {
        width: auto;
    }
}

/* Framework error UI */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 12px 20px;
    background: var(--ov-ink);
    color: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

    #blazor-error-ui .reload {
        color: var(--ov-lime);
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 16px;
        top: 10px;
    }

@media (max-width: 720px) {
    .topbar {
        padding: 0 var(--sp-4);
        gap: var(--sp-3);
        height: 56px;
    }

    .brand small {
        display: none;
    }

    .brand .ownd-auth-wordmark {
        height: 24px;
        width: auto;
    }

    .main {
        padding: var(--sp-5) var(--sp-4) var(--sp-7);
    }

    h1 {
        font-size: 1.5rem;
    }

    .navlink {
        padding: 8px 11px;
    }
}

/* Phones: the top bar carries too much to keep text labels + centring spacers.
   Drop the spacers, pin the brand left, and let the nav collapse to icons so
   brand · search · Lijsten · Alerts · meldingen · account all fit one row. */
@media (max-width: 640px) {
    .topbar-spacer { display: none; }

    .brand { margin-right: auto; }

    /* Hide the text label inside nav links (the SVG icon is not a <span>, and
       the count badge is explicitly kept), leaving a compact icon-only bar. */
    .navlink > span:not(.count-badge) { display: none; }

    .navlink {
        padding: 9px 10px;
    }

    /* Nudge the fired/unread badges onto the icon corner now labels are gone. */
    .navlink .count-badge {
        position: absolute;
        top: 1px;
        right: 1px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 0.62rem;
    }

    /* Tapping the avatar is affordance enough; drop the chevron to save width. */
    .user-trigger .icon { display: none; }
    .user-trigger { padding: 4px; }

    /* Let the list-detail action buttons wrap instead of overflowing the row. */
    .page-head .row-flex { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 400px) {
    .main {
        padding: var(--sp-4) var(--sp-3) var(--sp-6);
    }

    .topbar {
        gap: var(--sp-2);
        padding: 0 var(--sp-3);
    }
}

/* Very narrow phones (≤360px, e.g. iPhone SE): the search trigger is the
   least essential top-bar item — drop it so nothing overflows the row. */
@media (max-width: 360px) {
    .search-trigger { display: none; }
}


.mud-alert-message {
    width: 100%;
}

/* ============ STATUS / SEMANTIC HELPERS ============ */
.status-owned {
    color: var(--mud-palette-success);
}

.status-pending {
    color: var(--mud-palette-warning);
}

.status-unowned {
    color: var(--mud-palette-error);
}

.validation-message {
    color: var(--mud-palette-error);
    font-size: 0.75rem;
    margin-top: 4px;
}

/* ============ LOADING ============ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--ov-cream) 85%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================================
   AUTH HERO PAGES (Signup / Login)
   Two-pane editorial layout sharing the marketing site's cream canvas
   so the auth surface no longer feels like a separate product. Form on
   the left in a paper card; value props on the right directly on cream.
   ============================================================ */
.ownd-auth-page-bg { background: var(--ov-cream); }

.ownd-auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: var(--ov-cream);
}

/* Subtle hairline grid, masked to fade out at the edges. Adds editorial
   texture without competing with the form. */
.ownd-auth-grid {
    position: absolute;
    inset: -1px;
    background-image:
        linear-gradient(to right, var(--ov-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--ov-line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
    opacity: .55;
}

.ownd-auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
}
.ownd-auth-glow-1 {
    width: 640px; height: 640px;
    top: -180px; left: -160px;
    background: radial-gradient(circle, color-mix(in srgb, var(--ov-lime) 60%, transparent) 0%, color-mix(in srgb, var(--ov-lime) 14%, transparent) 40%, transparent 70%);
    animation: ownd-auth-drift-1 22s ease-in-out infinite alternate;
}
.ownd-auth-glow-2 {
    width: 520px; height: 520px;
    bottom: -160px; right: -140px;
    background: radial-gradient(circle, color-mix(in srgb, var(--ov-lime-deep) 38%, transparent) 0%, color-mix(in srgb, var(--ov-lime-deep) 8%, transparent) 50%, transparent 75%);
    animation: ownd-auth-drift-2 28s ease-in-out infinite alternate;
}
.ownd-auth-glow-3 {
    width: 480px; height: 480px;
    top: 40%; right: 28%;
    background: radial-gradient(circle, color-mix(in srgb, var(--ov-lime) 18%, transparent) 0%, transparent 60%);
    animation: ownd-auth-pulse 11s ease-in-out infinite;
}

@keyframes ownd-auth-drift-1 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(80px, 60px) rotate(45deg); }
}
@keyframes ownd-auth-drift-2 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-100px, -70px) rotate(-30deg); }
}
@keyframes ownd-auth-pulse {
    0%, 100% { opacity: .55; transform: scale(1); }
    50%      { opacity: .9;  transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
    .ownd-auth-glow-1, .ownd-auth-glow-2, .ownd-auth-glow-3 { animation: none; }
}

/* Page chrome. Flex column so the wordmark pins to the top-left of the
   viewport and the main pane vertically centres on tall screens. */
.ownd-auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ov-ink);
}
.ownd-auth-header { padding: 24px 32px 0; }
.ownd-auth-wordmark {
    width: 130px;
    max-width: 30vw;
    display: block;
}
.ownd-auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

/* Two-column grid: form pane left, value pane right. Stacks vertically
   below md with the form on top so the primary CTA stays above the fold
   on mobile. */
.ownd-auth-grid-2col {
    display: grid;
    grid-template-columns: minmax(360px, 460px) minmax(280px, 380px);
    gap: 64px;
    align-items: center;
    max-width: 980px;
    width: 100%;
}
@media (max-width: 960px) {
    .ownd-auth-grid-2col {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 460px;
    }
    .ownd-auth-value-pane { order: 2; }
}

/* Form pane — paper card with the same elevation language as the
   marketing hero mockup. Subtle lime halo underneath via ::before
   (matches .ov-mock::before on the marketing site). */
.ownd-auth-form-pane {
    position: relative;
    background: var(--ov-paper);
    border-radius: 18px;
    padding: 40px 36px 32px;
    border: 1px solid var(--ov-line);
    box-shadow:
        0 1px 0 #ffffff80 inset,
        0 30px 60px -30px rgba(14, 15, 17, .18),
        0 8px 20px -10px rgba(14, 15, 17, .08);
}
.ownd-auth-form-pane::before {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--ov-lime) 0%, transparent 65%);
    opacity: .35;
    filter: blur(2px);
    z-index: -1;
}

/* Standalone confirmation card for the anonymous /app/respond/* pages — same paper
   treatment as the auth form pane, but single-column and width-constrained (no grid). */
.ownd-respond-card {
    max-width: 460px;
    width: 100%;
    text-align: center;
}
.ownd-respond-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* Context line on the transfer respond page (type · cost). */
.ownd-respond-meta {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ov-muted, #5F5C54);
    margin: -2px 0 14px;
}

/* Offboarding handover — one row per item the leaver still owns. */
.ownd-handover-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    text-align: left;
}
.ownd-handover-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(14, 15, 17, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
}
.ownd-handover-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.ownd-handover-name {
    font-weight: 600;
    color: var(--ov-ink);
    letter-spacing: -0.01em;
}
.ownd-handover-type {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ov-muted, #5F5C54);
}
.ownd-handover-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ownd-handover-select {
    flex: 1 1 200px;
    min-width: 0;
}

.ownd-auth-heading {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--ov-ink);
    margin: 0 0 8px;
}
/* The auth/respond headings carry tabindex="-1" and get focused on route change so
   screen readers announce the new page. They're never in the keyboard tab order, so the
   default focus ring is just a stray box around the title — suppress the visible outline
   while keeping the programmatic focus (and its announcement) intact. */
.ownd-auth-heading:focus {
    outline: none;
}
.ownd-auth-heading em {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--ov-lime-deep);
}
.ownd-auth-sub {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ov-muted);
    margin: 0 0 24px;
}
.ownd-auth-expiry {
    font-size: 13px;
    color: var(--ov-muted);
    margin: 0 0 16px;
    text-align: center;
}

.ownd-auth-cta {
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    height: 48px;
}
.ownd-auth-secondary-btn {
    text-transform: none !important;
    height: 48px;
    color: var(--ov-ink) !important;
    border: 1px solid var(--ov-line-2) !important;
    background: #FBF9F2;
    font-weight: 500;
}
.ownd-auth-secondary-btn:hover {
    background: var(--ov-cream-2);
    border-color: var(--ov-ink) !important;
}
.ownd-auth-secondary-btn .mud-button-label,
.ownd-auth-secondary-btn .mud-icon-root {
    color: var(--ov-ink);
}

/* Auth form fields — label + input rhythm. v2 uses plain inputs (not Mud), so
   the vertical spacing MudTextField's margins used to provide is defined here. */
.ownd-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.ownd-auth-field label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--ov-ink);
}
.ownd-auth-field .input {
    width: 100%;
}

/* CTAs fill the form column so the primary and the Microsoft button read as one
   aligned stack (the primary was pill-hugging while the secondary was full-width). */
.ownd-auth-form-pane .ownd-auth-cta,
.ownd-auth-form-pane .ownd-auth-secondary-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.ownd-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--ov-muted);
    font-size: 13px;
}
.ownd-auth-divider::before,
.ownd-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ov-line);
}

.ownd-auth-existing {
    font-size: 14px;
    color: var(--ov-muted);
    margin: 16px 0 0;
    text-align: center;
}

/* Sign-in-wrap consent line beneath the signup CTAs. Smaller and lighter than
   the "Already have an account?" link so it reads as fine print, not a CTA. */
.ownd-auth-terms {
    font-size: 13px;
    color: var(--ov-muted);
    margin: 12px 0 0;
    text-align: center;
    line-height: 1.5;
}
.ownd-auth-terms a {
    text-decoration: underline;
}

/* Success state (after submitting a magic-link / signup form). */
.ownd-auth-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ownd-auth-success-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

/* Value pane (right column). Plain on cream, ink text, lime accents. */
.ownd-auth-value-pane {
    color: var(--ov-ink);
    padding: 12px 0;
}
.ownd-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--ov-lime) 32%, transparent);
    color: var(--ov-ink);
    border: 1px solid color-mix(in srgb, var(--ov-lime-deep) 35%, transparent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}
.ownd-auth-value-heading {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin: 0 0 28px;
    color: var(--ov-ink);
}
.ownd-auth-value-heading em {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--ov-lime-deep);
}

.ownd-auth-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ownd-auth-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.ownd-auth-step-num {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ov-lime);
    color: var(--ov-ink);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    box-shadow: 0 1px 2px rgba(14, 15, 17, .08);
}
.ownd-auth-step-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--ov-ink);
}
.ownd-auth-step-body p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ov-muted);
    margin: 0;
}

.ownd-auth-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ov-muted);
    padding-top: 18px;
    border-top: 1px solid var(--ov-line);
}

/* ============================================================
   Demo / intro page (.ownd-demo-*) — single-column, video-centric
   layout on the shared cream auth surface (.ownd-auth-bg). Shareable
   from LinkedIn: explainer video above a single trial CTA.
   ============================================================ */
.ownd-demo-stack {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

/* Heading/sub reuse the auth type scale; just center and cap width. */
.ownd-demo-heading {
    margin: 0;
}
.ownd-demo-sub {
    margin: 0;
    max-width: 560px;
}

/* Founder-note onder "Waarom we dit bouwden": klein, persoonlijk, geen kaart-drukte. */
.ov-founder-note {
    max-width: 640px;
    margin: 36px auto 0;
    padding: 22px 26px;
    text-align: center;
    background: var(--ov-cream-2, #F7F4EC);
    border: 1px solid var(--ov-line);
    border-radius: 16px;
}
.ov-founder-note p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ov-ink-soft, #3E3C36);
}
.ov-founder-note .ov-founder-sign {
    margin-top: 10px;
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    color: var(--ov-ink, #0E0F11);
}

/* Homepage explainer (Hoe het werkt): same portrait-safe treatment as the
   /demo video below — height-capped, centered, paper-card chrome. */
.ov-video-wrap {
    margin: 0 auto 44px;
    text-align: center;
}
.ov-video {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 62vh;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--ov-line);
    box-shadow:
        0 1px 0 #ffffff80 inset,
        0 30px 60px -30px rgba(14, 15, 17, .18),
        0 8px 20px -10px rgba(14, 15, 17, .08);
}
.ov-video-caption {
    margin: 14px 0 0;
    font-size: 13.5px;
    color: var(--ov-muted, #6B6860);
}

/* Video card matches the paper-card chrome of .ownd-auth-form-pane:
   same radius, hairline border, layered shadow. Black backdrop covers the
   loading state. The explainer is a portrait/square cut, so cap by height
   (not just width) and let the element keep its intrinsic ratio — otherwise
   a forced full-width portrait video runs nearly full-viewport-tall and
   shoves the CTA below the fold. */
.ownd-demo-video {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 62vh;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid var(--ov-line);
    background: #000;
    box-shadow:
        0 1px 0 #ffffff80 inset,
        0 30px 60px -30px rgba(14, 15, 17, .18),
        0 8px 20px -10px rgba(14, 15, 17, .08);
}

.ownd-demo-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}
/* Give the CTA real presence on a wide page rather than the form-width fill. */
.ownd-demo-actions .ownd-auth-cta {
    min-width: 240px;
}

/* ============================================================
   Onboarding wizard (.ownd-ob-*) — full-page first-run flow.
   Sits on the same fixed cream + lime-glow surface as the auth
   pages (.ownd-auth-bg) so signup → onboarding reads continuous.
   ============================================================ */

/* Header: wordmark left, persistent "Skip for now" right. */
.ownd-ob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.ownd-ob-skip {
    text-transform: none !important;
    font-weight: 500 !important;
    color: var(--ov-muted) !important;
}
.ownd-ob-skip:hover { color: var(--ov-ink) !important; }

/* Centered column holding the progress rail above the card. */
.ownd-ob-shell {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Horizontal step rail — numbered lime nodes joined by a hairline. */
.ownd-ob-rail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.ownd-ob-rail-node {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-width: 0;
}
/* Connector line between nodes (drawn to the left of every node but the first). */
.ownd-ob-rail-node:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--ov-line-2);
    z-index: 0;
}
.ownd-ob-rail-node.done::before,
.ownd-ob-rail-node.active::before { background: var(--ov-lime-deep); }
.ownd-ob-rail-dot {
    position: relative;
    z-index: 1;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: var(--ov-paper);
    color: var(--ov-muted);
    border: 1.5px solid var(--ov-line-2);
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ownd-ob-rail-node.active .ownd-ob-rail-dot {
    background: var(--ov-lime);
    color: var(--ov-ink);
    border-color: var(--ov-lime-deep);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ov-lime) 28%, transparent);
}
.ownd-ob-rail-node.done .ownd-ob-rail-dot {
    background: var(--ov-lime-deep);
    color: var(--ov-ink);
    border-color: var(--ov-lime-deep);
}
.ownd-ob-rail-label {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ov-muted);
    max-width: 92px;
}
.ownd-ob-rail-node.active .ownd-ob-rail-label { color: var(--ov-ink); font-weight: 600; }

/* The single wizard card. Inherits .ownd-auth-form-pane treatment; just
   ensures full-width fill inside the shell and a roomy min-height so the
   card height doesn't jump between short and tall steps. */
.ownd-ob-card {
    width: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.ownd-ob-welcome-points { margin-top: 4px; margin-bottom: 0; }

/* Selectable choice cards (team-permission policy). */
.ownd-ob-choice {
    border: 1.5px solid var(--ov-line-2) !important;
    background: var(--ov-paper) !important;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ownd-ob-choice:hover { border-color: var(--ov-lime-deep) !important; }
.ownd-ob-choice.selected {
    border-color: var(--ov-lime-deep) !important;
    background: color-mix(in srgb, var(--ov-lime) 12%, var(--ov-paper)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ov-lime) 22%, transparent);
}

/* Finish step — centered confirmation. */
.ownd-ob-finish {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 8px;
}

/* Action row pinned to the card's bottom edge. */
.ownd-ob-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 28px;
}

@media (max-width: 600px) {
    .ownd-ob-rail-label { display: none; }
    .ownd-ob-rail-node:not(:first-child)::before { top: 15px; }
    .ownd-auth-form-pane.ownd-ob-card { padding: 28px 22px 24px; }
}

/* Per-plan feature matrix in Settings > Subscription. Renders below the plan
   picker as a 4-column comparison so users can see exactly what changes
   between tiers. The selected column is highlighted (column header + cells)
   so the matrix stays visually tied to the radio above it. */
.ownd-feature-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ownd-feature-matrix th,
.ownd-feature-matrix td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--mud-palette-divider);
    text-align: center;
    color: var(--mud-palette-text-secondary);
}
.ownd-feature-matrix th {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-background-grey);
}
.ownd-feature-matrix th.is-selected,
.ownd-feature-matrix td.is-selected {
    background: var(--mud-palette-tertiary-hover);
    color: var(--mud-palette-text-primary);
}
.ownd-feature-matrix td.ownd-feature-name {
    text-align: left;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}
.ownd-feature-matrix tbody tr:last-child th,
.ownd-feature-matrix tbody tr:last-child td {
    border-bottom: none;
}

/* Selection — picks up the lime accent so copy-paste feels on-brand. */
::selection {
    background: var(--ov-lime);
    color: var(--ov-ink);
}

/* ============ DRAWER ============
   Wordmark lives in the top app bar (Batch 3) so the drawer no longer needs
   its own logo — the nav is the content and we let it start at the top. The
   trial pill at the bottom relies on flex-column layout so it always sits
   under the nav regardless of how many items the role exposes. */

.ownd-drawer .mud-drawer-content,
.ownd-drawer > .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* MudNavMenu becomes the growing region; the trial-pill wrap follows in flow
   and is pushed to the bottom by margin-top:auto. No more position:absolute,
   no risk of overlapping nav items as roles add more entries. */
.ownd-drawer .mud-navmenu {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* Workspace label — small, calm "you are in this workspace" identifier above
   the nav. Hairline border-bottom separates it from the nav block. Truncates
   with ellipsis so a long org name doesn't push the layout. */
.ownd-workspace-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--ov-line);
    color: var(--ov-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.ownd-workspace-label .mud-icon-root {
    font-size: 16px;
    color: var(--ov-muted);
}

.ownd-workspace-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-dark .ownd-workspace-label {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: rgba(241, 237, 226, 0.6);
}

body.theme-dark .ownd-workspace-label .mud-icon-root {
    color: rgba(241, 237, 226, 0.6);
}

/* Global User/Admin view switch — a bordered, filled segmented pair sitting under
   the workspace label. Reads as a top-level mode switch rather than in-page navigation. */
.ownd-viewmode-switch {
    display: flex;
    gap: 4px;
    margin: 12px;
    padding: 3px;
    border: 1px solid var(--ov-line);
    border-radius: 10px;
    flex: 0 0 auto;
}

.ownd-viewmode-switch .mud-button-root {
    border-radius: 7px;
    text-transform: none;
    font-weight: 600;
    min-width: 0;
}

body.theme-dark .ownd-viewmode-switch {
    border-color: rgba(255, 255, 255, 0.08);
}

.ownd-trial-pill-wrap {
    margin-top: auto;
    padding: 12px;
}

.mud-paper.ownd-trial-pill:not(.mud-table-container):not(.mud-dialog):not(.mud-popover) {
    background-color: color-mix(in srgb, var(--ov-lime-deep) 8%, var(--ov-paper));
    border: 1px solid color-mix(in srgb, var(--ov-lime-deep) 25%, var(--ov-paper));
    color: var(--ov-ink);
}

body.theme-dark .mud-paper.ownd-trial-pill:not(.mud-table-container):not(.mud-dialog):not(.mud-popover) {
    background-color: color-mix(in srgb, var(--ov-lime) 8%, var(--ov-ink-2));
    border-color: color-mix(in srgb, var(--ov-lime) 30%, var(--ov-ink-2));
    color: var(--ov-cream);
}

/* ============ TOP APP BAR ============
   Wordmark next to the menu icon (always-visible brand anchor), and the
   user-menu trigger uses an avatar + name pattern. The standalone theme
   toggle moved into the user menu so the bar stays visually quiet. */

.ownd-wordmark {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    line-height: 1;
    /* MudLink + Color.Inherit picks up the bar's text color in both themes. */
}

.ownd-user-trigger {
    text-transform: none !important;
    letter-spacing: normal !important;
    min-height: 40px;
    border-radius: 20px;
}

.ownd-user-trigger .mud-avatar {
    font-size: 0.75rem;
    font-weight: 600;
    width: 28px;
    height: 28px;
    min-width: 28px;
    /* Avatar uses the lime Primary fill; ink text keeps WCAG contrast on lime. */
    color: var(--ov-ink) !important;
}

.ownd-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* On narrow viewports the name is dropped — avatar still anchors the menu. */
@media (max-width: 600px) {
    .ownd-user-name { display: none; }
    .ownd-user-trigger .mud-avatar { margin-right: 0 !important; }
}

/* Inline keyboard-shortcut chip used in the help menu and (later) elsewhere. */
.ownd-kbd {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--ov-line);
    color: var(--ov-muted);
    border: 1px solid transparent;
}

body.theme-dark .ownd-kbd {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(241, 237, 226, 0.7);
}

/* ============ ASSET GROUP CARDS ============
   Tile per group on /app/admin/asset-groups, replacing the old chip-soup.
   Subtle hover lift signals "click to edit". Color accent via inline border-
   left so the per-group ColorHex stays in plain sight at a glance. */
.ownd-group-card {
    transition: background-color 120ms ease, transform 120ms ease;
}

.ownd-group-card:hover {
    background-color: color-mix(in srgb, var(--ov-ink) 4%, transparent);
    transform: translateY(-1px);
}

body.theme-dark .ownd-group-card:hover {
    background-color: color-mix(in srgb, var(--ov-cream) 5%, transparent);
}

/* ============ STICKY BULK-ACTION BAR (AdminLedger) ============
   Appears above the table the moment the admin selects a row. Anchored under
   the 64px app bar so it stays visible while scrolling. Tinted success-green
   in light mode for a "selection mode is active" feel; flips to ink-2 + lime
   border in dark mode so the bar reads as a state change without blowing out.
   Selectors are doubled-up (.mud-paper.ownd-bulk-bar) to outrank MudBlazor's
   default surface background without resorting to !important. */
.mud-paper.ownd-bulk-bar:not(.mud-table-container):not(.mud-dialog):not(.mud-popover) {
    position: sticky;
    top: 64px;
    z-index: 5;
    background-color: color-mix(in srgb, var(--ov-lime-deep) 12%, var(--ov-paper));
    border: 1px solid color-mix(in srgb, var(--ov-lime-deep) 35%, var(--ov-paper));
}

body.theme-dark .mud-paper.ownd-bulk-bar:not(.mud-table-container):not(.mud-dialog):not(.mud-popover) {
    background-color: var(--ov-ink-2);
    border-color: color-mix(in srgb, var(--ov-lime) 40%, var(--ov-ink-2));
}

/* ============ STAT TILES (Ownership Weather, Insights summaries) ============
   Editorial-feel stat tile: large display number, eyebrow caption above,
   small icon chip, hairline border, hover lift. Inspired by the marketing
   .ov-stat treatment so the dashboard reads like the same brand. */

/* Equal-grow flex row for 5-up stat layouts (Ownership Weather): cells
   share row width evenly so the grid never leaves a half-filled trailing
   row. Wraps to 2-up on mobile via min-width. */
.ownd-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ownd-stat-row > .ownd-stat-tile {
    flex: 1 1 calc(20% - 12px);
    min-width: 140px;
}

.ownd-stat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 16px 14px;
    background: var(--ov-paper);
    border: 1px solid var(--ov-line);
    border-radius: var(--ov-radius);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.ownd-stat-tile:hover {
    border-color: var(--ov-line-2);
    box-shadow: 0 6px 14px -8px rgba(14, 15, 17, .18);
}

.ownd-stat-tile.is-actionable {
    cursor: pointer;
}

.ownd-stat-tile.is-actionable:hover {
    transform: translateY(-1px);
}

.ownd-stat-tile .ownd-stat-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ov-muted);
}

.ownd-stat-tile .ownd-stat-eyebrow .ownd-stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ov-line-2);
}

.ownd-stat-tile.is-warning .ownd-stat-dot { background: #E59E3D; }
.ownd-stat-tile.is-danger  .ownd-stat-dot { background: var(--ov-coral); }
.ownd-stat-tile.is-good    .ownd-stat-dot { background: var(--ov-lime-deep); }

/* Weather glyph next to the eyebrow caption — small, color emoji, no extra
   line-height drift. Used inside .ownd-stat-eyebrow alongside the dot/label. */
.ownd-stat-tile .ownd-stat-weather {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
    transform: translateY(-1px);
    filter: saturate(1.1);
}

.ownd-stat-tile .ownd-stat-num {
    font-size: 2.1rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ov-ink);
    font-feature-settings: "tnum" 1;
}

.ownd-stat-tile.is-warning .ownd-stat-num { color: var(--ov-warn-strong); }
.ownd-stat-tile.is-danger  .ownd-stat-num { color: var(--ov-coral); }

.ownd-stat-tile .ownd-stat-label {
    font-size: 0.86rem;
    color: var(--ov-muted);
    line-height: 1.3;
}

body.theme-dark .ownd-stat-tile {
    background: var(--ov-ink-2);
    border-color: rgba(241, 237, 226, .10);
}

body.theme-dark .ownd-stat-tile:hover {
    border-color: rgba(241, 237, 226, .22);
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55);
}

body.theme-dark .ownd-stat-tile .ownd-stat-num     { color: var(--ov-cream); }
body.theme-dark .ownd-stat-tile .ownd-stat-eyebrow { color: rgba(241, 237, 226, .65); }
body.theme-dark .ownd-stat-tile .ownd-stat-label   { color: rgba(241, 237, 226, .70); }

/* Override accent-card inner — when stat tiles live inside the weather card,
   knock the inner-tile background to transparent so the lime gradient shows
   through and tiles read as glass on glass. */
.ownd-accent-card .ownd-stat-tile {
    background: rgba(255, 255, 255, .55);
}
body.theme-dark .ownd-accent-card .ownd-stat-tile {
    background: rgba(241, 237, 226, .04);
}

/* ============ COMMAND PALETTE (cmd+K) ============ */
.ownd-cmdk-shell {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    pointer-events: none;
}
.ownd-cmdk {
    width: min(640px, calc(100% - 32px));
    pointer-events: auto;
    background: var(--ov-paper);
    color: var(--ov-ink);
    border: 1px solid var(--ov-line-2);
    border-radius: var(--ov-radius-lg);
    box-shadow: 0 30px 60px -20px rgba(14,15,17,.35), 0 12px 24px -10px rgba(14,15,17,.20);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}
body.theme-dark .ownd-cmdk {
    background: var(--ov-ink-2);
    color: var(--ov-cream);
    border-color: rgba(241,237,226,.18);
    box-shadow: 0 30px 80px -10px rgba(0,0,0,.75);
}

.ownd-cmdk-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ov-line);
}
body.theme-dark .ownd-cmdk-search { border-color: rgba(241,237,226,.10); }
.ownd-cmdk-search-icon { color: var(--ov-muted); display: inline-flex; }
.ownd-cmdk-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1.05rem;
    color: inherit;
    font-family: inherit;
}
.ownd-cmdk-input::placeholder { color: var(--ov-muted); }
.ownd-cmdk-kbd, .ownd-cmdk-foot kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: var(--ov-muted);
    background: var(--ov-cream-2);
    border: 1px solid var(--ov-line);
    border-radius: 4px;
}
body.theme-dark .ownd-cmdk-kbd,
body.theme-dark .ownd-cmdk-foot kbd {
    background: rgba(241,237,226,.06);
    border-color: rgba(241,237,226,.14);
    color: rgba(241,237,226,.72);
}

.ownd-cmdk-results {
    overflow-y: auto;
    padding: 4px 0 8px;
}
.ownd-cmdk-group { padding: 6px 0; }
.ownd-cmdk-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ov-muted);
    padding: 6px 18px 4px;
}
.ownd-cmdk-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}
.ownd-cmdk-row.is-active {
    background: color-mix(in srgb, var(--ov-lime) 24%, transparent);
}
body.theme-dark .ownd-cmdk-row.is-active {
    background: color-mix(in srgb, var(--ov-lime) 16%, transparent);
}
.ownd-cmdk-row-icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
    font-size: 1rem;
}
.ownd-cmdk-row-name { flex: 1; }
.ownd-cmdk-row-meta {
    color: var(--ov-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ownd-cmdk-empty, .ownd-cmdk-loading {
    padding: 18px;
    color: var(--ov-muted);
    text-align: center;
    font-size: 0.9rem;
}

.ownd-cmdk-foot {
    display: flex;
    gap: 16px;
    padding: 10px 18px;
    border-top: 1px solid var(--ov-line);
    font-size: 0.75rem;
    color: var(--ov-muted);
}
body.theme-dark .ownd-cmdk-foot { border-color: rgba(241,237,226,.10); }
.ownd-cmdk-foot kbd { margin-right: 4px; padding: 0 4px; }


/* =========================================================================
   List detail: slide-out buttons, editable + draggable column headers,
   and the ownership-transfer UI. (Added with the transfer feature.)
   ========================================================================= */

/* Icon-first button whose label slides open on hover/focus. */
.btn-slide .slide-label {
  display: inline-block; max-width: 0; overflow: hidden;
  white-space: nowrap; opacity: 0;
  margin-left: -8px; /* absorb the flex gap while collapsed */
  transition: max-width 0.3s var(--ease), opacity 0.22s var(--ease), margin-left 0.3s var(--ease);
}
.btn-slide:hover .slide-label,
.btn-slide:focus-visible .slide-label { max-width: 160px; opacity: 1; margin-left: 0; }

/* Editable, draggable column header. Rest state is clean; grip + pencil reveal on hover. */
.th-edit {
  display: inline-flex; align-items: center; gap: 7px;
  margin: -5px -9px; padding: 5px 9px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; cursor: grab;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.th-edit:active { cursor: grabbing; }
.th-edit .th-name { color: var(--ov-muted); transition: color 0.15s var(--ease); }
.th-edit:hover { background: var(--ov-surface); border-color: var(--ov-line-strong); box-shadow: var(--ov-shadow-sm); }
.th-edit:hover .th-name { color: var(--ov-ink); }
.th-edit:focus-visible { outline: none; box-shadow: var(--ov-ring); }

.th-edit .th-grip {
  display: inline-flex; color: var(--ov-faint);
  max-width: 0; overflow: hidden; opacity: 0; margin-left: -7px;
  transition: max-width 0.18s var(--ease), opacity 0.14s var(--ease), margin-left 0.18s var(--ease);
}
.th-edit .th-grip svg { width: 15px; height: 15px; }
.th-edit:hover .th-grip { max-width: 16px; opacity: 1; margin-left: 0; }

.th-edit .th-pencil {
  display: inline-flex; color: var(--ov-faint);
  max-width: 0; overflow: hidden; opacity: 0; margin-left: -7px;
  transition: max-width 0.18s var(--ease), opacity 0.14s var(--ease), margin-left 0.18s var(--ease);
}
.th-edit .th-pencil svg { width: 13px; height: 13px; }
.th-edit:hover .th-pencil { max-width: 16px; opacity: 1; margin-left: 0; }

/* Drag feedback: dim the column being dragged, show an insertion accent on the target. */
.grid-table thead th.col-dragging .th-edit { opacity: 0.45; }
.grid-table thead th.col-drag-over {
  box-shadow: inset 3px 0 0 0 var(--ov-lime-deep);
  background: var(--ov-lime-soft);
}

/* Transfer popup: selectable list of lists. */
.transfer-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 280px; overflow-y: auto;
  border: 1px solid var(--ov-line); border-radius: 12px; padding: 6px;
}
.transfer-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: background 0.14s var(--ease);
}
.transfer-row:hover { background: var(--ov-bg-tint); }
.transfer-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ov-lime-deep); flex: none; }
.transfer-row .lc-icon { flex: none; color: var(--ov-faint); display: inline-flex; }
.transfer-row-name { font-weight: 550; color: var(--ov-ink); }

/* Transfer accept page: review list of lists being handed over. */
.transfer-review { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.transfer-review li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--ov-line); border-radius: 12px;
  background: var(--ov-surface); font-weight: 550;
}
.transfer-review li .lc-icon { color: var(--ov-faint); display: inline-flex; flex: none; }

/* ---- Dashboard scope tabs (my lists / shared with me) ---- */
.dash-tabs {
  display: flex; gap: 22px;
  border-bottom: 1px solid var(--ov-line);
  margin: 0 0 var(--sp-5);
}
.dash-tab {
  appearance: none; border: none; background: transparent; cursor: pointer; font: inherit;
  font-weight: 650; font-size: 0.98rem; color: var(--ov-muted);
  padding: 10px 2px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.dash-tab:hover { color: var(--ov-ink); }
.dash-tab.active { color: var(--ov-ink); border-bottom-color: var(--ov-lime-deep); }
.dash-tab:focus-visible { outline: none; box-shadow: var(--ov-ring); border-radius: 6px; }
.dash-tab .tab-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: var(--ov-r-pill);
  background: var(--ov-bg-tint); color: var(--ov-muted);
  font-size: 0.74rem; font-weight: 700; line-height: 1;
}
.dash-tab.active .tab-count { background: var(--ov-lime-soft); color: var(--ov-lime-ink); }

/* ---- Dashboard incoming-transfer banner ---- */
.transfer-inbox { display: flex; flex-direction: column; gap: 10px; margin: 0 0 var(--sp-6); }
.transfer-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--ov-r-lg);
  border: 1px solid #F0DCA8; background: var(--ov-amber-soft);
}
.transfer-card .ti-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: #F0DCA8; color: var(--ov-amber-ink);
}
.transfer-card .ti-icon svg { width: 18px; height: 18px; }
.transfer-card .ti-body { flex: 1 1 260px; min-width: 0; }
.transfer-card .ti-body strong { display: block; color: var(--ov-ink); font-size: 0.98rem; }
.transfer-card .ti-body small { color: var(--ov-amber-ink); font-size: 0.85rem; }
.transfer-card .ti-actions { display: flex; gap: 8px; flex: none; }
