/* =========================================================================
   Smart Intake System — base styles + glassmorphism
   ========================================================================= */

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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    color: var(--ink);
    background: var(--surface-base);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { text-decoration: underline; }

/* ---- Background blobs (the "sky" behind frosted glass) ----------------- */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}
.blob-1 {
    width: 520px; height: 520px;
    background: var(--accent-soft);
    top: -120px; left: -80px;
}
.blob-2 {
    width: 460px; height: 460px;
    background: var(--accent-strong);
    bottom: -120px; right: -60px;
    opacity: 0.35;
}
.blob-3 {
    width: 360px; height: 360px;
    background: var(--surface-2);
    top: 40%; left: 55%;
    opacity: 0.45;
}

/* ---- Glassmorphism ------------------------------------------------------ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}
.glass--dark {
    background: var(--glass-bg-dark);
    border-color: rgba(255, 255, 255, 0.10);
    color: #fff;
}
.glass--strong {
    background: rgba(232, 238, 241, 0.65);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* Reduced-transparency / unsupported fallback */
@media (prefers-reduced-transparency: reduce) {
    .glass, .glass--dark, .glass--strong {
        background: var(--surface-base);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .glass--dark { background: var(--ink); color: #fff; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass         { background: rgba(232, 238, 241, 0.95); }
    .glass--dark   { background: rgba(30, 61, 88, 0.95); }
    .glass--strong { background: rgba(232, 238, 241, 0.97); }
}

/* ---- Top bar ------------------------------------------------------------ */
.topbar {
    position: sticky;
    top: var(--space-3);
    margin: var(--space-3) auto;
    width: min(1200px, 92vw);
    padding: var(--space-3) var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 10;
    transition: padding 0.22s ease;
}
.topbar__collapsible {
    min-height: 0;
    flex-shrink: 1;
}
.topbar__collapsible-inner {
    overflow: visible;
}
.topbar__main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.topbar__collapse-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 5px 18px 7px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    z-index: 1;
}
.topbar__collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.24);
}
.topbar__collapse-chevron {
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 7px solid currentColor;
    transition: transform 0.25s ease;
}
.topbar--collapsed .topbar__collapse-chevron {
    transform: rotate(180deg);
}
.topbar--collapsed {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}
.topbar__brand { display: flex; align-items: center; gap: var(--space-3); }
.topbar__brand-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: #fff;
    text-decoration: none;
}
.topbar__brand-link:hover { text-decoration: none; }
.topbar__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.topbar__title { font-weight: 600; font-size: var(--fs-lg); }
.topbar__nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.topbar__nav-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px var(--space-1);
}
.topbar__link,
.topbar__drop-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    opacity: 0.88;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 140ms ease, opacity 140ms ease;
}
.topbar__link:hover,
.topbar__drop-trigger:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}
.topbar__drop {
    position: relative;
}
.topbar__drop-trigger {
    list-style: none;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.topbar__drop-trigger::-webkit-details-marker {
    display: none;
}
.topbar__drop-trigger::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.75;
}
.topbar__drop[open] .topbar__drop-trigger {
    opacity: 1;
    background: rgba(255, 255, 255, 0.16);
}
.topbar__drop-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 11.5rem;
    padding: 6px;
    margin: 0;
    border-radius: var(--radius-md);
    background: rgba(22, 42, 62, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.topbar__drop-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: #fff;
    opacity: 0.9;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.topbar__drop-menu a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}
.topbar__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    max-width: 100%;
}
.topbar__group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    opacity: 0.5;
    white-space: nowrap;
}
.topbar__group-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-4);
}
.topbar__nav a {
    color: #fff;
    opacity: 0.85;
    font-weight: 500;
    text-decoration: none;
}
.topbar__nav a:hover { opacity: 1; }
.topbar__nav-link--secondary { opacity: 0.6 !important; font-size: 13px; }
.topbar__user {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    font-size: 13px;
}
.topbar__role-pill {
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.topbar__username { color: #fff; opacity: 0.95; }
.topbar__logout { margin: 0; }
.topbar__logout-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.30);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 120ms ease;
}
.topbar__logout-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.55);
}

.topbar__install-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.30);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 120ms ease;
}
.topbar__install-btn:hover {
    background: #046ab1;
    border-color: rgba(255, 255, 255, 0.55);
}
.topbar__install-btn[hidden] { display: none !important; }

@media (max-width: 720px) {
    .topbar__main-row { flex-wrap: wrap; gap: var(--space-2); }
    .topbar__title { display: none; }
    .topbar__nav {
        gap: var(--space-2);
        width: 100%;
        justify-content: flex-start;
    }
    .topbar__nav-main {
        width: 100%;
        gap: 4px;
    }
    .topbar__drop-menu {
        left: auto;
        right: 0;
    }
    .topbar__group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .topbar__group-label { flex: 0 0 auto; }
    .topbar__group-links { justify-content: flex-end; }
    .topbar__user { align-self: flex-start; }
}

/* ---- Layout ------------------------------------------------------------- */
.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: var(--space-5) 0 var(--space-7);
}
.container--gerente {
    width: min(1680px, 98vw);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
    padding: var(--space-7);
    margin-bottom: var(--space-6);
}
.hero h1 {
    font-size: var(--fs-3xl);
    margin: 0 0 var(--space-3);
    color: var(--ink);
    letter-spacing: -0.02em;
}
.hero__lead {
    font-size: var(--fs-lg);
    color: var(--ink);
    opacity: 0.85;
    max-width: 680px;
    margin: 0 0 var(--space-6);
    line-height: 1.55;
}

/* ---- Status grid -------------------------------------------------------- */
.status-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.status-card {
    padding: var(--space-5);
}
.status-card h3 {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-lg);
}
.status-card p { margin: var(--space-1) 0; }

.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}
.status--success { background: var(--success); color: var(--success-ink); }
.status--warning { background: var(--warning); color: var(--warning-ink); }
.status--danger  { background: var(--danger);  color: var(--danger-ink); }
.status--info    { background: var(--accent-soft); color: var(--ink); }

/* ---- Focus ring (a11y) -------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* =========================================================================
   Dashboard (Phase 4)
   ========================================================================= */

/* ---- Hero -------------------------------------------------------------- */
.dashboard-hero {
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-5);
    align-items: center;
}
.dashboard-hero__greeting {
    margin: 0 0 var(--space-1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dashboard-hero h1 {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
}
.dashboard-hero__sub { margin: 0; opacity: 0.75; max-width: 520px; }
.dashboard-hero__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(70px, auto));
    gap: var(--space-4);
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.40);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.55);
    min-width: 80px;
}
.stat__value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}
.stat__label {
    margin-top: 4px;
    font-size: 11px;
    color: var(--ink);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

@media (max-width: 720px) {
    .dashboard-hero { grid-template-columns: 1fr; }
    .dashboard-hero__stats { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: var(--space-2); }
    .stat { padding: var(--space-2); min-width: 0; }
    .stat__value { font-size: var(--fs-xl); }
}

/* ---- Department cards -------------------------------------------------- */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}
.dept-card {
    padding: var(--space-4);
    text-decoration: none;
    color: var(--ink);
    transition: transform 150ms ease, border-color 150ms ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border: 1px solid rgba(255, 255, 255, 0.40);
}
.dept-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-strong);
    text-decoration: none;
}
.dept-card--active {
    border: 1.5px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.15), var(--glass-shadow);
}
.dept-card__pill {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    align-self: flex-start;
}
.dept-card--active .dept-card__pill { background: var(--ink); }
.dept-card__name { font-weight: 600; font-size: var(--fs-lg); }
.dept-card__meta { font-size: 12px; opacity: 0.7; }

/* ---- Picker / search --------------------------------------------------- */
.picker { padding: var(--space-5); }
.picker__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.picker__hint {
    margin: var(--space-1) 0 0;
    font-size: 13px;
    opacity: 0.8;
    font-weight: 400;
}
.picker__title { display: flex; align-items: center; gap: var(--space-3); }
.picker__title h2 { margin: 0; font-size: var(--fs-xl); }
.picker__submissions-link {
    font-size: 13px;
    white-space: nowrap;
}
.picker__filter-pill {
    padding: 3px 10px;
    background: var(--accent-soft);
    color: var(--ink);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.picker__search { flex: 1; min-width: 240px; max-width: 480px; }
.picker__search input {
    width: 100%;
    padding: 12px 16px;
    font: inherit;
    font-size: var(--fs-base);
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    color: var(--ink);
    transition: border-color 120ms ease, background 120ms ease;
}
.picker__search input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

/* ---- People list ------------------------------------------------------- */
.people-list__count {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink);
    opacity: 0.6;
    margin-bottom: var(--space-3);
}
.people-list__empty {
    padding: var(--space-6);
    text-align: center;
    background: rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    color: var(--ink);
    opacity: 0.7;
    font-style: italic;
}

.person-rows { list-style: none; padding: 0; margin: 0; }
.person-row {
    display: grid;
    grid-template-columns: 44px 1fr auto auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.55);
    margin-bottom: var(--space-2);
    transition: background 120ms ease, transform 120ms ease;
}
.person-row:hover {
    background: rgba(255, 255, 255, 0.70);
    transform: translateX(2px);
}
.person-row__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}
.person-row__name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.person-row__sub {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}
.person-row__role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.person-row__role--operator { background: var(--primary); color: #fff; }
.person-row__role--gerente  { background: var(--ink);     color: #fff; }
.person-row__role--director { background: var(--accent-strong); color: #fff; }
.person-row__lang {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    opacity: 0.55;
    letter-spacing: 1px;
    width: 28px;
    text-align: center;
}
.person-row__name-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}
.person-row__name-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
.person-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: flex-end;
}

@media (max-width: 600px) {
    .person-row { grid-template-columns: 36px 1fr auto; }
    .person-row__avatar { width: 36px; height: 36px; font-size: 15px; }
    .person-row__lang { display: none; }
    .person-row .btn { padding: 6px 10px; font-size: 12px; }
    .person-row__actions .btn--ghost { display: none; }
}

/* ---- Person hub (360°) ------------------------------------------------ */
.person-hub { padding: var(--space-4); margin-bottom: var(--space-4); }
.person-hub__back { margin: 0 0 var(--space-3); font-size: 14px; }
.person-hub__back a { color: var(--primary); text-decoration: none; }
.person-hub__identity {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    flex-wrap: wrap;
}
.person-hub__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}
.person-hub__name {
    margin: 0 0 var(--space-1);
    font-size: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}
.person-hub__meta,
.person-hub__location {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
}
.person-hub__inactive { color: var(--danger, #c0392b); font-weight: 600; }
.person-hub__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.person-hub__nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.person-hub__nav a {
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}
.person-hub__nav a:hover { background: rgba(255, 255, 255, 0.9); color: var(--primary); }
.person-hub__nav-count {
    opacity: 0.6;
    font-weight: 500;
    margin-left: 2px;
}
.person-hub-section {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    scroll-margin-top: 7rem;
}
.person-hub-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.person-hub-section__head h2 { margin: 0; font-size: 1.15rem; }
.person-hub-subhead { margin: 0 0 var(--space-2); font-size: 14px; opacity: 0.9; }
.person-hub-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
@media (max-width: 720px) {
    .person-hub-split { grid-template-columns: 1fr; }
}
.person-hub-list { list-style: none; padding: 0; margin: 0; }
.person-hub-list li { padding: var(--space-2) 0; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.person-hub-list li:last-child { border-bottom: none; }
.person-hub-list--workflows .person-hub-workflow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.person-hub-muted { opacity: 0.7; font-size: 13px; margin-left: 4px; }
.person-hub-empty { opacity: 0.75; font-style: italic; margin: 0; }
.person-hub-table { width: 100%; }
.person-hub-table__actions { text-align: right; white-space: nowrap; }
.person-hub-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
}
.person-hub-status--draft { background: rgba(255, 193, 7, 0.25); }
.person-hub-status--submitted,
.person-hub-status--running { background: rgba(33, 150, 243, 0.2); }
.person-hub-status--completed,
.person-hub-status--reviewed { background: rgba(76, 175, 80, 0.2); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 120ms ease;
    text-decoration: none;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover:not(:disabled) {
    background: #046ab1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 125, 205, 0.30);
    text-decoration: none;
    color: #fff;
}
.btn--ghost {
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    border: 1px solid rgba(30, 61, 88, 0.18);
}
.btn--ghost:hover:not(:disabled) {
    background: #fff;
    border-color: var(--primary);
    color: var(--ink);
    text-decoration: none;
}
.btn__pill {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* =========================================================================
   Flash messages
   ========================================================================= */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.flash {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.7);
}
.flash--success { background: var(--success); color: var(--success-ink); border-color: rgba(0,0,0,0.05); }
.flash--warning { background: var(--warning); color: var(--warning-ink); border-color: rgba(0,0,0,0.05); }
.flash--error,
.flash--danger  { background: var(--danger);  color: var(--danger-ink);  border-color: rgba(0,0,0,0.05); }

/* =========================================================================
   Intake screen (Phase 4 slice 2)
   ========================================================================= */
.intake-screen { padding-bottom: 140px; }    /* room for the sticky submit bar */
.intake-screen--footer-collapsed { padding-bottom: 64px; }

/* ---- Header strip ----------------------------------------------------- */
.intake-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    align-items: center;
}
.intake-header h1 {
    margin: 6px 0 4px;
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
}
.intake-header__back {
    display: inline-block;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 4px;
}
.intake-header__back:hover { text-decoration: underline; }
.intake-header__lang {
    display: inline-block;
    padding: 1px 8px;
    background: var(--accent-soft);
    color: var(--ink);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.intake-header__right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.intake-header__template-pill {
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}
.intake-header__progress {
    font-size: 12px;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}
.intake-header__progress-required { font-weight: 700; }

@media (max-width: 720px) {
    .intake-header { grid-template-columns: 1fr; }
    .intake-header__right { align-items: flex-start; text-align: left; }
}

/* ---- Intake header (organized layout) --------------------------------- */
.intake-header--organized {
    grid-template-columns: 1fr minmax(220px, 320px);
    align-items: start;
}

.intake-header__primary { min-width: 0; }
.intake-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3);
    margin: 4px 0 0;
}
.intake-header__title {
    margin: 0;
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.intake-header h1.intake-header__title {
    margin: 0;
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
}
.intake-header__pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.intake-header__sub { margin: 0; font-size: 14px; opacity: 0.75; line-height: 1.5; }
.intake-header--organized .intake-header__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    align-items: center;
}
.intake-header__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(30, 61, 88, 0.06);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.intake-header__chip--lang {
    font-variant-numeric: tabular-nums;
}
.intake-header__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
    text-align: right;
}
.intake-header__progress-block {
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
    opacity: 0.88;
}
.intake-header__progress-meta { opacity: 0.65; font-weight: 500; }
.intake-header__btn-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

