@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* ── custom.css ──
   Core Layout, UI Components, and Visual Polish
   Bound to variables defined in themes.css.
*/

/* ── Typography & Reset ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  background-color: var(--bg);
  transition: background-color 0.3s ease;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--body-bg-gradient);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Background overlay grid for subtle depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-overlay-color, transparent) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-overlay-color, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 80%, rgba(0,0,0,0) 100%);
  transition: background-image 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--blue) 25%, transparent);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--blue) 45%, transparent);
}

/* ── Layout Structure ────────────────────────────────── */
.sidebar {
  width: 250px;
  min-height: 100vh;
  background: var(--sidebar-gradient);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 40;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--ink);
  text-shadow: 0 0 10px var(--blue), 0 0 20px var(--blue), 0 0 40px var(--indigo), 0 0 80px var(--indigo);
  position: relative;
  transition: transform 0.3s ease;
  animation: sidebarGlitchFlicker 3s infinite;
}

.sidebar-logo::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  border-radius: 14px;
  transform: rotate(45deg);
  animation: sidebarHexRotate 8s linear infinite;
}

.sidebar-logo::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--cyan);
  z-index: -1;
  animation: sidebarGlitchShift 2s infinite;
}

@keyframes sidebarGlitchFlicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.8; transform: translateX(2px); }
  97% { opacity: 1; transform: translateX(-2px); }
  98% { opacity: 0.9; transform: translateX(1px); }
}

@keyframes sidebarGlitchShift {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(2px, -1px); }
}

@keyframes sidebarHexRotate {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}

.sidebar:hover .sidebar-logo {
  transform: scale(1.1);
  text-shadow: 0 0 15px var(--blue), 0 0 30px var(--blue), 0 0 60px var(--indigo);
}

.sidebar-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--shadow-glow, rgba(59, 130, 246, 0.4));
}

.sidebar-sub {
  font-family: 'Orbitron', sans-serif;
  font-size: 8.5px;
  color: var(--cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 2px;
  text-shadow: 0 0 6px color-mix(in srgb, var(--cyan) 30%, transparent);
}

.sidebar-section {
  padding: 16px 12px 4px;
}

.sidebar-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 10px;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* Nav Links Styling */
.nav-link, .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 10px;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before, .nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 3px;
  background: var(--blue);
  border-radius: 0 4px 4px 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::before, .nav-item:hover::before {
  transform: scaleX(1);
}

.nav-link svg, .nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover, .nav-item:hover {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-soft));
  border-color: var(--border);
  color: var(--ink);
  transform: translateX(4px);
}

.nav-link:hover svg, .nav-item:hover svg {
  transform: scale(1.1);
  opacity: 1;
}

.nav-link.active, .nav-item.active {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-glow);
}

.nav-link.active::before, .nav-item.active::before {
  background: #FFFFFF;
  transform: scaleX(1);
}

.nav-link.active svg, .nav-item.active svg {
  opacity: 1;
  color: #FFFFFF;
}

.nav-badge {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.sidebar-uname {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.sidebar-urole {
  font-size: 10px;
  color: var(--muted);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  background: none;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

/* Main Content Area */
.main-wrap {
  margin-left: 250px;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.top-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.period-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-soft));
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  transition: all 0.2s ease;
}

.page {
  flex: 1;
  padding: 24px 32px 48px;
  position: relative;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ── Cards & Panels ──────────────────────────────────── */
.card, .dash-panel, .stat-card, .scard, .bot-card, .command-card, .result-card {
  background: var(--surface) !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease,
              background 0.3s ease;
}

/* Subtle micro-animation to feel alive */
.card:hover, .stat-card:hover, .scard:hover, .bot-card:hover, .command-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: var(--border-strong);
}

.card-head, .card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-solid) 95%, var(--blue) 5%), var(--surface-soft));
  transition: background 0.3s ease, border-color 0.3s ease;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ── Hero Main Banner ────────────────────────────────── */
.dash-panel.hero-dark, .page-hero {
  padding: 24px 28px !important;
  border-radius: var(--radius) !important;
  background: var(--body-bg-gradient) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-md) !important;
}

.kicker {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 6px;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 800px;
  line-height: 1.6;
}

/* ── Metric Grid ─────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric, .metric-card, .recon-card {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.metric:hover, .metric-card:hover, .recon-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--surface-solid);
}

.metric span, .metric-card span, .recon-card span {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.metric b, .metric-card b, .recon-card b {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.metric small, .metric-card small, .recon-card small {
  font-size: 11px;
  color: var(--muted2);
}

.metric-unread, .recon-card.unread {
  border-left: 3px solid var(--red) !important;
}

.recon-card.klop {
  border-left: 3px solid var(--green) !important;
}

/* ── Dashboard & Masonry Grid ────────────────────────── */
.dash-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .dash-hero {
    grid-template-columns: 1fr;
  }
}

