/**
 * @file    style.css
 * @brief   RTU Web Manager — Dark Industrial Dashboard Stylesheet
 */

/* ============================================================
   Design Tokens (CSS Variables)
   ============================================================ */
:root {
  --bg-deep:    #0a0f16;
  --bg-card:    #111922;
  --bg-surface: #192230;
  --bg-hover:   #1e2a3a;
  --bg-input:   #0d1520;
  --border:     #1e3040;
  --border-accent: #1a4a60;
  --text-primary:   #e4ecf2;
  --text-secondary: #8899aa;
  --text-muted:     #556677;
  --accent:     #00d4aa;
  --accent-glow: rgba(0,212,170,0.15);
  --accent2:    #00a8e8;
  --danger:     #ff4757;
  --warning:    #ffa502;
  --success:    #2ed573;
  --online:     #2ed573;
  --offline:    #ff4757;
  --nav-width:  240px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --transition: 180ms ease-out;
  --font-ui:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ============================================================
   Reset & Base
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-deep);
  display: flex;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============================================================
   Navigation Sidebar
   ============================================================ */
#nav-sidebar {
  width: var(--nav-width); min-width: var(--nav-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; transition: transform var(--transition);
}
.nav-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
}
.nav-logo svg { flex-shrink: 0; }
.nav-status {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 12px; color: var(--text-secondary);
}
.nav-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  transition: background var(--transition);
}
.nav-status-dot.connected    { background: var(--online); box-shadow: 0 0 8px var(--online); }
.nav-status-dot.disconnected { background: var(--offline); }
.nav-status-dot.connecting   { background: var(--warning); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.nav-section-title {
  padding: 16px 20px 6px;
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-muted); font-weight: 600;
}
#nav-links { flex: 1; overflow-y: auto; padding: 4px 0; }
#nav-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; margin: 1px 8px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
  transition: all var(--transition); cursor: pointer; position: relative;
}
#nav-links a:hover { background: var(--bg-hover); color: var(--text-primary); }
#nav-links a.active {
  background: var(--accent-glow); color: var(--accent); font-weight: 600;
}
#nav-links a.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.icon-svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.6; margin-right: 2px; }
#nav-links a.active .icon-svg { opacity: 1; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.65; }
#nav-links a.active .nav-icon { opacity: 1; color: var(--accent); }

/* ---- Language Switcher (Dropdown) ---- */
.nav-lang {
  padding: 10px 20px; border-top: 1px solid var(--border);
}
.lang-select {
  width: 100%; padding: 7px 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 12px; font-family: var(--font-ui); cursor: pointer;
  transition: border-color var(--transition);
}
.lang-select:focus { outline: none; border-color: var(--accent); }

.nav-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted);
  display: flex; justify-content: space-between;
}

/* ============================================================
   Mobile Toggle
   ============================================================ */
#nav-toggle {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 36px; height: 36px; border: 1px solid var(--border);
  background: var(--bg-card); border-radius: var(--radius-sm);
  color: var(--text-primary); cursor: pointer; align-items: center; justify-content: center;
}

/* ============================================================
   Main Content
   ============================================================ */
