/* Obra Control V2 - Ultimate High-Contrast Dark Architectural Design System */
:root {
  --bg-dark: #0b0f17;
  --bg-card: #182238;
  --bg-input: #0f172a;
  --border-light: rgba(255, 255, 255, 0.12);
  --text-white: #ffffff;
  --text-gray: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --font-main: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-numbers: 'Geist Mono', monospace;
}

/* Global Reset & Base */
html, body {
  background-color: #0b0f17 !important;
  color: #f8fafc !important;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#app {
  margin: 0 !important;
  min-height: 100vh !important;
  background-color: #0b0f17 !important;
  border: 0 !important;
  box-shadow: none !important;
}

aside {
  background-color: #0b0f17 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.brand {
  background: transparent !important;
  border: 0 !important;
  color: #ffffff !important;
  font-family: 'Geist', sans-serif !important;
  font-weight: 700 !important;
}

nav button {
  color: #94a3b8 !important;
}

nav button:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

nav button.selected {
  color: #ffffff !important;
  background: rgba(59, 130, 246, 0.2) !important;
  border-left: 3px solid #3b82f6 !important;
}

/* Main Layout & Header Dark Contrast Enforcements */
main {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

main header {
  background-color: #0b0f17 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 16px 24px !important;
}

main header #crumb {
  color: #94a3b8 !important;
  font: 600 11px 'Geist Mono', monospace !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

main header h1, main header #pageTitle {
  color: #ffffff !important;
  font-family: 'Geist', sans-serif !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  margin: 4px 0 0 0 !important;
}

/* Headings */
h1, h2, h3, h4 {
  color: #ffffff !important;
  font-family: 'Geist', sans-serif !important;
  font-weight: 700 !important;
}