.dashboard-masonry-v112 {
  display: grid;
  grid-template-columns: 2.1fr 0.9fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .dashboard-masonry-v112 {
    grid-template-columns: 1fr;
  }
}

.dashboard-main-column-v112,
.dashboard-side-column-v112 {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Tables & Data Grids ─────────────────────────────── */
.table-wrap, .tbl-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.dt {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.dt thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  font-weight: 700;
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dt tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
  transition: background-color 0.1s ease;
}

.dt tbody tr:last-child td {
  border-bottom: none;
}

.dt tbody tr:hover td {
  background-color: color-mix(in srgb, var(--blue) 6%, var(--surface-soft)) !important;
}

.dt .num {
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  white-space: nowrap;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.dt .total-row td, .dt tbody tr.total-row td {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface-soft)) !important;
  font-weight: 700;
  font-size: 13px;
  border-top: 1.5px solid var(--border-strong);
  border-bottom: 2px double var(--border-strong);
}

/* ── Inputs & Selects ────────────────────────────────── */
.input, .select, select {
  background: var(--surface-solid) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input:focus, .select:focus, select:focus {
  border-color: var(--border-strong) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn, .btn-primary, .btn-gen, .um-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover, .btn-primary:hover, .btn-gen:hover, .um-save:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-glow);
}

.btn:active, .btn-primary:active, .btn-gen:active, .um-save:active {
  transform: translateY(-0.5px);
}

.btn-primary, .btn-gen, .um-save {
  background: linear-gradient(135deg, var(--blue), var(--indigo)) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover, .btn-gen:hover, .um-save:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  border-color: var(--border) !important;
}

.btn-ghost:hover {
  background: var(--surface-solid) !important;
  border-color: var(--border-strong) !important;
}

.btn-success {
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 80%, #000)) !important;
  color: #FFFFFF !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), color-mix(in srgb, var(--red) 80%, #000)) !important;
  color: #FFFFFF !important;
}

.btn:disabled, .btn-primary:disabled, .btn-gen:disabled, .um-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Pills & Badges ──────────────────────────────────── */
.pill, .status-pill, .ca-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status-pill.ok, .pill-klop {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.2);
}

.status-pill.warn, .pill-warn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-pill.danger, .pill-selisih, .pill-sel {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}

.ca-badge, .pill-purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple);
  border-color: rgba(139, 92, 246, 0.2);
}

/* ── Progress Bar ────────────────────────────────────── */
.pbar, .progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

html[color-scheme="dark"] .pbar, html[color-scheme="dark"] .progress-bar {
  background: rgba(255, 255, 255, 0.05);
}

.pbar-fill, .progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.4s ease;
}

/* ── Log Boxes ───────────────────────────────────────── */
.log-box {
  background: var(--surface-soft) !important;
  color: var(--ink2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

/* ── Page Load Animation ─────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content-animated {
  animation: fadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Layout Details ──────────────────────────────────── */
.period-work-selector-v111 {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 4px 10px;
  color: var(--blue);
}

.period-work-selector-v111 select {
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 700;
  padding-right: 16px;
  cursor: pointer;
  box-shadow: none !important;
  width: auto;
}

.empty-v107, .issue-ok {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.issue-ok {
  color: var(--green);
  background: rgba(16, 185, 129, 0.05);
  border-radius: 10px;
}

/* ── Specific Overhaul Adjustments ───────────────────── */
/* Remove dota icons and sound buttons */
.dota-card-icon, #dashboard-sound-toggle, .sound-icon-status, .sound-text-status {
  display: none !important;
}

.sidebar-avatar {
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
}

/* Tidy up bank table rows */
.bank-table-v107 {
  display: flex;
  flex-direction: column;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.bank-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.bank-row:last-child {
  border-bottom: none;
}

.bank-row:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-soft));
}

.bank-head {
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tidy up top user rows */
.user-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.user-row:last-child {
  border-bottom: none;
}

.user-row:hover {
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-soft));
}

.user-head {
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-no-v107 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--muted);
}

.top-user-name {
  font-weight: 700;
  color: var(--ink);
}

.top-user-meta {
  font-size: 11px;
  color: var(--muted);
}

.top-user-amount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-align: right;
  color: var(--red);
}

/* Donut chart aesthetic cleanup */
.donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--donut-gradient, var(--blue) 0% 100%));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.donut-inner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--surface-solid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-inner span {
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.donut-inner b {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}

/* Shortage list */
.shortage-list-v107 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.shortage-row-v107 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shortage-top-v107 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.ca-label-v107 {
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ca-label-v107 i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ca-color, var(--blue));
}

.ca-money-v107 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink2);
}

.shortage-row-v107 .bar {
  height: 5px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

html[color-scheme="dark"] .shortage-row-v107 .bar {
  background: rgba(255, 255, 255, 0.05);
}

.shortage-row-v107 .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ca-color, var(--blue));
  width: var(--ca-pct, 0%);
  transition: width 0.4s ease;
}

