:root {
    --green: #004a4b;
    --green-900: #021e1f;
    --green-700: #073b3c;
    --teal-glow: #1bcca8;
    --mint: #e7f6f2;
    --paper: #f6fbf9;
    --ink: #082f30;
    --muted: #527476;
    --line: rgba(0, 74, 75, 0.14);
    --shadow: 0 24px 80px rgba(0, 50, 52, 0.14);
}

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

html { min-width: 320px; color-scheme: light; }

body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(36px, 5vw, 72px);
    background:
        radial-gradient(circle at 78% 18%, rgba(27, 204, 168, 0.22), transparent 26%),
        radial-gradient(circle at 18% 82%, rgba(27, 204, 168, 0.12), transparent 32%),
        linear-gradient(145deg, var(--green-900), var(--green-700));
    color: white;
}

.brand-panel::after {
    position: absolute;
    right: -180px;
    bottom: -210px;
    width: 560px;
    height: 560px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    box-shadow: 0 0 0 72px rgba(255,255,255,.025), 0 0 0 144px rgba(255,255,255,.018);
    content: '';
}

.brand-mark, .brand-message, .signbox-signature { position: relative; z-index: 1; }
.brand-mark { display: flex; align-items: center; gap: 14px; }

.brand-symbol {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--teal-glow);
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
}

.brand-symbol:hover,
.brand-symbol:focus-visible {
    border-color: rgba(27, 204, 168, 0.7);
    outline: none;
    background: rgba(27, 204, 168, 0.12);
    box-shadow: 0 0 24px rgba(27, 204, 168, 0.2);
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-message { max-width: 680px; margin: 80px 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 24px;
    color: rgba(223, 246, 242, 0.76);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal-glow);
    box-shadow: 0 0 12px var(--teal-glow);
}

.brand-message h1 {
    max-width: 620px;
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(40px, 5vw, 68px);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.02;
}

.brand-message > p:last-child {
    max-width: 590px;
    margin: 28px 0 0;
    color: rgba(223, 246, 242, 0.72);
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
}

.signbox-signature { margin: 0; color: rgba(223, 246, 242, 0.6); font-size: 14px; }
.signbox-signature strong { color: white; font-weight: 600; }

.four-s {
    position: absolute;
    right: clamp(24px, 4vw, 56px);
    bottom: clamp(24px, 4vw, 56px);
    z-index: 1;
    margin: 0;
    color: rgba(223, 246, 242, 0.22);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
}

.login-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 48px;
    background:
        linear-gradient(rgba(0,74,75,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,74,75,.025) 1px, transparent 1px),
        var(--paper);
    background-size: 32px 32px;
}

