/* ─────────────────────────────────────────────────────────────────
   AIPMS Admin — admin.momentum52.com
   Superadmin surface — Team Tab + Operations Tab
───────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

body {
    background: #0d0d0d;
    color: #e8e6e1;
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* ─── Auth Gate ───────────────────────────────────────────────── */
#auth-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    flex-direction: column;
    gap: 1rem;
    color: rgba(232,230,225,0.5);
    font-size: 0.88rem;
}
#auth-gate .spinner {
    width: 28px; height: 28px;
    border: 2px solid rgba(212,160,23,0.2);
    border-top-color: #d4a017;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Header ─────────────────────────────────────────────────── */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: #111;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #d4a017;
    margin: 0;
    letter-spacing: 0.04em;
}

.admin-badge {
    font-size: 0.65rem;
    background: rgba(212,160,23,0.12);
    color: #d4a017;
    border: 1px solid rgba(212,160,23,0.3);
    border-radius: 4px;
    padding: 2px 7px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-left: 0.75rem;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: rgba(232,230,225,0.45);
}

/* ─── Brand link (P10-305 correction-list item 7) ──────────────── */
.admin-brand-link { transition: opacity 0.15s; }
.admin-brand-link:hover { opacity: 0.82; }

.btn-admin-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(232,230,225,0.55);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.15s, border-color 0.15s;
}
.btn-admin-secondary:hover { color: #e8e6e1; border-color: rgba(255,255,255,0.25); }

/* ─── Tab Nav ────────────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    background: #111;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0 1.5rem;
}

.admin-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(232,230,225,0.5);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.65rem 1.1rem;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: #e8e6e1; }
.admin-tab.active {
    color: #d4a017;
    border-bottom-color: #d4a017;
}

/* Domain node tabs (P10-305 correction-list items 2/3/4) — same row as Team/Operations,
   short node_id label, monospace to distinguish them from the static tabs. */
.admin-tab-node { font-family: 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.02em; }
.admin-tab-newnode { color: rgba(212,160,23,0.6); }

/* ─── Tab Panels ─────────────────────────────────────────────── */
.admin-panel { display: none; padding: 1.5rem; }
.admin-panel.active { display: block; }

/* ─── Team Tab ───────────────────────────────────────────────── */
.team-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.team-toolbar h2 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(232,230,225,0.4);
    margin: 0;
}

