/* ============================================================
   CTS DASHBOARD PREMIUM THEME
   ============================================================ */

/* ---- Dashboard Grid Layout ---- */
.dash-grid {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
  margin-bottom: 20px;
}

.dash-panel {
  position: relative;
  min-width: 0;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
}

/* ---- Size Classes (Bootstrap col logic: 2,3,4,6,8,9,10,12) ---- */
.dash-panel.dp-col-2  { flex: 0 0 auto; width: 16.666667%; }
.dash-panel.dp-col-3  { flex: 0 0 auto; width: 25%; }
.dash-panel.dp-col-4  { flex: 0 0 auto; width: 33.333333%; }
.dash-panel.dp-col-6  { flex: 0 0 auto; width: 50%;  }
.dash-panel.dp-col-8  { flex: 0 0 auto; width: 66.666667%; }
.dash-panel.dp-col-9  { flex: 0 0 auto; width: 75%; }
.dash-panel.dp-col-10 { flex: 0 0 auto; width: 83.333333%; }
.dash-panel.dp-col-12 { flex: 0 0 auto; width: 100%; }

@media (max-width: 991px) {
  .dash-panel.dp-col-2,
  .dash-panel.dp-col-3,
  .dash-panel.dp-col-4 { width: 50%; }
}
@media (max-width: 768px) {
  .dash-panel { width: 100% !important; }
}

/* ---- Kasa Tables Responsive ---- */
.dash-panel { container-type: inline-size; }
@container (max-width: 900px) {
  .kasa-tables-row > [class*="col-xl-6"] { flex: 0 0 100%; max-width: 100%; }
}