#main-content {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
}
#page-header {
  padding: 16px 28px; border-bottom: 1px solid var(--border);
  background: var(--bg-card); display: flex; align-items: center; gap: 12px;
  min-height: 56px;
}
#page-title { font-size: 17px; font-weight: 700; }
#page-subtitle { font-size: 12px; color: var(--text-secondary); margin-left: 8px; }
#page-container { flex: 1; overflow-y: auto; padding: 24px 28px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-accent); }
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; font-weight: 600; font-size: 15px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  background: var(--bg-surface); color: var(--text-primary);
  font-family: var(--font-ui);
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #00e6bc; box-shadow: 0 0 16px var(--accent-glow); }
.btn-danger  { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover  { background: rgba(255,71,87,0.12); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px; line-height: 1; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; }
.form-input, .form-select {
  width: 100%; padding: 9px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 13px; font-family: var(--font-ui);
  transition: border-color var(--transition);
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.signal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.signal-table th {
  background: var(--bg-surface); padding: 10px 14px;
  text-align: left; font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}
.signal-table td { padding: 9px 14px; border-bottom: 1px solid rgba(30,48,64,0.6); }
.signal-table tbody tr { transition: background var(--transition); }
.signal-table tbody tr:hover { background: var(--bg-hover); }
.signal-table .empty-row td { text-align: center; color: var(--text-muted); padding: 40px; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.cell-desc { color: var(--text-secondary); font-size: 12px; }
.cell-val { font-family: var(--font-mono); font-weight: 600; }
.cell-val.changed { animation: flash-val 0.6s ease-out; }
@keyframes flash-val { 0% { color: var(--accent); } 100% { color: inherit; } }

/* ============================================================
   Dashboard Cards
   ============================================================ */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dash-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px; cursor: pointer;
  transition: all var(--transition);
}
.dash-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.dash-card-icon { margin-bottom: 10px; }
.dash-card-count { font-size: 32px; font-weight: 700; color: var(--accent); }
.dash-card-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; animation: fadeIn 0.15s ease-out;
}
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  width: 90%; max-width: 480px; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow); animation: slideUp 0.2s ease-out;
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   Toast
   ============================================================ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-md); font-size: 13px;
  font-weight: 500; animation: slideIn 0.25s ease-out;
  box-shadow: var(--shadow); max-width: 360px;
}
.toast-success { background: #0d3320; border: 1px solid var(--success); color: var(--success); }
.toast-error   { background: #330d15; border: 1px solid var(--danger); color: var(--danger); }
.toast-info    { background: #0d2033; border: 1px solid var(--accent2); color: var(--accent2); }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============================================================
   Terminal — 命令面板 + 输出窗口 + 输入框
   ============================================================ */
.terminal-wrap {
  background: #0a0d12; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column;
  height: calc(100vh - 180px); min-height: 400px;
}
.terminal-output {
  flex: 1; overflow-y: auto; padding: 16px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  color: #a0d0a0; white-space: pre-wrap; word-break: break-all;
}
/* 输入框行 */
.terminal-input-row {
  display: flex; border-top: 1px solid var(--border); background: var(--bg-input);
}
.terminal-prompt {
  padding: 10px 12px; color: var(--accent); font-family: var(--font-mono);
  font-size: 13px; user-select: none; white-space: nowrap;
}
.terminal-input {
  flex: 1; background: transparent; border: none; color: #c0e0c0;
  font-family: var(--font-mono); font-size: 13px; padding: 10px 8px; outline: none;
}
/* 命令面板 */
.cmd-panels {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  overflow-y: auto; max-height: 260px;
}
.cmd-group {
  margin-bottom: 10px;
}
.cmd-group-title {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  margin-bottom: 6px; padding-left: 2px;
}
.cmd-group-btns {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.cmd-btn {
  padding: 6px 14px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
  text-align: left; line-height: 1.4;
}
.cmd-btn:hover {
  border-color: var(--accent); background: rgba(0,173,181,0.08);
}
.cmd-btn-name {
  display: block; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-primary); font-weight: 600;
}
.cmd-btn-desc {
  display: block; font-family: var(--font-sans); font-size: 10px;
  color: var(--text-muted); margin-top: 2px;
}

/* ============================================================
   Datacenter
   ============================================================ */
.dc-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dc-tab-bar { display: flex; gap: 4px; }
.dc-tab {
  padding: 6px 16px; border-radius: 6px; font-size: 12px; font-family: var(--font-mono);
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
}
.dc-tab:hover { border-color: var(--accent); }
.dc-tab.active { background: var(--accent); color: var(--bg-deep); border-color: var(--accent); }
.dc-search {
  padding: 6px 12px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text-primary); width: 220px;
}
.dc-search:focus { outline: none; border-color: var(--accent); }
.dc-count { font-size: 12px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.dc-sel-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,212,170,0.08); border: 1px solid var(--accent);
  border-radius: var(--radius-md); padding: 8px 16px; margin-bottom: 12px;
}
.dc-sel-label { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ============================================================
   PLC Debug
   ============================================================ */
.plc-debug-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 16px; }
.plc-col { min-width: 0; }
.plc-sig-col { border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0 8px; }
.plc-sig-list { max-height: 65vh; overflow-y: auto; }
.plc-led {
  width: 28px; height: 28px; border-radius: 50%; background: #3a3a3a;
  border: 2px solid #555; cursor: pointer; flex-shrink: 0;
  transition: all 0.3s; box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.plc-led-on { background: #0f0; border-color: #4f4; box-shadow: 0 0 12px rgba(0,255,0,0.6); }
.plc-btn-icon {
  width: 32px; height: 32px; border-radius: 6px; background: var(--bg-surface);
  border: 1px solid var(--border); cursor: pointer; flex-shrink: 0;
  font-size: 16px; color: var(--text-secondary); transition: all 0.2s;
}
.plc-btn-icon:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.1); }
.plc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.plc-item:hover { background: rgba(255,255,255,0.02); }
.plc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plc-saddr { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); word-break: break-all; }
.plc-arrow-row { display: flex; gap: 4px; margin-left: auto; }
.plc-pick-row {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.plc-pick-row:hover { background: rgba(0,212,170,0.06); }
@media (max-width: 768px) { .plc-debug-grid { grid-template-columns: 1fr; } .plc-sig-col { border: none; padding: 0; } }

/* ============================================================
   Monitor
   ============================================================ */
.monitor-stats { display: flex; gap: 16px; margin-bottom: 16px; }
.monitor-stat {
  background: var(--bg-surface); padding: 12px 20px; border-radius: var(--radius-md);
  border: 1px solid var(--border); font-size: 12px;
}
.monitor-stat-val { font-size: 24px; font-weight: 700; color: var(--accent); }
.monitor-list {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow-y: auto;
  max-height: calc(100vh - 220px); font-family: var(--font-mono); font-size: 12px;
}
.monitor-item { padding: 6px 16px; border-bottom: 1px solid rgba(30,48,64,0.4); display: flex; gap: 10px; }
.monitor-dir { width: 20px; flex-shrink: 0; font-weight: 700; }
.monitor-dir.up   { color: var(--accent2); }
.monitor-dir.down { color: var(--accent); }
.monitor-ts { color: var(--text-muted); flex-shrink: 0; width: 80px; }
.monitor-msg { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.monitor-msg:hover { color: var(--text-primary); white-space: pre-wrap; }

/* ============================================================
   PLC
   ============================================================ */

/* ---- PLC Debug 三列布局 ---- */
.plc-debug-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  height: calc(100vh - 200px);
  min-height: 500px;
}
.plc-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-y: auto;
  padding: 0;
}
.plc-sig-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-y: auto;
  padding: 0;
  display: flex; flex-direction: column;
}
.plc-col-title {
  padding: 12px 14px 8px;
  font-size: 13px; font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  position: sticky; top: 0; z-index: 1;
}
.plc-empty { text-align: center; color: var(--text-muted); padding: 30px 10px; font-size: 12px; }