.btn-add-persona {
    background: #d4a017;
    border: none;
    border-radius: 5px;
    color: #000;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: opacity 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-add-persona:hover { opacity: 0.88; }

.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* ─── Persona Card ───────────────────────────────────────────── */
.persona-card {
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.persona-card:hover { border-color: rgba(212,160,23,0.25); }

.persona-card-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.persona-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e8e6e1;
    margin-bottom: 0.15rem;
}

.persona-card-meta {
    font-size: 0.72rem;
    color: rgba(232,230,225,0.45);
    line-height: 1.5;
}

.persona-card-archetype {
    font-size: 0.72rem;
    color: #d4a017;
    font-style: italic;
    margin-top: 0.2rem;
}

.persona-card-body {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* PACK status row */
.pack-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
}

.pack-label {
    color: rgba(232,230,225,0.4);
    min-width: 3.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.65rem;
}

.pack-steps {
    display: flex;
    gap: 3px;
}

.pack-step {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.pack-step.done { background: rgba(76,175,80,0.2); color: #4caf50; }
.pack-step.missing { background: rgba(255,255,255,0.06); color: rgba(232,230,225,0.25); }

.pack-complete-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: auto;
}
.pack-complete-badge.complete { background: rgba(76,175,80,0.15); color: #4caf50; }
.pack-complete-badge.incomplete { background: rgba(229,85,85,0.15); color: #e55; }

/* Info rows */
.card-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.card-info-label {
    color: rgba(232,230,225,0.35);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    min-width: 3.5rem;
}
.card-info-value { color: rgba(232,230,225,0.7); }

/* Card actions */
.persona-card-actions {
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-card-action {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(232,230,225,0.6);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-block;
}
.btn-card-action:hover { color: #e8e6e1; border-color: rgba(212,160,23,0.4); }
.btn-card-action.primary {
    background: rgba(212,160,23,0.1);
    border-color: rgba(212,160,23,0.3);
    color: #d4a017;
}
.btn-card-action.primary:hover { background: rgba(212,160,23,0.18); }

/* Pending nav node badge */
.rack-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: #f0a500;
    background: rgba(240,165,0,0.1);
    border: 1px solid rgba(240,165,0,0.25);
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: auto;
}

/* ─── Operations Tab ─────────────────────────────────────────── */
.ops-section {
    margin-bottom: 2rem;
}

.ops-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(232,230,225,0.4);
    margin: 0 0 0.85rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.admin-table th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(232,230,225,0.35);
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.admin-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: rgba(232,230,225,0.75);
    vertical-align: top;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.status-pill {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
}
.status-pill.pending { background: rgba(240,165,0,0.15); color: #f0a500; }
.status-pill.approved { background: rgba(76,175,80,0.15); color: #4caf50; }
.status-pill.rejected { background: rgba(229,85,85,0.15); color: #e55; }
.status-pill.complete { background: rgba(76,175,80,0.12); color: #4caf50; }

.btn-approve {
    background: rgba(76,175,80,0.12);
    border: 1px solid rgba(76,175,80,0.3);
    color: #4caf50;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    margin-right: 0.35rem;
    transition: background 0.15s;
}
.btn-approve:hover { background: rgba(76,175,80,0.22); }

.btn-reject {
    background: rgba(229,85,85,0.1);
    border: 1px solid rgba(229,85,85,0.25);
    color: #e55;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    transition: background 0.15s;
}
.btn-reject:hover { background: rgba(229,85,85,0.2); }

/* Empty state */
.admin-empty {
    padding: 1.5rem;
    color: rgba(232,230,225,0.3);
    font-size: 0.83rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
}

/* Loading state */
.admin-loading {
    color: rgba(232,230,225,0.35);
    font-size: 0.82rem;
    padding: 1rem 0;
}

/* ─── Team Tab V2 — Sub-Tab System ──────────────────────────── */
.persona-subtabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
    padding: 0.5rem 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 1.25rem;
}

.persona-subtab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(232,230,225,0.45);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    white-space: nowrap;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.persona-subtab:hover { color: #e8e6e1; }
.persona-subtab.active { color: #d4a017; border-bottom-color: #d4a017; }

.subtab-loading {
    font-size: 0.78rem;
    color: rgba(232,230,225,0.35);
    padding: 0.4rem 0;
}

/* ─── Persona Grid V2 ────────────────────────────────────────── */
.persona-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    gap: 2.5rem;
    background: url('/assets/persona-grid-bg.jpg') center center / cover no-repeat;
    border-radius: 8px;
    padding: 2.5rem;
}

/* ─── Identity Card ──────────────────────────────────────────── */
.persona-card-v2 {
    background: #ede9e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        0 10px 28px rgba(0,0,0,0.4);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    color: #111;
}
.persona-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.55), 0 18px 40px rgba(0,0,0,0.45);
    z-index: 4;
}

/* Photo */
.id-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.id-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: contrast(1.05) saturate(0.9);
    display: block;
}

/* Status badge — absolute over photo, bottom-left */
.id-class-indicator {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    z-index: 3;
}
.id-class-indicator.operational { background: #4caf50; color: #000; }
.id-class-indicator.pending     { background: #f0a500; color: #000; }

/* Body fields */
.id-body {
    padding: 10px 12px 12px;
    text-align: center;
    background: #ede9e0;
}
.id-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d0d0d;
    line-height: 1.2;
    margin-bottom: 3px;
}
.id-title {
    font-size: 0.65rem;
    color: #555;
    line-height: 1.35;
}

/* Level badge (used in char sheet) */
.level-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.level-badge.operational { background: rgba(76,175,80,0.15); color: #4caf50; }
.level-badge.pending { background: rgba(255,255,255,0.06); color: rgba(232,230,225,0.4); }

.btn-card-link {
    font-size: 0.72rem;
    color: rgba(212,160,23,0.7);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(212,160,23,0.2);
    border-radius: 3px;
    display: inline-block;
}
.btn-card-link:hover { color: #d4a017; border-color: rgba(212,160,23,0.4); }

/* ─── Character Sheet ────────────────────────────────────────── */
.char-sheet { max-width: 800px; }

.char-sheet-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e8e6e1;
    margin: 0 0 1.25rem;
    font-family: 'Cinzel', serif;
}

.char-section {
    background: #111;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 7px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.char-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(232,230,225,0.4);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.char-field-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
}
.char-field-row:last-of-type { border-bottom: none; }

.char-label {
    color: rgba(232,230,225,0.35);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    min-width: 5.5rem;
    flex-shrink: 0;
}

.char-display { color: rgba(232,230,225,0.75); }

.char-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: #e8e6e1;
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
    flex: 1;
    min-width: 0;
}
.char-input:focus { outline: none; border-color: rgba(212,160,23,0.4); }

.char-level-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: #e8e6e1;
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
}

.char-edit-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-char-edit {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: rgba(232,230,225,0.45);
    cursor: pointer;
    font-size: 0.65rem;
    padding: 2px 8px;
    transition: color 0.15s, border-color 0.15s;
}
.btn-char-edit:hover { color: #e8e6e1; border-color: rgba(255,255,255,0.25); }

.btn-char-save {
    background: rgba(76,175,80,0.12);
    border: 1px solid rgba(76,175,80,0.3);
    border-radius: 3px;
    color: #4caf50;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    transition: background 0.15s;
}
.btn-char-save:hover { background: rgba(76,175,80,0.22); }

.btn-char-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: rgba(232,230,225,0.5);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    transition: color 0.15s;
}
.btn-char-cancel:hover { color: #e8e6e1; }

.char-save-status { font-size: 0.78rem; color: rgba(232,230,225,0.6); }
.char-save-status.error { color: #e87070; }
.char-save-status.success { color: #7ec87d; }

.char-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 0.35rem;
}
.char-table th {
    text-align: left;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(232,230,225,0.3);
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.char-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: rgba(232,230,225,0.7);
}
.char-table tr:last-child td { border-bottom: none; }

.char-no-data {
    font-size: 0.8rem;
    color: rgba(232,230,225,0.3);
    font-style: italic;
    margin: 0.25rem 0;
}

.char-note {
    font-size: 0.72rem;
    color: rgba(232,230,225,0.3);
    font-style: italic;
    margin: 0.5rem 0 0;
}

/* ─── Character Sheet V2 (P10-276 rev2) ─────────────────────────── */
/* Type reference: Inter 700 · rgba(232,230,225,0.35) · 10px/17px for labels */

.cs-layout { display: flex; flex-direction: column; }

/* Row 1 — Hero */
.cs-row1 {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.75rem;
    align-items: start;
    padding: 1.75rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cs-photo {
    width: 150px; height: 200px;
    object-fit: cover; object-position: center top;
    border-radius: 3px;
    filter: contrast(1.05) saturate(0.88);
    box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}
.cs-identity { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.cs-name { font-size: 1.35rem; font-weight: 700; color: #e8e6e1; letter-spacing: 0.01em; line-height: 1.2; }
.cs-role { font-size: 14px; font-weight: 400; color: rgba(232,230,225,0.55); margin-top: 3px; line-height: 17px; }
.cs-id-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cs-domain-chip {
    font-size: 11px; font-weight: 600; padding: 2px 8px; line-height: 17px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px; color: rgba(232,230,225,0.55);
}
.cs-quote {
    margin-top: 10px; font-size: 13px; font-style: italic; font-weight: 400;
    color: rgba(232,230,225,0.28); line-height: 20px; max-width: 520px;
}
.cs-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 2px; }
.cs-hero-right .id-class-indicator { position: static; }
.cs-pack-pill {
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 2px; line-height: 17px; letter-spacing: 0.05em;
}
.cs-pack-pill.complete  { background: rgba(76,175,80,0.1); border: 1px solid rgba(76,175,80,0.25); color: #4caf50; }
.cs-pack-pill.incomplete { background: rgba(240,165,0,0.08); border: 1px solid rgba(240,165,0,0.2); color: #f0a500; }
.cs-archetype-pill {
    font-size: 10px; font-weight: 700; padding: 2px 8px; line-height: 17px; letter-spacing: 0.04em;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px; color: rgba(232,230,225,0.35);
}

/* Row 2 — Operations Band */
.cs-row2 {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background-color: #07070a;
    background-image: linear-gradient(rgba(67,119,66,0.07), rgba(67,119,66,0.07)), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544V0h.284zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28zm0 5.657L11.314 44.97 9.9 46.386l-9.9-9.9v-2.828zm0 5.657L8.485 47.8 7.07 49.212 0 42.143v-2.83zm0 5.657l5.657 5.657-1.414 1.415L0 47.8v-2.83zm0 5.657l2.828 2.83-1.414 1.413L0 53.456v-2.83zM54.627 60L30 35.373 5.373 60H8.2L30 38.2 51.8 60h2.827zm-5.656 0L30 41.03 11.03 60h2.828L30 43.858 46.142 60h2.83zm-5.656 0L30 46.686 16.686 60h2.83L30 49.515 40.485 60h2.83zm-5.657 0L30 52.343 22.343 60h2.83L30 55.172 34.828 60h2.83zM32 60l-2-2-2 2h4zM59.716 0l-28 28 1.414 1.414L60 2.544V0h-.284zM60 5.373L34.544 30.828l1.414 1.415L60 8.2V5.374zm0 5.656L37.373 33.656l1.414 1.414L60 13.86v-2.83zm0 5.656l-19.8 19.8 1.415 1.413L60 19.514v-2.83zm0 5.657l-16.97 16.97 1.414 1.415L60 25.172v-2.83zM60 28L45.858 42.142l1.414 1.414L60 30.828V28zm0 5.657L48.686 44.97l1.415 1.415 9.9-9.9v-2.828zm0 5.657L51.515 47.8l1.414 1.413 7.07-7.07v-2.83zm0 5.657l-5.657 5.657 1.414 1.415L60 47.8v-2.83zm0 5.657l-2.828 2.83 1.414 1.413L60 53.456v-2.83zM39.9 16.385l1.414-1.414L30 3.658 18.686 14.97l1.415 1.415 9.9-9.9 9.9 9.9zm-2.83 2.828l1.415-1.414L30 9.313 21.515 17.8l1.414 1.413 7.07-7.07 7.07 7.07zm-2.827 2.83l1.414-1.416L30 14.97l-5.657 5.657 1.414 1.415L30 17.8l4.243 4.242zm-2.83 2.827l1.415-1.414L30 20.626l-2.828 2.83 1.414 1.414L30 23.456l1.414 1.414zM56.87 59.414L58.284 58 30 29.716 1.716 58l1.414 1.414L30 32.544l26.87 26.87z' fill='%23e8e6e1' fill-opacity='0.035' fill-rule='evenodd'/%3E%3C/svg%3E");
}
.cs-week-context { padding: 0.55rem 1.25rem; font-size: 0.78rem; color: rgba(232,230,225,0.5); }
.cs-band-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    color: rgba(232,230,225,0.35); text-transform: uppercase;
    font-family: Inter, sans-serif; margin-bottom: 10px; line-height: 17px;
}
.cs-switches-col { padding: 1.1rem 1.25rem 1.1rem 2rem; }
.cs-switches-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 1rem; }
.cs-switch-item { display: flex; align-items: center; gap: 4px; }
.cs-switch-btn {
    display: flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 3px; padding: 5px 10px 5px 7px; cursor: pointer;
    transition: all 0.14s; color: rgba(232,230,225,0.6);
}
.cs-switch-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: #e8e6e1; }
.cs-switch-btn:disabled { opacity: 0.45; cursor: default; }
.cs-switch-btn.running { border-color: rgba(240,165,0,0.35); color: #f0a500; }
.cs-switch-btn.done    { border-color: rgba(76,175,80,0.35); color: #4caf50; }
.cs-switch-btn.error   { border-color: rgba(220,55,55,0.3);  color: #e05555; }
.cs-switch-btn.pending { border-color: rgba(150,150,150,0.3); color: #999; }
.cs-switch-result.neutral { color: #999; }
.cs-switch-id {
    width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.07); border-radius: 2px;
    font-size: 10px; font-weight: 700; font-family: Inter, sans-serif;
    color: rgba(232,230,225,0.6); flex-shrink: 0; line-height: 1;
}
.cs-switch-name { font-size: 11px; font-weight: 500; font-family: Inter, sans-serif; line-height: 17px; }
.cs-switch-result { font-size: 10px; font-weight: 600; color: #4caf50; }
.cs-no-switches { font-size: 12px; color: rgba(232,230,225,0.25); font-style: italic; }

/* Performance stat cards */
.cs-stat-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-stat-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; padding: 9px 14px; cursor: pointer;
    transition: background 0.14s, border-color 0.14s; min-width: 88px;
}
.cs-stat-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.18); }
.cs-stat-value { font-size: 1.45rem; font-weight: 700; color: rgba(232,230,225,0.9); line-height: 1.1; margin-bottom: 5px; font-family: Inter, sans-serif; }
.cs-stat-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(232,230,225,0.38); font-family: Inter, sans-serif; }
.cs-stat-arrow { color: rgba(232,230,225,0.28); font-size: 10px; }
.cs-stat-card:hover .cs-stat-arrow { color: rgba(232,230,225,0.65); }

/* Skill stats drill-down modal */
#cs-drill-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 500;
    display: none; align-items: center; justify-content: center;
}
.cs-drill-modal {
    background: #0e0e12; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
    width: 540px; max-width: 92vw; max-height: 78vh;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.cs-drill-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.cs-drill-title { font-size: 11px; font-weight: 700; color: rgba(232,230,225,0.8); letter-spacing: 0.1em; text-transform: uppercase; }
.cs-drill-close { background: none; border: none; color: rgba(232,230,225,0.35); cursor: pointer; font-size: 15px; padding: 2px 6px; line-height: 1; }
.cs-drill-close:hover { color: rgba(232,230,225,0.8); }
.cs-drill-body { padding: 16px 18px; overflow-y: auto; }
.cs-drill-formula {
    font-size: 11px; font-family: 'Courier New', monospace; color: rgba(232,230,225,0.45);
    margin-bottom: 14px; padding: 7px 10px;
    background: rgba(255,255,255,0.03); border-radius: 3px; border: 1px solid rgba(255,255,255,0.06);
}
.cs-drill-table { width: 100%; border-collapse: collapse; }
.cs-drill-table th { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(232,230,225,0.3); padding: 0 8px 7px 0; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.07); }
.cs-drill-table td { padding: 6px 8px 6px 0; color: rgba(232,230,225,0.68); font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cs-drill-total td { font-weight: 700; color: rgba(232,230,225,0.9); border-top: 1px solid rgba(255,255,255,0.12); border-bottom: none; padding-top: 9px; }
.cs-drill-empty { text-align: center; color: rgba(232,230,225,0.28) !important; font-style: italic; padding: 14px 0 !important; }
.cs-drill-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.cs-drill-badge-verified           { background: rgba(67,119,66,0.25);  color: #7ec87d; }
.cs-drill-badge-partially_verified { background: rgba(212,160,23,0.22); color: #d4a017; }
.cs-drill-badge-unverified         { background: rgba(255,255,255,0.06); color: rgba(232,230,225,0.38); }
.cs-drill-row-2col { display: flex; justify-content: space-between; gap: 1rem; font-size: 12px; color: rgba(232,230,225,0.75); padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cs-stat-guide-link { margin-top: 0.5rem; }
.cs-guide-link-btn { background: none; border: none; padding: 0; color: rgba(232,230,225,0.35); font-size: 10.5px; cursor: pointer; font-family: inherit; text-decoration: underline; text-decoration-color: transparent; }
.cs-guide-link-btn:hover { color: rgba(232,230,225,0.65); text-decoration-color: rgba(232,230,225,0.3); }
.cs-info-btn { background: none; border: 1px solid rgba(255,255,255,0.18); border-radius: 50%; color: rgba(232,230,225,0.4); font-size: 0.65rem; width: 1rem; height: 1rem; line-height: 1; cursor: pointer; padding: 0; vertical-align: middle; margin-left: 0.3rem; display: inline-flex; align-items: center; justify-content: center; }
.cs-info-btn:hover { color: rgba(232,230,225,0.85); border-color: rgba(255,255,255,0.45); }

.cs-dispatch-col { padding: 1.1rem 1.5rem; }
.cs-dispatch-days { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.cs-day-chip {
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 2px; line-height: 17px;
}
.cs-day-chip.base     { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: rgba(232,230,225,0.75); }
.cs-day-chip.expanded { background: rgba(76,175,80,0.08);  border: 1px solid rgba(76,175,80,0.2);  color: rgba(76,175,80,0.8); }
.cs-day-chip.none     { background: transparent; border: 1px solid rgba(255,255,255,0.07); color: rgba(232,230,225,0.25); font-style: italic; font-size: 11px; }
.cs-flag-chip { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 2px; margin-right: 4px; background: rgba(212,160,23,0.12); border: 1px solid rgba(212,160,23,0.25); color: rgba(212,160,23,0.8); }
.cs-flag-chip.none { background: transparent; border: 1px solid rgba(255,255,255,0.07); color: rgba(232,230,225,0.2); font-style: italic; text-transform: none; letter-spacing: 0; }
.cs-dispatch-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cs-dm-row { display: flex; gap: 10px; align-items: baseline; }
.cs-dm-label { font-size: 10px; font-weight: 700; color: rgba(232,230,225,0.35); min-width: 90px; line-height: 17px; text-transform: uppercase; letter-spacing: 0.06em; }
.cs-dm-row > span:last-child { font-size: 12px; font-weight: 400; color: rgba(232,230,225,0.65); line-height: 17px; }
.cs-sched-status { color: #4caf50 !important; }
.cs-dispatch-btn {
    font-size: 11px; font-weight: 600; font-family: Inter, sans-serif;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(232,230,225,0.6); padding: 5px 14px; border-radius: 2px; cursor: pointer;
    transition: all 0.14s; letter-spacing: 0.03em;
}
.cs-dispatch-btn:hover { background: rgba(255,255,255,0.08); color: #e8e6e1; border-color: rgba(255,255,255,0.18); }

/* Row 3 — Intelligence Panel */
.cs-row3 { display: grid; grid-template-columns: var(--cs-cola, 11.7%) 6px var(--cs-colskill, 23.5%) 6px var(--cs-colb, 35.9%) 6px 1fr; min-height: 440px; }

/* Col drag handles */
.cs-col-handle {
    cursor: col-resize;
    background: transparent;
    border-left: 1px solid rgba(255,255,255,0.07);
    transition: background 0.1s;
    position: relative;
}
.cs-col-handle::after {
    content: '';
    position: absolute;
    inset: 0 -3px;
}
.cs-col-handle:hover,
.cs-col-handle.dragging { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }

/* Col A — dossier cross-grid */
.cs-col-a {
    padding: 1.25rem 1rem 1.25rem 2rem; overflow-y: auto;
    background-color: #07070a;
    background-image: linear-gradient(rgba(67,119,66,0.09), rgba(67,119,66,0.09)), url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e8e6e1' fill-opacity='0.045'%3E%3Crect x='9.5' y='4' width='1' height='12'/%3E%3Crect x='4' y='9.5' width='12' height='1'/%3E%3C/g%3E%3C/svg%3E");
}
.cs-col-hdr {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em; line-height: 17px;
    color: rgba(232,230,225,0.35); text-transform: uppercase;
    font-family: Inter, sans-serif; margin-bottom: 8px;
}
.cs-col-hdr-spaced { margin-top: 1.25rem; }
.cs-field-block { margin-bottom: 10px; }
.cs-traits-top-row { display: flex; gap: 1rem; margin-bottom: 10px; }
.cs-traits-top-row .cs-field-block { margin-bottom: 0; flex: 1; min-width: 0; }
.cs-fb-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; line-height: 17px;
    color: rgba(232,230,225,0.35); text-transform: uppercase; margin-bottom: 1px;
}
.cs-fb-val { font-size: 13px; font-weight: 400; color: rgba(232,230,225,0.75); line-height: 19px; }
.cs-fb-val.cs-muted { color: rgba(232,230,225,0.28); font-style: italic; }
.cs-fb-val.cs-mono  { font-family: 'Courier New', monospace; font-size: 11px; color: rgba(232,230,225,0.45); }
.cs-attr-chips { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.cs-attr-chip { font-size: 11px; font-weight: 400; color: rgba(232,230,225,0.5); line-height: 17px; }
.cs-attr-k { font-weight: 700; color: rgba(232,230,225,0.35); margin-right: 4px; }
.cs-fb-para { margin: 0 0 8px; }
.cs-fb-para:last-child { margin-bottom: 0; }

/* Col Skillpaths — capability grid */
.cs-col-skillpaths {
    padding: 1.25rem 1rem; overflow-y: auto;
    background-color: #07070a;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e8e6e1' fill-opacity='0.045'%3E%3Crect x='9.5' y='4' width='1' height='12'/%3E%3Crect x='4' y='9.5' width='12' height='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* Col B — ledger lines */
.cs-col-b {
    padding: 1.25rem 1rem; display: flex; flex-direction: column;
    background-color: #07070a;
    background-image: linear-gradient(rgba(0,79,70,0.1), rgba(0,79,70,0.1)), repeating-linear-gradient(transparent, transparent 27px, rgba(255,255,255,0.022) 27px, rgba(255,255,255,0.022) 28px);
}
.cs-actlog { overflow-y: auto; flex: 1; }
.cs-dossier-col-body { overflow-y: auto; flex: 1; }

/* Col C — terminal/console */
.cs-col-c {
    display: flex; flex-direction: column; min-height: 440px; overflow: hidden;
    background-color: #07070a;
    background-image: linear-gradient(rgba(0,79,70,0.12), rgba(0,79,70,0.12)), repeating-linear-gradient(transparent, transparent 1px, rgba(0,0,0,0.18) 1px, rgba(0,0,0,0.18) 2px);
}
.cs-inner-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.cs-inner-tab {
    flex: 1; padding: 10px 4px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em; text-align: center; background: none; border: none;
    color: rgba(232,230,225,0.35); cursor: pointer; transition: color 0.14s, border-color 0.14s;
    font-family: Inter, sans-serif; line-height: 17px;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cs-inner-tab:hover { color: rgba(232,230,225,0.65); }
.cs-inner-tab.active { color: rgba(232,230,225,0.9); border-bottom-color: rgba(232,230,225,0.5); }
.cs-inner-panel { flex: 1; padding: 1rem 1.25rem; overflow-y: auto; display: block; }

/* SIGNAL tab */
.cs-signal-layout { display: flex; flex-direction: column; padding: 0; }
.cs-signal-feed { flex: 1; overflow-y: auto; padding: 0.9rem 1.25rem 0.5rem; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cs-signal-loading { font-size: 12px; color: rgba(232,230,225,0.28); text-align: center; padding: 2rem; }
.cs-signal-empty   { font-size: 12px; color: rgba(232,230,225,0.25); text-align: center; padding: 2.5rem 1rem; font-style: italic; }
.cs-signal-event {
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 3px; padding: 8px 10px; transition: border-color 0.12s;
}
.cs-signal-event:hover { border-color: rgba(255,255,255,0.13); }
.cs-signal-event-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.cs-signal-source {
    font-size: 10px; font-weight: 700; font-family: Inter, sans-serif; padding: 1px 6px;
    border-radius: 2px; letter-spacing: 0.05em; line-height: 17px;
    background: rgba(255,255,255,0.06); color: rgba(232,230,225,0.55);
}
.cs-signal-source.autonomous_dispatch { background: rgba(76,175,80,0.08); color: rgba(76,175,80,0.75); }
.cs-signal-source.human_claude        { background: rgba(240,165,0,0.08); color: rgba(240,165,0,0.75); }
.cs-signal-ts { font-size: 10px; font-weight: 400; color: rgba(232,230,225,0.28); margin-left: auto; line-height: 17px; }
.cs-signal-event-body { font-size: 12px; font-weight: 400; color: rgba(232,230,225,0.65); line-height: 18px; }
.cs-signal-wk {
    display: inline-block; background: rgba(255,255,255,0.06); border-radius: 2px;
    padding: 0 5px; font-size: 10px; font-weight: 700;
    color: rgba(232,230,225,0.45); margin-right: 5px; line-height: 17px;
}
.cs-signal-out { display: flex; flex-direction: column; align-items: flex-end; }
.cs-signal-out-meta { font-size: 10px; color: rgba(232,230,225,0.28); margin-bottom: 3px; line-height: 17px; }
.cs-signal-out-bubble {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px 4px 0 4px; padding: 8px 12px;
    font-size: 13px; font-weight: 400; color: rgba(232,230,225,0.8); max-width: 88%; line-height: 19px;
}
.cs-signal-compose {
    display: flex; gap: 8px; padding: 10px 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.cs-compose-input {
    flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 3px; color: #e8e6e1; font-size: 13px; padding: 6px 10px;
    resize: none; font-family: Inter, sans-serif; line-height: 19px;
}
.cs-compose-input:focus { outline: none; border-color: rgba(255,255,255,0.2); }
.cs-compose-send {
    width: 32px; height: 32px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px; color: rgba(232,230,225,0.65); cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background 0.14s; align-self: flex-end;
}
.cs-compose-send:hover { background: rgba(255,255,255,0.1); color: #e8e6e1; }

/* DISPATCH tab */
#cs-panel-dispatch { display: block; }
[id^="cs-panel-dispatch-"] { display: block; }
.cs-dispatch-compose {
    display: flex; flex-direction: column; gap: 8px; padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; width: 100%;
}
.cs-compose-input--lg { min-height: 72px; width: 100%; box-sizing: border-box; }
.cs-compose-footer { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; }

/* VOICE tab */
.cs-voice-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cs-version-badge {
    font-size: 10px; font-weight: 700; font-family: Inter, sans-serif; line-height: 17px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px; padding: 1px 7px; color: rgba(232,230,225,0.35);
}
.cs-field-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-field-label { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; color: rgba(232,230,225,0.35); min-width: 75px; line-height: 17px; text-transform: uppercase; }
.cs-field-disp { font-size: 13px; font-weight: 400; color: rgba(232,230,225,0.75); flex: 1; line-height: 17px; }
.cs-voice-actions { margin-top: 1rem; display: flex; gap: 8px; flex-wrap: wrap; }

/* PATHS tab */
.cs-path-card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.07); border-radius: 3px; padding: 9px 11px; margin-bottom: 6px; }
.cs-path-card.cs-path-core { border-color: rgba(76,175,80,0.18); }
.cs-path-name { font-size: 13px; font-weight: 700; color: rgba(232,230,225,0.85); margin-bottom: 6px; line-height: 19px; }
.cs-path-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.cs-paths-level-gate { margin-top: 1rem; padding-top: 0.7rem; border-top: 1px solid rgba(255,255,255,0.07); }
.cs-level-path { margin-top: 0.5rem; padding-top: 0.7rem; border-top: 1px solid rgba(255,255,255,0.07); }
.cs-gate-row { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cs-gate-icon { font-size: 11px; line-height: 17px; flex-shrink: 0; color: rgba(232,230,225,0.3); width: 16px; text-align: center; }
.cs-gate-info { display: flex; flex-direction: column; gap: 1px; }
.cs-gate-label { font-size: 11.5px; color: rgba(232,230,225,0.72); line-height: 17px; }
.cs-gate-detail { font-size: 10px; color: rgba(232,230,225,0.35); line-height: 15px; }
.cs-skills-table th { font-size: 10px !important; font-weight: 700 !important; color: rgba(232,230,225,0.35) !important; letter-spacing: 0.08em; text-transform: uppercase; }
.cs-skills-table td { font-size: 12px !important; color: rgba(232,230,225,0.65) !important; }
.cs-skill-id { font-family: 'Courier New', monospace; font-size: 10px !important; color: rgba(232,230,225,0.4) !important; }

/* LOOP tab */
.cs-loop-readonly { margin: 0.75rem 0; padding: 0.6rem 0; border-top: 1px solid rgba(255,255,255,0.07); border-bottom: 1px solid rgba(255,255,255,0.07); }
.cs-loop-ro-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; font-size: 11px; }
.cs-loop-orient { margin-bottom: 0.5rem; }
.cs-loop-tip { font-size: 11.5px; color: rgba(232,230,225,0.55); line-height: 1.55; margin: 0.4rem 0; }
.cs-loop-tip strong { color: rgba(232,230,225,0.8); }
.cs-loop-tip-sm { font-size: 10.5px; color: rgba(232,230,225,0.35); margin-top: 0.6rem; }
.cs-loop-types { display: flex; flex-direction: column; gap: 5px; margin: 0.5rem 0; }
.cs-loop-type-row { display: flex; align-items: baseline; gap: 8px; }
.cs-loop-type-desc { font-size: 11px; color: rgba(232,230,225,0.42); line-height: 1.4; }
.cs-loop-badge { display: inline-block; font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.cs-loop-badge-base_dispatch     { background: rgba(67,119,66,0.25);  color: #7ec87d; }
.cs-loop-badge-claimed           { background: rgba(212,160,23,0.22); color: #d4a017; }
.cs-loop-badge-rack_expansion    { background: rgba(0,79,70,0.35);    color: #4db8ad; }
.cs-loop-badge-session_obligation{ background: rgba(100,80,160,0.25); color: #a994e8; }
.cs-loop-row { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-loop-row-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cs-loop-title { font-size: 12px; color: rgba(232,230,225,0.8); }
.cs-loop-row-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.cs-loop-meta-item { font-size: 10.5px; color: rgba(232,230,225,0.38); }
.cs-loop-scope { font-size: 11px; color: rgba(232,230,225,0.45); margin-top: 4px; line-height: 1.45; }
.cs-loop-row-actions { margin-left: auto; display: flex; gap: 5px; flex-shrink: 0; }
.cs-loop-archived { opacity: 0.5; }
.cs-loop-btn { font-size: 10px; padding: 2px 8px; border-radius: 3px; border: none; cursor: pointer; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; transition: opacity 0.15s; }
.cs-loop-btn:hover { opacity: 0.8; }
.cs-loop-btn:disabled { opacity: 0.4; cursor: default; }
.cs-loop-btn-edit       { background: rgba(255,255,255,0.08); color: rgba(232,230,225,0.6); }
.cs-loop-btn-deactivate { background: rgba(180,50,50,0.2);    color: #e87070; }
.cs-loop-btn-restore    { background: rgba(67,119,66,0.2);    color: #7ec87d; }
.cs-loop-btn-save       { background: rgba(67,119,66,0.3);    color: #7ec87d; }
.cs-loop-btn-cancel     { background: rgba(255,255,255,0.05); color: rgba(232,230,225,0.4); }
.cs-loop-edit-form { margin-top: 8px; padding: 10px; background: rgba(255,255,255,0.04); border-radius: 4px; border: 1px solid rgba(255,255,255,0.08); }
.cs-loop-edit-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.cs-loop-edit-row label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(232,230,225,0.35); width: 52px; flex-shrink: 0; padding-top: 4px; }
.cs-loop-edit-row input, .cs-loop-edit-row select, .cs-loop-edit-row textarea { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; color: rgba(232,230,225,0.85); font-size: 11.5px; padding: 3px 7px; font-family: inherit; resize: vertical; }
.cs-loop-edit-row textarea { padding-top: 4px; }
/* VK feedback S161: select dropdown options were unreadable — light text on the
   browser's native white popup background (only the closed box picked up the dark
   theme colors). Style the open <option> list explicitly, same fix already applied
   to .pw-select. */
.cs-loop-edit-row select option { background: #1a1a1a; color: #e8e6e1; }
.cs-loop-edit-btns { display: flex; gap: 6px; margin-top: 4px; }
.cs-loop-add-form { margin-top: 0.5rem; padding: 10px 0 4px; border-top: 1px solid rgba(255,255,255,0.07); }
.cs-loop-add-form .cs-loop-edit-row input,
.cs-loop-add-form .cs-loop-edit-row select,
.cs-loop-add-form .cs-loop-edit-row textarea { background: rgba(255,255,255,0.05); }

/* RACK wizard form — Purpose suggest button + widened J81 Streams field (VK feedback S161) */
.rack-purpose-wrap { display: flex; gap: 6px; flex: 1; align-items: flex-start; }
.rack-purpose-wrap textarea { flex: 1; }
.rack-stream-field { margin-bottom: 10px; }
.rack-stream-field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(232,230,225,0.35); margin-bottom: 4px; }
.rack-step-nav { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* RACK Interview-Emulation Pipeline (P10-310) — Stage 2 question blocks */
.rack-q-block { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rack-q-text { font-size: 12.5px; color: rgba(232,230,225,0.8); margin-bottom: 6px; line-height: 1.5; }
.rack-q-source-toggle { display: flex; gap: 14px; margin-bottom: 6px; font-size: 11.5px; color: rgba(232,230,225,0.6); }
.rack-q-source-toggle label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.rack-q-live-input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; color: rgba(232,230,225,0.85); font-size: 11.5px; padding: 6px 8px; font-family: inherit; resize: vertical; margin-bottom: 6px; }
.rack-q-live-input:disabled { opacity: 0.4; }

/* ARCHIVE tab — proposals */
.cs-proposal-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); gap: 10px; }
.cs-proposal-title { font-size: 13px; font-weight: 400; color: rgba(232,230,225,0.7); flex: 1; line-height: 19px; }
.cs-proposal-actions { display: flex; gap: 5px; flex-shrink: 0; }
.cs-proposal-approve { font-size: 11px; font-weight: 600; padding: 3px 10px; background: rgba(76,175,80,0.08); border: 1px solid rgba(76,175,80,0.2); color: rgba(76,175,80,0.82); border-radius: 2px; cursor: pointer; }
.cs-proposal-reject  { font-size: 11px; font-weight: 600; padding: 3px 10px; background: rgba(220,55,55,0.06); border: 1px solid rgba(220,55,55,0.15); color: rgba(210,90,90,0.7); border-radius: 2px; cursor: pointer; }

/* ─── PACK Wizard (P10-278) ──────────────────────────────────── */

.pw-wizard { padding: 20px 0; }

.pw-wizard-hdr h4 { font-family: 'Cinzel', serif; font-size: 1rem; color: #d4a017; margin: 0 0 4px; }
.pw-wizard-sub { font-size: 0.83rem; color: rgba(232,230,225,0.5); margin: 0 0 20px; }

.pw-selector { max-width: 540px; }
.pw-or-divider { text-align: center; color: rgba(232,230,225,0.25); font-size: 0.78rem; margin: 14px 0; }

.pw-step1-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 780px) { .pw-step1-grid { grid-template-columns: 1fr; } }
.pw-photo-dropzone { border: 2px dashed rgba(212,160,23,0.3); border-radius: 8px; padding: 24px 12px; text-align: center; cursor: pointer; background: rgba(255,255,255,0.02); transition: border-color 0.15s, background 0.15s; }
.pw-photo-dropzone:hover, .pw-photo-dropzone.pw-dragover { border-color: #d4a017; background: rgba(212,160,23,0.06); }
.pw-photo-dropzone-text { font-size: 0.8rem; color: rgba(232,230,225,0.5); }
#pw-photo-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pw-photo-thumb { position: relative; width: 96px; }
.pw-photo-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(232,230,225,0.15); display: block; }
.pw-photo-thumb.pw-photo-default img { border-color: #d4a017; border-width: 2px; }
.pw-photo-default-badge { font-size: 0.62rem; text-align: center; color: #d4a017; margin-top: 3px; font-weight: 600; }
.pw-photo-set-default { width: 100%; font-size: 0.62rem; margin-top: 3px; padding: 2px 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(232,230,225,0.15); border-radius: 3px; color: rgba(232,230,225,0.6); cursor: pointer; }
.pw-photo-set-default:hover { background: rgba(212,160,23,0.15); color: #d4a017; }
.pw-photo-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.7); border: 1px solid rgba(232,230,225,0.3); color: rgba(232,230,225,0.8); font-size: 0.62rem; cursor: pointer; line-height: 1; }
.pw-photo-remove:hover { background: #e57373; border-color: #e57373; color: #fff; }

.pw-account-block { background: rgba(255,255,255,0.03); border: 1px solid rgba(212,160,23,0.2); border-radius: 8px; padding: 14px 16px; margin: 12px 0 18px; }
.pw-account-meta { display: flex; gap: 18px; font-size: 0.72rem; color: rgba(232,230,225,0.4); margin-bottom: 10px; }
.pw-account-meta code { color: rgba(232,230,225,0.65); background: rgba(0,0,0,0.2); padding: 1px 6px; border-radius: 3px; }
.pw-row-btn { display: flex; gap: 8px; align-items: stretch; }
.pw-row-btn .pw-input { flex: 1; }
.pw-row-btn .btn-suggest { white-space: nowrap; }
.pw-password-reveal { margin-top: 10px; font-size: 0.82rem; color: rgba(232,230,225,0.8); background: rgba(76,175,125,0.08); border: 1px solid rgba(76,175,125,0.3); border-radius: 6px; padding: 12px 14px; line-height: 1.6; }
.pw-password-value { font-family: monospace; font-size: 1.05rem; letter-spacing: 0.5px; color: #4caf7d; background: rgba(0,0,0,0.25); border-radius: 4px; padding: 6px 10px; margin-top: 6px; display: inline-block; user-select: all; }
.pw-social-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pw-social-row .pw-input { flex: 1; }
.pw-social-badge { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; color: #fff; }

.pw-step-tabs {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}
.pw-step-tab {
    flex: 1;
    padding: 9px 4px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255,255,255,0.03);
    color: rgba(232,230,225,0.4);
    border: none;
    border-right: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.15s;
}
.pw-step-tab:last-child { border-right: none; }
.pw-step-tab.active { background: rgba(212,160,23,0.12); color: #d4a017; font-weight: 600; }
.pw-step-tab.done { background: rgba(76,175,125,0.08); color: #4caf7d; }

.pw-slug-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px 14px;
    margin-bottom: 16px;
    font-size: 0.83rem;
}
.pw-slug-label { color: rgba(232,230,225,0.4); }
.pw-slug-value { font-weight: 600; color: #e8e6e1; font-family: monospace; }
.pw-mode-badge { padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.pw-step-panel h4.pw-step-title { font-family: 'Cinzel', serif; font-size: 0.95rem; color: #d4a017; margin: 0 0 4px; }
.pw-step-desc { font-size: 0.83rem; color: rgba(232,230,225,0.55); margin: 0 0 18px; line-height: 1.6; }

.pw-field { margin-bottom: 14px; }
.pw-field-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pw-field-sm { max-width: 240px; }
.pw-label { display: block; font-size: 0.78rem; font-weight: 600; color: rgba(232,230,225,0.8); margin-bottom: 6px; }
.pw-field-hdr .pw-label { margin-bottom: 0; }
.pw-label-note { font-weight: 400; color: rgba(232,230,225,0.4); margin-left: 5px; }
.pw-hint { font-size: 0.72rem; color: rgba(232,230,225,0.35); margin-top: 4px; }
.pw-info-block { font-size: 0.78rem; color: rgba(232,230,225,0.5); background: rgba(255,255,255,0.04); border-left: 2px solid rgba(232,230,225,0.15); padding: 10px 12px; border-radius: 0 4px 4px 0; line-height: 1.5; }
.pw-path-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(232,230,225,0.1); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; }
.pw-path-card.pw-path-core { border-color: rgba(134,196,146,0.25); }
.pw-path-card.pw-path-persona { border-color: rgba(147,179,255,0.25); }
.pw-path-name { font-size: 0.85rem; font-weight: 600; color: #e8e6e1; margin-bottom: 6px; }
.pw-path-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.pw-skill-chip { font-size: 0.68rem; background: rgba(255,255,255,0.07); border: 1px solid rgba(232,230,225,0.15); border-radius: 3px; padding: 2px 6px; color: rgba(232,230,225,0.65); font-family: monospace; }
.pw-chip-remove { margin-left: 4px; color: rgba(232,138,138,0.7); cursor: pointer; font-family: inherit; }
.pw-chip-remove:hover { color: #e57373; }
.pw-link-subtle { font-size: 0.78rem; color: rgba(232,230,225,0.45); cursor: pointer; text-decoration: underline; }

#pw-skill-builder { background: rgba(255,255,255,0.03); border: 1px solid rgba(212,160,23,0.2); border-radius: 8px; padding: 14px 16px; margin-top: 10px; }
.sb-existing-list { max-height: 220px; overflow-y: auto; background: rgba(0,0,0,0.15); border-radius: 6px; padding: 8px 10px; }
.sb-domain-group { margin-bottom: 8px; }
.sb-domain-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(212,160,23,0.7); margin-bottom: 3px; }
.sb-skill-check { display: block; font-size: 0.78rem; color: rgba(232,230,225,0.75); padding: 2px 0; cursor: pointer; }
.sb-skill-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(147,179,255,0.2); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }

.pw-input, .pw-textarea, .pw-select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #e8e6e1;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
}
.pw-input:focus, .pw-textarea:focus, .pw-select:focus { outline: none; border-color: #d4a017; }
.pw-textarea { resize: vertical; min-height: 70px; }
.pw-select { appearance: none; cursor: pointer; }
.pw-select option { background: #1a1a1a; color: #e8e6e1; }
.pw-select-sm { width: 100%; }

.pw-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-suggest {
    padding: 3px 10px;
    background: rgba(212,160,23,0.1);
    border: 1px solid rgba(212,160,23,0.3);
    border-radius: 4px;
    color: #d4a017;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-suggest:hover { background: rgba(212,160,23,0.2); }
.btn-suggest:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-pw-start {
    margin-top: 6px;
    padding: 9px 22px;
    background: #d4a017;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-pw-start:hover { opacity: 0.88; }

.btn-pw-reset {
    margin-left: auto;
    padding: 3px 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: rgba(232,230,225,0.5);
    font-size: 0.72rem;
    cursor: pointer;
}
.btn-pw-reset:hover { color: #e8e6e1; }

.pw-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.btn-pw-back { padding: 8px 18px; background: transparent; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: rgba(232,230,225,0.6); font-size: 0.85rem; cursor: pointer; }
.btn-pw-next { padding: 8px 22px; background: #d4a017; color: #000; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.btn-pw-next:hover { opacity: 0.88; }
.btn-pw-secondary { padding: 6px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; color: rgba(232,230,225,0.7); font-size: 0.8rem; cursor: pointer; }
.btn-pw-secondary:hover { border-color: rgba(255,255,255,0.2); color: #e8e6e1; }

.pw-provider-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 12px; }
.pw-provider-item { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 5px; padding: 8px 10px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pw-provider-item:has(input:checked) { border-color: #d4a017; background: rgba(212,160,23,0.08); }
.pw-provider-item input[type=checkbox] { accent-color: #d4a017; width: 14px; height: 14px; cursor: pointer; }
.pw-prov-name { font-size: 0.82rem; color: #e8e6e1; cursor: pointer; }
.pw-provider-actions { display: flex; gap: 8px; margin-top: 4px; }

.pw-prompt-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.82rem; }
.pw-prompt-row:last-child { border-bottom: none; }
.pw-prov-chip { background: rgba(255,255,255,0.06); border-radius: 3px; padding: 2px 7px; font-size: 0.72rem; color: rgba(232,230,225,0.7); }
.pw-prov-ver { color: rgba(232,230,225,0.4); font-family: monospace; font-size: 0.75rem; }
.pw-prov-status { color: #4caf7d; font-size: 0.72rem; }
.btn-dl-prompt { padding: 3px 9px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; color: rgba(232,230,225,0.6); font-size: 0.72rem; cursor: pointer; white-space: nowrap; }
.btn-dl-prompt:hover { border-color: rgba(212,160,23,0.4); color: #d4a017; }

/* RACK Provisioning Wizard (P10-305) */
.rack-stream-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; padding: 8px 10px; width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 4px; }
.pw-check-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(232,230,225,0.7); cursor: pointer; }
.pw-check-row input { flex-shrink: 0; }

.pw-preview-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.pw-preview-table th { text-align: left; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(232,230,225,0.3); padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.pw-preview-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); color: rgba(232,230,225,0.7); }
.pw-preview-table tr:last-child td { border-bottom: none; }
.pw-step-ok { color: #4caf7d; font-weight: 600; }
.pw-step-miss { color: rgba(232,230,225,0.25); }

.pw-skills-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.pw-skills-table th { text-align: left; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(232,230,225,0.3); padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.pw-skills-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); color: rgba(232,230,225,0.7); }

.pw-section-lbl { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(232,230,225,0.35); }
.pw-loading { font-size: 0.82rem; color: rgba(232,230,225,0.4); font-style: italic; padding: 10px 0; }
.pw-no-data { font-size: 0.82rem; color: rgba(232,230,225,0.35); font-style: italic; }
.pw-error { font-size: 0.82rem; color: #e05a5a; }

.pw-alert-info { padding: 9px 12px; border-radius: 5px; font-size: 0.82rem; background: rgba(212,160,23,0.08); color: #d4a017; border: 1px solid rgba(212,160,23,0.2); }
.pw-alert-warn { padding: 9px 12px; border-radius: 5px; font-size: 0.82rem; background: rgba(240,165,0,0.07); color: #f0a500; border: 1px solid rgba(240,165,0,0.2); }

.pw-result { padding: 10px 14px; border-radius: 6px; font-size: 0.85rem; margin-bottom: 14px; }
.pw-result-ok { background: rgba(76,175,125,0.1); color: #4caf7d; border: 1px solid rgba(76,175,125,0.25); }
.pw-result-err { background: rgba(224,90,90,0.1); color: #e05a5a; border: 1px solid rgba(224,90,90,0.25); }

.btn-pw-provision { padding: 10px 24px; background: #4caf7d; color: #000; border: none; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.btn-pw-provision:hover { opacity: 0.88; }
.btn-pw-provision:disabled { opacity: 0.4; cursor: not-allowed; }

.pw-local-files-section { background: rgba(240,165,0,0.05); border: 1px solid rgba(240,165,0,0.2); border-radius: 6px; padding: 14px; margin: 14px 0; }
.pw-local-file { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.pw-local-file:last-of-type { border-bottom: none; }
.pw-local-path { font-size: 0.75rem; color: rgba(232,230,225,0.6); font-family: monospace; flex: 1; word-break: break-all; }

/* RACK status display — Column A */
.cs-rack-status-display { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 0 10px 0; }
.cs-rack-status-display.rack-eligible { color: #7ec87d; }
.cs-rack-status-display.rack-not-eligible { color: rgba(232,230,225,0.3); font-style: italic; }

/* GOVERNANCE CONFIG section (Actions tab) */
.cs-gov-section { margin-top: 0.25rem; }
.cs-gov-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cs-gov-label { font-size: 11px; color: rgba(232,230,225,0.4); min-width: 110px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.cs-gov-value { font-size: 12px; color: rgba(232,230,225,0.72); }
.cs-gov-ops-list { margin: 0; padding: 0 0 0 1rem; list-style: disc; }
.cs-gov-ops-list li { font-size: 11px; color: rgba(232,230,225,0.6); padding: 2px 0; }
.cs-gov-authorize-btn { padding: 5px 12px; background: rgba(212,160,23,0.15); color: #d4a017; border: 1px solid rgba(212,160,23,0.35); border-radius: 4px; font-size: 11px; cursor: pointer; transition: opacity 0.15s; }
.cs-gov-authorize-btn:hover { opacity: 0.8; }
.cs-gov-authorize-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cs-gov-authorized-badge { font-size: 11px; color: #7ec87d; }

/* Activity log pagination */
.cs-log-pagination { display: flex; align-items: center; gap: 8px; padding: 8px 0 2px 0; }
.cs-log-pg-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: rgba(232,230,225,0.7); border-radius: 4px; width: 26px; height: 26px; font-size: 16px; line-height: 1; cursor: pointer; transition: background 0.15s; display: flex; align-items: center; justify-content: center; padding: 0; }
.cs-log-pg-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); color: #e8e6e1; }
.cs-log-pg-btn:disabled { opacity: 0.3; cursor: default; }
.cs-log-pg-info { font-size: 11px; color: rgba(232,230,225,0.45); min-width: 36px; text-align: center; }

/* P10-282: VK Direct Thread */
.cs-vk-thread { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.75rem; margin-bottom: 0.75rem; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; background: rgba(0,0,0,0.2); }
.cs-vk-empty { font-size: 0.72rem; color: rgba(255,255,255,0.3); text-align: center; padding: 0.75rem 0; }
.cs-vk-msg { display: flex; flex-direction: column; max-width: 82%; }
.cs-vk-msg--out { align-self: flex-end; align-items: flex-end; }
.cs-vk-msg--in { align-self: flex-start; align-items: flex-start; }
.cs-vk-bubble { padding: 0.4rem 0.7rem; border-radius: 10px; font-size: 0.78rem; line-height: 1.45; word-break: break-word; }
.cs-vk-msg--out .cs-vk-bubble { background: rgba(59,130,246,0.25); color: #93c5fd; }
.cs-vk-msg--in .cs-vk-bubble { background: rgba(67,119,66,0.25); color: #7ec87d; }
.cs-vk-meta { font-size: 0.58rem; color: rgba(255,255,255,0.28); margin-top: 0.15rem; padding: 0 0.2rem; }

/* P10-292 follow-on (S172): mock email headers for delivery_mode='email' messages */
.cs-vk-email-headers { width: 100%; font-size: 0.62rem; line-height: 1.5; color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px 6px 0 0; padding: 0.3rem 0.55rem; margin-bottom: -2px; }
.cs-vk-email-label { color: rgba(255,255,255,0.3); font-weight: 600; margin-right: 0.25rem; }
.cs-vk-msg--out .cs-vk-email-headers { text-align: right; }

/* P10-292 (amended S171): delivery-mode toggle + typing indicator */
.cs-compose-mode { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.68rem; color: rgba(255,255,255,0.55); }
.cs-mode-opt { display: flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.cs-mode-opt input { accent-color: #7ec87d; }
.cs-mode-hint { font-size: 0.6rem; color: rgba(255,255,255,0.3); }

/* P10-335/336 (S171): compose fields — each on its own line, label above control,
   control full-width to match the message textarea. */
.cs-compose-field { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; box-sizing: border-box; }
.cs-compose-field-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); }
.cs-compose-to {
    width: 100%; box-sizing: border-box; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.09);
    border-radius: 3px; color: #e8e6e1; font-size: 0.72rem; padding: 6px 8px;
    font-family: Inter, sans-serif;
}
/* Native <select> options ignore the select's own dark styling on some browser/OS
   combos and fall back to a white background — explicit option/optgroup colors fix
   the "light grey on white, unreadable" bug rather than leaving it to inheritance. */
.cs-compose-to option, .cs-compose-to optgroup { background: #1a1a1a; color: #e8e6e1; }
.cs-compose-mode--interdomain { align-items: center; color: #7ec87d; font-size: 0.68rem; }

/* P10-335 (S171): VK Thread / Interdomain Inbox tab toggle */
.cs-thread-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.cs-thread-tab {
    background: transparent; border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.45);
    border-radius: 4px; padding: 0.3rem 0.7rem; font-size: 0.66rem; cursor: pointer;
    font-family: Inter, sans-serif; transition: all 0.14s;
}
.cs-thread-tab:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.75); }
.cs-thread-tab.active { background: rgba(126,200,125,0.15); border-color: #7ec87d; color: #7ec87d; }
.cs-id-badge { display: inline-block; font-size: 0.56rem; padding: 0.05rem 0.35rem; border-radius: 3px; margin-left: 0.35rem; }
.cs-id-badge--verified { background: rgba(126,200,125,0.18); color: #7ec87d; }
.cs-id-badge--unverified { background: rgba(230,180,80,0.18); color: #e6b450; }
.cs-id-badge--encrypted { background: rgba(126,170,200,0.18); color: #7eaec8; }
.cs-vk-bubble--typing { display: flex; align-items: center; gap: 0.25rem; padding: 0.55rem 0.8rem; }
.cs-vk-bubble--typing span { width: 5px; height: 5px; border-radius: 50%; background: #7ec87d; opacity: 0.4; animation: cs-typing-bounce 1.1s infinite ease-in-out; }
.cs-vk-bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.cs-vk-bubble--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cs-typing-bounce { 0%, 60%, 100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

/* P10-277: Dispatch Schedule Editor */
.cs-dispatch-editor { padding: 0.5rem 0 0.5rem; }
.cs-de-row { display:flex; align-items:center; gap:0.6rem; margin-bottom:0.5rem; }
.cs-de-label { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.06em; color:rgba(255,255,255,0.45); min-width:80px; }
.cs-de-select { background:#1a1a1a; color:#f0f0f0; border:1px solid rgba(255,255,255,0.15); border-radius:4px; padding:0.3rem 0.5rem; font-size:0.8rem; }
.cs-toggle-wrap { position:relative; display:inline-block; width:36px; height:20px; cursor:pointer; }
.cs-toggle-wrap input { opacity:0; width:0; height:0; position:absolute; }
.cs-toggle-slider { position:absolute; inset:0; background:rgba(255,255,255,0.1); border-radius:20px; transition:0.2s; }
.cs-toggle-slider:before { content:''; position:absolute; height:14px; width:14px; left:3px; bottom:3px; background:#666; border-radius:50%; transition:0.2s; }
.cs-toggle-wrap input:checked + .cs-toggle-slider { background:rgba(212,160,23,0.35); }
.cs-toggle-wrap input:checked + .cs-toggle-slider:before { transform:translateX(16px); background:#d4a017; }
.cs-schedule-grid { margin:0.25rem 0 0.75rem; border-top:1px solid rgba(255,255,255,0.06); padding-top:0.5rem; }
.cs-sg-row { display:flex; align-items:baseline; gap:0.5rem; padding:0.18rem 0.25rem; font-size:0.72rem; }
.cs-sg-row.mine { background:rgba(212,160,23,0.08); border-radius:3px; }
.cs-sg-day { min-width:30px; font-size:0.63rem; text-transform:uppercase; letter-spacing:0.06em; color:rgba(255,255,255,0.35); flex-shrink:0; }
.cs-sg-names { color:rgba(255,255,255,0.65); }

/* P10-277: Header links replacing ⓘ buttons */
.cs-hdr-link { color:rgba(255,255,255,0.55); font-size:0.7rem; text-transform:uppercase; letter-spacing:0.08em; font-weight:600; cursor:pointer; text-decoration:none; border-bottom:1px dashed rgba(255,255,255,0.2); transition:color 0.15s, border-color 0.15s; }
.cs-hdr-link:hover { color:#d4a017; border-color:rgba(212,160,23,0.4); }
.cs-hdr-link--sub { font-size:0.65rem; text-transform:none; letter-spacing:0.02em; font-weight:400; color:rgba(255,255,255,0.35); border-bottom:1px dashed rgba(255,255,255,0.12); }
.cs-hdr-link--sub:hover { color:rgba(212,160,23,0.8); }

/* P10-277: PACK wizard schedule overview */
.pw-schedule-overview { margin-top:0.5rem; padding:0.4rem 0; border-top:1px solid rgba(255,255,255,0.07); }
.pw-sched-row { display:flex; gap:0.5rem; padding:0.15rem 0; font-size:0.72rem; }
.pw-sched-day { min-width:28px; color:rgba(255,255,255,0.35); text-transform:uppercase; font-size:0.63rem; letter-spacing:0.05em; flex-shrink:0; }
.pw-sched-names { color:rgba(255,255,255,0.6); }

/* Level Gate — Promotion Flow */
.cs-promo-request-btn { margin-top:0.6rem; background:rgba(212,160,23,0.12); color:#d4a017; border:1px solid rgba(212,160,23,0.3); border-radius:4px; padding:0.35rem 0.7rem; font-size:0.75rem; cursor:pointer; transition:background 0.15s; }
.cs-promo-request-btn:hover { background:rgba(212,160,23,0.22); }
.cs-promo-pending { margin-top:0.5rem; padding:0.6rem 0.75rem; background:rgba(59,130,246,0.08); border:1px solid rgba(59,130,246,0.2); border-radius:5px; }
.cs-promo-label { font-size:0.7rem; color:rgba(255,255,255,0.5); margin-bottom:0.5rem; line-height:1.4; }
.cs-promo-actions { display:flex; gap:0.5rem; flex-wrap:wrap; }
.cs-promo-approve { font-size:0.75rem; padding:0.3rem 0.65rem; }
.cs-promo-cancel { font-size:0.72rem; padding:0.3rem 0.55rem; background:transparent; color:rgba(255,255,255,0.35); border-color:rgba(255,255,255,0.1); }
.cs-next-up-btn { background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.55); border:1px solid rgba(255,255,255,0.12); border-radius:4px; padding:0.3rem 0.65rem; font-size:0.72rem; cursor:pointer; transition:background 0.15s,color 0.15s; }
.cs-next-up-btn:hover { background:rgba(212,160,23,0.12); color:#d4a017; border-color:rgba(212,160,23,0.3); }
.cs-level-override { margin-top:0.5rem; }
.cs-override-label { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.06em; color:rgba(255,255,255,0.25); cursor:pointer; }
.cs-override-body { padding:0.5rem 0 0; }
.cs-drill-section-hdr { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.07em; color:rgba(232,230,225,0.6); font-weight:600; margin:0.75rem 0 0.25rem; border-top:1px solid rgba(255,255,255,0.07); padding-top:0.6rem; }

/* Alignment Profile bars */
.cs-align-row { margin-bottom:0.7rem; cursor:pointer; }
.cs-align-row:last-child { margin-bottom:0; }
.cs-align-label { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:0.25rem; }
.cs-align-pct { font-size:0.65rem; color:rgba(255,255,255,0.35); }
.cs-align-track { height:5px; background:rgba(255,255,255,0.07); border-radius:3px; overflow:hidden; }
.cs-align-fill { height:100%; border-radius:3px; transition:width 0.5s ease; }
.cs-align-fill--gov { background:linear-gradient(90deg, #7c3aed 0%, #2563eb 100%); }
.cs-align-fill--adp { background:linear-gradient(90deg, #d97706 0%, #16a34a 100%); }
