/**
 * Admin Panel Theme Variables
 * Dark/Light mode CSS custom properties
 * Generated by Claude Code
 */

/* ============================================
   LIGHT THEME (Default)
   ============================================ */
:root,
[data-theme="light"] {
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;        /* gray-50 */
  --bg-tertiary: #f3f4f6;         /* gray-100 */
  --bg-hover: #f9fafb;            /* gray-50 */
  --bg-active: #f3f4f6;           /* gray-100 */
  --bg-elevated: #ffffff;         /* Modals, dropdowns */

  /* Text Colors */
  --text-primary: #111827;        /* gray-900 */
  --text-secondary: #374151;      /* gray-700 */
  --text-tertiary: #6b7280;       /* gray-500 */
  --text-muted: #9ca3af;          /* gray-400 */
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-primary: #e5e7eb;      /* gray-200 */
  --border-secondary: #d1d5db;    /* gray-300 */
  --border-tertiary: #9ca3af;     /* gray-400 */

  /* Shadow Colors */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Input & Form Colors */
  --input-bg: #ffffff;
  --input-border: #d1d5db;        /* gray-300 */
  --input-text: #111827;          /* gray-900 */
  --input-placeholder: #9ca3af;   /* gray-400 */
  --input-focus-border: #3b82f6;  /* blue-500 */
  --input-disabled-bg: #f3f4f6;   /* gray-100 */

  /* Table Colors */
  --table-header-bg: #f9fafb;     /* gray-50 */
  --table-row-bg: #ffffff;
  --table-row-alt-bg: #f9fafb;    /* gray-50 */
  --table-row-hover: #f3f4f6;     /* gray-100 */
  --table-border: #e5e7eb;        /* gray-200 */

  /* Card Colors */
  --card-bg: #ffffff;
  --card-border: #e5e7eb;         /* gray-200 */
  --card-header-bg: #f9fafb;      /* gray-50 */

  /* Sidebar Colors */
  --sidebar-bg: #ffffff;          /* white for light theme */
  --sidebar-text: #374151;        /* gray-700 */
  --sidebar-border: #e5e7eb;      /* gray-200 */

  /* Header Colors */
  --header-bg: #ffffff;
  --header-border: #e5e7eb;       /* gray-200 */
  --header-text: #374151;         /* gray-700 */

  /* Dropdown Colors */
  --dropdown-bg: #ffffff;
  --dropdown-border: #e5e7eb;     /* gray-200 */
  --dropdown-item-hover: #f9fafb; /* gray-50 */

  /* Modal Colors */
  --modal-bg: #ffffff;
  --modal-backdrop: rgba(0, 0, 0, 0.5);
  --modal-header-bg: #f9fafb;     /* gray-50 */
  --modal-footer-bg: #f9fafb;     /* gray-50 */

  /* Icon Colors */
  --icon-primary: #6b7280;        /* gray-500 */
  --icon-secondary: #9ca3af;      /* gray-400 */
  --icon-tertiary: #d1d5db;       /* gray-300 */

  /* Divider Colors */
  --divider-color: #e5e7eb;       /* gray-200 */

  /* Code Editor Colors */
  --code-bg: #f3f4f6;             /* gray-100 */
  --code-text: #111827;           /* gray-900 */
  --code-border: #e5e7eb;         /* gray-200 */
}

/* ============================================
   DARK THEME
   ============================================ */