@media (max-width: 720px) {
    .intake-header--organized {
        grid-template-columns: 1fr;
    }
    .intake-header__actions {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }
    .intake-header__btn-row { justify-content: flex-start; }
}

/* ---- §8.5.c Workflow progress (linked task, read-only) ------------------ */
.intake-workflow-progress {
    margin-bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
}
.intake-workflow-progress__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.intake-workflow-progress__title {
    margin: 0;
    font-size: var(--fs-lg);
    letter-spacing: -0.01em;
    color: var(--ink);
}
.intake-workflow-progress__sub {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.72;
    line-height: 1.4;
}
.intake-workflow-progress__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.intake-workflow-progress__step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.04);
    border: 1px solid rgba(30, 61, 88, 0.08);
}
.intake-workflow-progress__step--done {
    background: rgba(142, 201, 177, 0.2);
    border-color: rgba(62, 138, 107, 0.25);
}
.intake-workflow-progress__mark {
    font-size: 16px;
    line-height: 1.2;
    opacity: 0.85;
    flex-shrink: 0;
    width: 1.25em;
    text-align: center;
}
.intake-workflow-progress__step-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.intake-workflow-progress__step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}
.intake-workflow-progress__lane {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.55;
}
.intake-workflow-progress__empty {
    margin: 0;
    font-size: 13px;
    opacity: 0.75;
}

/* ---- Session layout toolbar (draft-only customization) --------------- */
.intake-session-toolbar {
    margin-bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.intake-session-toolbar__intro {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.intake-session-toolbar__intro strong { font-size: 15px; }
.intake-session-toolbar__hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
    opacity: 0.78;
}
.intake-session-toolbar__hint strong { opacity: 1; }
.intake-session-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
}
.intake-session-toolbar__status {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    min-height: 1.2em;
}
.intake-session-toolbar__micro {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.62;
}

/* ---- Per-card session customize row ----------------------------------- */
.qcard--session-custom {
    border-top: 3px solid rgba(5, 125, 205, 0.35);
}
.intake-card__session-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) var(--space-3);
    background: linear-gradient(
        135deg,
        rgba(5, 125, 205, 0.09) 0%,
        rgba(255, 255, 255, 0.4) 100%
    );
    border: 1px solid rgba(5, 125, 205, 0.2);
    border-radius: var(--radius-md);
}
.intake-card__drag-hint {
    cursor: grab;
    user-select: none;
    opacity: 0.55;
    padding: 4px 6px;
    line-height: 1;
    border-radius: var(--radius-sm);
    background: rgba(5, 125, 205, 0.12);
}
.intake-card__drag-hint:active { cursor: grabbing; }
.intake-card__hide {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}
.intake-card__hide-cb { accent-color: var(--primary); }
.intake-card__hide-note {
    font-size: 12px;
    opacity: 0.65;
    font-style: italic;
}
.intake-card__label-override {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}
.intake-card__label-input {
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.18);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
}

.intake-card__type-override {
    flex: 0 1 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}
.intake-card__type-select {
    margin-top: 2px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.18);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
}

/* ---- Cards ------------------------------------------------------------ */
.intake-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.qcard {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.qcard:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.15), var(--glass-shadow);
}
.qcard--required { border-left: 3px solid var(--primary); }
.qcard--pii      { border-left: 3px solid var(--warning); }

.qcard__head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.qcard__label {
    flex: 1;
    font-weight: 600;
    font-size: var(--fs-lg);
    line-height: 1.4;
}
.qcard__req { color: var(--primary); font-weight: 700; margin-left: 4px; }
.qcard__section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink);
    opacity: 0.55;
    align-self: center;
}
.qcard__pii-flag {
    padding: 2px 8px;
    background: var(--warning);
    color: var(--warning-ink);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    align-self: center;
}
.qcard__help { margin: 0; font-size: 13px; opacity: 0.7; }
.qcard__warn { font-size: 13px; opacity: 0.6; }

.qcard__body { display: flex; flex-direction: column; gap: var(--space-2); }

/* =========================================================================
   Signature pad (Phase 4.4.1 — pointer / S Pen)
   ========================================================================= */
.sigpad {
    display: grid;
    gap: var(--space-2);
}
.sigpad.sigpad--pen-near .sigpad__surface {
    border-color: rgba(5, 125, 205, 0.55);
    box-shadow: 0 0 0 2px rgba(5, 125, 205, 0.18);
}
.sigpad__surface {
    position: relative;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.sigpad__canvas {
    width: 100%;
    height: var(--sigpad-height, 180px);
    display: block;
    touch-action: none; /* critical for pen/touch drawing */
    /* Neutral \"paper\" that still fits the icy glass theme */
    background: linear-gradient(
        180deg,
        rgba(236, 246, 255, 0.88),
        rgba(230, 242, 252, 0.78)
    );
}
.sigpad__hint {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(11, 27, 43, 0.65);
    pointer-events: none;
    text-align: center;
    padding: var(--space-3);
}
.sigpad__actions {
    display: flex;
    justify-content: flex-end;
}
.sigpad__clear {
    padding: 8px 12px;
}

/* =========================================================================
   Inline ink panel (Phase 4.4.1.c)
   ========================================================================= */
.inkpanel {
    margin-top: var(--space-2);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 28, 44, 0.22);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.inkpanel__summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    list-style: none;
}
.inkpanel__summary::-webkit-details-marker { display: none; }
.inkpanel__summary::before {
    content: "✎";
    display: inline-block;
    margin-right: 8px;
    opacity: 0.85;
}
.inkpanel[open] .inkpanel__summary { margin-bottom: var(--space-2); }
.inkpanel__sigpad .sigpad__canvas { --sigpad-height: 220px; }
.inkpanel__sigpad .sigpad__surface {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================================================
   Modal (Phase 4.4.1.b — scratchpad)
   ========================================================================= */
.modal {
    width: min(980px, 96vw);
    max-height: 92vh;
    border: 0;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.modal::backdrop {
    background: rgba(3, 10, 18, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.modal__title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
    color: #fff;
}
.modal__sub {
    font-size: 13px;
    opacity: 0.75;
    color: #fff;
}
.modal__body {
    padding: var(--space-4);
    overflow: auto;
    max-height: calc(92vh - 96px); /* body scrolls, header stays visible */
}
.modal__x {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.modal__x .qcard__save { display: inline-flex; align-items: center; }
.modal[data-max="1"] {
    width: 98vw;
    height: 96vh;
    max-height: 96vh;
}
.modal[data-max="1"] .modal__body {
    max-height: calc(96vh - 96px);
}
.sigpad--scratchpad { --sigpad-height: min(58vh, 520px); }
.modal[data-max="1"] .sigpad--scratchpad { --sigpad-height: min(72vh, 720px); }
.intake-header__scratch {
    margin-left: var(--space-2);
}

/* =========================================================================
   Handwriting button (Phase 4.4.1.d)
   ========================================================================= */
.hwrwrap { position: relative; }
.hwrbtn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(30, 61, 88, 0.18);
    background: rgba(255, 255, 255, 0.78);
    color: rgba(11, 27, 43, 0.85);
    font-weight: 800;
    cursor: pointer;
}
.hwrbtn:hover { background: #fff; border-color: var(--primary); }
.hwrbtn--textarea { top: 12px; }
.modal--hwr { width: min(980px, 96vw); }
.hwrpreview { margin-top: var(--space-3); }

/* ---- Inputs ---------------------------------------------------------- */
.qinput {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: var(--fs-base);
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    color: var(--ink);
    transition: border-color 120ms ease, background 120ms ease;
    resize: vertical;
}
.qinput:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.qinput--long { min-height: 96px; line-height: 1.5; }
.qinput--number { max-width: 240px; }
.qinput--date   { max-width: 240px; }

/* ---- Choices --------------------------------------------------------- */
.qchoices, .qbool {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.qchoices--multi { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.qchoice, .qbool__opt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: all 120ms ease;
    user-select: none;
}
.qchoice:hover, .qbool__opt:hover {
    background: #fff;
    border-color: var(--primary);
}
.qchoice input, .qbool__opt input { accent-color: var(--primary); }
.qchoice:has(input:checked), .qbool__opt:has(input:checked) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.qcard__ink-caption-label {
    margin: var(--space-2) 0 4px;
    font-size: 12px;
    opacity: 0.75;
}
.sigpad--inkq {
    min-height: 180px;
}
.sigpad--inkq .sigpad__surface {
    min-height: 160px;
}

/* ---- Guest device mode (Phase 4.6) ---------------------------------- */
.intake-guest-launch {
    margin-top: var(--space-2);
}
.guest-handoff-modal .modal__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.guest-handoff-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.guest-handoff-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}
.guest-handoff-result-wrap {
    margin-top: var(--space-2);
}
.guest-handoff-result__code {
    font-size: 1.25rem;
    padding: 4px 10px;
    background: rgba(5, 125, 205, 0.12);
    border-radius: var(--radius-sm);
    margin-left: 8px;
}
.guest-handoff-result__urllabel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    margin-top: var(--space-2);
}
.guest-handoff-result__hint {
    font-size: 12px;
    opacity: 0.75;
    margin-top: var(--space-2);
}
.guest-actions__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}
.guest-actions__form {
    display: inline;
}
.guest-pin-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: 320px;
    margin-top: var(--space-3);
}
.guest-pin-form__label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.guest-lock-screen,
.guest-exit-screen,
.guest-thanks,
.guest-expired,
.guest-ended {
    padding: var(--space-4);
    max-width: 520px;
    margin: var(--space-4) auto;
}
.guest-exit-screen__back {
    margin-top: var(--space-3);
}

/* ---- Attachment panel (Phase 4.5) ----------------------------------- */
.attach-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(30, 61, 88, 0.12);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.attach-panel--dropping {
    border-color: var(--primary);
    background: rgba(5, 125, 205, 0.08);
    box-shadow: 0 0 0 2px rgba(5, 125, 205, 0.2);
}
.attach-panel__drop-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink);
    opacity: 0.8;
}
.attach-panel__drop-hint strong {
    font-weight: 600;
    opacity: 1;
}
.attach-panel__error {
    margin: 0;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #7a1f1f;
    background: rgba(200, 60, 60, 0.12);
    border: 1px solid rgba(180, 50, 50, 0.35);
    border-radius: var(--radius-sm);
}
.attach-panel__limits {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--ink);
    opacity: 0.72;
}
.attach-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.attach-list__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
}
.attach-list__link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    word-break: break-word;
}
.attach-list__link:hover { text-decoration: underline; }
.attach-list__meta {
    font-size: 11px;
    opacity: 0.65;
}
.attach-list__del { margin-left: auto; }
.attach-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-2);
}
.attach-upload__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 180px;
}
.attach-upload__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.7;
}
.attach-upload__input { font-size: 13px; }
.qcard__attach-note {
    margin: 0 0 4px;
    font-size: 12px;
    opacity: 0.75;
}

/* ---- Placeholder cards (signature / attachment) --------------------- */
.qcard__placeholder {
    padding: var(--space-3);
    background: rgba(208, 234, 248, 0.45);
    border: 1px dashed rgba(5, 125, 205, 0.35);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* ---- Footer ---------------------------------------------------------- */
.qcard__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.85;
}
.qcard__type {
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.55;
}

.save-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background 200ms ease;
}
.save-pill--idle    { background: rgba(30, 61, 88, 0.06); color: var(--ink); opacity: 0.6; }
.save-pill--saved   { background: var(--success); color: var(--success-ink); }
.save-pill--just-saved {
    background: var(--success);
    color: var(--success-ink);
    animation: save-flash 800ms ease;
}
.save-pill--queued {
    background: var(--warning);
    color: var(--warning-ink);
}
.save-pill--syncing {
    background: var(--accent-soft);
    color: var(--ink);
    animation: save-pulse 1200ms ease infinite;
}
.save-pill--failed {
    background: var(--danger);
    color: var(--danger-ink);
}
@keyframes save-flash {
    0%   { transform: scale(1.0); box-shadow: 0 0 0 0 rgba(72, 167, 124, 0.45); }
    40%  { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(72, 167, 124, 0.0); }
    100% { transform: scale(1.0); }
}
@keyframes save-pulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1.0; }
}

