/* ==========================================================================
   admin/assets/css/style.css
   Design system for the Game Earning admin panel.
   Dark mode is the default; [data-theme="light"] flips the tokens below.
   ========================================================================== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Light theme only (dark mode removed) */
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-topbar: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --table-stripe: #f8fafc;
  --hover-bg: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);

  --sidebar-width: 260px;
  --topbar-height: 60px;
}

/* Force light tokens even if old data-theme=dark is cached */
[data-theme="dark"],
[data-theme="light"],
html {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-topbar: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --table-stripe: #f8fafc;
  --hover-bg: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);
}

/* ==========================================================================
   Base
   ========================================================================== */

* { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }

body {
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: .925rem;
  margin: 0;
  overflow-x: hidden;
}

body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 9px; height: 9px; }
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }
body::-webkit-scrollbar-track { background: transparent; }

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

.text-muted-2 { color: var(--text-secondary) !important; }
.text-dim { color: var(--text-muted) !important; }
.fw-600 { font-weight: 600; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

.hover-lift { transition: transform .15s ease, box-shadow .15s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ==========================================================================
   Layout
   ========================================================================== */

.app-shell { min-height: 100vh; }

.app-main {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  transition: margin-left .2s ease;
}

.app-content { padding: 22px 26px 40px; }

/* --- sidebar --- */

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: transform .2s ease;
  overflow-y: auto;
}

.sidebar-brand {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-brand img,
.sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--primary);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-brand .brand-text { min-width: 0; }
.sidebar-brand .brand-text strong { display: block; color: #0f172a; font-size: .95rem; line-height: 1.15; }
.sidebar-brand .brand-text small { color: var(--text-muted); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }

.sidebar-nav { padding: 14px 10px 20px; flex: 1 1 auto; }

.sidebar-label {
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 14px 12px 6px;
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  color: #cbd5e1;
  font-size: .88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { background: #eef2ff; color: #4f46e5; }

.sidebar-link.active {
  background: rgba(99, 102, 241, .16);
  border-left-color: var(--primary);
  color: #fff;
}

.sidebar-link .badge-pill { margin-left: auto; }

.sidebar-foot {
  border-top: 1px solid var(--border-color);
  padding: 12px;
  flex-shrink: 0;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.sidebar-user img,
.sidebar-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

.sidebar-user .meta { min-width: 0; line-height: 1.2; }
.sidebar-user .meta strong { display: block; color: #0f172a; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .meta small { color: var(--text-muted); font-size: .7rem; }

.btn-logout {
  width: 100%;
  border: 1px solid rgba(239, 68, 68, .4);
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: .82rem;
  font-weight: 600;
}

.btn-logout:hover { background: rgba(239, 68, 68, .24); color: #fff; }

/* --- topbar --- */

.app-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  z-index: 1040;
  transition: left .2s ease;
}

.topbar-title { font-size: 1.02rem; font-weight: 600; margin: 0; line-height: 1.2; }
.topbar-crumb { font-size: .74rem; color: var(--text-muted); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.icon-btn:hover { background: var(--hover-bg); color: var(--text-primary); }

.sidebar-toggle { display: none; }

/* ==========================================================================
   Cards, tables, forms
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-header h6 { margin: 0; font-size: .95rem; font-weight: 600; }
.card-header .card-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }

/* --- stat cards --- */

.stat-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; height: 100%; }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59, 130, 246, .16); color: #60a5fa; }
.stat-icon.yellow { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.stat-icon.green { background: rgba(34, 197, 94, .16); color: #4ade80; }
.stat-icon.purple { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
.stat-icon.red { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.stat-icon.teal { background: rgba(20, 184, 166, .16); color: #5eead4; }

.stat-body { min-width: 0; }
.stat-label { font-size: .74rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .75rem; color: var(--text-muted); }

/* --- tables --- */

.table { --bs-table-bg: transparent; --bs-table-color: var(--text-primary); --bs-table-border-color: var(--border-color); margin-bottom: 0; }
.table > thead > tr > th {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  padding: 10px 12px;
}

.table > tbody > tr { background: transparent; }
.table > tbody > tr:nth-child(even) { background-color: var(--table-stripe); }
.table > tbody > tr:hover { background-color: var(--hover-bg); }
.table > tbody > tr > td { padding: 10px 12px; vertical-align: middle; border-color: var(--border-color); }
.table td, .table th { color: var(--text-primary); }

.table-sm > tbody > tr > td,
.table-sm > tbody > tr > th { padding: 8px 10px; }

/* DataTables search + length selects follow the theme */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: .82rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { color: var(--text-secondary) !important; font-size: .8rem; }

.dataTables_wrapper .dataTables_paginate .paginate_button {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 6px !important;
  margin-left: 3px;
  padding: 3px 9px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: .45;
  pointer-events: none;
}

table.dataTable thead .sorting::after { color: var(--text-muted) !important; }

.thumb-50 { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--hover-bg); }
.thumb-sm { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--hover-bg); }

/* --- badges --- */

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.5;
}

.badge-soft.green { background: rgba(34, 197, 94, .16); color: #4ade80; }
.badge-soft.red { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.badge-soft.yellow { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.badge-soft.blue { background: rgba(59, 130, 246, .16); color: #60a5fa; }
.badge-soft.purple { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
.badge-soft.teal { background: rgba(20, 184, 166, .16); color: #5eead4; }
.badge-soft.orange { background: rgba(249, 115, 22, .16); color: #fdba74; }
.badge-soft.grey { background: rgba(148, 163, 184, .16); color: var(--text-secondary); }

.badge-pill {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: .68rem;
  font-weight: 700;
}

/* --- action buttons --- */

.act {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-grid;
  place-items: center;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.act:hover { background: var(--hover-bg); color: var(--text-primary); }
.act.edit:hover { color: #60a5fa; border-color: rgba(59, 130, 246, .5); }
.act.danger:hover { color: #fca5a5; border-color: rgba(239, 68, 68, .5); }
.act.ok:hover { color: #4ade80; border-color: rgba(34, 197, 94, .5); }
.act.warn:hover { color: #fbbf24; border-color: rgba(245, 158, 11, .5); }
.act[disabled] { opacity: .45; pointer-events: none; }

/* --- forms --- */

.form-label { font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-text { font-size: .75rem; color: var(--text-muted); }

.form-control,
.form-select,
.input-group-text {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  background: var(--input-bg);
  border-color: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled, .form-control[readonly] { background: var(--hover-bg); color: var(--text-secondary); }

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.input-group-text { color: var(--text-secondary); }

.form-check-input { background-color: var(--input-bg); border-color: var(--input-border); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-label { color: var(--text-secondary); font-size: .86rem; }

/* switch */
.form-switch .form-check-input { width: 2.5em; height: 1.3em; cursor: pointer; }

/* file drop zone */
.file-drop {
  border: 1.5px dashed var(--input-border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.file-drop:hover,
.file-drop.dragover { border-color: var(--primary); background: rgba(99, 102, 241, .07); }
.file-drop i.preview { font-size: 2.6rem; color: var(--primary); }
.file-drop .current-file { font-size: .78rem; color: var(--text-muted); }

.file-preview { max-width: 160px; max-height: 130px; border-radius: 8px; margin-top: 10px; border: 1px solid var(--border-color); }

/* --- buttons --- */

.btn { border-radius: 8px; font-weight: 600; font-size: .85rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-light { border-color: var(--border-color); color: var(--text-secondary); }
.btn-outline-light:hover { background: var(--hover-bg); color: var(--text-primary); border-color: var(--border-color); }

/* --- nav pills / tabs --- */

.nav-pills .nav-link {
  color: var(--text-secondary);
  background: transparent;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  padding: 6px 14px;
}

.nav-pills .nav-link:hover { color: var(--text-primary); background: var(--hover-bg); }
.nav-pills .nav-link.active { background: var(--primary); color: #fff; }

.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs .nav-link { color: var(--text-secondary); border: none; border-bottom: 2px solid transparent; font-size: .87rem; font-weight: 600; }
.nav-tabs .nav-link:hover { color: var(--text-primary); border-color: transparent; }
.nav-tabs .nav-link.active { color: var(--primary); background: transparent; border-bottom-color: var(--primary); }

/* --- key/value list --- */

.kv-list { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0; }
.kv-list dt { padding: 7px 0; font-size: .78rem; color: var(--text-secondary); font-weight: 600; border-bottom: 1px solid var(--border-color); }
.kv-list dd { padding: 7px 0; margin: 0; font-size: .85rem; border-bottom: 1px solid var(--border-color); word-break: break-word; }

/* --- misc --- */

.empty-state { padding: 42px 20px; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 2.6rem; opacity: .5; display: block; margin-bottom: 10px; }

.alert { border-radius: 10px; border: 1px solid transparent; font-size: .86rem; }
.alert-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }
.alert-warning { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fcd34d; }
.alert-info { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .35); color: #93c5fd; }
.alert-success { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); color: #86efac; }

.chart-box { position: relative; height: 300px; }
.chart-box-sm { position: relative; height: 260px; }

.timeline-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.avatar-xl { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-color); }
.avatar-initial-xl { width: 96px; height: 96px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; }

.coin { font-weight: 700; font-variant-numeric: tabular-nums; }
.coin-pos { color: #4ade80; }
.coin-neg { color: #fca5a5; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-bar .field { min-width: 150px; }
.filter-bar label { display: block; font-size: .72rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--hover-bg) 25%, var(--table-stripe) 37%, var(--hover-bg) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* --- SweetAlert2 dark skin --- */

.swal2-popup {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.swal2-title { color: var(--text-primary); font-size: 1.05rem; }
.swal2-html-container { color: var(--text-secondary); font-size: .88rem; }
.swal2-confirm { background: var(--primary) !important; border-radius: 8px !important; }
.swal2-cancel { background: var(--bg-card) !important; color: var(--text-secondary) !important; border: 1px solid var(--border-color) !important; border-radius: 8px !important; }
.swal2-deny { background: var(--danger) !important; border-radius: 8px !important; }
.swal2-input, .swal2-textarea {
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 8px !important;
}
.swal2-textarea:focus, .swal2-input:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(99, 102, 241, .18) !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  .app-main { margin-left: 0; }
  .app-topbar { left: 0; padding: 0 14px; }
  .app-content { padding: 16px 14px 34px; }
  .sidebar-toggle { display: grid; }
  .stat-value { font-size: 1.15rem; }
  .chart-box { height: 240px; }
}

@media (max-width: 575.98px) {
  .topbar-title { font-size: .92rem; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .stat-card { padding: 13px 14px; gap: 11px; }
  .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; }
  .kv-list { grid-template-columns: 1fr; }
  .kv-list dt { padding-bottom: 0; border-bottom: none; }
  .filter-bar .field { min-width: 100%; }
}

@media print {
  .app-sidebar, .app-topbar, .sidebar-toggle, .act, .btn { display: none !important; }
  .app-main { margin-left: 0; padding-top: 0; }
  body { background: #fff; color: #000; }
}
/* ==========================================================================
   Professional UI polish (v2)
   ========================================================================== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-soft: rgba(99, 102, 241, .12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --font-display: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-display);
  letter-spacing: .01em;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(139,92,246,.12), transparent 50%),
    var(--bg-body);
}

/* Sidebar */
.app-sidebar {
  border-right: 1px solid var(--border-color);
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.sidebar-brand {
  font-weight: 700;
  letter-spacing: .02em;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,.2), transparent);
}
.sidebar-link {
  border-radius: 10px !important;
  margin: 2px 10px !important;
  transition: background .15s ease, transform .12s ease;
}
.sidebar-link:hover {
  background: var(--primary-soft) !important;
  transform: translateX(2px);
}
.sidebar-link.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}

/* Topbar */
.app-topbar {
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(255,255,255,.03);
}

/* Cards */
.card {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-color) !important;
  font-weight: 600;
  padding: 1rem 1.25rem !important;
}
.card-body { padding: 1.25rem !important; }

/* Stats / dashboard tiles */
.stat-card, .kpi-card, .card.stat {
  position: relative;
  overflow: hidden;
}
.stat-card::after, .kpi-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-soft);
}

/* Buttons */
.btn {
  border-radius: 10px !important;
  font-weight: 600;
  padding: .5rem 1rem;
  transition: transform .12s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
  border: none !important;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(99,102,241,.4);
}
.btn-outline-light, .btn-outline-secondary {
  border-radius: 10px !important;
}

/* Forms */
.form-control, .form-select {
  border-radius: 10px !important;
  background: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--text-primary) !important;
  min-height: 42px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.2) !important;
}
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Tables */
.table {
  --bs-table-bg: transparent;
  color: var(--text-primary);
}
.table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-secondary);
  border-bottom-color: var(--border-color) !important;
  font-weight: 600;
}
.table tbody tr {
  transition: background .12s ease;
}
.table tbody tr:hover {
  background: var(--hover-bg) !important;
}
.table td, .table th {
  border-color: var(--border-color) !important;
  vertical-align: middle;
}

/* Badges */
.badge {
  border-radius: 8px !important;
  font-weight: 600;
  padding: .35em .65em;
}

/* Login page */
.login-wrap, .auth-wrap, body.login-page {
  min-height: 100vh;
}
.login-card {
  border-radius: 20px !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0,0,0,.35) !important;
}

/* Page title */
.page-title, h1.page-heading {
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-subtitle {
  color: var(--text-secondary);
}

/* Content area spacing */
.app-content, .main-content, .page-content {
  padding: 1.25rem 1.5rem 2rem;
}

/* Soft scrollbar on sidebar */
.sidebar-nav {
  scrollbar-width: thin;
}

/* Icon buttons */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: background .15s ease, transform .12s ease;
}
.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Alert polish */
.alert {
  border-radius: 12px !important;
  border: none;
}

/* DataTables if present */
.dataTables_wrapper .dataTables_filter input {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  padding: .35rem .75rem;
}




/* === Light mode only — no dark cards, no glow === */
body {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.app-content .card,
.dashboard-kpis .card,
.row.g-3 > [class*="col-"] > .card,
.card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.04) !important;
  color: #0f172a !important;
}
.app-content .card:hover {
  border-color: #c7d2fe !important;
  box-shadow: 0 4px 20px rgba(99,102,241,.1) !important;
}
.app-content .fs-4,
.app-content .display-6,
.app-content .fw-bold.fs-3,
.stat-card .fs-4,
.stat-card .fw-bold {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: #0f172a !important;
}
.app-topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
.app-sidebar {
  background: #0f172a !important;
}
.card-header {
  background: #ffffff !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.table {
  color: #0f172a !important;
}
.table thead th {
  color: #64748b !important;
  background: #f8fafc !important;
}
.text-dim, .text-muted-2 { color: #64748b !important; }
.btn-outline-light {
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}
.btn-outline-light:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}


/* === Light sidebar (dark sidebar removed) === */
.app-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 1px 0 8px rgba(15,23,42,.04) !important;
}
.sidebar-brand {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
.sidebar-brand .brand-text strong,
.sidebar-brand .brand-text,
.sidebar-user .meta strong {
  color: #0f172a !important;
}
.sidebar-brand .brand-text small,
.sidebar-user .meta small,
.sidebar-label {
  color: #64748b !important;
}
.sidebar-link {
  color: #334155 !important;
}
.sidebar-link i {
  color: #64748b !important;
}
.sidebar-link:hover {
  background: #eef2ff !important;
  color: #4f46e5 !important;
}
.sidebar-link:hover i {
  color: #4f46e5 !important;
}
.sidebar-link.active {
  background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99,102,241,.25) !important;
}
.sidebar-link.active i {
  color: #ffffff !important;
}
.sidebar-foot {
  border-top: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}