[data-theme="dark"] {
  /* Background Colors */
  --bg-primary: #1f2937;          /* gray-800 */
  --bg-secondary: #111827;        /* gray-900 */
  --bg-tertiary: #374151;         /* gray-700 */
  --bg-hover: #374151;            /* gray-700 */
  --bg-active: #4b5563;           /* gray-600 */
  --bg-elevated: #1f2937;         /* gray-800 - Modals, dropdowns */

  /* Text Colors */
  --text-primary: #f9fafb;        /* gray-50 */
  --text-secondary: #e5e7eb;      /* gray-200 */
  --text-tertiary: #d1d5db;       /* gray-300 */
  --text-muted: #9ca3af;          /* gray-400 */
  --text-inverse: #111827;        /* gray-900 */

  /* Border Colors */
  --border-primary: #374151;      /* gray-700 */
  --border-secondary: #4b5563;    /* gray-600 */
  --border-tertiary: #6b7280;     /* gray-500 */

  /* Shadow Colors */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);

  /* Input & Form Colors */
  --input-bg: #374151;            /* gray-700 */
  --input-border: #4b5563;        /* gray-600 */
  --input-text: #f9fafb;          /* gray-50 */
  --input-placeholder: #9ca3af;   /* gray-400 */
  --input-focus-border: #60a5fa;  /* blue-400 */
  --input-disabled-bg: #1f2937;   /* gray-800 */

  /* Table Colors */
  --table-header-bg: #111827;     /* gray-900 */
  --table-row-bg: #1f2937;        /* gray-800 */
  --table-row-alt-bg: #111827;    /* gray-900 */
  --table-row-hover: #374151;     /* gray-700 */
  --table-border: #374151;        /* gray-700 */

  /* Card Colors */
  --card-bg: #1f2937;             /* gray-800 */
  --card-border: #374151;         /* gray-700 */
  --card-header-bg: #111827;      /* gray-900 */

  /* Sidebar Colors */
  --sidebar-bg: #111827;          /* gray-900 */
  --sidebar-text: #d1d5db;        /* gray-300 */
  --sidebar-border: #374151;      /* gray-700 */

  /* Header Colors */
  --header-bg: #1f2937;           /* gray-800 */
  --header-border: #374151;       /* gray-700 */
  --header-text: #e5e7eb;         /* gray-200 */

  /* Dropdown Colors */
  --dropdown-bg: #1f2937;         /* gray-800 */
  --dropdown-border: #374151;     /* gray-700 */
  --dropdown-item-hover: #374151; /* gray-700 */

  /* Modal Colors */
  --modal-bg: #1f2937;            /* gray-800 */
  --modal-backdrop: rgba(0, 0, 0, 0.75);
  --modal-header-bg: #111827;     /* gray-900 */
  --modal-footer-bg: #111827;     /* gray-900 */

  /* Icon Colors */
  --icon-primary: #9ca3af;        /* gray-400 */
  --icon-secondary: #6b7280;      /* gray-500 */
  --icon-tertiary: #4b5563;       /* gray-600 */

  /* Divider Colors */
  --divider-color: #374151;       /* gray-700 */

  /* Code Editor Colors */
  --code-bg: #111827;             /* gray-900 */
  --code-text: #f9fafb;           /* gray-50 */
  --code-border: #374151;         /* gray-700 */
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Themed Backgrounds */
.themed-bg-primary { background-color: var(--bg-primary); }
.themed-bg-secondary { background-color: var(--bg-secondary); }
.themed-bg-tertiary { background-color: var(--bg-tertiary); }
.themed-bg-elevated { background-color: var(--bg-elevated); }

/* Themed Text */
.themed-text-primary { color: var(--text-primary); }
.themed-text-secondary { color: var(--text-secondary); }
.themed-text-tertiary { color: var(--text-tertiary); }
.themed-text-muted { color: var(--text-muted); }

/* Themed Borders */
.themed-border { border-color: var(--border-primary); }
.themed-border-secondary { border-color: var(--border-secondary); }

/* Themed Cards */
.themed-card {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-primary);
}