/* HTMX request indicator */
.htmx-request .save-pill {
    background: var(--accent-soft);
    color: var(--ink);
    opacity: 1;
}

/* =========================================================================
   Connection chip (Phase 4.4.c)
   ========================================================================= */
.conn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.20);
    transition: background 200ms ease;
}
.conn-chip[hidden] { display: none !important; }
.conn-chip__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.20);
}
/* Offline state */
.conn-chip[data-online="0"] {
    background: var(--warning);
    color: var(--warning-ink);
    border-color: rgba(0, 0, 0, 0.05);
}
.conn-chip[data-online="0"] .conn-chip__dot {
    background: var(--danger-ink);
    animation: chip-pulse 1.5s ease-in-out infinite;
}
/* Online but with queued items */
.conn-chip[data-online="1"][data-pending="0"] .conn-chip__dot { background: var(--success); }
.conn-chip[data-online="1"]:not([data-pending="0"]) {
    background: var(--accent-soft);
    color: var(--ink);
    border-color: rgba(0, 0, 0, 0.05);
}
.conn-chip[data-online="1"]:not([data-pending="0"]) .conn-chip__dot {
    background: var(--primary);
    animation: chip-pulse 1.2s ease-in-out infinite;
}
@keyframes chip-pulse {
    0%, 100% { transform: scale(1.0); opacity: 1.0; }
    50%      { transform: scale(1.4); opacity: 0.55; }
}

/* The kiosk header is also dark — tray aligns lang + connection chip to the right. */
.kiosk-bar .kiosk-bar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.guest-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
}
.guest-lang__label { opacity: 0.75; white-space: nowrap; }
.guest-lang__opts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.guest-lang__opt {
    color: #fff;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.14);
}
.guest-lang__opt:hover { background: rgba(255, 255, 255, 0.26); }
.guest-lang__current {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    font-weight: 600;
}
.guest-lang--select {
    align-items: center;
}
.guest-lang__select {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-sm);
    padding: 6px 26px 6px 10px;
    cursor: pointer;
    max-width: 12rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.guest-lang__select:hover { background-color: rgba(255, 255, 255, 0.24); }
.guest-lang__select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =========================================================================
   Toast (Phase 4.4.c — used by offline-queue.js)
   ========================================================================= */
.toast-stack {
    position: fixed;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 1000;
    pointer-events: none;
    width: min(560px, 92vw);
}
.toast {
    pointer-events: auto;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(30, 61, 88, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: toast-in 220ms ease-out;
}
.toast--warning { background: var(--warning); color: var(--warning-ink); border-color: rgba(0,0,0,0.05); }
.toast--success { background: var(--success); color: var(--success-ink); border-color: rgba(0,0,0,0.05); }
.toast--error,
.toast--danger  { background: var(--danger);  color: var(--danger-ink);  border-color: rgba(0,0,0,0.05); }
.toast--leaving { animation: toast-out 320ms ease-in forwards; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(-12px); }
}

/* ---- Sticky submit bar ---------------------------------------------- */
.intake-actions {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--space-3);
    width: min(1200px, 92vw);
    padding: var(--space-3) var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 5;
    transition: padding 0.22s ease;
}
.intake-actions__collapsible {
    min-height: 0;
    flex-shrink: 1;
}
.intake-actions__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
}
.intake-actions__collapse-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    padding: 5px 18px 7px;
    border: none;
    border-radius: 999px;
    background: rgba(30, 61, 88, 0.1);
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    z-index: 1;
}
.intake-actions__collapse-toggle:hover {
    background: rgba(5, 125, 205, 0.16);
}
.intake-actions__collapse-chevron {
    display: block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 7px solid var(--ink);
    opacity: 0.7;
    transition: transform 0.25s ease;
}
.intake-actions--collapsed .intake-actions__collapse-chevron {
    transform: rotate(180deg);
}
.intake-actions--collapsed {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}
.intake-actions__hint { font-size: 13px; opacity: 0.7; }
.intake-actions__hint strong { font-weight: 600; opacity: 0.95; }
.intake-actions__kbd-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.65;
    line-height: 1.4;
}
.intake-actions__kbd-hint kbd {
    display: inline-block;
    padding: 1px 5px;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    border-radius: 4px;
    border: 1px solid rgba(30, 61, 88, 0.2);
    background: rgba(255, 255, 255, 0.45);
}
.intake-shortcuts-dialog.modal {
    width: min(440px, 94vw);
}
.intake-shortcuts-dialog__list {
    list-style: none;
    margin: 0;
    padding: 0 var(--space-2) var(--space-4);
    display: grid;
    grid-template-columns: minmax(11rem, auto) 1fr;
    gap: 10px 18px;
    font-size: 13px;
    align-items: baseline;
}
.intake-shortcuts-dialog__list dt {
    margin: 0;
    font-weight: 600;
}
.intake-shortcuts-dialog__list dt kbd {
    display: inline-block;
    padding: 2px 6px;
    margin: 0 2px 0 0;
    font-size: 11px;
    font-weight: 500;
    font-family: ui-monospace, monospace;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}
.intake-shortcuts-dialog__list dd {
    margin: 0;
    opacity: 0.85;
    line-height: 1.4;
}
.intake-actions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}
.intake-actions__inline-form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 600px) {
    .intake-actions__body {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
    }
    .intake-actions__buttons .btn { flex: 1; }
}

.intake-empty {
    padding: var(--space-6);
    text-align: center;
    font-style: italic;
    opacity: 0.7;
}

/* ---- Submissions console (§4.3.2) ------------------------------------- */
.submissions-console { margin-bottom: var(--space-6); }
.submissions-console__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}
.submissions-console__head h1 { margin: 0; font-size: var(--fs-2xl); }
.submissions-console__filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}
.submissions-console__filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    opacity: 0.85;
}
.submissions-console__filters input,
.submissions-console__filters select {
    font: inherit;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.55);
    min-width: 0;
}
.submissions-table-wrap { overflow-x: auto; }
.submissions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.submissions-table th,
.submissions-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: top;
}
.submissions-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.65;
}
.submissions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.35);
}
.submissions-table__person { font-weight: 600; }
.submissions-table__meta { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.submissions-table__snippet { font-size: 13px; line-height: 1.4; max-width: 280px; }
.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(30, 61, 88, 0.12);
}
.status-pill--draft { background: rgba(120, 120, 120, 0.18); }
.status-pill--submitted { background: rgba(30, 100, 180, 0.15); }
.status-pill--refined { background: rgba(40, 140, 90, 0.18); }
.status-pill--reviewed { background: rgba(140, 90, 40, 0.2); }
.status-pill--sent { background: rgba(90, 90, 140, 0.15); }
.status-pill--error { background: rgba(180, 50, 50, 0.15); }

.submission-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: 14px;
    opacity: 0.85;
    margin: var(--space-2) 0 var(--space-4);
}
.submission-detail__ai {
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}
.submission-detail__ai-tags { margin-top: var(--space-2); font-size: 13px; opacity: 0.8; }
.q-compare {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}
.q-compare__label { font-weight: 600; margin-bottom: var(--space-2); }
.q-compare__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    font-size: 14px;
}
.q-compare__k {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.65;
}
.q-compare__v { margin: 4px 0 0; white-space: pre-wrap; }
.q-compare__attachments { margin-top: var(--space-3); font-size: 13px; }
.scratchpad-ink-preview {
    max-width: 100%;
    max-height: 220px;
    overflow: auto;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: var(--space-2);
}
.scratchpad-ink-preview svg { max-width: 100%; height: auto; }

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

/* ---- Audit strip (submission detail, §4.3.2) -------------------------- */
.audit-strip {
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
}
.audit-strip__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}
.audit-strip__hint {
    margin: var(--space-2) 0 var(--space-3);
    font-size: 12px;
    opacity: 0.72;
}
.audit-strip__table-wrap { overflow-x: auto; }
.audit-strip__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.audit-strip__table th,
.audit-strip__table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: top;
}
.audit-strip__table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.6;
}
.audit-strip__entity {
    font-size: 11px;
    word-break: break-all;
}
.audit-strip__role {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    opacity: 0.65;
    text-transform: uppercase;
}
.audit-strip__empty {
    margin: 0;
    font-size: 14px;
    opacity: 0.7;
}

/* =========================================================================
   Done screen
   ========================================================================= */
.done-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.done-card {
    width: min(560px, 100%);
    padding: var(--space-7);
    text-align: center;
}
.done-card__check {
    width: 64px; height: 64px;
    margin: 0 auto var(--space-3);
    background: var(--success);
    color: var(--success-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
}
.done-card__title { margin: 0 0 var(--space-2); font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.done-card__sub { margin: 0 0 var(--space-5); opacity: 0.85; }
.done-card__meta { font-size: 12px; opacity: 0.65; }

.done-card__steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    text-align: left;
    margin-bottom: var(--space-5);
}
.done-card__step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    font-size: 13px;
}
.done-card__step--pending { opacity: 0.55; }
.done-card__step--ok { opacity: 1; }
.done-card__step--ok .done-card__step-num { background: var(--success); color: var(--success-ink, #0d4f2b); }
.done-card__step--warn { opacity: 1; }
.done-card__step--warn .done-card__step-num { background: var(--warning); color: #713f12; }
.done-card__step-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.done-card__step--pending .done-card__step-num { background: rgba(30, 61, 88, 0.25); }
.done-card__actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }
.done-card__check--warn { background: var(--warning); color: var(--warning-ink); }

/* =========================================================================
   Share-link panel (operator side, Phase 5)
   ========================================================================= */
.share-panel {
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    border-left: 3px solid var(--accent-strong);
}
.share-panel__head h3 {
    margin: 0 0 4px;
    font-size: var(--fs-lg);
}
.share-panel__hint { margin: 0; font-size: 13px; opacity: 0.75; }
.share-panel__empty { margin: 0; font-style: italic; opacity: 0.6; font-size: 13px; }

.share-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.share-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-md);
    transition: background 200ms ease;
}
.share-row--new {
    background: var(--success);
    border-color: rgba(72, 167, 124, 0.4);
    animation: save-flash 1200ms ease;
}
.share-row__main { min-width: 0; }
.share-row__url { display: flex; gap: var(--space-2); align-items: center; }
.share-row__url input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 12px;
    padding: 8px 10px;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.share-row__meta {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}

.share-panel__create {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: 4px;
}
.share-panel__create-hint { font-size: 12px; opacity: 0.6; }

