/* PayXip Admin v3 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --bg-input: #ffffff;
  --bg-code: #f5f6f7;
  --bg-modal: #ffffff;
  --bg-overlay: rgba(0,0,0,0.3);
  --bg-header: rgba(255,255,255,0.85);
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --accent: #18181b;
  --accent-bg: #18181b;
  --accent-text: #ffffff;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --green: #059669;
  --red: #dc2626;
  --amber: #d97706;
  --focus-ring: #18181b;
  --scrollbar: #d4d4d8;
  --selection-bg: #e4e4e7;
  --nav-active-bg: #18181b;
  --nav-active-text: #ffffff;
  --stat-value: #18181b;
  --toast-bg: #18181b;
  --sidebar-w: 232px;
  --radius: 8px;
  --radius-sm: 6px;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-card: #111113;
  --bg-card-hover: #18181b;
  --bg-input: #111113;
  --bg-code: #0a0a0b;
  --bg-modal: #111113;
  --bg-overlay: rgba(0,0,0,0.75);
  --bg-header: rgba(9,9,11,0.85);
  --border: #222226;
  --border-light: #1a1a1e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --accent: #fafafa;
  --accent-bg: #fafafa;
  --accent-text: #09090b;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;
  --green: #10b981;
  --red: #f87171;
  --amber: #fbbf24;
  --focus-ring: #52525b;
  --scrollbar: #222226;
  --selection-bg: #222226;
  --nav-active-bg: #fafafa;
  --nav-active-text: #09090b;
  --stat-value: #fafafa;
  --toast-bg: #27272a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; font-size: 14px; }
::selection { background: var(--selection-bg); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* ── Auth ── */
.auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 40px 36px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; justify-content: center; }
.auth-logo svg { width: 32px; height: 32px; }
.auth-logo span { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.auth-badge { font-size: 9px; font-weight: 700; background: var(--accent-bg); color: var(--accent-text); padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.03em; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-error { background: rgba(220,38,38,0.06); border: 1px solid rgba(220,38,38,0.15); color: var(--red); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.auth-step { display: none; }
.auth-step.active { display: block; }

.totp-input { display: flex; gap: 8px; margin: 24px 0; justify-content: center; }
.totp-input input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); outline: none; transition: all 0.15s; box-shadow: var(--shadow-sm); }
.totp-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24,24,27,0.1); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: all 0.15s; box-shadow: var(--shadow-sm); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24,24,27,0.08); }
.form-input::placeholder { color: var(--text-tertiary); }
.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--accent-bg); color: var(--accent-text); width: 100%; box-shadow: var(--shadow); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(220,38,38,0.2); }
.btn-danger:hover { background: rgba(220,38,38,0.06); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 6px 10px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 16px; }
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text); }
.btn-icon { background: transparent; border: none; color: var(--text-tertiary); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); display: flex; align-items: center; position: relative; }
.btn-icon:hover { background: var(--bg-card-hover); color: var(--text); }
.btn-spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent-text); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Layout ── */
.dashboard-layout { display: flex; min-height: 100vh; overflow: hidden; }
.sidebar { width: var(--sidebar-w); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; background: var(--bg-card); border-right: 1px solid var(--border); }
.sidebar-header { padding: 20px 18px 16px; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo svg { width: 28px; height: 28px; }
.sidebar-logo span { font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.sidebar-nav { flex: 1; padding: 4px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 2px; }
.nav-section-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all 0.12s; margin-bottom: 1px; }
.nav-item:hover { background: var(--bg-card-hover); color: var(--text); }
.nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-text); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.5; }
.nav-item.active svg { opacity: 1; }
.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); }
.admin-badge { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.admin-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--accent-text); flex-shrink: 0; }
.admin-info { flex: 1; min-width: 0; }
.admin-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; font-weight: 600; letter-spacing: 0.04em; margin-top: 1px; }
.header-actions { display: flex; gap: 2px; }

