:root {
  /* Modern Color Palette 2028 - Dark Theme (Default) */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;

  /* Neutral Colors - Dark (Elegant soft white-gray) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #f1f5f9;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --cyan: #06b6d4;

  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables - Elegant Modern Gray */
body[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  /* Adjust shadows for light theme */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

body {
  overflow-x: hidden;
}

/* Light Theme - Sidebar with Light Background */
body[data-theme="light"] .sidebar {
  background: #f1f5f9 !important;
  border-right: 1px solid #e2e8f0 !important;
}

body[data-theme="light"] .sidebar-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

body[data-theme="light"] .sidebar .logo {
  color: #1e293b !important;
  font-weight: 700;
}

body[data-theme="light"] .sidebar,
body[data-theme="light"] .sidebar p,
body[data-theme="light"] .sidebar span,
body[data-theme="light"] .sidebar div {
  color: #475569 !important;
}

body[data-theme="light"] .sidebar .nav-link {
  color: #475569 !important;
}

body[data-theme="light"] .sidebar .nav-link:hover {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

body[data-theme="light"] .sidebar .nav-link.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: white !important;
}

body[data-theme="light"] .sidebar .submenu {
  background: #e2e8f0 !important;
}

body[data-theme="light"] .sidebar .submenu-link {
  color: #475569 !important;
}

body[data-business="narayana-hotel"] .sidebar,
body[data-business="narayana-hotel"] .sidebar * {
  color: #ffffff !important;
}

body[data-business="narayana-hotel"] .sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

body[data-business="narayana-hotel"] .sidebar .nav-link,
body[data-business="narayana-hotel"] .sidebar .submenu-link,
body[data-business="narayana-hotel"] .sidebar .menu-section,
body[data-business="narayana-hotel"] .sidebar .logo,
body[data-business="narayana-hotel"] .sidebar .sidebar-footer,
body[data-business="narayana-hotel"] .sidebar a,
body[data-business="narayana-hotel"] .sidebar span,
body[data-business="narayana-hotel"] .sidebar div,
body[data-business="narayana-hotel"] .sidebar p,
body[data-business="narayana-hotel"] .sidebar li {
  color: #ffffff !important;
}

body[data-business="narayana-hotel"] .sidebar .nav-link,
body[data-business="narayana-hotel"] .sidebar .submenu-link {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body[data-business="narayana-hotel"] .sidebar .nav-icon,
body[data-business="narayana-hotel"] .sidebar .submenu-icon,
body[data-business="narayana-hotel"] .sidebar svg,
body[data-business="narayana-hotel"] .sidebar i {
  color: #ffffff !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

body[data-business="narayana-hotel"] .sidebar .nav-link.active,
body[data-business="narayana-hotel"] .sidebar .submenu-link.active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-left-color: rgba(255, 255, 255, 0.55) !important;
}

body[data-business="narayana-hotel"] .sidebar .nav-link:hover,
body[data-business="narayana-hotel"] .sidebar .submenu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body[data-business="narayana-hotel"] .sidebar .submenu {
  background: rgba(15, 23, 42, 0.92) !important;
  border-radius: 10px;
}

body[data-business="narayana-hotel"] .sidebar .submenu-link {
  background: transparent !important;
  color: #ffffff !important;
}

body[data-business="narayana-hotel"] .sidebar .submenu-link.active,
body[data-business="narayana-hotel"] .sidebar .submenu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body[data-business="narayana-hotel"] .sidebar .sidebar-footer {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.98) 0%,
    rgba(17, 24, 39, 1) 100%
  ) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  .sidebar-footer
  > div:first-child
  > div:first-child {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  .sidebar-footer
  > div:first-child
  > div:last-child
  div:first-child {
  color: #ffffff !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  .sidebar-footer
  > div:first-child
  > div:last-child
  div:last-child,
body[data-business="narayana-hotel"] .sidebar .sidebar-footer > div:last-child {
  color: rgba(255, 255, 255, 0.72) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  select[onchange*="switchBusiness"],
body[data-business="narayana-hotel"] .sidebar select {
  background: linear-gradient(180deg, #1a2d4d 0%, #0f1f35 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  select[onchange*="switchBusiness"]:hover,
body[data-business="narayana-hotel"] .sidebar select:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: linear-gradient(180deg, #1e334d 0%, #132440 100%) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  select[onchange*="switchBusiness"]:focus,
body[data-business="narayana-hotel"] .sidebar select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

body[data-business="narayana-hotel"]
  .sidebar
  select[onchange*="switchBusiness"]
  option,
body[data-business="narayana-hotel"] .sidebar select option {
  background: #0f172a !important;
  color: #ffffff !important;
}

body[data-theme="light"] .sidebar .submenu-link:hover {
  background: #cbd5e1 !important;
  color: #0f172a !important;
}

body[data-theme="light"] .sidebar-footer {
  border-top: 1px solid #e2e8f0 !important;
  background: #e8eef5 !important;
  color: #0f172a !important;
}

body[data-theme="light"] .sidebar ::-webkit-scrollbar-track {
  background: #e2e8f0 !important;
}

body[data-theme="light"] .sidebar ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border-color: #e2e8f0 !important;
}

/* Light Theme - Main Content & Typography */
body[data-theme="light"] .page-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] h5,
body[data-theme="light"] h6 {
  color: #1e293b !important;
  font-weight: 700 !important;
}

body[data-theme="light"] .card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .card-title {
  color: #0f172a !important;
}

body[data-theme="light"] .form-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

body[data-theme="light"] .form-control {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

body[data-theme="light"] .form-control:focus {
  border-color: #6366f1 !important;
  background: #ffffff !important;
}

body[data-theme="light"] .btn {
  color: #ffffff !important;
}

body[data-theme="light"] .table {
  color: #1e293b !important;
}

body[data-theme="light"] .table th {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

body[data-theme="light"] .table td {
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

body[data-theme="light"] .table tr:hover {
  background: #f1f5f9 !important;
}

body[data-theme="light"] p,
body[data-theme="light"] span,
body[data-theme="light"] div,
body[data-theme="light"] li,
body[data-theme="light"] a {
  color: #475569 !important;
}

body[data-theme="light"] a {
  color: #6366f1 !important;
}

body[data-theme="light"] a:hover {
  color: #4f46e5 !important;
}

/* Light Theme - Aggressive Text Color Override - Elegant Gray */
body[data-theme="light"],
body[data-theme="light"] * {
  --text-primary: #1e293b !important;
  --text-secondary: #475569 !important;
  --text-muted: #64748b !important;
}

/* Force all text elements - Elegant gray in light theme */
body[data-theme="light"] p,
body[data-theme="light"] span,
body[data-theme="light"] div,
body[data-theme="light"] li,
body[data-theme="light"] td,
body[data-theme="light"] th,
body[data-theme="light"] label,
body[data-theme="light"] .form-label,
body[data-theme="light"] .text-muted,
body[data-theme="light"] .text-secondary {
  color: #475569 !important;
}

body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] h5,
body[data-theme="light"] h6,
body[data-theme="light"] .card-title,
body[data-theme="light"] .page-title {
  color: #1e293b !important;
}

body[data-theme="light"] a {
  color: #6366f1 !important;
}

body[data-theme="light"] a:hover {
  color: #4f46e5 !important;
}

/* Light Theme - Main Content Area */
body[data-theme="light"] .main-content,
body[data-theme="light"] .content-wrapper {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* Light Theme - Cards and Containers */
body[data-theme="light"] .card,
body[data-theme="light"] .container {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* Light Theme - Form Elements */
body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

/* Light Theme - Buttons */
body[data-theme="light"] .btn-primary {
  background: #6366f1 !important;
  color: #ffffff !important;
}

body[data-theme="light"] .btn-secondary {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

/* Light Theme - Tables */
body[data-theme="light"] table {
  background: #ffffff !important;
  color: #1e293b !important;
}

body[data-theme="light"] table thead {
  background: #f8fafc !important;
}

body[data-theme="light"] table th {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

body[data-theme="light"] table td {
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

/* Light Theme - Lists and Nav */
body[data-theme="light"] .nav,
body[data-theme="light"] ul,
body[data-theme="light"] ol {
  color: #475569 !important;
}

body[data-theme="light"] .nav-link,
body[data-theme="light"] a.nav-link {
  color: #475569 !important;
}

body[data-theme="light"] .nav-link:hover {
  color: #6366f1 !important;
}

/* Light Theme - Sections and Divs */
body[data-theme="light"] .section,
body[data-theme="light"] .content,
body[data-theme="light"] .page-content {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* Light Theme - Cards and Containers */
body[data-theme="light"] .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

body[data-theme="light"] .card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body[data-theme="light"] .card-title {
  color: #64748b !important;
}

body[data-theme="light"] .card-value {
  background: linear-gradient(135deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body[data-theme="light"] .card-icon.income {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15),
    rgba(16, 185, 129, 0.05)
  ) !important;
  color: #10b981 !important;
}

body[data-theme="light"] .card-icon.expense {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.15),
    rgba(239, 68, 68, 0.05)
  ) !important;
  color: #ef4444 !important;
}

body[data-theme="light"] .card-icon.balance {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(99, 102, 241, 0.05)
  ) !important;
  color: #6366f1 !important;
}

body[data-theme="light"] .text-success {
  color: #10b981 !important;
}

body[data-theme="light"] .text-danger {
  color: #ef4444 !important;
}

/* Light Theme - Database Indicator Box */
body[data-theme="light"]
  .sidebar-header
  > div[style*="background: rgba(99, 102, 241"] {
  background: #eef2ff !important;
  border-color: #bfdbfe !important;
}

body[data-theme="light"]
  .sidebar-header
  > div[style*="background: rgba(99, 102, 241"]
  > div:first-child {
  color: #6366f1 !important;
}

body[data-theme="light"]
  .sidebar-header
  > div[style*="background: rgba(99, 102, 241"]
  > div:last-child {
  color: #6366f1 !important;
  font-weight: 600 !important;
}

/* Light Theme - Business Selector */
body[data-theme="light"] select {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

body[data-theme="light"] select:hover,
body[data-theme="light"] select:focus {
  border-color: #6366f1 !important;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   CUSTOM SCROLLBAR - Elegant for Both Themes
   ============================================ */
/* Scrollbar untuk browser berbasis Webkit (Chrome, Safari, Edge baru) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-color) 100%
  );
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

::-webkit-scrollbar-thumb:active {
  background: var(--primary-dark);
}

/* Scrollbar untuk Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* Scrollbar khusus untuk sidebar agar lebih subtle tapi tetap terlihat */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 10px;
  margin: 10px 0;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.6) 0%,
    rgba(139, 92, 246, 0.6) 100%
  );
  border-radius: 10px;
  border: 2px solid var(--bg-secondary);
  transition: var(--transition);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.9) 0%,
    rgba(139, 92, 246, 0.9) 100%
  );
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

/* Scrollbar untuk table wrapper */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin: 0 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    90deg,
    var(--primary-dark) 0%,
    var(--secondary-color) 100%
  );
}

html {
  font-size: 12px;
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* Smooth transitions for theme changes */
.sidebar,
.main-content,
.card,
.table,
.form-control,
.btn {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
  width: 210px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--bg-tertiary);
  padding: 1.125rem;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--bg-tertiary);
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-footer {
  margin-top: auto;
}

.nav-menu {
  list-style: none;
  overflow-x: hidden;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-link.active {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

/* Dropdown Menu Styles */
.nav-item.has-submenu {
  position: relative;
}

.nav-link.dropdown-toggle {
  cursor: pointer;
  position: relative;
  width: 100%;
  user-select: none;
}

.nav-link.dropdown-toggle * {
  pointer-events: none;
}

.nav-link.dropdown-toggle::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.nav-item.has-submenu.open .nav-link.dropdown-toggle::after {
  transform: translateY(-50%) rotate(180deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  padding-left: 0;
  list-style: none;
}

.nav-item.has-submenu.open .submenu {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.5rem;
}

.submenu-item {
  margin-bottom: 0.25rem;
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.813rem;
}

.submenu-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding-left: 2.75rem;
}

.submenu-link.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border-left: 3px solid var(--primary-color);
}

.submenu-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  margin-left: 210px;
  width: calc(100% - 210px);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
  box-sizing: border-box;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ============================================
   CARDS & WIDGETS
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}

.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--bg-tertiary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.card-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.card-icon.income {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(16, 185, 129, 0.05)
  );
  color: var(--success);
}

.card-icon.expense {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.2),
    rgba(239, 68, 68, 0.05)
  );
  color: var(--danger);
}

.card-icon.balance {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2),
    rgba(99, 102, 241, 0.05)
  );
  color: var(--primary-color);
}

.card-value {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  background: linear-gradient(
    135deg,
    var(--text-primary),
    var(--text-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.trend.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.trend.down {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* ============================================
   TABLE
   ============================================ */
.table-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 1.125rem;
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.125rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.table-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.table-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

tbody tr {
  border-bottom: 1px solid var(--bg-tertiary);
  transition: var(--transition);
}

tbody tr:hover {
  background: var(--bg-tertiary);
}

tbody td {
  padding: 0.75rem;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge.income {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge.expense {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a2e;
  font-weight: 700;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.813rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.125rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

select.form-control {
  cursor: pointer;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    padding: 0;
    border: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0.75rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .table-container {
    overflow-x: scroll;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-1 {
  gap: 0.5rem;
}
.gap-2 {
  gap: 1rem;
}
.gap-3 {
  gap: 1.5rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* ============================================
   ELEGANT TEXT COLORS - Theme Adaptive
   ============================================ */

/* Dark Theme - Soft White/Gray instead of pure white */
body:not([data-theme="light"]) {
  color: var(--text-primary);
}

body:not([data-theme="light"]) h1,
body:not([data-theme="light"]) h2,
body:not([data-theme="light"]) h3,
body:not([data-theme="light"]) h4,
body:not([data-theme="light"]) h5,
body:not([data-theme="light"]) h6 {
  color: #f1f5f9;
}

body:not([data-theme="light"]) p,
body:not([data-theme="light"]) span:not(.badge):not([class*="bg-"]),
body:not([data-theme="light"]) div:not([class*="bg-"]),
body:not([data-theme="light"]) li,
body:not([data-theme="light"]) td,
body:not([data-theme="light"]) th,
body:not([data-theme="light"]) label {
  color: #e2e8f0;
}

body:not([data-theme="light"]) .text-muted,
body:not([data-theme="light"]) small,
body:not([data-theme="light"]) .small {
  color: #94a3b8 !important;
}

/* Override inline white color styles in Light Theme */
body[data-theme="light"] [style*="color: white"],
body[data-theme="light"] [style*="color:#fff"],
body[data-theme="light"] [style*="color: #fff"],
body[data-theme="light"] [style*="color:#ffffff"],
body[data-theme="light"] [style*="color: #ffffff"],
body[data-theme="light"] [style*="color: rgb(255, 255, 255)"] {
  color: #1e293b !important;
}

/* Override inline black color styles in Dark Theme */
body:not([data-theme="light"]) [style*="color: black"],
body:not([data-theme="light"]) [style*="color:#000"],
body:not([data-theme="light"]) [style*="color: #000"],
body:not([data-theme="light"]) [style*="color:#000000"],
body:not([data-theme="light"]) [style*="color: #000000"],
body:not([data-theme="light"]) [style*="color: rgb(0, 0, 0)"] {
  color: #e2e8f0 !important;
}

/* Exclude buttons from color override - but NOT badges with explicit colors */
body[data-theme="light"] .btn,
body[data-theme="light"] [class*="btn-"],
body[data-theme="light"] [class*="bg-"] {
  color: inherit;
}

/* Light theme specific overrides for common inline styled elements */
body[data-theme="light"] [style*="color: var(--text-primary)"],
body[data-theme="light"] [style*="color:var(--text-primary)"] {
  color: #1e293b !important;
}

body[data-theme="light"] [style*="color: var(--text-secondary)"],
body[data-theme="light"] [style*="color:var(--text-secondary)"] {
  color: #475569 !important;
}

body[data-theme="light"] [style*="color: var(--text-muted)"],
body[data-theme="light"] [style*="color:var(--text-muted)"] {
  color: #64748b !important;
}

/* Modal text colors */
body[data-theme="light"] .modal-content,
body[data-theme="light"] .modal-body,
body[data-theme="light"] .modal-header,
body[data-theme="light"] .modal-footer {
  color: #1e293b !important;
  background: #ffffff !important;
}

body[data-theme="light"] .modal-title {
  color: #1e293b !important;
}

/* Dropdown text colors */
body[data-theme="light"] .dropdown-menu {
  background: #ffffff !important;
  color: #1e293b !important;
}

body[data-theme="light"] .dropdown-item {
  color: #475569 !important;
}

body[data-theme="light"] .dropdown-item:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

/* Toast/Alert text colors */
body[data-theme="light"] .alert {
  color: #1e293b !important;
}

/* Stat card values */
body[data-theme="light"] .stat-value,
body[data-theme="light"] .card-value {
  color: #1e293b !important;
}

body[data-theme="light"] .stat-label,
body[data-theme="light"] .card-label {
  color: #64748b !important;
}