/* Guest tablet sessions (operator intake, Phase 4.6) */
.guest-sessions-panel {
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    border-left: 3px solid var(--primary);
}
.guest-sessions-panel__head h3 {
    margin: 0 0 4px;
    font-size: var(--fs-lg);
}
.guest-sessions-panel__hint { margin: 0; font-size: 13px; opacity: 0.75; }
.guest-sessions-panel__empty { margin: 0; font-style: italic; opacity: 0.6; font-size: 13px; }
.guest-sessions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.guest-session-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-md);
}
.guest-session-row__main { min-width: 0; }
.guest-session-row__line {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.guest-session-row__scope { font-weight: 600; }
.guest-session-row__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}
.guest-session-row__badge--open { background: rgba(72, 167, 124, 0.35); color: var(--success-ink, #0d4f2b); }
.guest-session-row__badge--ended { background: rgba(100, 116, 139, 0.35); color: var(--ink-muted); }
.guest-session-row__badge--expired { background: rgba(234, 179, 8, 0.35); color: #713f12; }
.guest-session-row__meta {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}
.guest-session-row__url { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.guest-session-row__url-input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 12px;
    padding: 8px 10px;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.btn--small { padding: 6px 12px; font-size: 13px; }
.btn--danger { color: var(--danger-ink); border-color: rgba(0,0,0,0.05); }
.btn--ghost.btn--danger { background: var(--danger); }

/* Phase 8 — Gerente task inbox (minimal until full 8.4 layout) */
.task-inbox__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.task-inbox__card {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(30, 61, 88, 0.12);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.task-inbox__card:hover { border-color: rgba(30, 61, 88, 0.35); box-shadow: 0 4px 18px rgba(30, 61, 88, 0.08); }
.task-inbox__card--operator:hover { border-color: var(--primary); }
.task-inbox__title { font-weight: 600; margin: 0 0 4px; font-size: var(--fs-md); }
.task-inbox__meta { font-size: 12px; opacity: 0.72; margin: 0; line-height: 1.4; }
.task-inbox__empty { margin: 0; opacity: 0.72; font-size: 14px; }

/* §8.5.a — Task console (all tasks / history) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.task-console-stats { margin-bottom: var(--space-5); padding: var(--space-5); }
.task-console-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-4);
}
.task-console-stats__item {
    text-align: center;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.05);
}
.task-console-stats__value {
    display: block;
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--primary);
}
.task-console-stats__label { font-size: 12px; opacity: 0.75; }
.task-console__header { flex-wrap: wrap; gap: var(--space-3); align-items: flex-start; }
.task-console__mine { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.task-console__chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(30, 61, 88, 0.18);
    background: rgba(255, 255, 255, 0.6);
}
.task-console__chip:hover { border-color: rgba(30, 61, 88, 0.35); }
.task-console__chip--active {
    border-color: var(--primary);
    background: rgba(30, 61, 88, 0.08);
    font-weight: 600;
}
.task-console__filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: flex-end;
    margin-bottom: var(--space-5);
}
.task-console__field { flex: 1 1 160px; max-width: 280px; margin: 0; }
.task-console__field input,
.task-console__field select { width: 100%; }
.task-console__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.task-console__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.task-console__table th,
.task-console__table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(30, 61, 88, 0.1);
}
.task-console__table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.65; }
.task-console__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    background: rgba(30, 61, 88, 0.08);
}
.task-console__body { font-size: 15px; line-height: 1.55; margin: 0; }
.task-console__pre {
    font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 12px;
    padding: var(--space-4);
    margin: 0;
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.06);
    overflow: auto;
    max-height: 42vh;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-detail__back { margin: 0 0 var(--space-4); }
.task-detail__h { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; margin: var(--space-5) 0 var(--space-2); }
.task-detail__h:first-of-type { margin-top: 0; }
.task-detail__body { font-size: 15px; line-height: 1.55; }
.task-detail__pre {
    font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 12px;
    padding: var(--space-4);
    margin: 0;
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.06);
    overflow: auto;
    max-height: 42vh;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-handoff__hint { font-size: 13px; opacity: 0.75; margin: 0 0 var(--space-4); line-height: 1.45; }
.task-handoff__row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.task-handoff__row form { margin: 0; }

/* Phase 8.4 — Gerente workspace (3 columns) + §8.5.d polish */
.gerente-shell {
    display: grid;
    grid-template-columns:
        minmax(0, var(--gerente-rail-width))
        minmax(var(--gerente-center-min), 1fr)
        minmax(240px, var(--gerente-info-width));
    gap: var(--space-4);
    align-items: stretch;
    min-height: min(72vh, 900px);
}
/* Info collapsed: third column must not keep 240px min — let centre column grow */
.gerente-shell--info-collapsed {
    grid-template-columns:
        minmax(0, var(--gerente-rail-width))
        minmax(var(--gerente-center-min), 1fr)
        minmax(0, var(--gerente-info-collapsed-width));
}
.gerente-shell--info-collapsed .gerente-info-shell {
    min-width: 0;
    max-width: var(--gerente-info-collapsed-width);
}
.gerente-rail,
.gerente-center,
.gerente-info-shell .gerente-info {
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.gerente-rail {
    background: var(--surface-gerente-rail);
    color: var(--ink);
}
.gerente-info-shell .gerente-info {
    background: var(--surface-gerente-panel);
}
.gerente-rail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.gerente-rail__title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 700;
}
.gerente-rail__hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-3);
    line-height: 1.4;
}
.gerente-rail__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: min(52vh, 520px);
    overflow-y: auto;
}
.gerente-rail__item a {
    display: block;
    padding: 10px 11px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.1);
    background: rgba(255, 255, 255, 0.35);
    transition: border-color 0.12s ease, background 0.12s ease;
}
.gerente-rail__item a:hover {
    border-color: rgba(10, 107, 140, 0.35);
}
.gerente-rail__item--active a {
    border-color: var(--gerente-accent);
    background: rgba(10, 107, 140, 0.08);
    box-shadow:
        inset 3px 0 0 var(--gerente-accent),
        0 0 0 1px rgba(10, 107, 140, 0.12);
}
.gerente-rail__item-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gerente-rail__item-meta {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}
.gerente-rail__foot {
    margin: var(--space-3) 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}
.gerente-rail__foot a {
    color: var(--primary);
    font-weight: 600;
}
.gerente-rail__clear { color: var(--primary); }

/* Inbox count pill: ink on icy accent-soft was borderline — neutral tint on Gerente rail */
.gerente-rail .picker__filter-pill {
    background: rgba(30, 61, 88, 0.1);
    color: var(--ink);
    border: 1px solid rgba(30, 61, 88, 0.14);
}
.gerente-center {
    background: var(--surface-gerente-canvas);
    padding: var(--space-5);
    overflow-y: auto;
    max-height: min(78vh, 920px);
    min-width: 0; /* grid: allow 1fr column to absorb space freed when Info collapses */
}
.gerente-center__placeholder { padding: var(--space-4) 0; }
.gerente-center__placeholder-lead {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin: 0 0 var(--space-2);
}
.gerente-center__header { margin-bottom: var(--space-5); }
.gerente-center__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin: var(--space-2) 0 var(--space-3);
}
.gerente-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(30, 61, 88, 0.09);
    border: 1px solid rgba(30, 61, 88, 0.22);
    color: var(--ink);
}
.gerente-pill--accent {
    background: rgba(10, 107, 140, 0.14);
    border-color: rgba(10, 107, 140, 0.42);
    color: #074559;
}
.gerente-pill--danger {
    background: rgba(166, 50, 50, 0.12);
    border-color: rgba(166, 50, 50, 0.38);
    color: #6f1414;
}
.gerente-center__h1 {
    font-size: var(--fs-xl);
    margin: var(--space-2) 0;
    letter-spacing: -0.02em;
}
.gerente-center__sub { margin: 0; }
.gerente-center__block { margin-bottom: var(--space-4); }
.gerente-center__actions { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid rgba(30, 61, 88, 0.1); }

@media (max-width: 1024px) {
    /* §8.5.d.4 — three columns stay usable: explicit min width → horizontal scroll */
    .gerente-shell {
        max-width: 100%;
        min-width: calc(
            var(--gerente-rail-width) + var(--gerente-center-min) + 240px + 2 * var(--space-4)
        );
        overflow-x: auto;
        align-content: start;
        -webkit-overflow-scrolling: touch;
    }
}

.gerente-info__head { margin-bottom: var(--space-3); }
.gerente-info__title {
    margin: 0 0 4px;
    font-size: var(--fs-md);
    font-weight: 700;
}
.gerente-info__sub {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.35;
}
.gerente-info__filters { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.gerente-info__filters input[type="search"],
.gerente-info__filters select {
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.15);
    padding: 8px 10px;
    font: inherit;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.85);
}
.gerente-info__filters select {
    appearance: auto;
    min-height: 40px;
}
.gerente-info__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(50vh, 480px);
    overflow-y: auto;
    border: 1px solid rgba(30, 61, 88, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
}
.gerente-info__row {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.06);
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    align-items: start;
}
.gerente-info__row::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--surface-2), var(--accent-soft));
    border: 1px solid rgba(30, 61, 88, 0.12);
    margin-top: 2px;
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: start;
}
.gerente-info__row:last-child { border-bottom: none; }
.gerente-info__name { font-weight: 600; font-size: 13px; grid-column: 2; grid-row: 1; }
.gerente-info__email { font-size: 11px; opacity: 0.75; font-family: var(--font-mono, ui-monospace, monospace); word-break: break-all; grid-column: 2; grid-row: 2; }
.gerente-info__dept { font-size: 11px; opacity: 0.65; grid-column: 2; grid-row: 3; }
.gerente-info__dept--muted { opacity: 0.45; }
.gerente-info__empty {
    padding: var(--space-4);
    font-size: 13px;
    opacity: 0.65;
    margin: 0;
}
.gerente-info-shell {
    display: flex;
    align-items: stretch;
    min-width: 0;
}
.gerente-info-shell .gerente-info {
    flex: 1 1 280px;
    min-width: 220px;
    max-width: 340px;
    overflow-x: hidden;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.gerente-info__panel-inner {
    max-height: min(74vh, 880px);
    overflow-y: auto;
    padding-right: 2px;
}
.gerente-info__toggle {
    flex: 0 0 36px;
    align-self: stretch;
    border: 1px solid rgba(30, 61, 88, 0.12);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    color: var(--primary);
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gerente-info__toggle:hover {
    background: rgba(30, 61, 88, 0.07);
}
.gerente-shell--info-collapsed .gerente-info-shell .gerente-info {
    flex-basis: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border: none !important;
}
.gerente-shell--info-collapsed .gerente-info__toggle {
    border-radius: var(--radius-lg);
    border-right: 1px solid rgba(30, 61, 88, 0.12);
}
.gerente-shell--info-collapsed .gerente-info__toggle-icon {
    display: inline-block;
    transform: rotate(180deg);
}
.gerente-sidebar__h {
    margin: var(--space-4) 0 var(--space-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.72;
}
.gerente-sidebar__seat-assign {
    padding-top: var(--space-2);
    border-top: 1px solid rgba(30, 61, 88, 0.1);
}
.gerente-sidebar__seat-assign-hint {
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.78;
    margin: 0 0 var(--space-3);
}
.gerente-sidebar__seat-field {
    margin-bottom: var(--space-3);
}
.gerente-sidebar__seat-field .field__label {
    font-size: 11px;
}
.gerente-sidebar__seat-select {
    width: 100%;
    font: inherit;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.18);
    background: rgba(255, 255, 255, 0.85);
}
.gerente-seat-assign-drop {
    min-height: 52px;
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
    border: 2px dashed rgba(30, 61, 88, 0.22);
    background: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    text-align: center;
    color: rgba(30, 61, 88, 0.75);
}
.gerente-seat-assign-drop--active {
    border-color: var(--primary);
    background: rgba(30, 61, 88, 0.06);
}
.gerente-seat-assign-status {
    font-size: 12px;
    min-height: 1.25em;
    margin: 0 0 var(--space-2);
    opacity: 0.85;
}
.gerente-sidebar__submission {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gerente-sidebar__submissions {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    border: 1px solid rgba(30, 61, 88, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
    max-height: 200px;
    overflow-y: auto;
}
.gerente-sidebar__subj-title { font-weight: 600; font-size: 12px; }
.gerente-sidebar__subj-meta { font-size: 11px; opacity: 0.68; }
.gerente-sidebar__form-list {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid rgba(30, 61, 88, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
}
.gerente-sidebar__form-row {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gerente-sidebar__form-row:last-child { border-bottom: none; }
.gerente-sidebar__form-row--draggable {
    cursor: grab;
    user-select: none;
}
.gerente-sidebar__form-row--draggable:active { cursor: grabbing; }
.gerente-sidebar__form-name { font-weight: 600; font-size: 12px; }
.gerente-sidebar__form-meta { font-size: 11px; opacity: 0.65; }
.gerente-shape-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-2);
}
.gerente-shape-palette__item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.18);
    background: rgba(255, 255, 255, 0.7);
    cursor: grab;
    font-size: 16px;
    user-select: none;
}
.gerente-shape-palette__item:active { cursor: grabbing; }
.gerente-shape-palette__item--picked {
    outline: 2px solid rgba(61, 126, 166, 0.95);
    outline-offset: 2px;
    background: rgba(61, 126, 166, 0.12);
}
.gerente-assigned-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: var(--space-3);
}
.gerente-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    background: rgba(30, 61, 88, 0.1);
    border: 1px solid rgba(30, 61, 88, 0.15);
    font-size: 13px;
}
.gerente-chip--form {
    background: rgba(201, 162, 39, 0.12);
    border-color: rgba(201, 162, 39, 0.35);
}
.gerente-chip__rm-form { margin: 0; display: inline; }
.gerente-chip__rm {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.6;
}
.gerente-chip__rm:hover { opacity: 1; }
.gerente-chip__clear-form { margin: 0; }
.gerente-center__drop--forms {
    background: rgba(201, 162, 39, 0.06);
    border-color: rgba(201, 162, 39, 0.28);
}
.gerente-chip--report {
    background: rgba(14, 165, 233, 0.10);
    border-color: rgba(14, 165, 233, 0.40);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gerente-chip__code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #075985;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(14, 165, 233, 0.40);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.02em;
}
.gerente-chip__text--link {
    color: #075985;
    text-decoration: none;
}
.gerente-chip__text--link:hover {
    text-decoration: underline;
}
.gerente-center__drop--reports {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.32);
    margin-top: var(--space-2);
}
.gerente-center__drop--reports.gerente-center__drop--active {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.7);
}
.gerente-center__drop--narrow { max-width: 100%; }
.gerente-workflow-canvas-wrap {
    margin: var(--space-4) 0;
}
.gerente-workflow-canvas__toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}
.gerente-workflow-canvas {
    position: relative;
    min-height: 320px;
    border-radius: var(--radius-lg);
    background-color: #f6f4f0;
    background-image: radial-gradient(rgba(30, 61, 88, 0.08) 1px, transparent 1px);
    background-size: 14px 14px;
    border: 1px solid rgba(30, 61, 88, 0.12);
    overflow: hidden;
    touch-action: none;
}
.gerente-canvas-item {
    position: absolute;
    box-sizing: border-box;
    cursor: grab;
    user-select: none;
}
.gerente-canvas-item:active { cursor: grabbing; }
.gerente-canvas-item--square,
.gerente-canvas-item--rect {
    background: rgba(30, 61, 88, 0.12);
    border: 2px solid rgba(30, 61, 88, 0.45);
    border-radius: 4px;
}
.gerente-canvas-item--text {
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed rgba(30, 61, 88, 0.35);
    border-radius: 4px;
}
.gerente-canvas-item--arrow,
.gerente-canvas-item--triangle {
    background: transparent;
    border: none;
}
.gerente-canvas-item__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.gerente-canvas-item__poly {
    fill: rgba(30, 61, 88, 0.18);
    stroke: rgba(30, 61, 88, 0.55);
    stroke-width: 2;
}
.gerente-canvas-item__text {
    position: absolute;
    inset: 4px 4px 4px 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    background: transparent;
    border: 0;
    outline: none;
    resize: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    padding: 4px;
    overflow: auto;
}
.gerente-canvas-item__text--triangle {
    inset: 30% 8% 6% 8%;
    width: 84%;
    height: 64%;
}
.gerente-canvas-item__text--text {
    font-weight: 600;
}
.gerente-canvas-item__text--arrow {
    inset: 4px 14px 4px 14px;
    width: calc(100% - 28px);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    text-align: center;
}
.gerente-canvas-item__text:focus {
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.gerente-canvas-item__delete {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--danger-ink, #b00020);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    z-index: 2;
}
.gerente-canvas-item:hover .gerente-canvas-item__delete,
.gerente-canvas-item:focus-within .gerente-canvas-item__delete {
    display: flex;
}
.gerente-canvas-item__resize {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
    background:
        linear-gradient(135deg, transparent 50%, rgba(30, 61, 88, 0.6) 50%, rgba(30, 61, 88, 0.6) 70%, transparent 70%);
    border-bottom-right-radius: 4px;
    z-index: 2;
}
.gerente-canvas-item--arrow .gerente-canvas-item__resize {
    /* arrow resize uses end-point handle logic but we still anchor in the bbox corner */
    cursor: crosshair;
}
.gerente-canvas-item--readonly {
    cursor: default;
}
.gerente-canvas-item--readonly .gerente-canvas-item__text {
    cursor: default;
}
.gerente-canvas-item--readonly .gerente-canvas-item__delete,
.gerente-canvas-item--readonly .gerente-canvas-item__resize {
    display: none !important;
}
.gerente-workflow-canvas-wrap--readonly .gerente-workflow-canvas {
    background-color: #f6f4f0;
}

/* ---- Form builder (intake templates) ---- */
.form-builder-layout {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: 1fr 1.2fr;
    margin-top: var(--space-5);
    align-items: start;
}
@media (max-width: 960px) {
    .form-builder-layout {
        grid-template-columns: 1fr;
    }
}
.form-builder-qlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.form-builder-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.06);
    border: 1px solid rgba(30, 61, 88, 0.12);
    cursor: grab;
    user-select: none;
}
.form-builder-row--dragging {
    opacity: 0.55;
}
.form-builder-row__drag {
    font-size: 1.1rem;
    color: var(--ink-muted);
    cursor: grab;
}
.form-builder-row__title {
    font-weight: 600;
    flex: 1 1 40%;
}
.form-builder-row__meta {
    font-size: 0.85rem;
    color: var(--ink-muted);
    flex: 1 1 100%;
}
.form-builder-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: flex-end;
    margin-top: var(--space-3);
}
.form-builder-card {
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}
.form-builder-card__h {
    font-size: 1.05rem;
    margin: 0 0 var(--space-3);
}
.form-builder-card__form {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.form-builder-workflow-block {
    margin: var(--space-4) 0;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.form-builder-canvas {
    margin-top: var(--space-3);
}
.gerente-shape-palette--compact {
    margin-bottom: var(--space-3);
}
.qcard__workflow {
    margin-top: var(--space-3);
}

.gerente-center__comment-focus {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
@media (max-width: 1100px) {
    .gerente-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .gerente-info-shell {
        order: 4;
    }
    .gerente-rail__list,
    .gerente-center,
    .gerente-info__list {
        max-height: none;
    }
}

.gerente-assign-form-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.gerente-center__drop {
    border: 2px dashed rgba(30, 61, 88, 0.22);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(30, 61, 88, 0.82);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.gerente-center__drop--active {
    border-color: var(--gerente-accent);
    border-width: 2px;
    background: rgba(10, 107, 140, 0.07);
}

/* §8.5.b.4 — pick_person / approve_* / question-free centres */
.gerente-kind-panel__intro { margin-bottom: var(--space-3); }
.gerente-kind-panel__lead {
    margin: 0;
    max-width: 52ch;
    color: var(--text-secondary);
    font-size: 13px;
}
.gerente-kind-panel--pick-person .gerente-center__drop {
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gerente-approve-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.gerente-approve-summary-card {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.45);
}
.gerente-approve-summary-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    justify-content: space-between;
}
.gerente-approve-summary-card__title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 700;
}
.gerente-approve-summary-card__meta {
    margin: var(--space-2) 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.gerente-approve-summary-card__desc {
    margin: var(--space-2) 0 0;
    font-size: 13px;
    line-height: 1.45;
}
.gerente-approve-summary-card__actions {
    margin: var(--space-3) 0 0;
}
.gerente-submission-summary-card {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.45);
}
.gerente-submission-summary-card--stale {
    border-style: dashed;
    opacity: 0.92;
}
.gerente-submission-summary-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    justify-content: space-between;
}
.gerente-submission-summary-card__title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 700;
}
.gerente-submission-summary-card__meta {
    margin: var(--space-2) 0 0;
    font-size: 13px;
    line-height: 1.45;
}
.gerente-submission-summary-card__ai {
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.06);
    font-size: 13px;
    line-height: 1.45;
}
.gerente-submission-summary-card__ai-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.gerente-submission-summary-card__actions {
    margin: var(--space-3) 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.gerente-review-card__status { margin: 0 0 var(--space-2); }
.gerente-review-card__form .field { margin-bottom: var(--space-3); }
.gerente-review-card__actions {
    flex-wrap: wrap;
}
.field.field--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.field.field--checkbox input[type="checkbox"] {
    margin-top: 3px;
}

.gerente-assigned {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.08);
    border: 1px solid rgba(30, 61, 88, 0.14);
    margin-bottom: var(--space-4);
}
.gerente-assigned--readonly {
    display: block;
    margin-bottom: var(--space-4);
}
.gerente-assigned__heading {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-lg);
    font-weight: 600;
}
.gerente-assigned__name {
    margin: 0 0 4px;
    font-weight: 600;
    font-size: 15px;
}
.gerente-assigned__meta {
    margin: 0;
    font-size: 12px;
    opacity: 0.78;
    word-break: break-word;
}
.gerente-info__row--draggable {
    cursor: grab;
    user-select: none;
}
.gerente-info__row--draggable:active {
    cursor: grabbing;
}