.plc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid rgba(30,48,64,0.4);
  transition: background 0.15s;
}
.plc-item:hover { background: var(--bg-hover); }
.plc-cb { flex-shrink: 0; accent-color: var(--accent); }

.plc-debug-led {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  background: #3a3e4a; cursor: pointer; flex-shrink: 0;
  transition: all 0.2s;
}
.plc-debug-led-on { background: #2ed573; box-shadow: 0 0 12px rgba(46,213,115,0.6); }
.plc-debug-btn {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-primary); cursor: pointer; flex-shrink: 0;
  font-size: 11px; font-weight: 600; text-align: center; min-width: 50px;
  transition: all 0.15s;
}
.plc-debug-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.plc-item-info { flex: 1; min-width: 0; font-size: 11px; }
.plc-item-saddr { font-family: var(--font-mono); color: var(--accent); font-size: 11px; }
.plc-item-val { margin-left: 4px; font-weight: 600; font-size: 10px; }

/* ---- PLC Signal List ---- */
.plc-arrow-row { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.plc-sig-list { flex: 1; overflow-y: auto; }
.plc-sig-check-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-bottom: 1px solid rgba(30,48,64,0.3);
  cursor: pointer; transition: background 0.15s;
}
.plc-sig-check-item:hover { background: var(--bg-hover); }
.plc-sig-cb { flex-shrink: 0; accent-color: var(--accent2); }
.plc-sig-saddr { flex: 1; font-family: var(--font-mono); font-size: 11px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plc-sig-desc { font-size: 10px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plc-sig-val { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); flex-shrink: 0; }

/* ---- PLC Signal Picker Modal Row ---- */
.plc-sig-row:hover { background: var(--bg-hover); }

/* ---- Mobile: stack PLC debug columns ---- */
@media (max-width: 768px) {
  .plc-debug-grid { grid-template-columns: 1fr; height: auto; }
}

/* ---- PLC Config Canvas & Chain Tabs ---- */
.chain-tabs {
  display: flex; gap: 4px; padding: 6px 0 0;
  flex-wrap: wrap; border-bottom: 1px solid var(--border);
}
.chain-tab {
  padding: 6px 14px; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  border: 1px solid transparent; border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition);
  font-family: var(--font-mono);
}
.chain-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.chain-tab.active {
  color: var(--accent); background: var(--bg-surface);
  border-color: var(--border); font-weight: 600;
}
.plc-canvas-wrap {
  display: block; width: 100%; height: 500px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f0f2f5;
  cursor: crosshair;
  margin-top: 0;
}
.plc-zoom-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px; background: var(--bg-surface);
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 12px; color: var(--text-secondary);
}
.plc-zoom-bar span {
  cursor: pointer; padding: 2px 8px; border-radius: 3px;
  transition: all var(--transition);
}
.plc-zoom-bar span:hover { color: var(--accent); background: var(--bg-hover); }
#plc-zoom-val { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }

/* ============================================================
   PLC Config (stub - preserved for backward compat)
   ============================================================ */
.plc-canvas-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-wrap {
  display: flex; align-items: center; justify-content: center;
  height: 100vh; width: 100vw;
  background: radial-gradient(ellipse at center, #111d2b 0%, var(--bg-deep) 70%);
}
.login-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; width: 360px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
.login-box h1 { text-align: center; margin-bottom: 28px; font-size: 22px; font-weight: 700; }
.login-box .btn { width: 100%; justify-content: center; margin-top: 20px; padding: 12px; font-size: 14px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  #nav-sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
  #nav-sidebar.open { transform: translateX(0); }
  #nav-toggle { display: flex; }
  #main-content { margin-left: 0 !important; }
  #page-container { padding: 16px; }
  #page-header { padding: 12px 16px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