/* ── Main ── */
.main-content { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; overflow-x: hidden; overflow-y: auto; max-width: calc(100vw - var(--sidebar-w)); }
.main-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-header); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 50; }
.page-title { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-right kbd { font-size: 10px; background: var(--border); padding: 2px 5px; border-radius: 3px; font-family: inherit; color: var(--text-tertiary); }

/* ── Live Badge ── */
.live-badge { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green); padding: 4px 10px; border-radius: 4px; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); }
.live-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Notification Bell ── */
.notif-badge { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.btn-icon.has-notifs { color: var(--amber); }
.notif-dropdown { position: fixed; bottom: 60px; left: 16px; width: 260px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; }
.notif-header { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.notif-title { font-size: 13px; font-weight: 600; }
.notif-status { font-size: 11px; color: var(--text-tertiary); }
.notif-body { max-height: 300px; overflow-y: auto; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid var(--border-light); }
.notif-item.critical { border-left: 3px solid var(--red); }
.notif-item-event { font-size: 12px; font-weight: 500; }
.notif-item-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 3px; }

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; }
.page-content { padding: 28px; max-width: 1400px; overflow: hidden; width: 100%; }
.page-section { margin-bottom: 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.stat-card { background: var(--bg-card); padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: box-shadow 0.15s; }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-label { font-size: 11px; font-weight: 500; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; color: var(--stat-value); line-height: 1; }
.stat-change { font-size: 12px; font-weight: 500; margin-top: 6px; display: inline-block; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── Tables ── */
.data-table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead { background: var(--bg-card-hover); border-bottom: 1px solid var(--border); }
.data-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); white-space: nowrap; color: var(--text-secondary); }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover { background: var(--bg-card-hover); }
.data-table tbody tr.clickable:hover td:first-child { color: var(--accent); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; padding: 48px 16px !important; color: var(--text-tertiary); font-size: 14px; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-green { background: rgba(5,150,105,0.1); color: var(--green); }
.badge-red { background: rgba(220,38,38,0.1); color: var(--red); }
.badge-yellow { background: rgba(217,119,6,0.1); color: var(--amber); }
.badge-blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-gray { background: var(--border-light); color: var(--text-tertiary); }
.badge-cod { background: rgba(217,119,6,0.08); color: var(--amber); }
.badge-online { background: rgba(59,130,246,0.08); color: #3b82f6; }

/* ── Settings ── */
.settings-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.settings-card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.settings-card-desc { font-size: 13px; color: var(--text-tertiary); margin-bottom: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }

/* ── Charts ── */
.chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.chart-header { margin-bottom: 16px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--text); }
.chart-canvas-wrap { height: 220px; position: relative; overflow: hidden; }
.chart-area { padding: 8px; }
.charts-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.pagination-info { font-size: 13px; color: var(--text-tertiary); }
.pagination-btns { display: flex; gap: 8px; }

/* ── Detail ── */
.detail-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.detail-body { padding: 22px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-tertiary); font-weight: 500; font-size: 12px; }
.detail-value { font-weight: 500; text-align: right; max-width: 60%; word-break: break-all; color: var(--text-secondary); }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; animation: slideIn 0.25s ease; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.toast-success { background: var(--toast-bg); color: var(--green); }
.toast-error { background: var(--toast-bg); color: var(--red); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Code ── */
.code-block { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 12px; color: var(--text-secondary); overflow-x: auto; white-space: pre-wrap; word-break: break-all; position: relative; }
.code-copy-btn { position: absolute; top: 8px; right: 8px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-tertiary); padding: 4px 10px; border-radius: 4px; font-size: 10px; cursor: pointer; font-family: inherit; }
.code-copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ── Filters ── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 160px; }
.search-input { flex: 1; min-width: 200px; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--bg-modal); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.modal-lg { max-width: 720px; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg-modal); z-index: 1; }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Store Bars ── */
.store-bar { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.store-bar:last-child { border-bottom: none; }
.store-bar-name { font-size: 13px; font-weight: 500; min-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-secondary); }
.store-bar-fill-wrap { flex: 1; height: 5px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.store-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.6s ease; }
.store-bar-value { font-size: 13px; font-weight: 600; color: var(--text-secondary); min-width: 90px; text-align: right; }

