/* Xpirax Super Admin - Teal Theme Design System */

:root, html[data-theme="light"] {
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-muted: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: #ccfbf1;
  --sidebar-bg: #061e1c;
  --sidebar-border: #0d3835;
  --sidebar-text: #99f6e4;
  --sidebar-hover: #0f2d2b;
  --sidebar-active: #134e4a;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg-base: #031716;
  --bg-surface: #072220;
  --bg-card: #0c2d2a;
  --bg-input: #041b19;
  --bg-hover: #113835;
  --border: #144743;
  --border-muted: #0f3532;
  --text-primary: #f0fdfa;
  --text-secondary: #99f6e4;
  --text-muted: #5eead4;
  --accent: #14b8a6;
  --accent-hover: #2dd4bf;
  --accent-light: #115e59;
  --sidebar-bg: #041211;
  --sidebar-border: #092624;
  --sidebar-text: #99f6e4;
  --sidebar-hover: #0a2f2c;
  --sidebar-active: #115e59;
  color-scheme: dark;
}

select, input, textarea {
  color-scheme: inherit;
}

html[data-theme="dark"] select {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

html[data-theme="dark"] select option {
  background-color: #072220;
  color: #f0fdfa;
}

html[data-theme="light"] select option {
  background-color: #ffffff;
  color: #0f172a;
}

.bo-sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.bo-sortable-th:hover {
  color: #5eead4;
  background-color: var(--bg-hover);
}
html[data-theme="light"] .bo-sortable-th:hover {
  color: #0f766e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 148, 136, 0.5);
}

/* Glassmorphism & Portal Cards */
.portal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.portal-card-glass {
  background: rgba(12, 45, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

html[data-theme="light"] .portal-card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Sidebar Group Accordion */
.sidebar-group-content {
  display: none;
}
.sidebar-group.open .sidebar-group-content {
  display: block;
}
.sidebar-group.open .chevron {
  transform: rotate(90deg);
}

/* Badge styles */
.badge-teal {
  background-color: rgba(13, 148, 136, 0.15);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Data Table Component Rules */
.bo-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  font-size: 0.75rem;
  line-height: 1rem;
}
.bo-table thead tr {
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border);
  color: #2dd4bf;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bo-table thead th {
  padding: 0.875rem 1rem;
}
.bo-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
}
.bo-table tbody tr:hover {
  background-color: var(--bg-hover);
}
.bo-table tbody td {
  padding: 0.875rem 1rem;
  color: var(--text-primary);
}

/* Standard Buttons */
.btn-teal-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.5rem;
  background-color: #0d9488;
  color: #ffffff;
  transition: all 0.15s ease;
}
.btn-teal-primary:hover {
  background-color: #14b8a6;
  color: #ffffff;
}
.btn-teal-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: #2dd4bf;
  transition: all 0.15s ease;
}
.btn-teal-subtle:hover {
  background-color: rgba(20, 184, 166, 0.2);
  color: #5eead4;
}
.btn-rose-subtle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fb7185;
  transition: all 0.15s ease;
}
.btn-rose-subtle:hover {
  background-color: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}


/* Form Input Components */
.bo-form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.5;
}
.bo-form-input:focus {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}
.bo-form-input::placeholder {
  color: var(--text-muted);
}
.bo-form-input option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* Checkbox / Toggle */
.bo-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #14b8a6;
  cursor: pointer;
}
