* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0c0d12;
    --surface: #1a1d25;
    --surface-2: #242833;
    --border: #2a2f3a;
    --text: #e5e7eb;
    --text-dim: #9ca3af;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #dc2626;
    --success: #22c55e;
    --warn: #f59e0b;
    --amber: #f59e0b;
    --critical: #dc2626;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR",
                 Roboto, "Apple SD Gothic Neo", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    overflow: hidden;
}

.view { height: 100vh; }
.hidden { display: none !important; }

button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
}
button:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.small { padding: 5px 10px; font-size: 12px; }
button.danger { background: var(--danger); }
button.primary { background: var(--primary); }
button:not(.primary):not(.danger) { background: var(--surface-2); color: var(--text); }

/* ---------- LOGIN ---------- */
#login-view {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg) 0%, #1a1d25 100%);
}
.login-box {
    background: var(--surface);
    padding: 40px;
    border-radius: 14px;
    border: 1px solid var(--border);
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-box h1 { font-size: 32px; margin-bottom: 4px; }
.login-box .subtitle { color: var(--text-dim); margin-bottom: 28px; font-size: 13px; }
.login-box input {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
.login-box input:focus { outline: none; border-color: var(--primary); }
.login-box button {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    background: var(--primary);
    font-weight: 600;
    font-size: 14px;
}
.error { color: #f87171; margin-top: 12px; font-size: 13px; min-height: 18px; }

/* ---------- APP LAYOUT ---------- */
#app-view {
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 52px;
    flex-shrink: 0;
}
.brand { font-size: 16px; font-weight: 700; }
.topbar-actions { display: flex; gap: 8px; }

.workspace {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* stage */
.stage {
    flex: 1;
    position: relative;
    background: var(--bg);
    overflow: hidden;
    min-width: 0;
}
.office {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.office canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.stage-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.meeting-info {
    background: rgba(15, 17, 21, 0.85);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    pointer-events: auto;
}
.chain-status {
    background: rgba(15, 17, 21, 0.85);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    pointer-events: auto;
}
.chain-status.ok { color: #34d399; border: 1px solid #065f46; }
.chain-status.bad { color: #f87171; border: 1px solid #7f1d1d; }

.view-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(15, 17, 21, 0.78);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-dim);
    pointer-events: none;
}
.version {
    display: inline-block;
    font-size: 10px;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
}
.office {
    width: 100%;
    height: 100%;
    position: relative;
}
.office canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* panel */
.panel {
    width: 360px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.panel.collapsed { display: none; }

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.tab {
    flex: 1;
    padding: 10px 6px;
    background: transparent;
    color: var(--text-dim);
    border-radius: 0;
    border-bottom: 2px solid transparent;
    font-size: 12px;
}
.tab.active { color: var(--text); border-bottom-color: var(--primary); background: transparent; }
.tab:hover { color: var(--text); background: var(--surface-2); }

.tab-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.list { list-style: none; }
.list li {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.list li:hover { background: var(--surface-2); }
.list li.active { background: #312e81; color: #fff; }
.badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge.online { background: #065f46; color: #d1fae5; }
.badge.offline { background: #374151; color: var(--text-dim); }
.badge.conductor { background: #4338ca; color: #fff; }
.badge.worker { background: #166534; color: #fff; }
.badge.auditor { background: #b45309; color: #fff; }
.badge.critical { background: var(--critical); color: #fff; }
.badge.warn { background: var(--warn); color: #fff; }
.badge.open { background: var(--primary); color: #fff; }
.badge.closed, .badge.consensus { background: #374151; color: var(--text-dim); }

.panel-meeting-controls {
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.meeting-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

.composer {
    border-top: 1px solid var(--border);
    padding: 10px;
    display: flex;
    gap: 6px;
    background: var(--surface);
    flex-shrink: 0;
}
.composer textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    min-height: 52px;
    max-height: 160px;
}
.composer textarea:focus { outline: none; border-color: var(--primary); }
#send-btn { padding: 8px 14px; font-weight: 600; }

.log-view {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
}
.log-view .log-line { padding: 4px 6px; border-bottom: 1px dashed var(--border); }
.log-view .log-line .ts { color: #6b7280; }
.log-view .log-line.owner { color: #a5b4fc; }
.log-view .log-line.auditor { color: #fbbf24; }

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    width: 480px;
    max-width: 92vw;
}
.modal-box h3 { margin-bottom: 12px; }
.modal-box label { display: block; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.modal-box input, .modal-box textarea, .modal-box select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    margin-top: 4px;
    font-family: inherit;
    font-size: 14px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.modal-box.large { width: 860px; max-width: 96vw; }
.modal-box .modal-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin: 6px 0 10px;
    line-height: 1.5;
}
.yt-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid var(--border);
}
.yt-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.yt-wrap .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-dim);
    font-size: 13px;
}

/* ========== ORG CHART (v0.6.2 — Owner→Friday center, Auditor side observer) ========== */
.org-chart {
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.org-top-section {
    display: grid;
    grid-template-columns: 1fr minmax(100px, auto);
    align-items: flex-start;
    gap: 4px;
    padding: 0 4px;
}
.org-center-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    grid-column: 1;
    justify-self: center;
}
.org-auditor-side {
    grid-column: 2;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    margin-top: 60px;   /* align roughly between Owner and Friday */
}
.org-dotted-link {
    position: relative;
    width: 40px;
    height: 2px;
    margin-left: -40px;
    display: flex;
    align-items: center;
}
.org-dotted-link::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    border-top: 2px dashed var(--amber);
    transform: translateY(-1px);
}
.org-dotted-label {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 9px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--amber);
    white-space: nowrap;
}

.org-center-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.org-row-teams {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}
.org-team-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 64px;
}
.org-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--text-dim);
    font-size: 10px;
    text-align: center;
}
.org-branch-label {
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    color: var(--text-dim);
    margin-left: 8px;
    white-space: nowrap;
}
.org-branch-line {
    width: 2px;
    min-height: 20px;
    background: var(--border);
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
}
.org-branch-line .org-branch-label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.org-node {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 100px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.org-node:hover { border-color: var(--primary); transform: translateY(-1px); }
.org-node.owner { border-color: #fde68a; background: linear-gradient(135deg, #4c1d95, #312e81); }
.org-node.conductor { border-color: #6366f1; }
.org-node.auditor { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.org-node-inner { text-align: center; }
.org-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.org-meta { display: flex; gap: 4px; justify-content: center; align-items: center; flex-wrap: wrap; }
.org-expand {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    margin-left: 4px;
    line-height: 1;
}
.org-expand:hover { background: var(--primary); }

.org-branch-line {
    width: 2px;
    height: 14px;
    background: var(--border);
}

.org-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    width: 100%;
}
.org-row-subs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
    width: 100%;
}
.org-middle {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 8px 0;
    width: 100%;
    justify-content: center;
}
.org-auditor-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 12px;
    border-left: 1px dashed var(--accent, var(--amber));
}

.org-sub-group {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    margin-top: 6px;
    min-width: 80px;
}
.org-sub-group.open { display: flex; }
.org-sub-node {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    background: var(--surface);
}
.org-sub-node.on { border-left: 2px solid var(--success); }
.org-sub-node.off { border-left: 2px solid var(--text-dim); opacity: 0.6; }
.org-sub-empty {
    font-size: 10px;
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
}

/* ========== AVATAR MANAGER MODAL ========== */
.avatar-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-modal.hidden { display: none; }
.av-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}
.av-box {
    position: relative;
    width: 92vw;
    height: 86vh;
    max-width: 1400px;
    background: rgba(26,29,37,0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.av-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15,17,21,0.85);
}
.av-title { font-size: 18px; font-weight: 700; }
.av-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.av-body {
    flex: 1;
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 0;
}
.av-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,0.2);
}
.av-list-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--surface-2);
}
.av-list-item:hover { border-color: var(--primary); }
.av-list-item.active { background: #312e81; border-color: var(--primary); }
.av-list-item.set { border-left: 3px solid var(--success); }
.av-list-name { font-weight: 600; font-size: 13px; }
.av-list-status { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.av-creator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    background: #0a0c12;
}
.av-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    padding: 20px;
}
.av-placeholder.hidden { display: none; }
.av-iframe {
    flex: 1;
    border: 0;
    width: 100%;
    height: 100%;
}
.av-iframe.hidden { display: none; }
.av-current {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.av-current.hidden { display: none; }
.av-current-label { font-size: 12px; color: var(--text-dim); }
.av-current-url {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 12px;
}
.av-current-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .av-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .av-list {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 140px;
    }
}

/* ========== ORG CHART v0.6.3 (.oc clean) ========== */
.org-chart.oc {
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.oc .oc-level {
    display: flex;
    justify-content: center;
    position: relative;
}
.oc .oc-node {
    padding: 12px 14px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #475569;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    text-align: center;
    min-width: 120px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 1;
}
.oc .oc-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    border-color: var(--primary);
}
.oc .oc-node.oc-owner {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
    min-width: 180px;
    padding: 14px 18px;
}
.oc .oc-node.oc-owner:hover { border-color: #fde68a; }
.oc .oc-node.oc-conductor {
    border-color: var(--primary);
    min-width: 160px;
    padding: 14px 16px;
}
.oc .oc-node.oc-auditor {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    min-width: 140px;
}
.oc .oc-node.oc-team { min-width: 96px; padding: 10px 12px; }

.oc .oc-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #0f172a;
    margin: 0 auto 8px;
    overflow: hidden;
    border: 2px solid #475569;
    display: flex; align-items: center; justify-content: center;
}
.oc .oc-node.oc-owner .oc-avatar { width: 60px; height: 60px; border-color: #fbbf24; }
.oc .oc-node.oc-conductor .oc-avatar { width: 52px; height: 52px; border-color: var(--primary); }
.oc .oc-node.oc-auditor .oc-avatar { border-color: #f59e0b; }
.oc .oc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.oc .oc-avatar-ph { font-size: 20px; font-weight: 700; color: #94a3b8; }
.oc .oc-node.oc-owner .oc-avatar-ph { font-size: 26px; color: #fde68a; }

.oc .oc-title { font-weight: 700; font-size: 13px; color: #e2e8f0; }
.oc .oc-node.oc-owner .oc-title { font-size: 15px; color: #fde68a; }
.oc .oc-role { font-size: 10px; color: #94a3b8; margin-top: 3px; }
.oc .oc-count {
    font-size: 10px;
    color: #c7d2fe;
    margin-top: 5px;
    padding: 2px 7px;
    background: rgba(99,102,241,0.22);
    border-radius: 4px;
    display: inline-block;
}
.oc .oc-online {
    font-size: 9px;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    letter-spacing: 0.05em;
}
.oc .oc-online.on { color: #86efac; background: rgba(34,197,94,0.18); }
.oc .oc-online.off { color: #94a3b8; background: rgba(148,163,184,0.15); }

.oc .oc-vline {
    width: 2px;
    height: 26px;
    background: #475569;
    margin: 0 auto;
}
.oc .oc-vline-up {
    width: 2px;
    height: 20px;
    background: #475569;
}

/* Auditor side branch */
.oc .oc-aud-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0;
}
.oc .oc-aud-row::before {
    /* central vertical continuation (Owner→Friday axis) */
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: #475569;
    transform: translateX(-50%);
    z-index: 0;
}
.oc .oc-aud-hline {
    width: 60px;
    border-top: 2px dashed #f59e0b;
    align-self: center;
    z-index: 1;
    margin-right: -2px;   /* touch the node */
}
.oc .oc-aud-row .oc-node { z-index: 2; }

.oc .oc-hbar {
    height: 2px;
    background: #475569;
    width: 92%;
    margin: 0 auto;
}
.oc .oc-team-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 0;
}
.oc .oc-team-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.oc .oc-sub-panel {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid #334155;
}
.oc .oc-sub-panel-header {
    font-size: 13px;
    color: #e2e8f0;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
    margin-bottom: 10px;
}
.oc .oc-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 6px;
}
.oc .oc-sub-card {
    padding: 6px;
    background: #1e293b;
    border-radius: 6px;
    border: 1px solid #334155;
    text-align: center;
    position: relative;
}
.oc .oc-sub-card.on { border-left: 3px solid #22c55e; }
.oc .oc-sub-card.off { opacity: 0.55; }
.oc .oc-sub-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #0f172a;
    margin: 0 auto 3px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #64748b;
}
.oc .oc-sub-avatar img { width: 100%; height: 100%; object-fit: cover; }
.oc .oc-sub-name { font-size: 10px; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; }
.oc .oc-sub-dot { position: absolute; top: 4px; right: 6px; font-size: 10px; }
.oc .oc-sub-dot.on { color: #22c55e; }
.oc .oc-sub-dot.off { color: #64748b; }

.oc .oc-footer {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px dashed #475569;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #94a3b8;
    font-size: 10px;
    text-align: center;
}
.oc .oc-footer code {
    background: #0f172a;
    padding: 1px 4px;
    border-radius: 3px;
    color: #a5b4fc;
    font-size: 9px;
}

/* ========== DAILY CHECKLIST ========== */
.daily-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.daily-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.daily-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 3px;
    margin-bottom: 4px;
}
.daily-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.daily-item.status-done { opacity: 0.65; border-left: 3px solid #22c55e; }
.daily-item.status-done .daily-name { text-decoration: line-through; }
.daily-item.status-paused { border-left: 3px solid #f59e0b; }
.daily-item.status-stopped { border-left: 3px solid #ef4444; }
.daily-item.status-in_progress { border-left: 3px solid #3b82f6; }
.daily-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.daily-name { font-weight: 600; flex: 1; min-width: 0; }
.daily-assignee {
    font-size: 10px;
    color: var(--text-dim);
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 3px;
}
.daily-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid;
    font-weight: 600;
}
.daily-meta {
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.daily-reason {
    color: var(--text-dim);
    font-size: 11px;
    background: rgba(0,0,0,0.3);
    padding: 3px 6px;
    border-radius: 3px;
}
.daily-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}
.daily-status-sel {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
}
.daily-add-btn { margin-top: 6px; padding: 6px; }
.daily-summary {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    padding: 8px;
    border-top: 1px dashed var(--border);
    margin-top: 6px;
}

/* ========== 7:3 MEETING MODAL ========== */
.meeting-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.meeting-modal.hidden { display: none; }
.mm-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top, rgba(99,102,241,0.18) 0%, transparent 60%),
        rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
}
.mm-box {
    position: relative;
    width: 92vw;
    height: 86vh;
    max-width: 1400px;
    background: rgba(26,29,37,0.93);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.mm-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15,17,21,0.85);
}
.mm-title { display: flex; flex-direction: column; }
.mm-title > span:first-child { font-size: 17px; font-weight: 700; }
.mm-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mm-actions { display: flex; gap: 6px; }
.mm-body {
    flex: 1;
    display: grid;
    grid-template-columns: 7fr 3fr;
    min-height: 0;
}
.mm-chat {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(99,102,241,0.06) 0%, transparent 70%);
}
.mm-chat::before {
    content: "회의실";
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: 900;
    color: rgba(255,255,255,0.02);
    pointer-events: none;
    user-select: none;
}
.mm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mm-msg {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 78%;
    word-break: break-word;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.mm-msg.owner { align-self: flex-end; background: #312e81; border-color: #4f46e5; }
.mm-msg.system { align-self: center; background: transparent; border-style: dashed; font-size: 12px; color: var(--text-dim); }
.mm-msg.bot { align-self: flex-start; }
.mm-msg-head { font-size: 11px; margin-bottom: 3px; display: flex; justify-content: space-between; gap: 8px; }
.mm-time { color: var(--text-dim); }
.mm-msg-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.mm-msg-hash {
    font-size: 9px;
    color: var(--text-dim);
    font-family: ui-monospace, "SF Mono", monospace;
    margin-top: 4px;
    opacity: 0.6;
}
.mm-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 20px;
}
.mm-composer {
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    gap: 8px;
    background: rgba(15,17,21,0.8);
}
.mm-composer textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    min-height: 48px;
    max-height: 140px;
}
.mm-composer textarea:focus { outline: none; border-color: var(--primary); }
#mm-send-btn { padding: 8px 18px; }

.mm-evidence {
    padding: 16px 14px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
}
.mm-evidence h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 14px 0 6px;
    letter-spacing: 0.05em;
}
.mm-evidence h4:first-child { margin-top: 0; }
.mm-evidence ul { list-style: none; }
.mm-evidence li {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.mm-evidence li .badge { margin-right: 4px; }

/* ========== responsive meeting modal ========== */
@media (max-width: 900px) {
    .mm-body { grid-template-columns: 1fr; grid-template-rows: 6fr 4fr; }
    .mm-chat { border-right: none; border-bottom: 1px solid var(--border); }
}

/* responsive */
@media (max-width: 900px) {
    .panel {
        position: fixed;
        top: 52px;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 420px;
        z-index: 50;
        transform: translateX(100%);
        transition: transform 0.25s ease;
    }
    .panel.open { transform: translateX(0); box-shadow: -8px 0 24px rgba(0,0,0,0.5); }
    .panel.collapsed { display: flex; }
}

@media (max-width: 600px) {
    .topbar-actions button:not(.primary) { display: none; }
    #toggle-panel-btn { display: inline-block !important; }
    .modal-box { width: 95vw; padding: 18px; }
}