/* §8.5.b — workflow whiteboard */
.gerente-workflow-board {
    margin-bottom: var(--space-4);
}
.gerente-workflow-board__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.gerente-workflow-board__status {
    font-size: 13px;
    opacity: 0.75;
    min-height: 1.2em;
}
.gerente-workflow-board__hint {
    margin-top: var(--space-3);
}
.gerente-workflow-board__cols {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    min-height: 220px;
    background-color: #f6f4f0;
    background-image: radial-gradient(rgba(30, 61, 88, 0.08) 1px, transparent 1px);
    background-size: 14px 14px;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.gerente-workflow-board__col {
    flex: 0 0 min(280px, 86vw);
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.gerente-workflow-board__col-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}
.gerente-workflow-board__lane {
    flex: 1;
    min-height: 120px;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    border: 1px dashed rgba(30, 61, 88, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.gerente-workflow-board__lane--active {
    border-color: var(--primary);
    background: rgba(30, 61, 88, 0.04);
}
.gerente-workflow-board__card {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid rgba(30, 61, 88, 0.14);
    box-shadow: 0 1px 3px rgba(30, 61, 88, 0.06);
    cursor: grab;
    user-select: none;
}
.gerente-workflow-board__card:active {
    cursor: grabbing;
}
.gerente-workflow-board__card--dragging {
    opacity: 0.65;
}
.gerente-workflow-board__card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}
.gerente-workflow-board__debug {
    margin-top: var(--space-3);
    font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
    .gerente-center__drop,
    .gerente-workflow-board__lane {
        transition: none;
    }
}

.task-comments {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}
.task-comments__list {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: var(--space-2);
    max-height: min(36vh, 320px);
    overflow-y: auto;
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.04);
    border: 1px solid rgba(30, 61, 88, 0.08);
}
.task-comments__item {
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    border-bottom: none;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(30, 61, 88, 0.08);
    box-shadow: var(--shadow-sm);
}
.task-comments__item:last-child {
    margin-bottom: 0;
}
.task-comments__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: 11px;
    opacity: 0.72;
    margin-bottom: 6px;
}
.task-comments__author { font-weight: 600; color: var(--ink); opacity: 0.9; }
.task-comments__body { font-size: 14px; line-height: 1.5; margin: 0; }
.task-comments__empty {
    font-size: 13px;
    opacity: 0.65;
    padding: var(--space-2) 0;
    margin: 0;
}
.task-comments__form textarea {
    min-height: 72px;
    max-height: 200px;
    resize: vertical;
}

.task-start {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    border: 1px solid rgba(30, 61, 88, 0.12);
}
.task-start__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}
.task-start__lead {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: var(--fs-lg);
}
.task-start__meta {
    margin: 0 0 var(--space-2);
    font-size: 14px;
    line-height: 1.45;
}
.task-start__hint {
    margin: 0;
    font-size: 12px;
    opacity: 0.72;
    line-height: 1.4;
    max-width: 520px;
}
.task-start--muted {
    padding: var(--space-3) var(--space-4);
    border-style: dashed;
}

/* =========================================================================
   Kiosk chrome (public-share pages, Phase 5)
   ========================================================================= */
body.kiosk { padding-bottom: 40px; }

.kiosk-bar {
    position: sticky;
    top: var(--space-3);
    margin: var(--space-3) auto;
    width: min(1200px, 92vw);
    padding: var(--space-3) var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    z-index: 10;
}
.kiosk-bar__brand { display: flex; align-items: center; gap: var(--space-3); color: #fff; }
.kiosk-bar__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.kiosk-bar__title { font-weight: 600; font-size: var(--fs-lg); }

.kiosk-foot {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 11px;
    opacity: 0.5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* The kiosk reuses the operator intake-cards/qcard CSS — only the chrome differs. */
.kiosk-screen { padding-bottom: 140px; }

/* =========================================================================
   Login (Phase 4)
   ========================================================================= */
.login-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: min(420px, 100%);
    padding: var(--space-6);
}
.login-card__header { text-align: center; margin-bottom: var(--space-5); }
.login-card__logo {
    width: 56px; height: 56px;
    margin: 0 auto var(--space-3);
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}
.login-card h1 {
    margin: 0 0 var(--space-1);
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
}
.login-card__sub { margin: 0; opacity: 0.7; font-size: 14px; }
.login-form { display: flex; flex-direction: column; gap: var(--space-3); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}
.field__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.72;
}
.field input {
    padding: 12px 14px;
    font: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    color: var(--ink);
}
.field input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.field select,
.field textarea {
    padding: 12px 14px;
    font: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    color: var(--ink);
}
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.field__help {
    font-size: 11px;
    opacity: 0.65;
    margin: 0;
}
.field__error { font-size: 12px; color: var(--danger-ink); }
.task-create-form { display: flex; flex-direction: column; gap: var(--space-4); max-width: 520px; }
.task-create-banner { font-size: 13px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: rgba(201, 162, 39, 0.2); border: 1px solid rgba(201, 162, 39, 0.45); margin: 0 0 var(--space-4); }
.task-create-banner--error { background: var(--danger); color: var(--danger-ink); border-color: transparent; }

.login-error {
    background: var(--danger);
    color: var(--danger-ink);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.login-foot {
    margin-top: var(--space-4);
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
}

/* Phase 8.8 — virtual building landing */
.building-index-hero .building-index-hero__lead {
    max-width: 42rem;
    line-height: 1.55;
}
.building-index-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}
.building-index-quicklinks__item {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    background: rgba(30, 61, 88, 0.08);
    border: 1px solid rgba(30, 61, 88, 0.14);
    color: var(--primary, #1e3d58);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.building-index-quicklinks__item:hover {
    background: rgba(30, 61, 88, 0.12);
    border-color: rgba(30, 61, 88, 0.22);
}
.building-index-quicklinks__item--muted {
    font-weight: 500;
    opacity: 0.88;
}

.building-index-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
}
.building-index-totals {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: 0;
}
.building-index-totals > div {
    min-width: 5rem;
}
.building-index-totals dt {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.55;
}
.building-index-totals dd {
    margin: 4px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: var(--primary, #1e3d58);
}
.building-index-search {
    flex: 1;
    min-width: min(100%, 220px);
    max-width: 360px;
}
.building-index-search__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 6px;
}
.building-index-search__input {
    width: 100%;
    font: inherit;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.2);
    background: rgba(255, 255, 255, 0.65);
}

.building-index-board {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.building-index-empty {
    padding: var(--space-5);
    text-align: center;
}
.building-index-empty__hint {
    margin-top: var(--space-3);
}

.building-index-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}
.building-index-card__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
}
.building-index-card__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.55;
}
.building-index-card__title {
    margin: 0;
    font-size: 1.35rem;
}
.building-index-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin: 0;
}
.building-index-card__stats > div {
    min-width: 4.5rem;
}
.building-index-card__stats dt {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.55;
}
.building-index-card__stats dd {
    margin: 2px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.building-index-card__empty {
    margin-bottom: var(--space-2);
}

.building-index-floor-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.building-index-floor-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.45);
    overflow: hidden;
}
.building-index-floor-row__shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.building-index-floor-row__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
}
.building-index-floor-row__body {
    flex: 1;
    min-width: min(100%, 220px);
}
.building-index-floor-row__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary, #1e3d58);
    text-decoration: none;
}
.building-index-floor-row__name:hover {
    text-decoration: underline;
}
.building-index-floor-row__meta {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.72;
    line-height: 1.4;
}
.building-index-floor-row__cta {
    flex-shrink: 0;
}

