:root {
    --navy: #0b2b5f;
    --blue: #1176d8;
    --bg: #f4f7fb;
    --card: #ffffff;
    --border: #e1e7f0;
    --text: #172033;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Tahoma, "Noto Sans Thai", sans-serif; background: var(--bg); color: var(--text); }
#appShell { min-height: 100vh; display: flex; }
.sidebar { width: 270px; background: #102a54; color: white; padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #1d7ee5; font-weight: 800; }
.brand-title { font-size: 18px; font-weight: 700; }
.brand-subtitle { font-size: 12px; opacity: .7; }
.main { flex: 1; min-width: 0; }
.content-panel { padding: 24px; }
#topToolbar { background: #fff; border-bottom: 1px solid var(--border); padding: 8px 18px; }
.dx-treeview-node { color: #fff; }
.dx-treeview-item { color: #fff; }
.dx-treeview-node.dx-state-selected > .dx-treeview-item { background: rgba(17,118,216,.25); }
.page-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
h1 { margin: 0 0 4px; font-size: 30px; }
p { margin: 0; color: #667085; }
.api-button { display: inline-block; text-decoration: none; color: white; background: var(--blue); padding: 10px 16px; border-radius: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.metric-card, .section-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(16,42,84,.05); }
.metric-label { font-size: 13px; color: #667085; }
.metric-value { font-size: 28px; font-weight: 800; margin: 8px 0; color: var(--navy); }
.metric-note { font-size: 13px; color: #667085; }
.section-card h2 { margin: 0 0 16px; font-size: 20px; }
@media (max-width: 900px) { .sidebar { width: 220px; } .metric-grid { grid-template-columns: 1fr; } }
