/* ZeruPay — Premium Light Theme */
:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-ring: rgba(37, 99, 235, 0.18);
  --success: #059669;
  --success-light: #ECFDF5;
  --danger: #E11D48;
  --danger-light: #FFF1F2;
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --orange: #EA580C;
  --purple: #7C3AED;
  --purple-hover: #6D28D9;
  --sidebar-bg: #FFFFFF;
  --sidebar-border: #E8ECF1;
  --content-bg: #F6F8FB;
  --card-bg: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --border-soft: #F1F5F9;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.18s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--content-bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-hover); text-decoration: none; }

::selection {
  background: var(--primary-light);
  color: var(--primary-hover);
}

/* ─── Login ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(5, 150, 105, 0.07), transparent 50%),
    linear-gradient(165deg, #FAFBFD 0%, #F1F5F9 45%, #EEF2FF 100%);
  position: relative;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
}

.login-page > div {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.login-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(145deg, #10B981 0%, #059669 55%, #047857 100%);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.login-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 8px 0 28px;
  font-size: 14px;
}

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 28px;
  letter-spacing: 0.02em;
}

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #FAFBFC;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control:hover {
  border-color: #CBD5E1;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-ring);
}

select.form-control {
  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 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-control { min-height: 88px; resize: vertical; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #3B82F6 0%, var(--primary) 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.2), 0 6px 16px rgba(37, 99, 235, 0.28);
}

.btn-purple {
  background: linear-gradient(180deg, #8B5CF6 0%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.22);
}

.btn-purple:hover {
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-hover) 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
  text-decoration: none;
  color: #fff;
}

.btn-success {
  background: linear-gradient(180deg, #10B981 0%, var(--success) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.btn-danger {
  background: linear-gradient(180deg, #F43F5E 0%, var(--danger) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2);
}

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }

.btn-success:hover {
  background: linear-gradient(180deg, var(--success) 0%, #047857 100%);
  text-decoration: none;
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(180deg, var(--danger) 0%, #BE123C 100%);
  text-decoration: none;
  color: #fff;
}

.data-table td .btn { margin-right: 5px; }

/* ─── Alerts ─── */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert-danger {
  background: var(--danger-light);
  color: #BE123C;
  border-color: rgba(225, 29, 72, 0.15);
}

.alert-success {
  background: var(--success-light);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.15);
}

/* ─── App shell ─── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 268px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.03);
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 99px;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #10B981 0%, #059669 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-text small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav { padding: 12px 10px 24px; }

.nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94A3B8;
  padding: 18px 12px 6px;
  letter-spacing: 0.08em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  position: relative;
}

.nav-item:hover {
  background: #F8FAFC;
  text-decoration: none;
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon { width: 18px; text-align: center; opacity: 0.85; }

.main-wrap {
  margin-left: 268px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.menu-toggle {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  box-shadow: var(--shadow-xs);
  transition: background var(--transition);
}

.menu-toggle:hover { background: #F8FAFC; }

.sidebar-overlay { display: none !important; }

.top-header {
  height: 56px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.header-center {
  flex: 1;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  border: 1px solid var(--border);
}

.lang-switch-login { margin: 0 auto 18px; width: fit-content; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.lang-btn:hover { color: var(--text); text-decoration: none; background: #fff; }

.lang-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.live-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.live-badge.on {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.live-label { color: var(--text-muted); font-weight: 500; }

.header-time {
  color: var(--text-muted);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  background: #F8FAFC;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.header-link { color: var(--text-secondary); font-weight: 500; }

.notif-bell { position: relative; cursor: pointer; font-size: 16px; }

.notif-count {
  position: absolute;
  top: -7px;
  right: -9px;
  background: linear-gradient(180deg, #F43F5E, var(--danger));
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.notif-menu { position: relative; }

.notif-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 6px;
  z-index: 200;
}

.notif-menu.open .notif-dropdown { display: block; }

.notif-dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
}

.notif-dropdown a:hover { background: #F8FAFC; color: var(--text); }

.notif-sound-hint {
  padding: 8px 12px 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  line-height: 1.4;
}

.sound-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px 2px 8px;
}

.sound-select-icon {
  font-size: 13px;
  line-height: 1;
  opacity: 0.75;
}

.sound-select {
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 2px;
  max-width: 128px;
  cursor: pointer;
  outline: none;
}

.sound-test-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
}

.sound-test-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.live-badge.off {
  background: #F1F5F9;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.notif-bell.notif-pulse {
  animation: notifPulse 0.9s ease;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(1.08); }
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}

.user-menu::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  z-index: 201;
}

.user-menu:hover { background: #F8FAFC; }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #DBEAFE);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.user-name { font-size: 13px; font-weight: 600; color: var(--text); }

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px;
  z-index: 200;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown,
.user-dropdown:hover {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.user-dropdown a:hover { background: #F8FAFC; text-decoration: none; color: var(--text); }

.user-dropdown a:last-child { color: var(--danger); }

.user-dropdown a:last-child:hover { background: var(--danger-light); }

.main-content {
  padding: 28px 32px;
  flex: 1;
}

/* ─── Page ─── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.2;
}

.page-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), #10B981);
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-body { padding: 22px; }
.card-padded { padding: 22px; }

.card h3,
.card-padded h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ─── Stats ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.stat-card .stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-card .stat-value.green { color: var(--success); }
.stat-card .stat-value.red { color: var(--danger); }

.stat-side {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Table ─── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tr:nth-child(even) td {
  background: #FAFBFC;
}

.data-table tr:hover td {
  background: #F1F5F9;
}

.data-table tr:last-child td { border-bottom: none; }

.empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  font-weight: 500;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.12);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(225, 29, 72, 0.12);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: rgba(217, 119, 6, 0.12);
}

.badge-purple {
  background: #F5F3FF;
  color: var(--purple);
  border-color: rgba(124, 58, 237, 0.12);
}

.badge-blue {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.12);
}

.badge-orange {
  background: #FFF7ED;
  color: var(--orange);
  border-color: rgba(234, 88, 12, 0.12);
}

/* ─── Filters ─── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.filter-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-bar {
  background: linear-gradient(135deg, var(--primary-light) 0%, #F0F9FF 100%);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  color: var(--text-secondary);
}

.stat-pill {
  background: #F8FAFC;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 116px;
  text-align: center;
  border: 1px solid var(--border-soft);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-pill:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.stat-pill strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-pill span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ─── Switch ─── */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #CBD5E1;
  border-radius: 22px;
  transition: background 0.25s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