.building-index-room-list {
    list-style: none;
    margin: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(30, 61, 88, 0.08);
    background: rgba(30, 61, 88, 0.03);
}
.building-index-room-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.14);
    background: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.3;
}
.building-index-room-chip__name {
    font-weight: 600;
    color: var(--primary, #1e3d58);
}
.building-index-room-chip__dept {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(30, 61, 88, 0.1);
    color: var(--primary, #1e3d58);
}
.building-index-room-chip__meta {
    font-size: 11px;
    opacity: 0.72;
}
.building-index-room-empty {
    margin: 0;
    padding: var(--space-2) var(--space-3) var(--space-3);
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.65;
    border-top: 1px solid rgba(30, 61, 88, 0.08);
    background: rgba(30, 61, 88, 0.03);
}

.floor-editor {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}
.floor-editor-summary-chips {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.floor-editor-summary-chips__item {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30, 61, 88, 0.08);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.floor-editor-summary-chips__item strong {
    font-variant-numeric: tabular-nums;
}
.floor-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}
.floor-editor__toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding-right: var(--space-4);
    border-right: 1px solid rgba(30, 61, 88, 0.12);
}
.floor-editor__toolbar-group:last-of-type {
    border-right: none;
    padding-right: 0;
}
.floor-editor__tool-label {
    font-size: 13px;
    font-weight: 600;
    margin-right: var(--space-1);
}
.floor-editor__toolbar-group .floor-editor__capacity-label {
    margin-left: 0;
}
.floor-editor__selection-status {
    font-size: 12px;
    opacity: 0.72;
    min-width: 10rem;
}
.floor-editor__toolbar-group #floor-delete-selected:disabled {
    opacity: 0.45;
}
.floor-editor__capacity-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-left: var(--space-2);
}
.floor-editor__capacity-input {
    width: 4rem;
    font: inherit;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.2);
}
.floor-editor__hint {
    font-size: 12px;
    opacity: 0.72;
    margin: 0 0 var(--space-3);
}
.floor-editor__bg-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.35);
}
.floor-editor__bg-form-label {
    font-size: 13px;
    font-weight: 600;
}
.floor-editor__bg-file {
    font-size: 13px;
    max-width: min(100%, 220px);
}
.floor-editor__status {
    font-size: 13px;
    opacity: 0.75;
    margin-left: var(--space-2);
}
.floor-editor__surface-wrap {
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.15);
    background: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    max-width: 100%;
}
.floor-editor__canvas-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.4);
}
.floor-editor__canvas-controls-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-right: var(--space-2);
}
.floor-editor__zoom-pct {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 3rem;
    opacity: 0.85;
}
.floor-editor__toggle-btn[aria-pressed="false"] {
    opacity: 0.55;
}
.floor-editor__viewport {
    overflow: hidden;
    max-height: min(72vh, 620px);
    touch-action: none;
    background: rgba(248, 250, 252, 0.9);
}
.floor-editor__viewport-inner {
    transform-origin: 0 0;
    width: fit-content;
}
.floor-editor__svg {
    display: block;
    max-width: 100%;
    height: auto;
    touch-action: none;
}
.floor-editor-seats { margin-bottom: var(--space-5); }
.floor-seat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.floor-seat-table th,
.floor-seat-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.15);
    text-align: left;
    vertical-align: middle;
}
.floor-seat-assign-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.floor-seat-select {
    min-width: 160px;
    font: inherit;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.2);
}

.plan-b-page {
    display: grid;
    gap: var(--space-4);
    align-items: start;
    margin-bottom: var(--space-6);
}
.plan-b-page--center-only {
    grid-template-columns: 1fr;
}
.plan-b-page--center-only .plan-b-center {
    max-width: 52rem;
    margin-inline: auto;
    width: 100%;
}
.plan-b-page--triple {
    grid-template-columns: minmax(220px, 280px) minmax(280px, 1fr) minmax(260px, 300px);
}
.plan-b-page--triple.plan-b-page--collapse-left {
    grid-template-columns: 2.75rem minmax(280px, 1fr) minmax(260px, 300px);
}
.plan-b-page--triple.plan-b-page--collapse-right {
    grid-template-columns: minmax(220px, 280px) minmax(280px, 1fr) 2.75rem;
}
.plan-b-page--triple.plan-b-page--collapse-left.plan-b-page--collapse-right {
    grid-template-columns: 2.75rem minmax(280px, 1fr) 2.75rem;
}
@media (max-width: 1100px) {
    .plan-b-page--triple {
        grid-template-columns: 1fr;
    }
    .plan-b-aside-left,
    .plan-b-center,
    .plan-b-rail {
        position: static;
    }
    .plan-b-panel-btn {
        display: none !important;
    }
    .plan-b-aside-left,
    .plan-b-rail {
        flex-direction: column;
    }
}

.plan-b-page--collapse-left .plan-b-aside-left__body {
    display: none;
}
.plan-b-page--collapse-right .plan-b-rail__body {
    display: none;
}
.plan-b-page--collapse-left .plan-b-aside-left,
.plan-b-page--collapse-right .plan-b-rail {
    min-height: min(70vh, 520px);
}

.plan-b-aside-left {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: sticky;
    top: var(--space-3);
    padding: 0;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.plan-b-aside-left__body {
    flex: 1;
    min-width: 0;
    padding: var(--space-4);
}
.plan-b-aside-left__head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.14);
}
.plan-b-aside-left__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}
.plan-b-aside-left__lead {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.88;
}
.plan-b-aside-left__lead code {
    font-size: 11px;
}

.plan-b-panel-btn {
    flex-shrink: 0;
    width: 2.75rem;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(30, 61, 88, 0.07);
    color: var(--primary, #1e3d58);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.plan-b-panel-btn:hover {
    background: rgba(30, 61, 88, 0.14);
}
.plan-b-panel-btn:focus-visible {
    outline: 2px solid var(--primary, #1e3d58);
    outline-offset: -2px;
    z-index: 2;
}
.plan-b-aside-left .plan-b-panel-btn--after-body {
    border-left: 1px solid rgba(30, 61, 88, 0.12);
}
.plan-b-rail .plan-b-panel-btn--before-body {
    border-right: 1px solid rgba(30, 61, 88, 0.12);
}

.plan-b-center {
    position: sticky;
    top: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    min-width: 0;
}
.plan-b-center__head {
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
}
.plan-b-center__title {
    margin: 0;
    font-size: 1.1rem;
}
.plan-b-center__intro {
    margin: var(--space-2) 0 0;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.88;
}
.plan-b-center__intro code {
    font-size: 12px;
}
.plan-b-center__empty {
    margin: 0;
    font-size: 13px;
}

.plan-b-db-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.35);
}
.plan-b-db-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.08);
}
.plan-b-db-row:last-child {
    border-bottom: none;
}
.plan-b-db-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: min(100%, 200px);
    flex: 1;
}
.plan-b-db-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary, #1e3d58);
    text-decoration: none;
}
.plan-b-db-name:hover {
    text-decoration: underline;
}
.plan-b-db-name--backup {
    font-weight: 600;
}
.plan-b-db-arrow {
    font-weight: 700;
    opacity: 0.35;
    font-size: 14px;
    padding: 0 2px;
}
.plan-b-db-dept {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(30, 61, 88, 0.08);
    color: var(--primary, #1e3d58);
}
.plan-b-db-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.plan-b-db-priority {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(30, 61, 88, 0.1);
}
.plan-b-db-notes {
    font-size: 11px;
    opacity: 0.75;
    max-width: 14rem;
    text-align: right;
    line-height: 1.35;
}

.plan-b-main {
    padding: 0;
    border-radius: 0;
}
.plan-b-main__h {
    margin: 0 0 var(--space-2);
    font-size: 1.15rem;
}
.plan-b-main__lead {
    margin: 0 0 var(--space-4);
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.88;
}

.plan-b-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.35);
}
.plan-b-stats--compact {
    grid-template-columns: 1fr;
}
.plan-b-stats dt {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.55;
}
.plan-b-stats dd {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.plan-b-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.plan-b-card {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.1);
    background: rgba(255, 255, 255, 0.4);
}
.plan-b-card__title {
    margin: 0 0 var(--space-2);
    font-size: 14px;
}
.plan-b-card__list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 13px;
    line-height: 1.55;
}
.plan-b-card__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.plan-b-rail {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: sticky;
    top: var(--space-3);
    padding: 0;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.plan-b-rail__body {
    flex: 1;
    min-width: 0;
    padding: var(--space-4);
}
.plan-b-rail__head {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(30, 61, 88, 0.14);
}
.plan-b-rail__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}
.plan-b-rail__subtitle {
    margin: 6px 0 0;
    font-size: 12px;
    opacity: 0.75;
}
.plan-b-rail__subtitle code {
    font-size: 11px;
}
.plan-b-rail__empty {
    margin: 0;
    font-size: 13px;
}
.plan-b-rail__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}
.plan-b-rail__item {
    margin: 0;
}
.plan-b-rail__link {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 36px 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-b-rail__link:hover {
    border-color: rgba(30, 61, 88, 0.28);
    background: rgba(255, 255, 255, 0.92);
}
.plan-b-rail__chev {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    opacity: 0.35;
    pointer-events: none;
}
.plan-b-rail__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.plan-b-rail__name {
    font-weight: 700;
    font-size: 13px;
}
.plan-b-rail__dept {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(30, 61, 88, 0.1);
    color: var(--primary, #1e3d58);
}
.plan-b-rail__email {
    font-size: 11px;
    opacity: 0.75;
    word-break: break-all;
}

.floor-editor__palette {
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.35);
}
.floor-editor__palette-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.floor-editor__palette-title {
    font-size: 13px;
    font-weight: 600;
}
.floor-editor__palette-hint {
    font-size: 11px;
    opacity: 0.65;
}
.floor-editor__palette-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 0;
}
.floor-person-chip {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(30, 61, 88, 0.1);
    border: 1px solid rgba(30, 61, 88, 0.18);
    cursor: grab;
    user-select: none;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.floor-person-chip:active {
    cursor: grabbing;
}
.floor-person-chip--clear {
    background: rgba(180, 80, 80, 0.12);
    border-color: rgba(180, 80, 80, 0.35);
}
.floor-person-chip--dragging {
    opacity: 0.55;
}
.floor-seat-row--drag-over {
    outline: 2px dashed var(--primary);
    outline-offset: -2px;
    background: rgba(30, 61, 88, 0.06);
}

.floor-seat-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 var(--space-4);
}
.floor-seat-scope__label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.75;
}
.floor-seat-scope__link {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(30, 61, 88, 0.18);
    background: rgba(255, 255, 255, 0.45);
    color: var(--primary, #1e3d58);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.floor-seat-scope__link:hover {
    border-color: rgba(30, 61, 88, 0.35);
    background: rgba(255, 255, 255, 0.85);
}
.floor-seat-scope__link--active {
    border-color: rgba(30, 61, 88, 0.45);
    background: rgba(30, 61, 88, 0.12);
}

.floor-seat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.35);
}
.floor-seat-filters__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(30, 61, 88, 0.85);
}
.floor-seat-filters__select,
.floor-seat-filters__input {
    font: inherit;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.2);
    min-width: 140px;
}
.floor-seat-details__summary {
    cursor: pointer;
    list-style: none;
}
.floor-seat-details__summary::-webkit-details-marker {
    display: none;
}
.floor-seat-details__summary code {
    text-decoration: underline dotted rgba(30, 61, 88, 0.35);
}
.floor-seat-card {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.15);
    background: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    line-height: 1.45;
    max-width: 420px;
}
.floor-seat-card__title {
    margin: 0 0 4px;
    font-weight: 600;
}
.floor-seat-card__label {
    margin: 10px 0 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}
.floor-seat-card__meta {
    margin: 0;
    opacity: 0.85;
}
.floor-seat-card__list {
    margin: 0;
    padding-left: 1.1rem;
}
.floor-seat-card__pri {
    font-weight: 600;
    margin-right: 4px;
}
.floor-seat-card__admin {
    margin: 10px 0 0;
}

.people-graph-filters {
    margin-bottom: var(--space-4);
    padding: var(--space-3);
}
.people-graph-filters__label {
    font-size: 13px;
    font-weight: 600;
}
.people-graph-filters__select {
    margin-left: 8px;
    font: inherit;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(30, 61, 88, 0.2);
}
.people-graph-panel {
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}
.people-graph-meta {
    margin-top: 0;
    font-size: 13px;
    opacity: 0.75;
}
.people-graph-zoom {
    margin-top: var(--space-3);
}
.people-graph-zoom__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.people-graph-zoom__hint {
    font-size: 12px;
    opacity: 0.72;
    margin-left: auto;
}
.people-graph-svg-wrap {
    overflow-x: auto;
    margin-top: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 61, 88, 0.12);
    background: rgba(255, 255, 255, 0.45);
}
.people-graph-svg-wrap--pan {
    margin-top: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.people-graph-svg-wrap--pan.people-graph-svg-wrap--grabbing {
    cursor: grabbing;
}
.people-graph-svg {
    display: block;
    width: 100%;
    max-height: 70vh;
}
.people-graph-marker-shape {
    fill: rgba(30, 61, 88, 0.72);
}
.people-graph-edge {
    stroke: rgba(30, 61, 88, 0.42);
    stroke-width: 2.25;
    stroke-linecap: round;
}
.people-graph-edge-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    fill: #153047;
    paint-order: stroke fill;
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 4.5px;
    stroke-linejoin: round;
}
.people-graph-node__ring {
    fill: none;
    stroke: rgba(30, 61, 88, 0.35);
    stroke-width: 3;
}
.people-graph-node__disc {
    stroke: rgba(30, 61, 88, 0.55);
    stroke-width: 1.5;
}
.people-graph-node__label {
    font-size: 13px;
    font-weight: 700;
    fill: #1e3d58;
    pointer-events: none;
}
.people-graph-table {
    margin-top: var(--space-4);
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.people-graph-table th,
.people-graph-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    text-align: left;
}