/* ---- Kasa Section Cards ---- */
.kasa-section {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  background: #fff;
  height: 100%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.kasa-section-header {
  padding: 8px 14px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}
.kasa-header-acilis  { background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); color: #2e7d32; }
.kasa-header-kapanis { background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%); color: #e65100; }
.kasa-header-giris   { background: linear-gradient(135deg, #e3f2fd 0%, #e8eaf6 100%); color: #1565c0; }
.kasa-header-cikis   { background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%); color: #c62828; }

.kasa-table { font-size: 12px; }
.kasa-table thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 6px 10px;
  color: #495057;
}
.kasa-table tbody td {
  padding: 6px 10px;
  vertical-align: middle;
}
.kasa-table tbody tr:hover { background: rgba(0,123,255,0.04); }
.kasa-table { border-collapse: separate; border-spacing: 0; }
.kasa-table thead th:first-child { border-top-left-radius: 0; }
.kasa-table thead th:last-child { border-top-right-radius: 0; }
.kasa-table tbody tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.kasa-table tbody tr:last-child td:last-child { border-bottom-right-radius: 11px; }
.kasa-table, .kasa-table th, .kasa-table td { border: none; border-bottom: 1px solid rgba(0,0,0,0.06); }
.kasa-table tbody tr:last-child td { border-bottom: none; }

.kasa-th-link { color: #495057 !important; text-decoration: none; }
.kasa-th-link:hover { color: #0d6efd !important; }

/* Dark mode */
[data-theme="dark"] .kasa-section,
body.dark-mode .kasa-section {
  background: #1e2235;
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .kasa-header-acilis,
body.dark-mode .kasa-header-acilis  { background: linear-gradient(135deg, rgba(46,125,50,0.15) 0%, rgba(46,125,50,0.08) 100%); color: #81c784; }
[data-theme="dark"] .kasa-header-kapanis,
body.dark-mode .kasa-header-kapanis { background: linear-gradient(135deg, rgba(230,81,0,0.15) 0%, rgba(230,81,0,0.08) 100%); color: #ffb74d; }
[data-theme="dark"] .kasa-header-giris,
body.dark-mode .kasa-header-giris   { background: linear-gradient(135deg, rgba(21,101,192,0.15) 0%, rgba(21,101,192,0.08) 100%); color: #64b5f6; }
[data-theme="dark"] .kasa-header-cikis,
body.dark-mode .kasa-header-cikis   { background: linear-gradient(135deg, rgba(198,40,40,0.15) 0%, rgba(198,40,40,0.08) 100%); color: #ef9a9a; }
[data-theme="dark"] .kasa-table thead th,
body.dark-mode .kasa-table thead th { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: #adb5bd; }
[data-theme="dark"] .kasa-table tbody tr:hover,
body.dark-mode .kasa-table tbody tr:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .kasa-th-link,
body.dark-mode .kasa-th-link { color: #adb5bd !important; }
[data-theme="dark"] .kasa-th-link:hover,
body.dark-mode .kasa-th-link:hover { color: #64b5f6 !important; }

/* ---- Card Premium ---- */
.dashboard-card {
  border: none !important;
  border-left: none !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  overflow: visible;
  background: #fff !important;
  animation: fnFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  transition: all 0.25s ease;
}
.dashboard-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 30px rgba(98,89,202,0.1);
}
.dashboard-card:nth-child(1) { animation-delay: 0s; }
.dashboard-card:nth-child(2) { animation-delay: 0.08s; }
.dashboard-card:nth-child(3) { animation-delay: 0.16s; }
.dashboard-card:nth-child(4) { animation-delay: 0.24s; }

.dashboard-card .card-header {
  background: linear-gradient(135deg, rgba(98,89,202,0.04), rgba(139,92,246,0.02));
  border-bottom: 1px solid rgba(0,0,0,0.04);
  padding: 16px 22px;
}
.dashboard-card .card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e1e2d;
  margin: 0;
  display: flex;
  align-items: center;
}
.dashboard-card .card-title i {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6259ca, #8b5cf6);
  color: #fff;
  font-size: 14px;
  opacity: 1;
  box-shadow: 0 3px 8px rgba(98,89,202,0.25);
}
.dashboard-card .card-body { padding: 20px; }

/* Gradient bar at top of card */
.card-gradient-bar {
  height: 3px;
  background: linear-gradient(90deg, #6259ca 0%, #8b5cf6 30%, #667eea 60%, #a78bfa 100%);
  border-radius: 16px 16px 0 0;
}

/* Card options (header buttons) */
.dashboard-card .card-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Parity Alert ---- */
.dash-alert {
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fnFadeIn 0.4s ease;
}
.dash-alert-danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(220,38,38,0.04));
  color: #991b1b;
  border-left: 4px solid #ef4444;
}
.dash-alert-danger b {
  color: #dc2626;
}
.dash-alert i.alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(239,68,68,0.3);
}

/* ---- Rate Cards Grid (Exchange Rates) ---- */
.rate-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rate-card-mini {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1px 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #f8f9fe;
  transition: all 0.2s;
  flex: 0 0 155px;
  min-width: 155px;
}
.rate-card-mini.rate-up {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), #f8f9fe 60%);
}
.rate-card-mini.rate-down {
  background: linear-gradient(135deg, rgba(239,68,68,0.06), #f8f9fe 60%);
}
.rate-card-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102,126,234,0.18);
  cursor: pointer;
}
.rate-card-mini.rate-up:hover {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), #eef0fc 60%);
  border-color: rgba(16,185,129,0.35);
}
.rate-card-mini.rate-down:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.12), #eef0fc 60%);
  border-color: rgba(239,68,68,0.35);
}
.rate-mini-name {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.3px;
}
.rate-mini-value {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rate-mini-change {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 100%;
  line-height: 1;
  text-align: right;
}
.rate-card-mini.rate-up .rate-mini-change { color: #059669; }
.rate-card-mini.rate-up .rate-mini-value { color: #065f46; }
.rate-card-mini.rate-down .rate-mini-change { color: #dc2626; }
.rate-card-mini.rate-down .rate-mini-value { color: #991b1b; }

/* ---- Modern Table ---- */
.modern-table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0;
}
.modern-table thead tr {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
}
.modern-table thead th {
  color: #fff !important;
  font-weight: 600;
  padding: 11px 14px;
  border: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modern-table thead th:first-child { border-radius: 10px 0 0 0; }
.modern-table thead th:last-child { border-radius: 0 10px 0 0; }
.modern-table tbody tr { transition: all 0.2s; }
.modern-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(99,102,241,0.04), rgba(139,92,246,0.06)) !important;
}
.modern-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
  color: #374151;
}
.modern-table tbody tr:last-child td { border-bottom: none; }
.modern-table tfoot td {
  font-weight: 700;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-top: 2px solid #8b5cf6;
  color: #4c1d95;
}
.modern-table thead.thead-success tr { background: linear-gradient(135deg, #10b981, #059669); }
.modern-table thead.thead-danger tr { background: linear-gradient(135deg, #ef4444, #dc2626); }
.modern-table thead.thead-primary tr { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.modern-table thead.thead-dark tr { background: linear-gradient(135deg, #1e293b, #334155); }

/* Editable inputs inside modern-table */
.modern-table input.form-control-sm,
.modern-table input.form-control {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  transition: all 0.2s;
  background: #fafbff;
  color:black!important;
}
.modern-table input.form-control-sm:focus,
.modern-table input.form-control:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
  background: #fff;
}

/* ---- Modern Tabs ---- */
.modern-tabs .nav-tabs,
.modern-tabs .panel-tabs {
  border-bottom: 2px solid rgba(0,0,0,0.05);
  padding: 0 8px;
}
.modern-tabs .nav-link {
  border: none !important;
  color: #8392a5;
  font-weight: 500;
  font-size: 12.5px;
  padding: 10px 16px;
  border-bottom: 3px solid transparent !important;
  margin-bottom: -2px;
  transition: all 0.25s;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}
.modern-tabs .nav-link:hover {
  color: #6366f1;
  background: rgba(99,102,241,0.04);
  border-bottom-color: rgba(99,102,241,0.3) !important;
}
.modern-tabs .nav-link.active {
  color: #6366f1 !important;
  font-weight: 700;
  border-bottom-color: #6366f1 !important;
  background: rgba(99,102,241,0.06);
}
.modern-tabs .nav-link i { margin-right: 6px; font-size: 14px; }

/* Tab badge */
.tab-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  margin-left: 6px;
  font-weight: 700;
}
.tab-badge:empty { display: none; }

/* ---- Quick Menu ---- */
.quick-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8f9fe 0%, #f0f1fa 100%);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.quick-menu-row:last-child { margin-bottom: 0; }
.quick-menu-row:hover {
  background: linear-gradient(145deg, #eeedfb 0%, #e8e7f8 100%);
  border-color: rgba(98,89,202,0.15);
  box-shadow: 0 4px 16px rgba(102,126,234,0.1);
  transform: translateX(2px);
}
.quick-menu-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.quick-menu-select { flex: 1; min-width: 0; }
.quick-menu-btn {
  min-width: 180px;
  font-size: 13px !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
}
@media (max-width: 768px) {
  .quick-menu-row { flex-wrap: wrap; }
  .quick-menu-icon { display: none; }
  .quick-menu-select { flex: 1 1 100%; }
  .quick-menu-btn { min-width: unset; flex: 1 1 100%; }
}

/* ---- Gradient Buttons ---- */
.btn-gradient-purple {
  background: linear-gradient(135deg, #6259ca, #8b5cf6);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(98,89,202,0.3);
}
.btn-gradient-purple:hover { color: #fff; background: linear-gradient(135deg, #564dbd, #7c3aed); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(98,89,202,0.4); }

.btn-gradient-dark {
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(51,65,85,0.3);
}
.btn-gradient-dark:hover { color: #fff; background: linear-gradient(135deg, #1e293b, #334155); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(51,65,85,0.4); }

.btn-gradient-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}
.btn-gradient-red:hover { color: #fff; background: linear-gradient(135deg, #dc2626, #b91c1c); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(239,68,68,0.4); }

.btn-gradient-orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}
.btn-gradient-orange:hover { color: #fff; background: linear-gradient(135deg, #d97706, #b45309); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.4); }

/* ---- Todo Card ---- */
.todo-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #e8ecf1;
  margin-bottom: 8px;
  background: #fff;
}
.todo-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.todo-card.todo-completed { border-left-color: #10b981; opacity: 0.7; }
.todo-card.todo-pending { border-left-color: #6366f1; }
.todo-card.todo-urgent { border-left-color: #ef4444; }
.todo-card .todo-title { font-size: 14px; font-weight: 600; color: #1a1a2e; }
.todo-card .todo-detail { font-size: 12.5px; color: #6c757d; margin-top: 4px; }
.todo-card .todo-meta { font-size: 11px; color: #8392a5; }
.todo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ---- Spot Parity Card ---- */
.spot-parity-card .card-body { padding: 0; }
.spot-parity-card .table { margin: 0; }
.spot-parity-card .modern-table thead th:first-child { border-radius: 0; }
.spot-parity-card .modern-table thead th:last-child { border-radius: 0; }

/* ---- Animations ---- */
@keyframes fnFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fn-fade-in { animation: fnFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* ---- Smooth transitions ---- */
.dashboard-card .card, .dashboard-card .btn, .dashboard-card .form-control, .dashboard-card .nav-link, .dashboard-card .badge {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   DARK MODE (data-theme-mode="dark")
   ============================================================ */
[data-theme-mode=dark] .dashboard-card {
  background: #1e293b !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
}
[data-theme-mode=dark] .dashboard-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
[data-theme-mode=dark] .dashboard-card .card-gradient-bar {
  display: none !important;
}
[data-theme-mode=dark] .dashboard-card .card-header {
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  background: transparent !important;
}
[data-theme-mode=dark] .dashboard-card .card-title {
  color: #f0f1f5 !important;
}
[data-theme-mode=dark] .dashboard-card .card-body {
  background: transparent !important;
}

/* Alert dark */
[data-theme-mode=dark] .dash-alert-danger {
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(220,38,38,0.06));
  color: #fca5a5;
}
[data-theme-mode=dark] .dash-alert-danger b { color: #f87171; }

/* Rate cards dark */
[data-theme-mode=dark] .rate-card-mini {
  background: #253347 !important;
  border-color: rgba(255,255,255,0.06) !important;
}
[data-theme-mode=dark] .rate-card-mini.rate-up {
  background: linear-gradient(135deg, rgba(16,185,129,0.1), #253347 60%) !important;
  border-left-color: #10b981 !important;
}
[data-theme-mode=dark] .rate-card-mini.rate-down {
  background: linear-gradient(135deg, rgba(239,68,68,0.1), #253347 60%) !important;
  border-left-color: #ef4444 !important;
}
[data-theme-mode=dark] .rate-card-mini:hover {
  box-shadow: 0 2px 10px rgba(99,102,241,0.18) !important;
  cursor: pointer;
}
[data-theme-mode=dark] .rate-card-mini.rate-up:hover {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), #253347 60%) !important;
  border-color: rgba(16,185,129,0.5) !important;
}
[data-theme-mode=dark] .rate-card-mini.rate-down:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.18), #253347 60%) !important;
  border-color: rgba(239,68,68,0.5) !important;
}
[data-theme-mode=dark] .rate-mini-name { color: #8a8ea8 !important; }
[data-theme-mode=dark] .rate-mini-value { color: #f0f1f5 !important; }
[data-theme-mode=dark] .rate-card-mini.rate-up .rate-mini-value { color: #6ee7b7 !important; }
[data-theme-mode=dark] .rate-card-mini.rate-down .rate-mini-value { color: #fca5a5 !important; }

/* Modern table dark */
[data-theme-mode=dark] .modern-table thead tr {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #5b21b6 100%) !important;
}
[data-theme-mode=dark] .modern-table tbody td {
  color: #e2e4ea !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}
[data-theme-mode=dark] .modern-table tbody tr {
  background: #1e293b !important;
}
[data-theme-mode=dark] .modern-table tbody tr:nth-child(even) {
  background: #253347 !important;
}
[data-theme-mode=dark] .modern-table tbody tr:hover {
  background: rgba(139,92,246,0.12) !important;
}
[data-theme-mode=dark] .modern-table tfoot td {
  background: rgba(99,102,241,0.1) !important;
  border-top-color: #6366f1 !important;
  color: #a5b4fc !important;
}
[data-theme-mode=dark] .modern-table input.form-control-sm,
[data-theme-mode=dark] .modern-table input.form-control {
  background: #1e2030 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e2e4ea !important;
}

/* Quick menu dark */
[data-theme-mode=dark] .quick-menu-row {
  background: linear-gradient(145deg, #1e293b 0%, #253347 100%) !important;
  border-color: rgba(255,255,255,0.06) !important;
}
[data-theme-mode=dark] .quick-menu-row:hover {
  background: linear-gradient(145deg, #253347 0%, #2d3f56 100%) !important;
  border-color: rgba(129,140,248,0.2) !important;
}

/* Todo dark */
[data-theme-mode=dark] .todo-card {
  background: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.2) !important;
}
[data-theme-mode=dark] .todo-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}
[data-theme-mode=dark] .todo-card .todo-title { color: #e2e8f0 !important; }
[data-theme-mode=dark] .todo-card .todo-detail { color: #8a8ea8 !important; }

/* Tabs dark */
[data-theme-mode=dark] .modern-tabs .nav-link {
  color: #8392a5 !important;
  background: transparent !important;
}
[data-theme-mode=dark] .modern-tabs .nav-link:hover {
  color: #a78bfa !important;
  background: rgba(139,92,246,0.06) !important;
}
[data-theme-mode=dark] .modern-tabs .nav-link.active {
  color: #a78bfa !important;
  background: rgba(139,92,246,0.08) !important;
  border-bottom-color: #a78bfa !important;
}

/* ============================================================
   DASHBOARD PANEL TOOLBAR - Drag/Resize/Hide
   ============================================================ */

/* Panel toolbar (appears on hover) */
.dash-panel .dp-toolbar {
  display: flex; align-items: center; gap: 4px;
  position: absolute; top: 8px; right: 18px; z-index: 10;
  opacity: 0; transition: opacity 0.2s;
}
.dash-panel:hover .dp-toolbar { opacity: 1; }

.dp-toolbar .dp-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08); background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #8392a5; font-size: 12px;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.dp-toolbar .dp-btn:hover {
  background: #6259ca; color: #fff; border-color: #6259ca;
  box-shadow: 0 2px 8px rgba(98,89,202,0.3);
}
.dp-toolbar .dp-btn.dp-drag { cursor: grab; }
.dp-toolbar .dp-btn.dp-drag:active { cursor: grabbing; }

/* Size indicator badge */
.dp-toolbar .dp-size-badge {
  font-size: 9px; font-weight: 700; color: #8392a5;
  padding: 2px 5px; border-radius: 4px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Hidden panel state */
.dash-panel.dp-hidden {
  display: none !important;
}

/* Dragging state */
.dash-panel.dp-dragging {
  opacity: 0.6; transform: scale(0.98);
  box-shadow: 0 10px 40px rgba(98,89,202,0.3) !important;
}
.dash-panel.dp-drag-over {
  outline: 2px dashed #6259ca; outline-offset: 4px;
  border-radius: 16px;
}

/* Settings bar */
.dp-settings-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 18px; margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(98,89,202,0.04), rgba(139,92,246,0.02));
  border: 1px solid rgba(98,89,202,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.dp-settings-bar .dp-settings-label {
  font-size: 11px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-right: 4px;
}
.dp-settings-bar .dp-settings-sep {
  width: 1px; height: 24px;
  background: rgba(0,0,0,0.08);
  margin: 0 4px;
}
.dp-settings-bar .dp-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 8px;
  font-size: 11px; font-weight: 600; color: #5b6e88;
  border: 1px solid rgba(0,0,0,0.06); background: #fff;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.dp-settings-bar .dp-toggle:hover { border-color: #6259ca; color: #6259ca; background: rgba(98,89,202,0.04); }
.dp-settings-bar .dp-toggle.active {
  background: linear-gradient(135deg, #6259ca, #8b5cf6); color: #fff; border-color: transparent;
  box-shadow: 0 2px 8px rgba(98,89,202,0.25);
}
.dp-settings-bar .dp-toggle i { font-size: 12px; }
.dp-settings-bar .dp-reset {
  margin-left: auto; padding: 5px 16px;
  border-radius: 8px; font-size: 11px; font-weight: 600;
  background: #fff; color: #64748b;
  border: 1px solid rgba(0,0,0,0.08); cursor: pointer;
  transition: all 0.2s;
}
.dp-settings-bar .dp-reset:hover { color: #dc2626; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }

/* Dark mode toolbar & settings */
[data-theme-mode=dark] .dp-toolbar .dp-btn {
  background: rgba(30,41,59,0.9); border-color: rgba(255,255,255,0.1); color: #a8afc7;
}
[data-theme-mode=dark] .dp-toolbar .dp-btn:hover {
  background: #6259ca; color: #fff; border-color: #6259ca;
}
[data-theme-mode=dark] .dp-toolbar .dp-size-badge {
  background: rgba(30,41,59,0.9); border-color: rgba(255,255,255,0.1); color: #a8afc7;
}
[data-theme-mode=dark] .dp-settings-bar {
  background: linear-gradient(135deg, rgba(98,89,202,0.08), rgba(139,92,246,0.04));
  border-color: rgba(255,255,255,0.06);
}
[data-theme-mode=dark] .dp-settings-bar .dp-settings-label { color: #a8afc7; }
[data-theme-mode=dark] .dp-settings-bar .dp-settings-sep { background: rgba(255,255,255,0.08); }
[data-theme-mode=dark] .dp-settings-bar .dp-toggle {
  background: #1a1a2e; border-color: rgba(255,255,255,0.08); color: #a8afc7;
}
[data-theme-mode=dark] .dp-settings-bar .dp-toggle:hover {
  border-color: rgba(98,89,202,0.4); color: #a78bfa; background: rgba(98,89,202,0.1);
}
[data-theme-mode=dark] .dp-settings-bar .dp-toggle.active {
  background: linear-gradient(135deg, #6259ca, #8b5cf6); color: #fff; border-color: transparent;
}
[data-theme-mode=dark] .dp-settings-bar .dp-reset {
  background: #1a1a2e; border-color: rgba(255,255,255,0.08); color: #a8afc7;
}
[data-theme-mode=dark] .dp-settings-bar .dp-reset:hover {
  color: #f87171; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08);
}