input:checked + .slider {
  background: linear-gradient(180deg, #10B981, var(--success));
}

input:checked + .slider:before { transform: translateX(16px); }

/* ─── Misc ─── */
code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #F1F5F9;
  padding: 2px 7px;
  border-radius: 6px;
  color: #475569;
  border: 1px solid var(--border-soft);
}

hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 20px 0;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .menu-toggle { display: inline-flex !important; }

  .sidebar {
    width: 288px;
    max-width: 86vw;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 90;
  }

  .app-shell.sidebar-open .sidebar-overlay { display: block !important; }

  .sidebar .brand-text,
  .sidebar .nav-item,
  .sidebar .nav-section { display: flex; }
  .sidebar .nav-section { display: block; }

  .main-wrap { margin-left: 0; width: 100%; }
  .top-header { padding: 0 14px; height: 52px; }
  .header-center { display: none; }
  .header-time,
  .live-label,
  .header-link,
  .lang-switch,
  .switch,
  .sound-test-btn { display: none; }
  .sound-select-wrap { max-width: 110px; }
  .sound-select { max-width: 90px; font-size: 11px; }
  .header-right { gap: 10px; }
  .user-name { display: none; }
  .main-content { padding: 18px 14px; }
  .page-title { font-size: 22px; margin-bottom: 18px; }
  .stats-grid,
  .stats-grid-4 { grid-template-columns: 1fr; }
  .stat-card .stat-value { font-size: 26px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-group { width: 100%; min-width: 0; }
  .filter-bar .btn { width: 100%; align-self: stretch !important; }
  .toolbar { gap: 8px; }
  .toolbar .btn-sm { flex: 1 1 auto; text-align: center; min-width: 0; padding: 9px 10px; }
  .card-padded { padding: 18px; }
  .data-table { font-size: 12px; min-width: 640px; }
  .data-table th,
  .data-table td { padding: 10px 12px; }
  .table-wrap { -webkit-overflow-scrolling: touch; margin: 0 -2px; }
  .login-card { margin: 0; padding: 32px 24px; }
  .data-table td .btn-sm { display: inline-block; margin: 3px 0; }
  .data-table td form { flex-direction: column !important; align-items: stretch !important; }
  .data-table td form .form-control { width: 100% !important; margin-bottom: 6px; }
  .data-table td form .btn { width: 100%; }
  .btn, .btn-sm { min-height: 42px; }
  .breadcrumb { font-size: 12px; word-break: break-word; }
  .alert { font-size: 12px; }
  code { word-break: break-all; font-size: 11px; }
}

@media (max-width: 480px) {
  .page-title { font-size: 20px; }
  .data-table { min-width: 520px; }
  .top-header { height: 48px; }
  .menu-toggle { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Secilebilir admin temalari icin uyarlanabilir yuzeyler. Eski sabit beyaz/gri
   arka planlar koyu, mavi ve kirmizi temalarda okunurlugu bozuyordu. */
:root {
  --surface-muted: color-mix(in srgb, var(--card-bg) 92%, var(--text));
  --surface-hover: color-mix(in srgb, var(--card-bg) 86%, var(--text));
  --surface-elevated: var(--card-bg);
}

.top-header,
.menu-toggle,
.notif-dropdown,
.user-dropdown,
.sound-test-btn,
.lang-btn.active,
.login-card {
  background: var(--surface-elevated) !important;
  color: var(--text);
}

.nav-item:hover,
.menu-toggle:hover,
.notif-dropdown a:hover,
.user-menu:hover,
.user-dropdown a:hover,
.data-table th,
.stat-pill,
.header-time,
.sound-select-wrap,
.summary-bar,
code {
  background: var(--surface-muted) !important;
}

.data-table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--card-bg) 97%, var(--text)) !important;
}

.data-table tr:hover td {
  background: var(--surface-hover) !important;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  background-color: var(--card-bg);
  color: var(--text);
  border-color: var(--border);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.lang-switch,
.live-badge.off {
  background: var(--surface-muted);
}

.notif-count,
.user-avatar {
  border-color: var(--card-bg);
}
