@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════
   PSU Plan System — Main CSS (redesign)
   ═══════════════════════════════════════ */
:root {
  --accent: #2b4a9e;
  --accent-soft: #eaeffb;
  --ink: #1b2333;
  --ink-2: #3d4659;
  --muted: #6b7385;
  --line: #e6e8ee;
  --line-2: #d6dae3;
  --bg: #f5f6f9;
  --surface: #ffffff;
  --ok: #17803d;      --ok-soft: #e6f4ec;
  --warn: #b26a00;    --warn-soft: #fdf1dc;
  --bad: #c0302b;     --bad-soft: #fbe9e8;
  --info: #1f6fb2;    --info-soft: #e5f0fa;
  --idle: #6b7385;    --idle-soft: #eef0f4;
  --lv-plan: #2b4a9e; --lv-obj: #0e7490; --lv-str: #3f7d20; --lv-kpi: #a8590a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20,28,45,.05);
  --primary: var(--accent);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Sans Thai", "Sarabun", system-ui, sans-serif;
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 { font-family: inherit; font-weight: 600; color: var(--ink); }
a, button, .btn { font-family: inherit !important; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.text-muted { color: var(--muted) !important; }
.num { font-variant-numeric: tabular-nums; }

/* ── Loading / Toast ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.82); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; z-index: 9999;
}
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.loading-text { margin-top: 12px; color: var(--ink-2); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
.ng-loading-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 99999; }
.ng-loading-bar-inner { height: 100%; background: var(--accent); transition: width .3s ease; }

.toast-container { position: fixed; top: 70px; right: 18px; z-index: 9998; min-width: 280px; }
.toast-msg {
  padding: 11px 14px; border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; font-size: 13px; box-shadow: 0 6px 20px rgba(20,28,45,.2);
  animation: slideIn .25s ease;
}
.toast-msg.success i { color: #6ee7a0; } .toast-msg.error i { color: #ff9b95; }
.toast-msg.warning i { color: #ffd37a; } .toast-msg.info i { color: #9cc9f5; }
@keyframes slideIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Buttons ── */
.btn { border-radius: 8px; font-size: 13px; font-weight: 500; padding: 6px 14px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary, .btn-success { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-success:hover, .btn-primary:focus, .btn-success:focus { background: var(--accent); border-color: var(--accent); filter: brightness(.92); }
.btn-outline-primary { color: var(--accent); border-color: var(--line-2); background: #fff; }
.btn-outline-primary:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn-outline-secondary { color: var(--ink-2); border-color: var(--line-2); background: #fff; }
.btn-outline-secondary:hover { background: var(--idle-soft); color: var(--ink); border-color: var(--line-2); }
.btn-secondary { background: var(--idle-soft); border-color: var(--idle-soft); color: var(--ink-2); }
.btn-secondary:hover { background: var(--line); border-color: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; border: 0; color: var(--muted); padding: 4px 8px; }
.btn-ghost:hover { background: var(--idle-soft); color: var(--ink); }

.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; padding: 0; cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--idle-soft); color: var(--ink); }
.icon-btn.view:hover { background: var(--info-soft); color: var(--info); }
.icon-btn.edit:hover { background: var(--warn-soft); color: var(--warn); }
.icon-btn.del:hover  { background: var(--bad-soft); color: var(--bad); }
.icon-btn.add:hover  { background: var(--ok-soft); color: var(--ok); }

/* ── Login (split) ── */
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.login-brand {
  background: #1f2f57; color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; right: -140px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%;
  border: 56px solid rgba(255,255,255,.06);
}
.login-brand .brand-logo { height: 64px; width: auto; filter: brightness(0) invert(1); align-self: flex-start; }
.login-brand h1 { color: #fff; font-size: 38px; line-height: 1.25; font-weight: 600; margin: 0 0 16px; max-width: 520px; }
.login-brand p { color: rgba(255,255,255,.72); font-size: 16px; margin: 0; max-width: 460px; }
.login-brand .brand-foot { color: rgba(255,255,255,.55); font-size: 13px; position: relative; z-index: 1; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--bg); }
.login-panel { width: 100%; max-width: 440px; }
.login-panel h2 { font-size: 22px; margin: 0 0 4px; }
.login-panel .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.faculty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.faculty-card {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 10px 12px; cursor: pointer;
  background: #fff; text-align: center; transition: border-color .15s, box-shadow .15s;
}
.faculty-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.faculty-card.selected { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.faculty-card img { width: 72px; height: 44px; object-fit: contain; margin-bottom: 8px; }
.faculty-card .fc-name { font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--ink-2); }
.login-error {
  background: var(--bad-soft); color: #8f241f; border-radius: 8px; padding: 10px 14px; font-size: 13px;
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; white-space: pre-line;
}
.btn-back { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 0; margin-bottom: 14px; display: inline-flex; gap: 6px; align-items: center; }
.btn-back:hover { color: var(--ink); }
.selected-faculty-badge {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); margin-bottom: 20px;
}
.selected-faculty-badge img { width: 56px; height: 36px; object-fit: contain; }
.selected-faculty-badge small { color: var(--muted); display: block; font-size: 12px; }
.selected-faculty-badge strong { font-weight: 600; }
.google-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.google-signin-hint { font-size: 13px; color: var(--muted); text-align: center; }
#googleBtn { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; }
  .login-brand { padding: 32px 28px; min-height: 240px; }
  .login-brand h1 { font-size: 26px; }
}

/* ── App layout ── */
.app-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; min-height: 100vh; position: fixed; inset: 0 auto 0 0; z-index: 1000;
  background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.sidebar-brand { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.sidebar-brand img.fac-logo { height: 36px; max-width: 100%; object-fit: contain; object-position: left; display: block; margin-bottom: 10px; }
.sidebar-brand .sys-name { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sidebar-brand .fac-name { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.nav-section-title { color: var(--muted); font-size: 12px; font-weight: 500; padding: 14px 10px 4px; }
.sidebar-nav .nav-link {
  color: var(--ink-2); padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-size: 13.5px; margin-bottom: 1px;
}
.sidebar-nav .nav-link i { font-size: 16px; color: var(--muted); width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover { background: var(--idle-soft); color: var(--ink); }
.sidebar-nav .nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-nav .nav-link.active i { color: var(--accent); }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--line); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-user img, .sidebar-user .ph {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0;
}
.sidebar-user .u-name { font-size: 13px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .u-role { font-size: 11.5px; color: var(--muted); }

.main-content { margin-left: 248px; flex: 1; min-width: 0; min-height: 100vh; }
.topbar {
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px); height: 56px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 100; gap: 14px;
}
.topbar-title { font-weight: 600; font-size: 15px; flex: 1; display: flex; align-items: center; gap: 8px; }
.topbar-title i { color: var(--muted); }
.topbar .year-select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.topbar .year-select select {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 28px 4px 10px; font-size: 13px; font-weight: 500;
  background-color: #fff; color: var(--ink);
}
.topbar .updated { font-size: 12px; color: var(--muted); }
.page-content { padding: 24px; max-width: 1400px; }

/* ── Page header / Cards ── */
.page-header { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-header h3 { font-size: 21px; font-weight: 600; margin: 0 0 2px; }
.page-header p { color: var(--muted); margin: 0; font-size: 13px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-header h6 { margin: 0; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card-header h6 i { color: var(--muted); }
.card-body { padding: 16px; }
.section-note { font-size: 12.5px; color: var(--muted); }

/* Stat */
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; height: 100%; }
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 600; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Table */
.table { font-size: 13px; --bs-table-bg: transparent; }
.table th { font-weight: 500; color: var(--muted); font-size: 12px; white-space: nowrap; background: #fafbfc; border-bottom: 1px solid var(--line); }
.table td { vertical-align: middle; color: var(--ink-2); border-color: var(--line); }
.table-hover > tbody > tr:hover > * { background: #f9fafc; }
.progress { height: 6px; border-radius: 4px; background: var(--idle-soft); }
.progress-bar { border-radius: 4px; }

/* Badges / chips */
.badge-status, .chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 12px;
  font-weight: 500; line-height: 1.5; background: var(--idle-soft); color: var(--ink-2); white-space: nowrap;
}
.chip i { font-size: 12px; }
.chip.ok, .badge-success { background: var(--ok-soft); color: var(--ok); }
.chip.warn, .badge-warning { background: var(--warn-soft); color: var(--warn); }
.chip.bad, .badge-danger { background: var(--bad-soft); color: var(--bad); }
.chip.info, .badge-info { background: var(--info-soft); color: var(--info); }
.chip.idle, .badge-gray { background: var(--idle-soft); color: var(--idle); }
.chip.outline { background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); }
.badge.bg-success { background: var(--ok-soft) !important; color: var(--ok) !important; font-weight: 500; }
.badge.bg-warning { background: var(--warn-soft) !important; color: var(--warn) !important; font-weight: 500; }
.badge.bg-danger { background: var(--bad-soft) !important; color: var(--bad) !important; font-weight: 500; }
.badge.bg-secondary { background: var(--idle-soft) !important; color: var(--idle) !important; font-weight: 500; }
.badge.bg-primary, .badge.bg-info { background: var(--info-soft) !important; color: var(--info) !important; font-weight: 500; }
.badge.bg-light { background: var(--idle-soft) !important; color: var(--ink-2) !important; font-weight: 500; }
.badge { font-weight: 500; }

.tag { /* ป้ายระดับลำดับชั้น เช่น SO / กลยุทธ์ */
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 5px; margin-right: 6px; vertical-align: 1px;
}
.tag.so { background: #1f2f57; color: #fff; }
.tag.sc { background: #e8ecf8; color: #2b4a9e; } .tag.sa { background: #e3f1f5; color: #0e7490; } .tag.sop { background: #eaf3e3; color: #3f7d20; }
.tag.lv-plan { background: #e8ecf8; color: var(--lv-plan); }
.tag.lv-obj  { background: #e0f1f5; color: var(--lv-obj); }
.tag.lv-str  { background: #e8f3e1; color: var(--lv-str); }
.tag.lv-kpi  { background: #fbeee0; color: var(--lv-kpi); }

/* Forms */
.form-label { font-weight: 500; color: var(--ink-2); font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 13.5px; border-color: var(--line-2); border-radius: 8px; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-control[readonly] { background: #f6f7fa; color: var(--ink-2); }
.form-section-title { font-weight: 600; font-size: 14px; margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.form-section-title:first-child { margin-top: 0; }
.form-section-title i { color: var(--muted); }
.month-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Modal */
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(20,28,45,.25); }
.modal-header { border-bottom: 1px solid var(--line); padding: 16px 22px; background: #fff !important; color: var(--ink) !important; }
.modal-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.modal-title i { color: var(--accent); }
.modal-header .btn-close { filter: none !important; }
.modal-body { max-height: 74vh; overflow-y: auto; padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--line); padding: 12px 22px; }

/* Tabs (pill) */
.nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; padding: 9px 14px; font-size: 13.5px; border-radius: 0; display: flex; align-items: center; gap: 7px; }
.nav-tabs .nav-link:hover { color: var(--ink); }
.nav-tabs .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }

/* Segmented filter */
.seg { display: inline-flex; background: var(--idle-soft); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 7px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.seg button.active { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(20,28,45,.12); }
.seg button:hover:not(.active) { color: var(--ink); }

/* ── Accordion tree (แผนยุทธศาสตร์ / แผนปฏิบัติการ) ── */
.plan-acc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow); }
.plan-acc-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; border-left: 4px solid var(--lv-plan);
}
.plan-acc-head:hover { background: #fafbfd; }
.plan-acc-head .chev { color: var(--muted); font-size: 16px; transition: transform .2s; }
.plan-acc.open .plan-acc-head .chev { transform: rotate(90deg); }
.plan-acc-title { font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.plan-acc-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.plan-acc-body { padding: 4px 16px 16px 16px; border-top: 1px solid var(--line); background: #fcfcfd; }
.head-actions { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }

.tree-node { position: relative; margin-top: 12px; }
.tree-node .node-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.tree-node .node-main { flex: 1; min-width: 0; }
.tree-children { margin-left: 14px; padding-left: 18px; border-left: 2px solid var(--line); }
.node-obj > .node-row { padding: 2px 0 2px 12px; }
.node-str > .node-row { padding: 2px 0 2px 12px; }
.node-title { font-weight: 500; font-size: 14px; line-height: 1.5; }
.node-obj > .node-row .node-title { font-weight: 600; }
.node-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi-row {
  display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; margin-top: 8px;
}
.empty-line { font-size: 13px; color: var(--muted); padding: 8px 0; display: flex; align-items: center; gap: 6px; }
.add-link { border: 1px dashed var(--line-2); background: transparent; color: var(--ink-2); border-radius: 8px; font-size: 12.5px; padding: 4px 10px; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.add-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Project cards */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; margin-top: 8px; }
.proj-card { background: #edf5ff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.proj-card:hover { border-color: var(--line-2); box-shadow: 0 4px 14px rgba(20,28,45,.07); }
.proj-card .p-title { font-weight: 600; font-size: 14px; line-height: 1.45; }
.proj-card .p-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.proj-card .p-meta i { margin-right: 4px; }
.proj-card .p-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; }
.proj-card .p-budget { font-weight: 600; font-variant-numeric: tabular-nums; }
.proj-card .p-budget small { font-weight: 400; color: var(--muted); }
.card-actions { display: flex; gap: 2px; }

/* Source rows (budget) */
.source-row { display: grid; grid-template-columns: 1fr 180px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.budget-total { display: flex; justify-content: space-between; align-items: center; background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-weight: 600; }

/* Read-only context in action modal */
.ctx-stack { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fafbfc; }

/* ── Dashboard ── */
.dash-tabs-loading { padding: 56px 0; text-align: center; }
.loadbar { width: min(420px, 80%); height: 8px; background: var(--idle-soft); border-radius: 6px; margin: 14px auto 8px; overflow: hidden; }
.loadbar > div { height: 100%; background: var(--accent); border-radius: 6px; transition: width .08s linear; }
.loadpct { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.loadlabel { color: var(--muted); font-size: 13px; }
.meter { height: 8px; background: var(--idle-soft); border-radius: 6px; overflow: hidden; min-width: 80px; }
.meter > div { height: 100%; border-radius: 6px; }
.meter.good > div { background: var(--ok); } .meter.warn > div { background: var(--warn); } .meter.bad > div { background: var(--bad); } .meter.none > div { background: var(--line-2); }
.pct-text.good { color: var(--ok); } .pct-text.warn { color: var(--warn); } .pct-text.bad { color: var(--bad); } .pct-text.none { color: var(--muted); }
.score-big { font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.risk-tile { cursor: pointer; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; text-align: left; width: 100%; transition: border-color .15s; }
.risk-tile:hover { border-color: var(--line-2); }
.risk-tile.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.risk-tile .rt-n { font-size: 24px; font-weight: 600; line-height: 1.1; }
.risk-tile .rt-l { font-size: 12.5px; color: var(--muted); }
.ai-box { background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 13.5px; line-height: 1.7; }
.ai-box .ai-h { font-weight: 600; margin-top: 8px; color: var(--ink); }
.ai-box .ai-li { padding-left: 14px; position: relative; } .ai-box .ai-li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.ai-box .ai-num { padding-left: 0; } .ai-box .ai-num::before { display: none; } .ai-box .ai-num span { color: var(--muted); margin-right: 6px; }
.ai-box .ai-gap { height: 6px; }
.group-row td { background: #f2f4f9 !important; font-weight: 600; color: var(--ink); font-size: 13px; }
.crumb { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin-top: 2px; line-height: 1.5; }
.crumb i { font-size: 10px; color: #aab0bf; }
.method-box { font-size: 13px; color: var(--ink-2); background: #f7f8fc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.method-box li { margin-bottom: 2px; }

/* misc */
.ng-view-wrap { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.empty-state { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty-state i { font-size: 28px; display: block; margin-bottom: 6px; color: #b5bbc9; }
@media (max-width: 991px) {
  .sidebar { position: static; width: 100%; min-height: 0; }
  .app-wrapper { flex-direction: column; }
  .main-content { margin-left: 0; }
}
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin: 0; } .page-content { padding: 0; }
}

/* ── Legacy: ใช้เฉพาะ views/strategic.old.html (ไว้เทียบดีไซน์เดิม) ── */
.strategic-header { background: linear-gradient(135deg, #1a56db, #7e3af2); color: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.strategic-body { border: 2px solid #e2e8f0; border-radius: 0 0 12px 12px; margin-top: -10px; padding: 16px; background: #fff; margin-bottom: 16px; }
.objective-block { border: 1px solid #bfdbfe; border-radius: 10px; margin-bottom: 14px; overflow: hidden; background: #f8faff; }
.objective-block-header { background: #eff6ff; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #bfdbfe; }
.objective-block-body { padding: 12px 16px; }
.strategy-row { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; background: #fff; display: flex; align-items: flex-start; justify-content: space-between; }
.str-badge { display: inline-block; background: #f0fdf4; color: #057a55; border: 1px solid #bbf7d0; border-radius: 20px; padding: 1px 8px; font-size: 10px; font-weight: 700; margin-right: 6px; }
.kpi-badge { display: inline-block; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 20px; padding: 1px 8px; font-size: 10px; font-weight: 700; }