/* Metric Cards & Summary Panels */
.metric, .metrics, .report-hero, .accounts article, .contract-summary article,
.destajo-executive-title, .destajo-executive-metrics article, .destajo-executive,
.executive-panel, .executive-kpis .metric, .allocation-panel, .prod-task,
.work-project-group, .plan-intro, .report-export, .contractor-executive {
  background: #182238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.metric strong, .metrics strong, .accounts article strong, .report-grid strong,
.contract-summary b, .destajo-executive-metrics b, .executive-kpis .metric strong,
.plan-intro-note b, .contractor-executive-total b {
  color: #ffffff !important;
  font-family: 'Geist Mono', monospace !important;
  font-weight: 700 !important;
}

.metric span, .metric small, .accounts article span, .contract-summary span,
.contract-summary small, .destajo-executive-metrics span, .destajo-executive-title span,
.executive-panel header span, .executive-panel header p {
  color: #94a3b8 !important;
  font-family: 'Geist Mono', monospace !important;
}

/* Filter Controls & Panels */
.finance-filter-panel, .filter-controls, .contract-report-filters,
.prod-capture, .prod-toolbar, .executive-filter, .filter-panel-head {
  background: #182238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
}

.filter-panel-head b, .filter-panel-head p, .filter-controls label span,
.contract-report-filters label span, .contract-report-head p, .contract-report-head span {
  color: #94a3b8 !important;
  font-family: 'Geist Mono', monospace !important;
  font-weight: 600 !important;
}

/* Inputs, Selects, and Textareas */
input, select, textarea,
.filter-controls input, .filter-controls select,
.contract-report-filters select, .quick-search input {
  height: auto !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-family: 'Geist', sans-serif !important;
  font-size: 13px !important;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid #3b82f6 !important;
  border-color: #3b82f6 !important;
  background-color: #131b2e !important;
}

select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

/* Tables */
.table-wrap, table {
  background: #182238 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

th, .contractor-ledger th, .work-contractor th {
  background: #0b0f17 !important;
  color: #94a3b8 !important;
  font-family: 'Geist Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

td, .contractor-ledger td, .work-contractor td {
  color: #cbd5e1 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: transparent !important;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

td b, td strong, .amount, .monto, .saldo {
  color: #ffffff !important;
  font-family: 'Geist Mono', monospace !important;
  font-weight: 700 !important;
}

td small, td span {
  color: #94a3b8 !important;
}

/* Consolidation Row Headers in Tables */
.contractor-ledger .consolidation-group td, .work-project-group > header {
  background: #1e293b !important;
  color: #ffffff !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Buttons */
.action, .prod-primary, button.primary, .exec-hero-actions .minor:last-child {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 0 !important;
  padding: 10px 18px !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  cursor: pointer !important;
}

.minor, button.minor, .prod-button, .exec-hero-actions .minor, .bell {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}

.minor:hover, .prod-button:hover {
  background: #334155 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.danger, .row-actions .danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

.danger:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #ffffff !important;
}

.pay, .row-actions .pay {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

/* Modals */
dialog form {
  background: #182238 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
  border-radius: 12px !important;
  padding: 32px !important;
}

dialog::backdrop {
  background: rgba(11, 15, 23, 0.85) !important;
  backdrop-filter: blur(8px) !important;
}

/* Brikel.io Projects Page 1:1 Design Replication */
.brikel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .brikel-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 650px) {
  .brikel-kpi-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.brikel-kpi-card {
  background: #182238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.brikel-kpi-card span {
  display: block;
  font: 600 10px 'Geist Mono', monospace !important;
  letter-spacing: 0.08em !important;
  color: #94a3b8 !important;
  text-transform: uppercase;
}

.brikel-kpi-card strong {
  display: block;
  font: 700 24px 'Geist Mono', monospace !important;
  color: #ffffff !important;
  margin: 8px 0 2px !important;
}

.brikel-kpi-card strong.good {
  color: #34d399 !important;
}

.brikel-kpi-card p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 11px !important;
}

.brikel-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.brikel-tabs {
  display: flex;
  gap: 8px;
}

.brikel-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  padding: 8px 16px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.brikel-tab.active, .brikel-tab:hover {
  color: #ffffff;
  border-bottom-color: #f97316;
}

.brikel-search-box {
  min-width: 280px;
}

.brikel-search-box input {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  padding: 9px 14px !important;
  color: #ffffff !important;
  width: 100%;
}

.brikel-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.brikel-project-card {
  background: #182238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 20px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brikel-project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.4) !important;
}

.brikel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.brikel-project-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brikel-project-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.12);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.brikel-project-title-group h3 {
  margin: 0 !important;
  font-size: 17px !important;
  font-family: 'Geist', sans-serif !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.brikel-project-title-group p {
  margin: 2px 0 0 !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
}

.brikel-badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font: 600 10px 'Geist Mono', monospace;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brikel-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

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

.brikel-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brikel-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
}

.brikel-progress-header strong {
  color: #ffffff;
  font-family: 'Geist Mono', monospace;
}

.brikel-bar-track {
  height: 6px;
  background: #0b0f17;
  border-radius: 3px;
  overflow: hidden;
}

.brikel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #f97316);
  border-radius: 3px;
}

.brikel-bar-fill.green {
  background: #10b981;
}

.brikel-tag-pills {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.brikel-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font: 600 9px 'Geist Mono', monospace;
  letter-spacing: 0.04em;
}

.brikel-pill.ok {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.brikel-financial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #0b0f17;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.brikel-financial-grid span {
  display: block;
  font: 600 9px 'Geist Mono', monospace;
  color: #64748b;
  letter-spacing: 0.06em;
}

.brikel-financial-grid b {
  display: block;
  font: 700 15px 'Geist Mono', monospace;
  color: #ffffff;
  margin-top: 3px;
}

.brikel-collected-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brikel-collected-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

.brikel-collected-header b {
  color: #34d399;
  font-family: 'Geist Mono', monospace;
}

.brikel-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  font-size: 11px;
  color: #64748b;
  font-family: 'Geist Mono', monospace;
}

.brikel-card-actions {
  display: flex;
  gap: 8px;
}

.brikel-card-actions .action {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #ffffff !important;
  border: 1px solid #c2410c !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3) !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
}

/* ─── Brikel Portfolio Page (bp-*) ─── */

/* KPI Row */
.bp-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .bp-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

.bp-kpi-card {
  background: var(--card-bg, #182238);
  border: 1px solid var(--card-border, rgba(255,255,255,0.1));
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bp-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

[data-theme="light"] .bp-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.bp-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bp-kpi-body span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
}

[data-theme="light"] .bp-kpi-body span { color: #64748b; }

.bp-kpi-body strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.1;
  margin-bottom: 2px;
}

[data-theme="light"] .bp-kpi-body strong { color: #0f172a; }

.bp-kpi-body strong small {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.bp-kpi-body p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

/* Filter Tabs */
.bp-filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.bp-filter-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--card-border, rgba(255,255,255,0.12));
  border-radius: 8px;
  overflow: hidden;
}

[data-theme="light"] .bp-filter-tabs {
  border: 1px solid #e2e8f0;
}

.bp-ftab {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Geist', sans-serif;
}

.bp-ftab:last-child { border-right: none; }

.bp-ftab:hover {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
}

[data-theme="light"] .bp-ftab {
  border-right: 1px solid #e2e8f0;
  color: #64748b;
}

[data-theme="light"] .bp-ftab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.bp-ftab.selected {
  background: rgba(249,115,22,0.12);
  color: #f97316;
  font-weight: 700;
}

[data-theme="light"] .bp-ftab.selected {
  background: #fff7ed;
  color: #ea580c;
}

/* Project List */
.bp-project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Project Card */
.bp-project-card {
  background: var(--card-bg, #182238);
  border: 1px solid var(--card-border, rgba(255,255,255,0.1));
  border-radius: 14px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bp-project-card:hover {
  border-color: rgba(249,115,22,0.35);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

[data-theme="light"] .bp-project-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

[data-theme="light"] .bp-project-card:hover {
  border-color: #f97316;
  box-shadow: 0 4px 16px rgba(249,115,22,0.1);
}

/* Card Left (donut side) */
.bp-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  border-right: 1px solid rgba(255,255,255,0.07);
  min-width: 140px;
  background: rgba(0,0,0,0.1);
}

[data-theme="light"] .bp-card-left {
  background: #f8fafc;
  border-right: 1px solid #f1f5f9;
}

.bp-donut {
  display: block;
  overflow: visible;
}

.bp-donut-text {
  font-family: 'Geist', sans-serif;
}

[data-theme="light"] .bp-donut circle:first-child {
  stroke: #e2e8f0;
}

.bp-card-progress-label {
  text-align: center;
}

.bp-card-progress-label b {
  display: block;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.bp-status-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.bp-pill-ok {
  font-size: 10px;
  color: #22c55e;
  background: rgba(34,197,94,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

.bp-pill-warn {
  font-size: 10px;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* Card Main Content */
.bp-card-main {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.bp-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bp-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bp-card-proj-icon {
  font-size: 22px;
  line-height: 1;
}

.bp-card-title-group h3 {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 2px 0;
}

[data-theme="light"] .bp-card-title-group h3 { color: #0f172a; }

.bp-card-title-group p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* Status Badges */
.bp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bp-badge-active {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
}

.bp-badge-paused {
  background: rgba(148,163,184,0.12);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.25);
}

/* Stats Row */
.bp-card-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bp-stat-mini {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px 14px;
}

[data-theme="light"] .bp-stat-mini {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.bp-stat-mini span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.bp-stat-mini b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

[data-theme="light"] .bp-stat-mini b { color: #0f172a; }

.bp-stat-mini small {
  font-size: 11px;
  color: #64748b;
}

/* Cobrado Bar */
.bp-cobrado-section {}

.bp-cobrado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bp-cobrado-header span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #94a3b8;
  text-transform: uppercase;
}

.bp-cobrado-header b {
  font-size: 13px;
  color: #f1f5f9;
}

[data-theme="light"] .bp-cobrado-header b { color: #0f172a; }

.bp-cobrado-header b small {
  font-size: 11px;
  color: #64748b;
  margin-left: 4px;
}

.bp-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

[data-theme="light"] .bp-bar-track {
  background: #e2e8f0;
}

.bp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #fb923c);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 3px;
}

/* Card Footer */
.bp-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

[data-theme="light"] .bp-card-footer-row {
  border-top: 1px solid #f1f5f9;
}

.bp-date-range {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bp-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bp-btn-minor {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Geist', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bp-btn-minor:hover {
  border-color: rgba(255,255,255,0.3);
  color: #e2e8f0;
}

[data-theme="light"] .bp-btn-minor {
  border: 1px solid #e2e8f0;
  color: #64748b;
}

[data-theme="light"] .bp-btn-minor:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.bp-btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border: none;
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Geist', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(249,115,22,0.35);
}

.bp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.45);
}

/* Quick Project Selector in Sidebar */
.sidebar-project-quicknav {
  padding: 10px 12px;
  margin: 4px 10px 14px 10px;
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

[data-theme="light"] .sidebar-project-quicknav {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sidebar-project-quicknav label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #f97316;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sidebar-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 10px;
  transition: border-color 0.15s ease;
}

.sidebar-select-wrap:focus-within {
  border-color: #f97316;
}

[data-theme="light"] .sidebar-select-wrap {
  background: #ffffff;
  border: 1px solid #cbd5e1;
}

.sidebar-select-wrap select {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-family: 'Geist', sans-serif;
  cursor: pointer;
  outline: none;
}

[data-theme="light"] .sidebar-select-wrap select {
  color: #0f172a;
}

/* Brikel Subtabs Navigation */
.brikel-subtabs {
  display: flex;
  gap: 8px;
  background: #101828;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  width: fit-content;
}

[data-theme="light"] .brikel-subtabs {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.brikel-subtabs button {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brikel-subtabs button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .brikel-subtabs button:hover {
  color: #0f172a;
  background: #ffffff;
}

.brikel-subtabs button.selected {
  background: #1e293b;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .brikel-subtabs button.selected {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.nav-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* Brikel.io Settings & Team Suite Replication */
.brikel-settings-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1000px;
  margin-bottom: 40px;
}

.brikel-settings-card {
  background: #182238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 24px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Brikel Dropdown Settings Cards */
details.brikel-settings-card {
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

details.brikel-settings-card:hover {
  border-color: rgba(249, 115, 22, 0.35) !important;
}

details.brikel-settings-card > summary.brikel-dropdown-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none;
  background: #182238;
  border-radius: 14px;
  transition: background 0.15s ease;
}

details.brikel-settings-card > summary.brikel-dropdown-trigger::-webkit-details-marker {
  display: none !important;
}

details.brikel-settings-card > summary.brikel-dropdown-trigger:hover {
  background: #1e2a47 !important;
}

details.brikel-settings-card[open] > summary.brikel-dropdown-trigger {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px 14px 0 0;
  background: #1c2744 !important;
}

.brikel-trigger-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brikel-trigger-info h3 {
  margin: 0 !important;
  font-size: 16px !important;
  color: #ffffff !important;
  font-family: 'Geist', sans-serif !important;
  font-weight: 600;
}

.brikel-trigger-info p {
  margin: 3px 0 0 !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
}

.brikel-trigger-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brikel-trigger-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
}

.brikel-trigger-chevron {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, color 0.2s;
}

details.brikel-settings-card[open] .brikel-trigger-chevron {
  transform: rotate(180deg);
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.brikel-dropdown-content {
  padding: 24px !important;
  background: #141c2e;
  animation: brikelDropdownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes brikelDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brikel-top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 8px;
}

.brikel-top-controls p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.brikel-top-controls .brikel-btn-group {
  display: flex;
  gap: 8px;
}

.brikel-details-accordion {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.brikel-accordion-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  background: #0b0f17;
  user-select: none;
}

.brikel-accordion-summary strong {
  display: block;
  font-size: 15px;
  color: #ffffff;
}

.brikel-accordion-summary span {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Geist Mono', monospace;
}

.brikel-accordion-body {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.brikel-holidays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.brikel-holiday-item {
  background: #182238;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brikel-holiday-date {
  font: 700 12px 'Geist Mono', monospace;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  padding: 4px 8px;
  border-radius: 4px;
}

.brikel-holiday-name {
  font-size: 13px;
  color: #ffffff;
  flex: 1;
}

.brikel-hint-text {
  font-size: 12px;
  color: #94a3b8;
  margin: 12px 0 0;
  line-height: 1.5;
}

.brikel-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .brikel-account-grid {
    grid-template-columns: 1fr;
  }
}

.brikel-account-field {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brikel-account-field span {
  font: 600 11px 'Geist Mono', monospace;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brikel-field-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brikel-field-value strong {
  font-size: 15px;
  color: #ffffff;
}

.brikel-inline-btn {
  background: #182238;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.brikel-inline-btn:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: #f97316;
  color: #ffffff;
}

.brikel-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.brikel-user-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brikel-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #f97316);
  color: #ffffff;
  display: grid;
  place-items: center;
  font: 700 18px 'Geist', sans-serif;
}

.brikel-user-info h3 {
  margin: 0 !important;
  font-size: 15px !important;
  color: #ffffff !important;
}

.brikel-user-info p {
  margin: 2px 0 6px !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
}

.brikel-user-badges {
  display: flex;
  gap: 6px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(249, 115, 22, 0.5);
  transform: scale(1.05);
}

/* ==========================================================================
   BRIKEL LIGHT THEME ENGINE [data-theme="light"]
   ========================================================================== */
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-muted: #f1f5f9;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;
}

[data-theme="light"],
[data-theme="light"] body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] #app {
  background-color: #f8fafc !important;
}

[data-theme="light"] aside {
  background-color: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

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

[data-theme="light"] .brand b {
  color: #0f172a !important;
}

[data-theme="light"] aside .workspace {
  color: #64748b !important;
}

[data-theme="light"] .nav-group-title {
  color: #94a3b8 !important;
}

[data-theme="light"] nav button {
  color: #475569 !important;
}

[data-theme="light"] nav button:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

[data-theme="light"] nav button.selected {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
  border-left: 3px solid #2563eb !important;
  font-weight: 600 !important;
}

[data-theme="light"] aside .account {
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] aside .account #userName {
  color: #0f172a !important;
}

[data-theme="light"] aside .account #userRole {
  color: #64748b !important;
}

[data-theme="light"] aside .account button {
  color: #64748b !important;
}

[data-theme="light"] aside .account button:hover {
  color: #ef4444 !important;
}

[data-theme="light"] main {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] main header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] #pageTitle {
  color: #0f172a !important;
}

[data-theme="light"] #crumb {
  color: #2563eb !important;
}

[data-theme="light"] .quick-search {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #64748b !important;
}

[data-theme="light"] .quick-search input {
  color: #0f172a !important;
}

[data-theme="light"] .quick-search input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .bell,
[data-theme="light"] .theme-toggle-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .bell:hover,
[data-theme="light"] .theme-toggle-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Cards & Sections */
[data-theme="light"] .card,
[data-theme="light"] .brikel-settings-card,
[data-theme="light"] .brikel-user-card,
[data-theme="light"] .kpi,
[data-theme="light"] .chart-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

[data-theme="light"] details.brikel-settings-card > summary.brikel-dropdown-trigger {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] details.brikel-settings-card > summary.brikel-dropdown-trigger:hover {
  background: #f8fafc !important;
}

[data-theme="light"] details.brikel-settings-card[open] > summary.brikel-dropdown-trigger {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .brikel-trigger-info h3 {
  color: #0f172a !important;
}

[data-theme="light"] .brikel-trigger-info p {
  color: #64748b !important;
}

[data-theme="light"] .brikel-trigger-pill {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .brikel-trigger-chevron {
  background: #f1f5f9 !important;
  color: #64748b !important;
}

[data-theme="light"] details.brikel-settings-card[open] .brikel-trigger-chevron {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #ea580c !important;
}

[data-theme="light"] .brikel-dropdown-content {
  background: #ffffff !important;
}

[data-theme="light"] .brikel-top-controls {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .brikel-top-controls p {
  color: #475569 !important;
}

[data-theme="light"] .brikel-account-field {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .brikel-account-field > span {
  color: #64748b !important;
}

[data-theme="light"] .brikel-field-value strong {
  color: #0f172a !important;
}

[data-theme="light"] .brikel-field-value small {
  color: #64748b !important;
}

[data-theme="light"] .brikel-holiday-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .brikel-holiday-date {
  color: #ea580c !important;
}

[data-theme="light"] .brikel-holiday-name {
  color: #0f172a !important;
}

[data-theme="light"] .brikel-holiday-item strong {
  color: #0f172a !important;
}

[data-theme="light"] .brikel-inline-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .brikel-inline-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .brikel-badge.active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

[data-theme="light"] .brikel-badge.paused {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

/* Tables in light mode */
[data-theme="light"] table {
  background: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] tr:hover td {
  background: #f8fafc !important;
}

[data-theme="light"] .table-wrap {
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
}

/* Modals & Dialogs in light mode */
[data-theme="light"] dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] dialog h2,
[data-theme="light"] dialog label,
[data-theme="light"] dialog span {
  color: #0f172a !important;
}

[data-theme="light"] dialog input,
[data-theme="light"] dialog select,
[data-theme="light"] dialog textarea {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] dialog input:focus,
[data-theme="light"] dialog select:focus,
[data-theme="light"] dialog textarea:focus {
  border-color: #2563eb !important;
  outline: none !important;
}

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

[data-theme="light"] .close:hover {
  color: #0f172a !important;
}