.themed-card-header {
  background-color: var(--card-header-bg);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

/* Themed Tables */
.themed-table {
  background-color: var(--table-row-bg);
  color: var(--text-primary);
}

.themed-table thead {
  background-color: var(--table-header-bg);
  border-color: var(--table-border);
}

.themed-table tr {
  border-color: var(--table-border);
}

.themed-table tr:hover {
  background-color: var(--table-row-hover);
}

/* Themed Inputs */
.themed-input {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}

.themed-input::placeholder {
  color: var(--input-placeholder);
}

.themed-input:focus {
  border-color: var(--input-focus-border);
  background-color: var(--input-bg);
}

.themed-input:disabled {
  background-color: var(--input-disabled-bg);
  cursor: not-allowed;
}

/* Themed Modals */
.themed-modal {
  background-color: var(--modal-bg);
  color: var(--text-primary);
}

.themed-modal-header {
  background-color: var(--modal-header-bg);
  border-color: var(--border-primary);
}

.themed-modal-footer {
  background-color: var(--modal-footer-bg);
  border-color: var(--border-primary);
}

/* Themed Dropdowns */
.themed-dropdown {
  background-color: var(--dropdown-bg);
  border-color: var(--dropdown-border);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.themed-dropdown-item:hover {
  background-color: var(--dropdown-item-hover);
}

/* Hover States */
.themed-hover:hover {
  background-color: var(--bg-hover);
}

/* Dividers */
.themed-divider {
  border-color: var(--divider-color);
}

/* Shadows */
.themed-shadow-sm { box-shadow: var(--shadow-sm); }
.themed-shadow { box-shadow: var(--shadow); }
.themed-shadow-md { box-shadow: var(--shadow-md); }
.themed-shadow-lg { box-shadow: var(--shadow-lg); }
.themed-shadow-xl { box-shadow: var(--shadow-xl); }

/* Smooth Transitions */
.theme-transition {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Icon Theming */
.themed-icon {
  color: var(--icon-primary);
}

.themed-icon-secondary {
  color: var(--icon-secondary);
}

/* Code Editor Theming */
.themed-code {
  background-color: var(--code-bg);
  color: var(--code-text);
  border-color: var(--code-border);
}

/* ============================================
   GLOBAL ADMIN PANEL THEMING
   Auto-theme common admin panel elements
   ============================================ */

/* Dashboard Body & Background */
.dashboard__body {
  background-color: var(--bg-secondary) !important;
  transition: background-color 0.3s ease;
}

/* Custom Markup Cards (used in 44+ pages) */
.customMarkup__single {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-primary) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s ease;
}

.customMarkup__single__title {
  color: var(--text-primary) !important;
  transition: color 0.3s ease;
}

/* Data Tables */
.DataTable_activation,
.custom_table table {
  background-color: var(--table-row-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--table-border) !important;
  transition: all 0.3s ease;
}

.DataTable_activation thead,
.custom_table thead {
  background-color: var(--table-header-bg) !important;
  border-color: var(--table-border) !important;
}

.DataTable_activation thead th,
.custom_table thead th {
  color: var(--text-muted) !important;
  border-color: var(--table-border) !important;
}

.DataTable_activation tbody,
.custom_table tbody {
  background-color: var(--table-row-bg) !important;
}

.DataTable_activation tbody tr,
.custom_table tbody tr {
  border-color: var(--table-border) !important;
  transition: background-color 0.2s ease;
}

.DataTable_activation tbody tr:hover,
.custom_table tbody tr:hover {
  background-color: var(--table-row-hover) !important;
}

.DataTable_activation tbody td,
.custom_table tbody td {
  color: var(--text-primary) !important;
  border-color: var(--table-border) !important;
}

/* Form Inputs & Labels */
.single-input label,
.form-group label,
.label-title {
  color: var(--text-secondary) !important;
  transition: color 0.3s ease;
}

.form-control,
.form--control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="date"],
textarea,
select {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--input-text) !important;
  transition: all 0.3s ease;
}

.form-control:focus,
.form--control:focus,
input:focus,
textarea:focus,
select:focus {
  background-color: var(--input-bg) !important;
  border-color: var(--input-focus-border) !important;
}

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

/* Modals */
.modal-content {
  background-color: var(--modal-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-primary) !important;
  transition: all 0.3s ease;
}

.modal-header {
  background-color: var(--modal-header-bg) !important;
  border-color: var(--border-primary) !important;
}

.modal-header .modal-title {
  color: var(--text-primary) !important;
}

.modal-body {
  background-color: var(--modal-bg) !important;
  color: var(--text-primary) !important;
}

.modal-footer {
  background-color: var(--modal-footer-bg) !important;
  border-color: var(--border-primary) !important;
}

/* Dropdowns */
.dropdown-menu {
  background-color: var(--dropdown-bg) !important;
  border-color: var(--dropdown-border) !important;
  box-shadow: var(--shadow-lg) !important;
  transition: all 0.3s ease;
}

.dropdown-item {
  color: var(--text-primary) !important;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--dropdown-item-hover) !important;
}

/* Notices & Alerts */
.alert-info,
.notice-board {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

/* Pagination */
.pagination {
  background-color: var(--card-bg) !important;
}

.page-link {
  background-color: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: var(--bg-hover) !important;
}

.page-item.active .page-link {
  background-color: var(--bg-active) !important;
  border-color: var(--border-secondary) !important;
}

/* Cards & Panels */
.card,
.panel {
  background-color: var(--card-bg) !important;
  border-color: var(--card-border) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s ease;
}

.card-header,
.panel-heading {
  background-color: var(--card-header-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.card-body,
.panel-body {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

/* List Groups */
.list-group-item {
  background-color: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: var(--bg-hover) !important;
}

/* Tabs */
.nav-tabs {
  border-color: var(--border-primary) !important;
}

.nav-tabs .nav-link {
  color: var(--text-secondary) !important;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  background-color: var(--bg-hover) !important;
  border-color: var(--border-primary) !important;
}

.nav-tabs .nav-link.active {
  background-color: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.tab-content {
  background-color: var(--card-bg) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

/* Breadcrumbs */
.breadcrumb {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
}

.breadcrumb-item a {
  color: var(--text-secondary) !important;
}

.breadcrumb-item.active {
  color: var(--text-primary) !important;
}

/* Text Elements */
p, span, div, li, td, th, label {
  transition: color 0.3s ease;
}

/* Dividers */
hr {
  border-color: var(--divider-color) !important;
  transition: border-color 0.3s ease;
}