/* ── Donut ── */
.donut-wrap { display: flex; align-items: center; gap: 24px; padding: 8px; }
.donut-chart { width: 110px; height: 110px; flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-value { color: var(--text-tertiary); margin-left: auto; font-size: 12px; }

/* ── Theme Toggle ── */
.theme-toggle { width: 100%; background: var(--bg-card-hover); border: 1px solid var(--border); color: var(--text-secondary); padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-family: inherit; display: flex; align-items: center; gap: 8px; transition: all 0.12s; margin-top: 8px; }
.theme-toggle:hover { background: var(--border); color: var(--text); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ── Cmd+K Hint ── */
.cmdk-hint { font-size: 10px; color: var(--text-tertiary); text-align: center; margin-top: 8px; }

/* ── Command Palette ── */
.cmdk-overlay { display: none; position: fixed; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(4px); z-index: 2000; }
.cmdk-palette { display: none; position: fixed; top: 15%; left: 50%; transform: translateX(-50%); width: 100%; max-width: 540px; background: var(--bg-modal); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); z-index: 2001; overflow: hidden; }
.cmdk-input-wrap { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cmdk-input-wrap svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-tertiary); }
.cmdk-input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 15px; font-family: inherit; outline: none; }
.cmdk-input::placeholder { color: var(--text-tertiary); }
.cmdk-kbd { font-size: 10px; background: var(--border); padding: 2px 6px; border-radius: 4px; font-family: inherit; color: var(--text-tertiary); }
.cmdk-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.cmdk-group-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px 4px; }
.cmdk-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: background 0.1s; }
.cmdk-item:hover { background: var(--bg-card-hover); }
.cmdk-item-key { font-size: 14px; font-weight: 500; color: var(--text); }
.cmdk-item-desc { font-size: 12px; color: var(--text-tertiary); }
.cmdk-item-type { font-size: 14px; }
.cmdk-loading, .cmdk-empty { padding: 32px; text-align: center; font-size: 13px; color: var(--text-tertiary); }

/* ── Order Detail Modal ── */
.order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.order-detail-section { background: var(--bg-card-hover); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.order-detail-section-title { font-size: 12px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.order-detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span:first-child { color: var(--text-tertiary); font-size: 12px; min-width: 80px; }
.order-detail-row span:last-child { color: var(--text-secondary); text-align: right; }

/* ── Health page ── */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.status-banner.healthy { background: rgba(5,150,105,0.04); border-color: rgba(5,150,105,0.2); }
.status-banner.degraded { background: rgba(217,119,6,0.04); border-color: rgba(217,119,6,0.2); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot.healthy { background: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.status-dot.degraded { background: var(--amber); box-shadow: 0 0 0 3px rgba(217,119,6,0.15); }
.alert-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); }
.alert-item.warning { border-left: 3px solid var(--amber); }
.alert-item.critical { border-left: 3px solid var(--red); }

/* ── Loading Skeletons ── */
.skeleton { background: linear-gradient(90deg, var(--bg-card-hover) 25%, var(--border) 50%, var(--bg-card-hover) 75%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 4px; }
.skeleton-text { height: 12px; width: 100%; display: block; margin-bottom: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; max-width: 100vw; }
  .page-content { padding: 20px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .charts-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .cmdk-palette { top: 10%; max-width: 95vw; }
  .mobile-menu-btn { display: flex; }
}
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; border-radius: 6px; }
.mobile-menu-btn:hover { background: var(--bg-card-hover); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 99; }
.inline-form { display: flex; gap: 14px; flex-wrap: wrap; }
.inline-form .form-group { flex: 1; min-width: 140px; }