/* =========================================================================
   Leadership meetings calendar (Operator / Gerente / Director)
   ========================================================================= */

.meetings-shell {
    max-width: min(1220px, 100%);
}
.meetings-hero .meetings-hero__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: flex-end;
}
@media (max-width: 720px) {
    .meetings-hero .meetings-hero__actions {
        justify-content: flex-start;
    }
}
.meetings-calendar-wrap {
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.meetings-calendar-mount {
    min-height: 560px;
    font-family: inherit;
}
.meetings-calendar-note {
    margin: var(--space-4) 0 0;
    font-size: 13px;
    opacity: 0.74;
    line-height: 1.45;
    max-width: 720px;
}

.meetings-calendar-mount .fc-theme-standard td,
.meetings-calendar-mount .fc-theme-standard th {
    border-color: rgba(30, 61, 88, 0.14);
}
.meetings-calendar-mount .fc-scrollgrid,
.meetings-calendar-mount .fc-theme-standard .fc-scrollgrid {
    border-color: rgba(30, 61, 88, 0.14);
}
.meetings-calendar-mount .fc-toolbar-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.meetings-calendar-mount .fc-button-primary {
    background: var(--primary);
    border-color: rgba(30, 61, 88, 0.35);
}
.meetings-calendar-mount .fc-button-primary:not(:disabled):active,
.meetings-calendar-mount .fc-button-primary:not(:disabled).fc-button-active {
    background: #163451;
}
.meetings-calendar-mount .fc-col-header-cell-cushion,
.meetings-calendar-mount .fc-timegrid-slot-label-cushion {
    font-weight: 600;
    font-size: 12px;
}
.meetings-calendar-mount .fc-event {
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 600;
}
.meetings-calendar-mount .fc-list-event-title {
    font-weight: 600;
}

.meetings-form-card {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    max-width: 720px;
}
.meetings-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.meetings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.meetings-field--inline {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}
.meetings-field--inline input[type="checkbox"] {
    margin-top: 4px;
}
.meetings-field__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    opacity: 0.72;
}
.meetings-field__hint {
    font-size: 12px;
    opacity: 0.68;
    line-height: 1.35;
}
.meetings-field__control {
    padding: 12px 14px;
    font: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
}
.meetings-field__control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.meetings-field__control--textarea {
    resize: vertical;
    min-height: 100px;
}
.meetings-field__control--multi {
    padding: 8px 10px;
    min-height: 180px;
}
.meetings-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.meetings-detail-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}
.meetings-detail-hero__primary {
    flex: 1;
    min-width: min(100%, 280px);
}
.meetings-detail-hero__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.meetings-detail-kicker {
    margin: 0 0 var(--space-2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.65;
}
.meetings-detail-hero h1 {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-2xl);
    letter-spacing: -0.02em;
}
.meetings-detail-window {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.meetings-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.meetings-pill--neutral {
    background: rgba(30, 61, 88, 0.1);
    color: var(--ink);
}
.meetings-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.meetings-detail-panel {
    padding: var(--space-5);
}
.meetings-detail-heading {
    margin: 0 0 var(--space-2);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    opacity: 0.65;
}
.meetings-detail-value {
    margin: 0 0 var(--space-4);
    font-size: 15px;
    line-height: 1.45;
}
.meetings-detail-notes {
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
}
.meetings-muted {
    opacity: 0.68;
    font-weight: 500;
}
.meetings-attendee-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 14px;
    line-height: 1.65;
}
.meetings-attendee-name {
    font-weight: 600;
}

.meetings-pill--ok {
    background: rgba(5, 122, 85, 0.15);
    color: #065f46;
}
.meetings-pill--danger {
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
}
.meetings-detail-hero__actions--stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
}
.meetings-inline-form {
    margin: 0;
}
.meetings-btn--warn {
    color: #b45309;
}
.meetings-log-card {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}
.meetings-log-intro {
    margin-top: 0;
}
.meetings-log-table,
.meetings-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.meetings-log-table th,
.meetings-log-table td,
.meetings-history-table th,
.meetings-history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    text-align: left;
    vertical-align: top;
}
.meetings-history-row--muted {
    opacity: 0.72;
}
.meetings-history-attendees {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.45;
}
.meetings-history-card {
    padding: var(--space-5);
}
.meetings-table-scroll {
    overflow-x: auto;
}
.meetings-calendar-mount .fc-event.meetings-fc-event--cancelled {
    opacity: 0.72;
    text-decoration: line-through;
}

.meetings-rsvp-banner {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    font-size: 14px;
    line-height: 1.5;
}
.meetings-detail-hint {
    margin: 0;
    font-size: 12px;
    max-width: 220px;
    text-align: right;
}
.meetings-rsvp-row .meetings-pill {
    margin-left: 8px;
}
.meetings-rsvp-msg {
    margin: 6px 0 0;
    font-size: 13px;
    font-style: italic;
}
.meetings-rsvp-form-card {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}
.meetings-rsvp-form .meetings-field {
    margin-bottom: var(--space-3);
}

.meetings-delete-card {
    padding: var(--space-6);
    max-width: 560px;
}
.meetings-delete-title {
    margin: 0 0 var(--space-3);
    font-size: var(--fs-xl);
}
.meetings-delete-lead {
    margin: 0 0 var(--space-3);
    font-size: 15px;
    line-height: 1.45;
}
.meetings-delete-copy {
    margin: 0 0 var(--space-4);
    font-size: 14px;
    opacity: 0.78;
    line-height: 1.45;
}
.meetings-delete-form .meetings-field {
    margin-bottom: var(--space-3);
}

/* =========================================================================
   Network design exports hub
   ========================================================================= */

.network-design-shell {
    max-width: min(960px, 100%);
}
.network-design-hero.dashboard-hero {
    grid-template-columns: 1fr;
}
.network-design-hero .dashboard-hero__text {
    max-width: none;
    width: 100%;
}
.network-design-intro-lead {
    margin-bottom: var(--space-4);
    max-width: none !important;
    width: 100%;
    text-align: justify;
    text-wrap: pretty;
    hyphens: auto;
    line-height: 1.55;
}
.network-design-hero .network-design-intro-list {
    max-width: none;
    width: 100%;
}
.network-design-intro-list {
    margin: 0;
    padding-left: 1.15rem;
    max-width: 52rem;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
}
.network-design-intro-list li {
    margin-bottom: var(--space-2);
}
.network-design-intro-list li:last-child {
    margin-bottom: 0;
}
.network-design-export-group {
    margin-bottom: var(--space-5);
}
.network-design-export-group:last-of-type {
    margin-bottom: 0;
}
.network-design-export-group-title {
    margin: 0 0 var(--space-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.65;
}
.network-design-section-title {
    margin: 0 0 var(--space-3);
    font-size: var(--fs-lg);
    letter-spacing: -0.02em;
}
.network-design-muted {
    margin: 0 0 var(--space-4);
    font-size: 14px;
    opacity: 0.76;
    line-height: 1.45;
}
.network-design-actions,
.network-design-snapshot-card,
.network-design-table-card {
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}
.network-design-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.network-design-snapshot-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}
.network-design-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(480px, 100%);
}
.network-design-field-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    opacity: 0.72;
}
.network-design-field {
    padding: 12px 14px;
    font: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    width: 100%;
}
.network-design-table-scroll {
    overflow-x: auto;
}
.network-design-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.network-design-table th,
.network-design-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    text-align: left;
}

/* Workflows staff UI (Part F steps 9 & 9b) */
.wf-panel {
    margin-bottom: var(--space-5);
}
.wf-empty,
.wf-muted {
    margin: 0;
    font-size: 14px;
    opacity: 0.78;
}
.wf-issue-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 14px;
    color: var(--ink);
}
.wf-issue-list li {
    margin-bottom: var(--space-2);
}
.wf-inbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.wf-inbox-card {
    display: block;
    padding: var(--space-4) var(--space-5);
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
}
.wf-inbox-card__title {
    margin: 0 0 4px;
    font-weight: 600;
}
.wf-inbox-card__meta {
    margin: 0;
    font-size: 13px;
    opacity: 0.76;
}
.wf-start-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 520px;
}
.wf-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    opacity: 0.8;
}
.wf-field select,
.wf-field input,
.wf-field textarea,
.wf-field .wf-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font: inherit;
    border: 1.5px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink, #1e3d58);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wf-field select.wf-control--select,