/* Panel title row */
.panel-title-row-v107 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-title-row-v107 h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
}

.panel-title-row-v107 p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Recon Stack & Status Panels ─────────────────────── */
.status-panel-v107 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px !important;
}

.status-head-v107 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.status-title-v107 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

.status-sub-v107 {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.recon-stack-v107 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.recon-line-v107 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border-left: 3px solid transparent;
  background: var(--surface-soft);
  color: var(--ink2);
}

.recon-line-v107.ok-line {
  background: rgba(16, 185, 129, 0.05);
  border-left-color: var(--green);
  color: var(--green);
}

.recon-line-v107.warn-line {
  background: rgba(239, 68, 68, 0.05);
  border-left-color: var(--red);
  color: var(--red);
}

.formula-v107 {
  font-size: 10.5px;
  color: var(--muted2);
  text-align: center;
  margin-top: 4px;
}

/* ── Action Cards ────────────────────────────────────── */
.action-cards-v107 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px !important;
  text-decoration: none;
}

.action-card b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.action-card b svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.action-card:hover b svg {
  transform: scale(1.15) rotate(5deg);
}

.action-card small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Recon Cards Dashboard Grid ──────────────────────── */
.recon-cards-v107 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.issues-panel-v112 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px !important;
}

.issue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  transition: all 0.2s ease;
}

.issue-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-solid);
  transform: translateX(3px);
}

.issue-row b {
  font-size: 12.5px;
  color: var(--ink);
}

.issue-row div div {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Responsive Sidebar on Mobile ────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-250px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0,0,0,0.25);
  }
  .main-wrap {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: block !important;
  }
  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 35;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .mobile-sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .top-bar {
    padding: 0 16px;
  }
  .page {
    padding: 16px 16px 32px;
  }
  .profile-meta-v11 {
    display: none !important;
  }
  #gmt-clock {
    display: none !important;
  }
}

/* v211 polish: pusat kontrol dibuat vertikal dan teks kartu Griyabayar memakai warna tema */
.system-connection-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px;
}
.system-connection-row{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(16,185,129,.18);
  background:rgba(16,185,129,.055);
  border-radius:14px;
  padding:12px 14px;
  min-height:58px;
}
.system-connection-row.telegram{
  border-color:rgba(16,185,129,.24);
  background:rgba(16,185,129,.075);
  box-shadow:0 0 0 1px rgba(16,185,129,.04),0 12px 28px rgba(16,185,129,.055);
}
.live-dot{position:relative;display:inline-flex;width:10px;height:10px;flex:0 0 10px;}
.live-dot-ping{position:absolute;inset:0;border-radius:999px;background:var(--green);opacity:.72;animation:ping 1.45s cubic-bezier(0,0,.2,1) infinite;}
.live-dot-ping.fast{animation-duration:1.08s;opacity:.86;}
.live-dot-core{position:relative;display:inline-flex;width:10px;height:10px;border-radius:999px;background:var(--green);}
.live-dot-core.glow{box-shadow:0 0 12px rgba(16,185,129,.85);}
.system-connection-text{min-width:0;display:flex;flex-direction:column;gap:2px;line-height:1.25;}
.system-connection-title{font-size:12.5px;font-weight:950;color:var(--green);letter-spacing:.015em;text-transform:none;}
.system-connection-row.telegram .system-connection-title{text-transform:uppercase;letter-spacing:.035em;}
.system-connection-sub{font-size:10.5px;color:var(--muted);font-weight:750;}

.griyabayar-page-title,
.ca-card .ca-name,
.griyabayar-modal-title{color:var(--ink)!important;}
.griyabayar-page-kicker,
.ca-card .ca-username,
.griyabayar-page-desc,
.griyabayar-muted,
.griyabayar-file-path,
.griyabayar-file-date{color:var(--muted)!important;}
.ca-card{background:var(--surface)!important;border-color:var(--border)!important;}
.ca-card .btn-ghost{color:var(--ink)!important;border-color:var(--border)!important;background:var(--surface-soft)!important;}
.ca-card .btn-ghost:hover{border-color:var(--border-strong)!important;filter:brightness(1.06);}

/* Safety net: inline warna lama dari UI terang diganti mengikuti token tema agar semua tema terbaca. */
html[data-theme] .page [style*="color:#0F172A"],
html[data-theme] .page [style*="color: #0F172A"],
html[data-theme] .page [style*="color:#1E293B"],
html[data-theme] .page [style*="color: #1E293B"],
html[data-theme] .page [style*="color:#334155"],
html[data-theme] .page [style*="color: #334155"]{color:var(--ink)!important;}
html[data-theme] .page [style*="color:#64748B"],
html[data-theme] .page [style*="color: #64748B"],
html[data-theme] .page [style*="color:#475569"],
html[data-theme] .page [style*="color: #475569"],
html[data-theme] .page [style*="color:#94A3B8"],
html[data-theme] .page [style*="color: #94A3B8"]{color:var(--muted)!important;}