.login-card {
    width: min(100%, 440px);
    padding: clamp(32px, 4vw, 50px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.section-label {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-card h2 {
    margin: 0;
    color: var(--green);
    font-family: 'Sora', sans-serif;
    font-size: clamp(28px, 3vw, 36px);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.login-card header > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
form { display: grid; gap: 20px; margin-top: 36px; }
.field { display: grid; gap: 8px; }
label { color: var(--ink); font-size: 14px; font-weight: 600; }

input {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    border: 1px solid rgba(0, 74, 75, 0.2);
    border-radius: 10px;
    outline: none;
    background: white;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder { color: #829c9d; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0, 74, 75, 0.1); }

button {
    min-height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 10px 26px rgba(0, 74, 75, 0.24);
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover {
    background: var(--green-700);
    box-shadow: 0 14px 32px rgba(0, 74, 75, 0.3);
    transform: translateY(-1px);
}

button:focus-visible { outline: 3px solid rgba(27, 204, 168, 0.45); outline-offset: 3px; }
.access-note { margin: 28px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.access-note a { color: var(--green); font-weight: 600; text-decoration: none; }
.mfa-qr { display: grid; place-items: center; margin: 24px auto 8px; }
.mfa-qr svg { width: 220px; height: 220px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.mfa-key { margin: 14px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.mfa-key code { display: inline-block; margin-top: 6px; color: var(--ink); font-size: 13px; letter-spacing: .08em; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.recovery-codes code { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--mint); color: var(--ink); text-align: center; }
.inline-admin-form { display: inline; margin: 0; }

.form-alert {
    margin-top: 24px;
    padding: 12px 14px;
    border: 1px solid rgba(156, 69, 0, 0.22);
    border-radius: 10px;
    background: rgba(156, 69, 0, 0.07);
    color: #7a3703;
    font-size: 14px;
}

.utility-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 20% 10%, rgba(27, 204, 168, 0.12), transparent 28%),
        linear-gradient(rgba(0,74,75,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,74,75,.025) 1px, transparent 1px),
        var(--paper);
    background-size: auto, 32px 32px, 32px 32px, auto;
}

.utility-card {
    width: min(100%, 500px);
    padding: clamp(30px, 5vw, 52px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
}

.mini-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 44px;
    color: var(--green);
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.mini-brand span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: var(--green);
    color: var(--teal-glow);
}

.utility-card h1 {
    margin: 0;
    color: var(--green);
    font-family: 'Sora', sans-serif;
    font-size: clamp(30px, 5vw, 42px);
    letter-spacing: -.045em;
    line-height: 1.08;
}

.utility-card > p:not(.section-label):not(.access-note) {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.field small { color: var(--muted); font-size: 12px; }
.role-card { width: min(100%, 640px); }

.welcome-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.welcome-strip a { color: var(--green); text-decoration: none; }

.easter-egg {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border: 1px solid rgba(27, 204, 168, 0.32);
    border-radius: 999px;
    background: var(--green-900);
    box-shadow: 0 18px 48px rgba(0, 30, 31, 0.28);
    color: rgba(223, 246, 242, 0.82);
    font-size: 13px;
    animation: four-s-in 220ms ease-out;
}

.easter-egg[hidden] { display: none; }
.easter-egg strong { color: var(--teal-glow); font-family: 'Sora', sans-serif; }

@keyframes four-s-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 780px) {
    .login-shell { grid-template-columns: 1fr; }
    .brand-panel { min-height: auto; padding: 32px; }
    .brand-message { margin: 72px 0 64px; }
    .brand-message h1 { max-width: 720px; font-size: clamp(36px, 8vw, 56px); }
    .login-panel { min-height: auto; padding: 56px 24px 72px; }
}

@media (max-width: 520px) {
    .brand-panel { padding: 24px; }
    .brand-message { margin: 56px 0 48px; }
    .brand-message > p:last-child { font-size: 16px; }
    .login-panel { padding: 32px 16px 48px; }
    .login-card { padding: 28px 22px; border-radius: 18px; }
    .four-s { display: none; }
    .easter-egg { right: 16px; bottom: 16px; left: 16px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Simon application shell */
.app-page { min-height: 100vh; background: #f3f8f6; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    display: flex;
    width: 248px;
    flex-direction: column;
    padding: 28px 20px 20px;
    background: var(--green-900);
    color: white;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    color: white;
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-size: 20px;
}

.app-logo span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px;
    background: rgba(255,255,255,.07);
    color: var(--teal-glow);
    font-weight: 700;
}

.role-chip {
    align-self: flex-start;
    margin: 26px 0 22px;
    padding: 6px 10px;
    border: 1px solid rgba(27,204,168,.18);
    border-radius: 999px;
    background: rgba(27,204,168,.08);
    color: #a6dfd6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.app-nav { display: grid; gap: 5px; }

.app-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: rgba(223,246,242,.62);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.app-nav a:hover { background: rgba(255,255,255,.06); color: white; }
.app-nav a.active { background: rgba(27,204,168,.14); color: white; }
.app-nav a span { width: 18px; color: var(--teal-glow); text-align: center; }

.sidebar-foot {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.user-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--mint);
    font-size: 11px;
    font-weight: 700;
}

.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { font-size: 13px; }
.sidebar-foot span { margin-top: 2px; color: rgba(223,246,242,.48); font-size: 11px; }
.sidebar-foot > a { color: rgba(223,246,242,.6); text-decoration: none; }

.app-main {
    min-height: 100vh;
    margin-left: 248px;
    padding: clamp(28px, 4vw, 56px);
}

.app-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 36px;
}

.context-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.app-header h1 {
    margin: 0;
    color: var(--green);
    font-family: 'Sora', sans-serif;
    font-size: clamp(34px, 4vw, 50px);
    letter-spacing: -.05em;
    line-height: 1;
}

.app-header p:last-child { margin: 12px 0 0; color: var(--muted); }

.primary-action, .filter-button {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    white-space: nowrap;
}

.primary-action span { margin-right: 5px; font-size: 18px; }
.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 10px 26px rgba(0, 74, 75, 0.24);
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-action:hover {
    background: var(--green-700);
    box-shadow: 0 14px 32px rgba(0, 74, 75, 0.3);
    transform: translateY(-1px);
}

.attention-launch {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    align-items: center;
    gap: 30px;
    margin-bottom: 26px;
    padding: 24px 28px;
    border-radius: 18px;
    background: linear-gradient(125deg, var(--green-800, #032d2e), var(--green));
    box-shadow: 0 16px 44px rgba(0,50,52,.14);
    color: white;
}

.launch-copy { position: relative; padding-left: 18px; }
.launch-copy .live-dot { position: absolute; top: 7px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-glow); box-shadow: 0 0 10px var(--teal-glow); }
.launch-copy p { margin: 0 0 2px; color: rgba(223,246,242,.62); font-size: 12px; }
.launch-copy h2 { margin: 0; font-family: 'Sora', sans-serif; font-size: 20px; }

.search-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 5px 7px 5px 15px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    background: white;
    color: var(--green);
}

.search-box input {
    min-height: 42px;
    padding: 8px 0;
    border: 0;
    box-shadow: none;
}

.search-box input:focus { box-shadow: none; }
.search-box kbd { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; gap: 24px; }
.attention-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); }

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 8px 30px rgba(0,50,52,.055);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.panel-heading .section-label { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; color: var(--ink); font-family: 'Sora', sans-serif; font-size: 19px; letter-spacing: -.025em; }
.count-badge { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--mint); color: var(--green); font-weight: 700; }
.tiny-code { color: #8ca4a2; font-family: 'JetBrains Mono', monospace; font-size: 10px; }

.attention-list { display: grid; }
.attention-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 19px 22px 19px 27px; border-bottom: 1px solid var(--line); }
.attention-row:last-child { border-bottom: 0; }
.attention-row.selected { background: #f8fcfb; }
.status-bar { position: absolute; inset: 16px auto 16px 0; width: 4px; border-radius: 0 4px 4px 0; }
.status-bar.copper { background: #c96214; }
.status-bar.teal { background: var(--teal-glow); }
.status-bar.muted-bar { background: #b6c7c4; }
.attention-main > div { display: flex; align-items: center; gap: 10px; }
.attention-main strong { color: var(--ink); font-size: 14px; }
.attention-main p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.priority { padding: 3px 7px; border-radius: 999px; background: rgba(156,69,0,.09); color: #9c4500; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.attention-time { text-align: right; }
.attention-time strong, .attention-time span { display: block; }
.attention-time strong { color: var(--ink); font-size: 12px; }
.attention-time span { margin-top: 5px; color: var(--muted); font-size: 10px; }

.knowledge-preview { padding-bottom: 18px; }
.knowledge-tree { padding: 22px 24px 12px; }
.tree-root, .knowledge-tree li { display: flex; align-items: center; gap: 12px; }
.tree-root > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--green); color: white; font-size: 11px; font-weight: 700; }
.tree-root strong, .tree-root small, .knowledge-tree li strong, .knowledge-tree li small { display: block; }
.tree-root strong, .knowledge-tree li strong { color: var(--ink); font-size: 13px; }
.tree-root small, .knowledge-tree li small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.knowledge-tree ul { position: relative; display: grid; gap: 17px; margin: 20px 0 0 19px; padding: 0 0 0 24px; list-style: none; }
.knowledge-tree ul::before { position: absolute; top: -8px; bottom: 10px; left: 0; width: 1px; background: var(--line); content: ''; }
.knowledge-tree li > span { width: 25px; color: var(--green); text-align: center; }
.text-link { color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.knowledge-preview > .text-link { display: inline-block; margin: 10px 24px; }

.toolbar { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.search-box.compact { width: min(100%, 560px); border-color: var(--line); }
.filter-button { border: 1px solid var(--line); background: white; box-shadow: none; color: var(--green); }
.filter-button:hover { background: var(--mint); box-shadow: none; transform: none; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.metric-grid article { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 6px 22px rgba(0,50,52,.045); }
.metric-grid span, .metric-grid strong, .metric-grid small { display: block; }
.metric-grid span { color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-grid strong { margin: 7px 0 4px; color: var(--green); font-family: 'Sora', sans-serif; font-size: 28px; letter-spacing: -.04em; }
.metric-grid small { color: #71908d; font-size: 10px; }
.client-panel { overflow-x: auto; }

.client-table { min-width: 760px; }
.table-row { display: grid; grid-template-columns: 1.45fr 1.15fr 1fr .65fr 24px; align-items: center; gap: 18px; min-height: 72px; padding: 12px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.table-row:last-child { border-bottom: 0; }
.table-row:not(.table-head):hover { background: #f8fcfb; }
.table-head { min-height: 42px; background: #f8fbfa; color: #78908f; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.table-row > span > strong, .table-row > span > small { display: block; }
.table-row > span > strong { color: var(--ink); font-size: 12px; }
.table-row > span > small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.client-name { display: flex; align-items: center; gap: 11px; }
.client-name strong, .client-name small { display: block; }
.client-name small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.client-name i { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--mint); color: var(--green); font-size: 10px; font-style: normal; font-weight: 700; }
.state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.state::before { width: 5px; height: 5px; border-radius: 50%; content: ''; }
.state.active { background: rgba(27,204,168,.1); color: #087d68; }
.state.active::before { background: #1bcca8; }
.state.review { background: rgba(156,69,0,.08); color: #9c4500; }
.state.review::before { background: #c96214; }

.meta-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin-bottom: 24px; padding: 24px 28px; border-radius: 18px; background: linear-gradient(125deg, var(--green-900), var(--green-700)); color: white; }
.meta-orbit { position: relative; display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; color: var(--teal-glow); font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; }
.meta-orbit i { position: absolute; top: -6px; right: -6px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--teal-glow); color: var(--green-900); font-size: 9px; font-style: normal; }
.meta-banner .section-label { margin-bottom: 4px; color: #85bdb5; }
.meta-banner h2 { margin: 0; font-family: 'Sora', sans-serif; font-size: 20px; }
.meta-banner p:last-child { margin: 6px 0 0; color: rgba(223,246,242,.62); font-size: 12px; }
.system-ok { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(27,204,168,.2); border-radius: 999px; background: rgba(27,204,168,.09); color: #aeece1; font-size: 10px; font-weight: 700; }
.system-ok i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-glow); box-shadow: 0 0 8px var(--teal-glow); }
.version-number { font-family: 'JetBrains Mono', monospace !important; font-size: 23px !important; }
.button-link { display: inline-flex; margin-top: 28px; padding: 12px 18px; border-radius: 999px; background: var(--green); color: white; font-weight: 700; text-decoration: none; }

/* Attention workspace */
.attention-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.back-link { align-self: start; padding-top: 7px; color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.attention-header h1 { margin: 0; color: var(--green); font-family: 'Sora', sans-serif; font-size: clamp(30px,4vw,44px); letter-spacing: -.045em; }
.draft-state { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 10px; font-weight: 700; }
.draft-state i { width: 6px; height: 6px; border-radius: 50%; background: #c96214; }

.client-picker {
    width: min(100%, 880px);
    margin: 7vh auto 0;
    padding: clamp(28px,5vw,52px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.picker-intro { max-width: 620px; margin: 0 auto 28px; text-align: center; }
.picker-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 20px; place-items: center; border-radius: 15px; background: var(--mint); color: var(--green); font-size: 24px; }
.picker-intro h2 { margin: 0; color: var(--green); font-family: 'Sora', sans-serif; font-size: 30px; letter-spacing: -.04em; }
.picker-intro > p:last-child { margin: 13px 0 0; color: var(--muted); line-height: 1.55; }

.picker-search { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 5px 8px 5px 16px; border: 1px solid rgba(0,74,75,.24); border-radius: 13px; color: var(--green); }
.picker-search input { border: 0; box-shadow: none; }
.picker-search input:focus { box-shadow: none; }
.picker-search kbd { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 10px; }
.picker-results { margin-top: 22px; }
.picker-results > p { margin: 0 0 9px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.picker-results button { display: grid; width: 100%; min-height: 68px; grid-template-columns: auto 1fr 1fr auto; align-items: center; gap: 14px; margin: 0; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); text-align: left; }
.picker-results button:hover { background: #f6fbf9; box-shadow: none; transform: none; }
.picker-results strong, .picker-results small { display: block; }
.picker-results strong { font-size: 12px; }
.picker-results small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.result-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--green); color: white; font-size: 10px; font-weight: 700; }
.result-contact { padding-left: 20px; border-left: 1px solid var(--line); }

.attention-live[hidden], .client-picker[hidden], .siggy-card[hidden], .siggy-editor[hidden], .journal-entry[hidden], .advance-composer[hidden], .journal-empty[hidden] { display: none; }
.attention-context-bar { display: grid; grid-template-columns: auto 1px minmax(220px,1fr) auto auto; align-items: center; gap: 18px; margin-bottom: 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.context-client { display: flex; align-items: center; gap: 10px; }
.context-client > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: var(--green); color: white; font-size: 10px; font-weight: 700; }
.context-client small, .context-client strong { display: block; }
.context-client small, .attention-context-bar label small { color: var(--muted); font-size: 9px; }
.context-client strong { margin-top: 2px; color: var(--ink); font-size: 12px; }
.context-divider { width: 1px; height: 30px; background: var(--line); }
.attention-context-bar label select { display: block; margin-top: 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 12px 'DM Sans',sans-serif; }
.quiet-button { width: auto; min-height: auto; margin: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: none; color: var(--green); font-size: 11px; }
.quiet-button:hover { background: var(--mint); box-shadow: none; transform: none; }
.attention-id { color: var(--muted); font: 500 9px 'JetBrains Mono',monospace; letter-spacing: .08em; }

.attention-workspace { display: grid; grid-template-columns: minmax(330px,.78fr) minmax(460px,1.22fr); align-items: start; gap: 20px; }
.actor-panel, .journal-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 30px rgba(0,50,52,.05); }
.actor-panel { position: sticky; top: 24px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.workspace-heading .section-label { margin-bottom: 4px; }
.workspace-heading h2 { margin: 0; color: var(--ink); font-family: 'Sora',sans-serif; font-size: 17px; }

.actor-map { display: grid; grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr); align-items: center; gap: 7px; min-height: 116px; margin: 0 18px; padding: 16px 0; }
.actor-node { position: relative; z-index: 2; display: flex; width: 100%; min-height: 76px; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 16px rgba(0,50,52,.08); color: var(--ink); }
.actor-node:hover { background: var(--paper); box-shadow: 0 8px 22px rgba(0,50,52,.12); transform: translateY(-1px); }
.actor-node i { display: grid; width: 27px; height: 27px; margin-bottom: 5px; place-items: center; border-radius: 8px; background: var(--mint); color: var(--green); font-size: 8px; font-style: normal; font-weight: 700; }
.actor-node strong { font-size: 10px; }
.actor-node small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.actor-node.active { border-color: rgba(27,204,168,.4); background: var(--green); color: white; }
.actor-node.active i { background: rgba(27,204,168,.15); color: var(--teal-glow); }
.actor-node.active small { color: rgba(223,246,242,.62); }
.node-erp { grid-column: 1; grid-row: 1; }
.line-erp { grid-column: 2; grid-row: 1; }
.node-client { grid-column: 3; grid-row: 1; }
.line-signbox { grid-column: 4; grid-row: 1; }
.node-signbox { grid-column: 5; grid-row: 1; }
.actor-line { position: relative; z-index: 1; width: 100%; height: 1px; background: rgba(0,74,75,.22); }
.actor-detail { margin: 0 20px 20px; padding: 15px; border-radius: 12px; background: var(--paper); }
.actor-detail strong, .actor-detail span, .actor-detail a { display: block; }
.actor-detail strong { color: var(--ink); font-size: 12px; }
.actor-detail span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.actor-detail a { margin-top: 12px; color: var(--green); font-size: 10px; font-weight: 700; text-decoration: none; }

.journal-panel { min-height: 590px; }
.journal-author { color: var(--muted); font-size: 10px; }
.journal-empty { padding: 34px 30px 18px; text-align: center; }
.journal-empty > span { display: grid; width: 38px; height: 38px; margin: 0 auto 12px; place-items: center; border-radius: 12px; background: var(--mint); color: var(--green); }
.journal-empty strong { color: var(--ink); font-size: 13px; }
.journal-empty p { max-width: 430px; margin: 8px auto 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.advance-composer { margin: 20px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfc; }
.advance-composer label { display: block; margin-bottom: 9px; }
.advance-composer textarea, .siggy-editor textarea { width: 100%; resize: vertical; padding: 13px; border: 1px solid rgba(0,74,75,.18); border-radius: 10px; outline: none; background: white; color: var(--ink); font: 14px/1.55 'DM Sans',sans-serif; }
.advance-composer textarea:focus, .siggy-editor textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,74,75,.08); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; }
.composer-foot span { max-width: 320px; color: var(--muted); font-size: 9px; font-style: italic; }
.composer-foot button, .siggy-button { width: auto; min-height: 38px; margin: 0; padding: 8px 14px; font-size: 11px; }
.siggy-card, .siggy-editor { margin: 20px; padding: 16px; border: 1px solid rgba(27,204,168,.28); border-radius: 13px; background: #f1faf7; }
.siggy-title { display: flex; align-items: center; gap: 10px; }
.siggy-title > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #fff4e9; }
.siggy-avatar { position: relative; overflow: hidden; }
.siggy-avatar img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; transition: opacity 160ms ease, transform 160ms ease; }
.siggy-avatar img:last-child { opacity: 0; }
.siggy-card:hover .siggy-avatar img:first-child, .siggy-editor:hover .siggy-avatar img:first-child { opacity: 0; }
.siggy-card:hover .siggy-avatar img:last-child, .siggy-editor:hover .siggy-avatar img:last-child { opacity: 1; transform: scale(1.04); }
.siggy-title strong, .siggy-title small { display: block; }
.siggy-title strong { color: var(--green); font-size: 12px; }
.siggy-title small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.siggy-card > p { margin: 12px 0 0; color: var(--ink); font-size: 11px; line-height: 1.5; }
.siggy-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.siggy-button { border-radius: 9px; }
.siggy-editor textarea { margin-top: 14px; font-size: 12px; }
.journal-entry { margin: 22px; padding: 17px; border-left: 3px solid var(--teal-glow); border-radius: 0 11px 11px 0; background: var(--paper); }
.entry-meta { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; }
.entry-meta > span { grid-row: 1 / 3; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 9px; font-weight: 700; }
.entry-meta strong { color: var(--ink); font-size: 11px; }
.entry-meta small { color: var(--muted); font-size: 8px; }
.entry-siggy { display: inline-block; width: 22px; height: 18px; margin-left: 3px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 2px 3px rgba(156,69,0,.16)); }
.journal-entry > p { margin: 14px 0 0; color: var(--ink); font-size: 12px; line-height: 1.6; }

@media (max-width: 1060px) {
    .attention-grid { grid-template-columns: 1fr; }
    .attention-launch { grid-template-columns: 1fr; gap: 18px; }
    .attention-workspace { grid-template-columns: 1fr; }
    .actor-panel { position: static; }
}

@media (max-width: 760px) {
    .app-sidebar { position: static; width: auto; padding: 18px 20px; }
    .role-chip, .app-nav { display: none; }
    .sidebar-foot { position: absolute; top: 18px; right: 18px; margin: 0; padding: 0; border: 0; }
    .sidebar-foot > div:nth-child(2) { display: none; }
    .app-main { margin-left: 0; padding: 28px 18px 42px; }
    .app-header { align-items: flex-start; flex-direction: column; }
    .primary-action { width: 100%; }
    .metric-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; }
    .search-box.compact { width: 100%; }
    .filter-button { align-self: flex-start; }
    .meta-banner { grid-template-columns: auto 1fr; }
    .system-ok { grid-column: 1 / -1; justify-self: start; }
    .attention-header { grid-template-columns: 1fr auto; }
    .attention-header .back-link { grid-column: 1 / -1; }
    .attention-context-bar { grid-template-columns: 1fr auto; }
    .context-divider, .attention-context-bar label, .attention-id { display: none; }
    .picker-results button { grid-template-columns: auto 1fr auto; }
    .result-contact { display: none; }
    .composer-foot { align-items: stretch; flex-direction: column; }
    .composer-foot button { width: 100%; }
}

/* Client directory and client truth profile */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.clients-header { margin-bottom: 26px; }
.directory-count { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; }
.directory-count strong { color: var(--green); font-family: 'Sora', sans-serif; font-size: 18px; }
.directory-count span { color: var(--muted); font-size: 11px; }
.client-metrics { grid-template-columns: repeat(4, 1fr); }
.client-metrics .review-metric { background: #fffaf5; }
.client-metrics .review-metric strong { color: #9c4500; }
.directory-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; margin: 0 0 20px; }
.directory-toolbar .search-box { border-color: var(--line); }
.directory-filter select { min-height: 54px; padding: 0 38px 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: white; color: var(--ink); font: 600 12px 'DM Sans', sans-serif; }
.directory-filter select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,74,75,.08); }
.directory-search-button { min-height: 54px; padding-inline: 18px; }
.directory-heading { position: sticky; left: 0; }
.directory-result-count { color: var(--muted); font-size: 11px; }
.real-client-table { min-width: 920px; }
.client-directory-row { color: inherit; text-decoration: none; }
.client-directory-row > span { min-width: 0; }
.client-directory-row > span:nth-child(2) strong,
.client-directory-row > span:nth-child(2) small,
.client-directory-row > span:nth-child(3) strong,
.client-directory-row > span:nth-child(3) small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-arrow { color: var(--green); font-size: 16px; text-align: right; transition: transform 160ms ease; }
.client-directory-row:hover .row-arrow { transform: translateX(3px); }
.empty-directory { padding: 62px 24px; text-align: center; }
.empty-directory > span { display: grid; width: 42px; height: 42px; margin: 0 auto 14px; place-items: center; border-radius: 13px; background: var(--mint); color: var(--green); font-size: 20px; }
.empty-directory strong { color: var(--ink); }
.empty-directory p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 17px 24px; border-top: 1px solid var(--line); }
.pagination a { color: var(--green); font-size: 11px; font-weight: 700; text-decoration: none; }
.pagination a:last-child { text-align: right; }
.pagination > span { color: var(--muted); font-size: 10px; }
.client-profile-header { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 26px; margin-bottom: 24px; }
.profile-title h1 { margin: 0; color: var(--green); font-family: 'Sora', sans-serif; font-size: clamp(30px,4vw,44px); letter-spacing: -.045em; line-height: 1.08; }
.profile-title > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.profile-state { display: inline-flex; align-items: center; gap: 7px; margin-top: 26px; padding: 7px 10px; border-radius: 999px; background: rgba(156,69,0,.08); color: #9c4500; font-size: 10px; font-weight: 700; }
.profile-state i { width: 6px; height: 6px; border-radius: 50%; background: #c96214; }
.profile-state.active { background: rgba(27,204,168,.1); color: #087d68; }
.profile-state.active i { background: var(--teal-glow); }
.profile-state.inactive { background: rgba(116,131,129,.12); color: #566866; }
.profile-state.inactive i { background: #7d918e; }
.profile-actions { display: flex; align-items: center; gap: 9px; margin-top: 26px; }
.profile-actions .profile-state { margin-top: 0; }
.profile-actions .quiet-button { text-decoration: none; }
.client-truth-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 22px; padding: 20px 22px; border-radius: 17px; background: linear-gradient(125deg, var(--green-900), var(--green-700)); color: white; }
.client-truth-banner > div:first-child { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; color: var(--teal-glow); }
.client-truth-banner .section-label { margin-bottom: 3px; color: #85bdb5; }
.client-truth-banner h2 { margin: 0; font-family: 'Sora',sans-serif; font-size: 17px; }
.client-truth-banner p:last-child { margin: 5px 0 0; color: rgba(223,246,242,.62); font-size: 11px; }
.client-profile-grid { display: grid; grid-template-columns: minmax(300px,.82fr) minmax(430px,1.18fr); align-items: start; gap: 20px; }
.profile-column { display: grid; gap: 20px; }
.profile-section { overflow: hidden; }
.profile-list { display: grid; }
.profile-list-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.profile-list-item:last-child { border-bottom: 0; }
.list-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--mint); color: var(--green); font-size: 11px; font-weight: 700; }
.profile-list-item strong { display: block; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.profile-list-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.profile-list-item small { display: block; margin-top: 8px; color: #8ca4a2; font-size: 9px; font-style: italic; }
.profile-empty { padding: 34px 22px; text-align: center; }
.profile-empty.compact { padding: 24px 22px; }
.profile-empty strong { color: var(--ink); font-size: 12px; }
.profile-empty p { margin: 6px auto 0; color: var(--muted); font-size: 10px; }
.identity-block { padding: 19px 22px; }
.identity-block span, .identity-block strong { display: block; }
.identity-block span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.identity-block strong { margin-top: 6px; color: var(--ink); font-size: 13px; }
.alias-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 22px 20px; }
.alias-list span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 10px; }
.profile-note { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 10px; }
.client-actor-map { display: grid; grid-template-columns: minmax(0,1fr) 32px minmax(0,1fr) 32px minmax(0,1fr); align-items: center; gap: 8px; min-height: 126px; margin: 0 18px; padding: 18px 0; }
.profile-actor { position: relative; z-index: 2; display: flex; width: 100%; min-height: 82px; flex-direction: column; align-items: center; justify-content: center; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 16px rgba(0,50,52,.07); text-align: center; }
.profile-actor i { display: grid; width: 27px; height: 27px; margin-bottom: 5px; place-items: center; border-radius: 8px; background: var(--mint); color: var(--green); font-size: 8px; font-style: normal; font-weight: 700; }
.profile-actor strong { max-width: 104px; overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-actor small { max-width: 104px; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.profile-actor.client { grid-column: 3; grid-row: 1; border-color: rgba(27,204,168,.4); background: var(--green); }
.profile-actor.client strong { color: white; }
.profile-actor.client small { color: rgba(223,246,242,.62); }
.profile-actor.client i { background: rgba(27,204,168,.15); color: var(--teal-glow); }
.profile-actor.provider { grid-column: 1; grid-row: 1; }
.line-to-provider { grid-column: 2; grid-row: 1; }
.profile-actor.signbox { grid-column: 5; grid-row: 1; }
.line-to-signbox { grid-column: 4; grid-row: 1; }
.profile-actor-line { position: relative; z-index: 1; width: 100%; height: 1px; background: rgba(0,74,75,.2); }
.map-caption { margin: 0; padding: 13px 20px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-list { display: grid; }
.integration-list article { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 9px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.integration-list span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.integration-list strong { color: var(--ink); font-size: 11px; }
.technical-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin: 0; padding: 1px 0 0; background: var(--line); }
.technical-grid div { padding: 14px 20px; background: white; }
.technical-grid dt { color: var(--muted); font-size: 9px; }
.technical-grid dd { margin: 5px 0 0; color: var(--ink); font-size: 11px; font-weight: 700; }
.access-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); }
.real-access-grid { grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); }
.access-preview-grid article { min-width: 0; padding: 17px; background: white; }
.access-preview-grid .access-kind { color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.access-preview-grid strong { display: block; margin-top: 7px; color: var(--ink); font-size: 11px; }
.state.demo { background: rgba(27,204,168,.1); color: #087d68; }
.state.demo::before { background: var(--teal-glow); }
.credential-pair { display: grid; gap: 11px; margin: 15px 0 0; }
.credential-pair > div { min-width: 0; }
.credential-pair dt { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.credential-pair dd { display: flex; align-items: center; gap: 5px; min-width: 0; margin: 4px 0 0; }
.credential-pair code { min-width: 0; margin-right: auto; overflow: hidden; color: var(--ink); font: 500 9px 'JetBrains Mono',monospace; text-overflow: ellipsis; white-space: nowrap; }
.credential-pair button, .encrypted-summary button, .attention-access-body button { width: auto; min-height: 25px; margin: 0; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: none; color: var(--green); font-size: 8px; }
.credential-pair button:hover, .encrypted-summary button:hover, .attention-access-body button:hover { background: var(--mint); box-shadow: none; transform: none; }
.encrypted-summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin-top: 13px; }
.encrypted-summary span { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.encrypted-summary code { align-self: center; min-width: 0; overflow: hidden; color: var(--ink); font: 500 8px 'JetBrains Mono',monospace; text-overflow: ellipsis; white-space: nowrap; }
.access-safety-note { margin: 0; padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfdfc; color: var(--muted); font-size: 9px; line-height: 1.5; }
.attention-access { margin: -7px 20px 20px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.attention-access summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; color: var(--green); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.attention-access summary::-webkit-details-marker { display: none; }
.attention-access summary::after { content: '+'; color: var(--teal-glow); font-size: 15px; }
.attention-access[open] summary::after { content: '−'; }
.attention-access summary small { margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 500; }
.attention-access-body { border-top: 1px solid var(--line); }
.attention-access-body article { display: grid; grid-template-columns: minmax(70px,1fr) auto auto auto; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.attention-access-body article:last-child { border-bottom: 0; }
.attention-access-body span, .attention-access-body strong { display: block; }
.attention-access-body span { color: var(--muted); font-size: 8px; }
.attention-access-body strong { margin-top: 2px; color: var(--ink); font-size: 9px; }
.attention-access-body code { color: var(--ink); font: 500 8px 'JetBrains Mono',monospace; }
.pending-list { display: grid; gap: 11px; margin: 0; padding: 20px 22px; list-style: none; }
.pending-list li { color: var(--ink); font-size: 11px; }
.pending-list span { margin-right: 7px; color: #c96214; }
.source-note { margin: 0; padding: 13px 22px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.missing-client { max-width: 640px; margin: 10vh auto; padding: 40px; }
.missing-client h1 { margin: 0; color: var(--green); font-family: 'Sora',sans-serif; }
.missing-client > p:not(.section-label) { color: var(--muted); }
.edit-client-header { grid-template-columns: auto 1fr; }
.save-message { margin-bottom: 20px; padding: 12px 15px; border: 1px solid rgba(27,204,168,.24); border-radius: 11px; background: rgba(27,204,168,.08); color: #087d68; font-size: 12px; font-weight: 700; }
.edit-alert { margin: 0 0 20px; }
.client-edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 20px; }
.edit-section form { margin: 0; padding: 20px; }
.edit-section form + form { border-top: 1px solid var(--line); }
.edit-section select, .edit-section textarea { width: 100%; padding: 12px 14px; border: 1px solid rgba(0,74,75,.2); border-radius: 10px; outline: none; background: white; color: var(--ink); }
.edit-section select:focus, .edit-section textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,74,75,.08); }
.edit-section button[type="submit"]:not(.record-delete) { width: fit-content; min-height: 40px; padding: 8px 15px; font-size: 10px; }
.editable-records { display: grid; }
.editable-records article { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-width: 0; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.editable-records article > div { min-width: 0; }
.editable-records strong, .editable-records small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editable-records strong { color: var(--ink); font-size: 11px; }
.editable-records small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.editable-records form { padding: 0; }
.editable-records .record-delete { width: auto; min-height: 28px; margin: 0; padding: 5px 8px; border: 1px solid rgba(156,69,0,.15); border-radius: 7px; background: #fffaf5; box-shadow: none; color: #9c4500; font-size: 8px; }
.editable-records .record-delete:hover { background: #fff3e7; box-shadow: none; transform: none; }
.access-edit-section { grid-column: 1 / -1; }
.access-edit-section > form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.access-edit-section > form button { grid-column: 1 / -1; }

@media (max-width: 1100px) {
    .client-metrics { grid-template-columns: repeat(2, 1fr); }
    .client-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .directory-count { display: none; }
    .client-metrics { grid-template-columns: 1fr; }
    .directory-toolbar { grid-template-columns: 1fr; }
    .directory-filter select, .directory-search-button { width: 100%; }
    .client-profile-header { grid-template-columns: 1fr; gap: 10px; }
    .profile-state { justify-self: start; margin-top: 0; }
    .profile-actions { align-items: flex-start; flex-direction: column; margin-top: 0; }
    .client-truth-banner { grid-template-columns: auto 1fr; }
    .client-truth-banner > .tiny-code { display: none; }
    .integration-list article { grid-template-columns: auto 1fr; }
    .access-preview-grid { grid-template-columns: 1fr; }
    .client-edit-grid { grid-template-columns: 1fr; }
    .access-edit-section { grid-column: auto; }
    .access-edit-section > form { grid-template-columns: 1fr; }
    .access-edit-section > form button { grid-column: auto; }
}