.wf-field select.wf-control {
    appearance: none;
    -webkit-appearance: none;
    min-height: 46px;
    padding-right: 2.5rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e3d58' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}
.wf-field select.wf-control--select:hover,
.wf-field select.wf-control:hover {
    border-color: rgba(30, 61, 88, 0.35);
    background-color: #fff;
}
.wf-field select.wf-control--select:focus,
.wf-field select.wf-control:focus,
.wf-field input.wf-control:focus,
.wf-field textarea.wf-control:focus {
    outline: none;
    border-color: var(--primary, #1e3d58);
    box-shadow: 0 0 0 3px rgba(30, 61, 88, 0.12);
    background-color: #fff;
}
.wf-field textarea.wf-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
    font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
    font-size: 13px;
}
.wf-field--checkbox {
    display: flex;
    align-items: flex-start;
}
.wf-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.wf-control--checkbox {
    width: auto;
    min-height: auto;
    margin: 0;
    accent-color: var(--primary, #1e3d58);
}
.wf-builder-form {
    max-width: 640px;
}
.wf-guide-banner {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    font-size: 14px;
    line-height: 1.5;
}
.wf-guide-banner p {
    margin: 0;
}
.wf-guide-doc {
    padding: var(--space-5);
}
.container--builder {
    max-width: min(1400px, 96vw);
    /* Clear sticky topbar (nav can be two rows on wide screens) */
    --wf-preview-sticky-top: 9.5rem;
}
.wf-builder-layout {
    display: grid;
    grid-template-columns: 1fr min(380px, 36vw);
    gap: var(--space-5);
    align-items: start;
}
.wf-builder-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.wf-builder-main .wf-panel,
.wf-builder-main .picker {
    margin-bottom: var(--space-5);
}
.wf-builder-preview {
    position: sticky;
    top: var(--wf-preview-sticky-top, 9.5rem);
    margin-top: var(--space-6);
    padding: var(--space-5);
    max-height: calc(100vh - var(--wf-preview-sticky-top, 9.5rem) - var(--space-5));
    overflow: auto;
    z-index: 1;
}
.wf-builder-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.wf-builder-preview__title {
    margin: 0;
    font-size: var(--fs-md);
    letter-spacing: -0.02em;
}
.wf-builder-preview__diagram {
    margin: 0;
    padding: var(--space-3);
    min-height: 200px;
}
.wf-builder-preview__hint {
    margin: var(--space-3) 0 0;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.4;
}
@media (max-width: 960px) {
    .wf-builder-layout {
        grid-template-columns: 1fr;
    }
    .wf-builder-preview {
        position: static;
        top: auto;
        margin-top: 0;
        max-height: none;
        order: -1;
    }
}

@media (min-width: 961px) and (max-height: 800px) {
    .container--builder {
        --wf-preview-sticky-top: 7rem;
    }
}

.wf-pilot-notice {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    border-left: 4px solid var(--primary, #1e3d58);
    background: rgba(30, 61, 88, 0.06);
}
.wf-pilot-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Workflow builder — visual guide */
.wf-guide-toc {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    position: sticky;
    top: 0;
    z-index: 20;
}
.wf-guide-toc a {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink, #1e3d58);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(30, 61, 88, 0.06);
    transition: background 0.15s ease;
}
.wf-guide-toc a:hover {
    background: rgba(30, 61, 88, 0.14);
}
.wf-guide-section {
    padding: var(--space-6);
    margin-bottom: var(--space-5);
    scroll-margin-top: 5rem;
}
.wf-guide-section__title {
    margin: 0 0 var(--space-3);
    font-size: var(--fs-lg);
    letter-spacing: -0.02em;
}
.wf-guide-lead {
    margin: 0 0 var(--space-4);
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.85;
}
.wf-guide-steps {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.wf-guide-step-card {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.wf-guide-step-card__num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    background: var(--primary, #1e3d58);
    color: #fff;
}
.wf-guide-step-card p {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.45;
}
.wf-guide-callout {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid;
}
.wf-guide-callout--info {
    background: rgba(30, 61, 88, 0.06);
    border-color: var(--primary, #1e3d58);
}
.wf-guide-callout--warn {
    background: rgba(201, 162, 39, 0.12);
    border-color: #c9a227;
}
.wf-guide-kind-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}
.wf-guide-kind {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.wf-guide-kind--highlight {
    border-color: rgba(30, 61, 88, 0.28);
    background: rgba(220, 234, 245, 0.5);
}
.wf-guide-kind p {
    margin: var(--space-2) 0 0;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.85;
}
.wf-guide-diagram {
    padding: var(--space-4);
    margin: var(--space-3) 0 var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.wf-guide-flow-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.wf-guide-mini-card {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(30, 61, 88, 0.1);
}
.wf-guide-mini-card__n {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    background: rgba(142, 201, 177, 0.5);
    margin-bottom: 6px;
}
.wf-guide-mini-card p {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
}
.wf-guide-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}
.wf-guide-code {
    margin: 0 0 var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: rgba(30, 61, 88, 0.08);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
}
.wf-guide-label {
    margin: var(--space-4) 0 var(--space-2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.65;
}
.wf-guide-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.55;
    font-size: 14px;
}
.wf-guide-list--numbered {
    padding-left: 1.5rem;
}
.wf-guide-checklist {
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
}
.wf-guide-checklist li {
    padding: var(--space-2) 0;
    padding-left: 1.5rem;
    position: relative;
}
.wf-guide-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success, #5a9e7a);
    font-weight: 700;
}
.wf-guide-checklist--boxes li::before {
    content: "☐";
    color: var(--ink, #1e3d58);
    opacity: 0.4;
}
.wf-guide-foot {
    margin: var(--space-4) 0 0;
    font-size: 13px;
    opacity: 0.75;
}
.wf-field__help {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.72;
}
.wf-field__error {
    margin: 4px 0 0;
    color: var(--danger, #c45c5c);
    font-size: 13px;
}
.wf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.wf-action-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.wf-action-card {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
}
.wf-action-card__title {
    margin: 0 0 4px;
    font-weight: 600;
}
.wf-action-card__meta {
    margin: 0 0 var(--space-3);
    font-size: 13px;
    opacity: 0.76;
}
.wf-action-card__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}
.wf-inline-form {
    display: inline;
    margin: 0;
}
.wf-mermaid-wrap {
    overflow-x: auto;
    padding: var(--space-3) 0;
}
.wf-mermaid-wrap .mermaid {
    background: transparent;
}
.wf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}
.wf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wf-badge--active {
    background: rgba(30, 61, 88, 0.12);
    color: var(--ink, #1e3d58);
}
.wf-badge--done,
.wf-badge--completed {
    background: rgba(142, 201, 177, 0.35);
}
.wf-badge--pending {
    background: rgba(30, 61, 88, 0.06);
    opacity: 0.75;
}
.wf-table-scroll {
    overflow-x: auto;
}
.wf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wf-table th,
.wf-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    text-align: left;
}
.wf-row--active td:first-child {
    font-weight: 600;
}
.wf-timer-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 14px;
}
.wf-subhead {
    margin: var(--space-4) 0 var(--space-2);
    font-size: var(--fs-md);
}

.wf-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.wf-field--highlight label {
    font-weight: 600;
}

.wf-field--highlight select.wf-control {
    border-color: var(--accent, #2d6a9f);
}

.wf-advanced {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(30, 61, 88, 0.2);
    font-size: 14px;
}

.wf-advanced summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-muted, #4a6275);
}

.wf-advanced[open] summary {
    margin-bottom: var(--space-3);
}

.dashboard-hero:has(.wf-save-workflow-form) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.wf-save-workflow-form {
    margin: 0;
    flex-shrink: 0;
}

/* ============================================================
   Reports library — leadership-only documents tab
   ============================================================ */

.reports-shell { display: flex; flex-direction: column; gap: var(--space-4); padding-block: var(--space-4); }

/* Hero ------------------------------------------------------- */
.reports-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}
.reports-hero__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}
.reports-hero__title { margin-left: var(--space-2); font-weight: 600; }
.reports-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}
.reports-inline-form { display: inline; margin: 0; }

/* Code & section title -------------------------------------- */
.reports-code {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(5, 125, 205, 0.08);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Menlo, monospace;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
}
.reports-code:hover { background: rgba(5, 125, 205, 0.16); }
.reports-code--lg { font-size: 1em; padding: 4px 10px; }
.reports-title { color: var(--ink); text-decoration: none; font-weight: 500; }
.reports-title:hover { color: var(--primary); text-decoration: underline; }
.reports-section-title {
    margin: 0 0 var(--space-3) 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
}
.reports-muted { color: rgba(30, 61, 88, 0.6); font-size: 0.9rem; }

/* Filters card ---------------------------------------------- */
.reports-filters {
    padding: var(--space-4);
}
.reports-filters__form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) auto auto;
    gap: var(--space-3);
    align-items: end;
}
.reports-filters__actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}
@media (max-width: 720px) {
    .reports-filters__form { grid-template-columns: 1fr; }
}

/* Field shell (label + input/select) ------------------------ */
.reports-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.reports-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(30, 61, 88, 0.7);
}
.reports-field__hint {
    font-size: 0.78rem;
    color: rgba(30, 61, 88, 0.6);
}
.reports-req { color: var(--danger-ink, #b91c1c); margin-left: 2px; }

.reports-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--ink);
    user-select: none;
    cursor: pointer;
    padding-bottom: 6px;
}
.reports-checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

/* Inputs & selects ------------------------------------------ */
.reports-input,
.reports-shell input[type="text"],
.reports-shell input[type="search"],
.reports-shell input[type="number"],
.reports-shell input[type="date"],
.reports-shell input[type="datetime-local"],
.reports-shell input[type="email"],
.reports-shell input[type="tel"],
.reports-shell textarea,
.reports-shell select,
.materials-shell input[type="text"],
.materials-shell input[type="search"],
.materials-shell input[type="number"],
.materials-shell input[type="date"],
.materials-shell input[type="datetime-local"],
.materials-shell input[type="email"],
.materials-shell input[type="tel"],
.materials-shell textarea,
.materials-shell select,
.meetings-shell .meetings-form input[type="text"],
.meetings-shell .meetings-form input[type="search"],
.meetings-shell .meetings-form input[type="number"],
.meetings-shell .meetings-form input[type="datetime-local"],
.meetings-shell .meetings-form input[type="date"],
.meetings-shell .meetings-form textarea,
.meetings-shell .meetings-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(30, 61, 88, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.reports-shell textarea,
.materials-shell textarea { min-height: 110px; resize: vertical; }
.reports-shell input[type="file"],
.materials-shell input[type="file"],
.meetings-shell .meetings-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed rgba(30, 61, 88, 0.22);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}
.reports-shell input[type="file"]:hover,
.materials-shell input[type="file"]:hover,
.meetings-shell .meetings-form input[type="file"]:hover { border-color: var(--primary); background: rgba(5, 125, 205, 0.05); }
.reports-input:focus,
.reports-shell input:focus,
.reports-shell textarea:focus,
.reports-shell select:focus,
.materials-shell input:focus,
.materials-shell textarea:focus,
.materials-shell select:focus,
.meetings-shell .meetings-form input:focus,
.meetings-shell .meetings-form textarea:focus,
.meetings-shell .meetings-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.18);
    background: #fff;
}

/* Custom select with chevron -------------------------------- */
.reports-select-wrap {
    position: relative;
    display: block;
}
.reports-select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}
.reports-shell select,
.materials-shell select,
.meetings-shell .meetings-form select,
.reports-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--primary) 50%),
        linear-gradient(135deg, var(--primary) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.reports-shell select::-ms-expand,
.materials-shell select::-ms-expand,
.meetings-shell .meetings-form select::-ms-expand { display: none; }

/* When the select is wrapped in .reports-select-wrap (provides its own
   ::after chevron), drop the background chevron so we don't render two. */
.reports-select-wrap > select {
    background-image: none;
}

/* Form card -------------------------------------------------- */
.reports-form-card { padding: var(--space-4); }
.reports-form__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}
.reports-field--narrow { grid-column: span 2; }
.reports-field--wide { grid-column: span 2; }
.reports-field--full { grid-column: 1 / -1; }
.reports-field--files .reports-field__hint { margin-bottom: 4px; }
@media (max-width: 760px) {
    .reports-form__grid { grid-template-columns: 1fr; }
    .reports-field--narrow,
    .reports-field--wide { grid-column: 1 / -1; }
}
.reports-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(30, 61, 88, 0.08);
}

/* Table card ------------------------------------------------ */
.reports-table-card { padding: var(--space-3); }
.reports-detail-card { padding: var(--space-4); }
.reports-detail-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}
.reports-table-scroll { overflow-x: auto; }
.reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.reports-table th,
.reports-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.08);
    vertical-align: top;
}
.reports-table thead th {
    background: rgba(5, 125, 205, 0.04);
    color: var(--ink);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom: 1px solid rgba(30, 61, 88, 0.12);
    position: sticky;
    top: 0;
    z-index: 1;
}
.reports-table__row:hover { background: rgba(5, 125, 205, 0.035); }
.reports-table__row--archived { opacity: 0.6; }
.reports-table__row--archived td:first-child { border-left: 3px solid #cbd5e1; }
.reports-table__num { text-align: right; font-variant-numeric: tabular-nums; }
.reports-table__actions-col { width: 1%; white-space: nowrap; }
.reports-table--files td:first-child { font-family: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace; }
.reports-row-actions { display: inline-flex; gap: 6px; align-items: center; }

/* Tags & badges --------------------------------------------- */
.reports-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reports-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    background: rgba(30, 61, 88, 0.06);
    color: var(--ink);
    border-radius: 999px;
    font-weight: 500;
}
.reports-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(30, 61, 88, 0.08);
    color: var(--ink);
}
.reports-badge--report   { background: rgba(5, 125, 205, 0.12);  color: var(--primary); }
.reports-badge--policy   { background: rgba(180, 83, 9, 0.14);   color: #92400e; }
.reports-badge--study    { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.reports-badge--plan     { background: rgba(16, 185, 129, 0.14); color: #047857; }
.reports-badge--other    { background: rgba(75, 85, 99, 0.14);   color: #374151; }
.reports-badge--archived { background: rgba(234, 179, 8, 0.18);  color: #854d0e; }

/* Definition list (detail page) ----------------------------- */
.reports-defn {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 10px var(--space-3);
    margin: 0;
}
.reports-defn dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(30, 61, 88, 0.7);
    font-weight: 600;
    align-self: center;
}
.reports-defn dd { margin: 0; color: var(--ink); line-height: 1.5; }
@media (max-width: 640px) {
    .reports-defn { grid-template-columns: 1fr; gap: 4px var(--space-2); }
    .reports-defn dd { margin-bottom: 8px; }
}

/* Empty state ------------------------------------------------ */
.reports-empty {
    padding: var(--space-5) var(--space-4);
    text-align: center;
}
.reports-empty h2 {
    margin: 0 0 var(--space-2);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
}
.reports-empty .btn { margin-top: var(--space-3); }

/* Danger variant button (used inline) ----------------------- */
.reports-shell .btn--danger {
    color: var(--danger-ink, #b91c1c);
    border-color: rgba(185, 28, 28, 0.25);
}
.reports-shell .btn--danger:hover:not(:disabled) {
    background: rgba(185, 28, 28, 0.08);
    border-color: rgba(185, 28, 28, 0.45);
}

/* =================================================================
   Reports in the workflow right rail + report chip on the canvas
   ================================================================= */
.gerente-sidebar__section--reports {
    margin-top: 14px;
}
.gerente-sidebar__reports-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.gerente-sidebar__reports-head .gerente-sidebar__h {
    margin: 0;
}
.gerente-sidebar__upload-doc {
    white-space: nowrap;
}
.gerente-sidebar__reports-hint {
    margin: 2px 0 8px;
    font-size: 12px;
    color: var(--ink-muted, #5a6573);
}
.gerente-sidebar__reports-list .gerente-sidebar__report-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "code  title"
        "meta  meta";
    gap: 2px 8px;
    align-items: baseline;
    padding: 6px 8px;
    border-radius: 6px;
}
.gerente-sidebar__reports-list .gerente-sidebar__report-row + .gerente-sidebar__report-row {
    margin-top: 4px;
}
.gerente-sidebar__report-code {
    grid-area: code;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #075985;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.35);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.02em;
}
.gerente-sidebar__report-title {
    grid-area: title;
    font-weight: 600;
    line-height: 1.25;
}
.gerente-sidebar__report-meta {
    grid-area: meta;
    font-size: 11.5px;
    color: var(--ink-muted, #5a6573);
}
.gerente-sidebar__report-row[draggable="true"] {
    cursor: grab;
}
.gerente-sidebar__report-row[draggable="true"]:active {
    cursor: grabbing;
}

/* Canvas: report chip (link-only) */
.gerente-canvas-item--report {
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    border: 1.5px solid rgba(14, 165, 233, 0.55);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(14, 116, 144, 0.12);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}
.gerente-canvas-item--report:hover {
    box-shadow: 0 3px 10px rgba(14, 116, 144, 0.2);
}
.gerente-canvas-item__report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gerente-canvas-item__report-code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #075985;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.02em;
}
.gerente-canvas-item__report-open {
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
    color: #075985;
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 4px;
    padding: 1px 6px;
    background: #fff;
}
.gerente-canvas-item__report-open:hover {
    background: rgba(14, 165, 233, 0.1);
}
.gerente-canvas-item__report-title {
    font-size: 12.5px;
    line-height: 1.25;
    color: var(--ink);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
