/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1E293B;
  --primary-light: #2563EB;
  --primary-hover: #0F172A;
  --sidebar-bg: #FFFFFF;
  --sidebar-text: #475569;
  --sidebar-active: #2563EB;
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-muted: #64748B;
  --danger: #DC2626;
  --success: #16A34A;
  --warning: #D97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -1px rgba(0,0,0,0.06);
}

body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── Layout ────────────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }
#sidebar { width: 240px; min-height: 100vh; background: var(--sidebar-bg); display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; border-right: 1px solid var(--border); }
#main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; overflow-x: hidden; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-logo h2 { color: var(--primary); font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.sidebar-logo p { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section { padding: 16px 16px 6px; color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; opacity: 0.7; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: var(--sidebar-text); cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; font-size: 13.5px; user-select: none; }
.nav-item:hover { background: var(--bg); color: var(--primary); }
.nav-item.active { background: #EFF6FF; color: var(--sidebar-active); border-left-color: var(--sidebar-active); }
.nav-item svg { flex-shrink: 0; opacity: 0.6; }
.nav-item.active svg { opacity: 1; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.user-badge { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { color: var(--primary); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--text-muted); font-size: 11px; text-transform: capitalize; }
.btn-logout { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; opacity: 0.6; }
.btn-logout:hover { color: var(--danger); background: rgba(220,38,38,0.1); opacity: 1; }

/* ── Page header ───────────────────────────────────────────────── */
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-header h1 { font-size: 20px; font-weight: 700; color: var(--primary); }
.page-header .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; }

/* ── Content ───────────────────────────────────────────────────── */
.content { padding: 24px 28px; flex: 1; min-width: 0; overflow-x: hidden; }

/* ── Cards ─────────────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 14px; font-weight: 700; }
.card-body { padding: 20px; }

/* ── Stats grid ────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; box-shadow: var(--shadow); }
.stat-card .stat-num { font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card .stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon { padding: 5px; border-radius: 4px; }

/* ── Tables ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F8FAFC; }
tbody tr.expanded-row { background: #F8FAFC; }
.clickable-row { cursor: pointer; }

/* ── Badges ────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.badge-active, .badge-open { background: #FEE2E2; color: #991B1B; }
.badge-in_progress { background: #FEF3C7; color: #92400E; }
.badge-completed, .badge-resolved, .badge-mitigated { background: #DCFCE7; color: #166534; }
.badge-closed, .badge-cancelled { background: #F1F5F9; color: #475569; }
.badge-on_hold { background: #FEF3C7; color: #92400E; }
.badge-critical { background: #FEE2E2; color: #991B1B; }
.badge-high { background: #FFEDD5; color: #9A3412; }
.badge-medium { background: #FEF9C3; color: #713F12; }
.badge-low { background: #DCFCE7; color: #166534; }
/* project status in header */
.badge-status-active { background: #DBEAFE; color: #1D4ED8; }
.badge-status-on_hold { background: #FEF3C7; color: #92400E; }
.badge-status-completed { background: #DCFCE7; color: #166534; }
.badge-status-cancelled { background: #F1F5F9; color: #475569; }

/* ── Tabs ──────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; overflow-x: auto; }
.tab { padding: 10px 20px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary-light); }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; color: var(--text); background: var(--surface); transition: border-color 0.15s; }
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Modal ─────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal--wide { max-width: 810px; }
.modal-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: 4px; display: flex; align-items: center; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── Quill editor overrides ────────────────────────────────────── */
.ql-toolbar.ql-snow { border-radius: 6px 6px 0 0; border-color: #CBD5E1; background: #F8FAFC; padding: 6px 8px; }
.ql-container.ql-snow { border-radius: 0 0 6px 6px; border-color: #CBD5E1; font-size: 13px; font-family: inherit; }
.ql-editor { min-height: 110px; line-height: 1.6; color: var(--text); }
.ql-editor.ql-blank::before { color: #94A3B8; font-style: italic; }
.ql-toolbar.ql-snow .ql-formats { margin-right: 8px; }
/* Quill injects its own borders on each sub-container — unify with our border-radius wrapper */
#m-status-editor .ql-toolbar, #m-progress-editor .ql-toolbar { border-radius: 5px 5px 0 0; }
#m-status-editor .ql-container, #m-progress-editor .ql-container { border-radius: 0 0 5px 5px; }
#m-status-editor, #m-progress-editor { border: none !important; }

/* ── Notes ─────────────────────────────────────────────────────── */
.notes-panel { background: #F8FAFC; border-top: 1px solid var(--border); padding: 16px 20px; }
.notes-panel h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.note-item { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin-bottom: 8px; }
.note-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.note-author { font-weight: 600; color: var(--primary-light); }
.note-content { font-size: 13px; white-space: pre-wrap; }
.note-form { display: flex; gap: 8px; margin-top: 10px; }
.note-form textarea { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; resize: none; height: 60px; font-family: inherit; }
.note-form textarea:focus { outline: none; border-color: var(--primary-light); }

/* ── Detail expand ─────────────────────────────────────────────── */
.item-detail { padding: 14px 20px; background: #F8FAFC; border-top: 1px solid var(--border); }
.item-description { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; white-space: pre-wrap; }

/* ── Login ─────────────────────────────────────────────────────── */
#login-screen { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.login-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-md); width: 100%; max-width: 380px; padding: 36px 32px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--primary); }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.login-error { background: #FEE2E2; color: #991B1B; border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 10px; font-size: 14px; margin-top: 6px; }

/* ── Project detail header ─────────────────────────────────────── */
.project-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px 28px; }
.project-header .back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; cursor: pointer; margin-bottom: 10px; }
.project-header .back-link:hover { color: var(--primary); }
.project-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-title-row h1 { font-size: 22px; font-weight: 800; color: var(--primary); }
.project-meta { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.project-meta span { display: flex; align-items: center; gap: 4px; }

/* ── Project Dashboard ─────────────────────────────────────────── */
.project-dashboard { display: flex; gap: 12px; padding: 14px 28px; background: var(--bg); border-bottom: 1px solid var(--border); overflow-x: auto; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; flex: 1; min-width: 150px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dash-card-wide { flex: 1.8; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.dash-card-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.dash-card-count { font-size: 18px; font-weight: 800; line-height: 1; }
.dash-bar { height: 18px; border-radius: 9px; overflow: hidden; display: flex; background: #F1F5F9; flex-shrink: 0; }
.dash-bar-seg { height: 100%; min-width: 2px; transition: width 0.35s ease; }
.dash-legend { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.dash-legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }
.dash-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-toggle { display: flex; background: var(--bg); border-radius: 6px; padding: 2px; flex-shrink: 0; }
.dash-toggle-btn { background: none; border: none; font-size: 11px; padding: 3px 8px; border-radius: 4px; cursor: pointer; color: var(--text-muted); transition: all 0.15s; white-space: nowrap; }
.dash-toggle-btn.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.12); font-weight: 600; }
.dash-alert-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dash-alert-item { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; border-radius: 4px; padding: 2px 4px; margin: 0 -4px; }
.dash-alert-item[data-issue-id], .dash-alert-item[data-risk-id] { cursor: pointer; transition: background 0.12s; }
.dash-alert-item[data-issue-id]:hover, .dash-alert-item[data-risk-id]:hover { background: var(--bg); }
.dash-alert-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.dash-sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-sev-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; text-transform: capitalize; white-space: nowrap; flex-shrink: 0; }
.dash-score-chip { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; color: #fff; }
.dash-allclear { font-size: 12px; color: var(--success); margin: auto 0; }
.dash-act-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dash-act-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.dash-act-chip { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
.dash-stale { color: var(--warning); }

/* ── Empty state ───────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Toast ─────────────────────────────────────────────────────── */
#toast { position: fixed; bottom: 24px; right: 24px; background: #1E293B; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 9999; max-width: 320px; }
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { background: var(--danger); }

/* ── Filters row ───────────────────────────────────────────────── */
.filters-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters-row select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--surface); color: var(--text); cursor: pointer; }
.filters-row .filter-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ── Multi-select filter ───────────────────────────────────────── */
.mf-wrap { position: relative; }
.mf-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; font-family: inherit; }
.mf-trigger:hover { border-color: #93C5FD; }
.mf-trigger.has-selection { border-color: var(--primary); background: #EFF6FF; }
.mf-trigger .mf-label { font-weight: 600; color: var(--text-muted); font-size: 12px; }
.mf-trigger .mf-value { color: var(--text); }
.mf-trigger.has-selection .mf-value { color: var(--primary); }
.mf-caret { color: var(--text-muted); flex-shrink: 0; transition: transform 0.15s; }
.mf-wrap.open .mf-caret { transform: rotate(180deg); }
.mf-dropdown { position: absolute; top: calc(100% + 4px); left: 0; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 300; padding: 5px 0; display: none; }
.mf-wrap.open .mf-dropdown { display: block; }
.mf-opt { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; user-select: none; color: var(--text); }
.mf-opt:hover { background: #F8FAFC; }
.mf-opt input[type=checkbox] { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }

/* ── Gantt / Timeline ───────────────────────────────────────────── */
#g-scroll { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }
#g-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
#g-scroll::-webkit-scrollbar-track { background: transparent; }
#g-scroll::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
#g-scroll::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
.g-bar:hover { opacity: 0.82; }
.g-lbl:hover { fill: #2563EB !important; }
.g-ms:hover  { opacity: 0.75; }

/* ── Report section ────────────────────────────────────────────── */
.report-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.report-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.report-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-icon.excel { background: #DCFCE7; color: #16A34A; }
.report-icon.html { background: #DBEAFE; color: #1D4ED8; }
.report-icon.customer { background: #F3E8FF; color: #7C3AED; }
.report-info h4 { font-weight: 700; font-size: 14px; }
.report-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Traffic light ─────────────────────────────────────────────── */
.tl-selector { display: flex; gap: 10px; align-items: center; }
.tl-option { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 12px; border-radius: 20px; border: 2px solid var(--border); font-size: 12px; font-weight: 600; transition: all 0.15s; user-select: none; }
.tl-option:hover { border-color: currentColor; }
.tl-option.selected-green { border-color: #16A34A; background: #DCFCE7; color: #166534; }
.tl-option.selected-orange { border-color: #D97706; background: #FEF3C7; color: #92400E; }
.tl-option.selected-red { border-color: #DC2626; background: #FEE2E2; color: #991B1B; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tl-dot-green { background: #16A34A; }
.tl-dot-orange { background: #D97706; }
.tl-dot-red { background: #DC2626; }

/* Traffic light display (read-only) */
.tl-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.tl-badge-green { background: #DCFCE7; color: #166534; }
.tl-badge-orange { background: #FEF3C7; color: #92400E; }
.tl-badge-red { background: #FEE2E2; color: #991B1B; }

/* ── Update cards ──────────────────────────────────────────────── */
.update-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.update-card-header { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.update-period { font-weight: 700; font-size: 14px; color: var(--primary); }
.update-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.update-card-body { padding: 16px 20px; }
.update-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 6px; }
.update-text { font-size: 13px; line-height: 1.65; color: var(--text); }
.update-text p  { margin: 0 0 6px 0; }
.update-text h1, .update-text h2, .update-text h3 { margin: 8px 0 4px; font-weight: 700; }
.update-text h1 { font-size: 16px; } .update-text h2 { font-size: 14px; } .update-text h3 { font-size: 13px; }
.update-text ul, .update-text ol { margin: 4px 0 6px 20px; padding: 0; }
.update-text li { margin-bottom: 2px; }
.update-text strong { font-weight: 700; } .update-text em { font-style: italic; }
.update-text u { text-decoration: underline; } .update-text s { text-decoration: line-through; }
.update-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.update-card-header-left { display: flex; align-items: center; gap: 12px; }

/* Large traffic light dot for update header */
.tl-dot-lg { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px currentColor; }
.tl-dot-lg.green  { background: #16A34A; color: #16A34A22; }
.tl-dot-lg.orange { background: #D97706; color: #D9770622; }
.tl-dot-lg.red    { background: #DC2626; color: #DC262622; }

/* ── Logo upload ────────────────────────────────────────────────── */
.logo-preview { max-height: 60px; max-width: 200px; object-fit: contain; border-radius: 4px; border: 1px solid var(--border); padding: 4px; margin-top: 8px; display: block; }
.logo-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Settings page ──────────────────────────────────────────────── */
.settings-section { max-width: 600px; }
.settings-section + .settings-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ── Members list ──────────────────────────────────────────────── */
.member-list { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px 4px 4px; font-size: 12px; }
.member-chip .avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.member-chip .role { color: var(--text-muted); font-size: 11px; }
.member-chip .remove-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.member-chip .remove-btn:hover { color: var(--danger); }

/* ── Misc ──────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.risk-score { display: inline-block; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 700; text-align: center; line-height: 24px; }
.score-low { background: #DCFCE7; color: #166534; }
.score-medium { background: #FEF9C3; color: #713F12; }
.score-high { background: #FFEDD5; color: #9A3412; }
.score-critical { background: #FEE2E2; color: #991B1B; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { width: 200px; }
  #main { margin-left: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
