/* ==========================================================================
   SHIVINAY SOLAR SOLUTIONS - ENTERPRISE UI/UX MASTER STYLESHEET
   National Solar EPC, Rooftop & Utility-Scale Management Suite
   ========================================================================== */

:root {
  /* Surfaces & Backgrounds */
  --surface-canvas:      #F8FAFC; /* Slate 50 Main body */
  --surface-card:        #FFFFFF; /* Pure White Elevated Cards */
  --surface-subtle:      #F1F5F9; /* Slate 100 Pill & Header backgrounds */
  --border-light:        #E2E8F0; /* Slate 200 Card borders */
  --border-medium:       #CBD5E1; /* Slate 300 Input dividers */

  /* Dark Executive Surfaces */
  --navy-deep:           #070F1E; /* Deep Tech Navy */
  --navy-dark:           #0A192F; /* Royal Midnight Navy */
  --navy-card:           #112240; /* Elevated Dark Surface */
  --border-dark:         #233554;

  /* Typography */
  --text-primary:        #0F172A; /* Slate 900 Razor-sharp headings */
  --text-muted:          #475569; /* Slate 600 Body & metadata */
  --text-light:          #94A3B8; /* Slate 400 Timestamps & captions */
  --text-white:          #FFFFFF;

  /* Brand & Accents */
  --brand-cobalt:        #1D4ED8; /* Royal Blue 700 */
  --accent-electric:     #2563EB; /* Blue 600 */
  --solar-amber:         #D97706; /* Solar Gold / Critical Path */
  --solar-amber-bg:      #FFFBEB;
  --solar-emerald:       #059669; /* Grid Synced / COD Success */
  --solar-emerald-bg:    #ECFDF5;
  --solar-cyan:          #0284C7; /* Technical / Engineering Info */
  --solar-cyan-bg:       #F0F9FF;
  --danger-crimson:      #DC2626; /* Safety Lockout / Overdue */
  --danger-bg:           #FEF2F2;

  /* Elevations */
  --shadow-sm:  0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg:  0 10px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-pop: 0 16px 32px -4px rgba(15, 23, 42, 0.18), 0 8px 12px -6px rgba(15, 23, 42, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ==========================================================================
   OFFLINE-RESILIENT LOCAL FONT DECLARATIONS
   ========================================================================== */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  src: url('/assets/fonts/material-symbols-outlined.woff2') format('woff2');
  font-display: block;
}

@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/material-icons.woff2') format('woff2');
  font-display: block;
}

@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  src: url('/assets/fonts/fa-solid-900.woff2') format('woff2');
  font-display: block;
}

/* ==========================================================================
   TYPOGRAPHY & STRICT ICON PROTECTION (PREVENTS "re_v" & "search" LIGATURE BUGS)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, a, input, select, textarea, button, table, th, td, label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Scoped non-icon rule */
span:not(.material-symbols-outlined):not(.material-symbols-rounded):not(.material-symbols-sharp):not(.material-icons):not(.mat-icon):not(.fa):not(.fas):not(.far):not(.fab):not([class*="fa-"]) {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.material-icons, mat-icon, .mat-icon {
  font-family: 'Material Icons' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.fa, .fas, .far, .fab, [class*="fa-"] {
  font-family: "Font Awesome 5 Free", "FontAwesome" !important;
  font-weight: 900;
  vertical-align: middle;
}

/* ==========================================================================
   APP SHELL & LAYOUT ARCHITECTURE
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 260px;
  background-color: var(--navy-deep);
  color: #CBD5E1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-subtitle {
  color: #94A3B8;
  font-size: 11px;
  font-weight: 500;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.nav-item.active {
  background: var(--accent-electric);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-item .material-symbols-outlined {
  font-size: 18px;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
}

.user-badge-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #334155;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.user-name-role {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: #F8FAFC;
  font-size: 12px;
  font-weight: 600;
}

.user-role-label {
  color: #64748B;
  font-size: 10px;
}

/* Main Content Workspace */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--surface-canvas);
}

/* ==========================================================================
   RECIPE A: EXECUTIVE PMO HEADER (68px Height)
   ========================================================================== */
.enterprise-page-header {
  min-height: 68px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-title-box {
  display: flex;
  flex-direction: column;
}

.header-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.badge-solar-gold {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background: var(--accent-electric);
  color: #FFFFFF;
  border-color: var(--accent-electric);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background: var(--brand-cobalt);
  border-color: var(--brand-cobalt);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: #FFFFFF;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--surface-subtle);
  border-color: #94A3B8;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ==========================================================================
   RECIPE B: HIGH-DENSITY 6-KPI METRIC STRIP
   ========================================================================== */
.content-wrapper {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kpi-strip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--accent-electric);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.kpi-card.border-top-amber {
  border-top-color: var(--solar-amber);
}

.kpi-card.border-top-emerald {
  border-top-color: var(--solar-emerald);
}

.kpi-card.border-top-cyan {
  border-top-color: var(--solar-cyan);
}

.kpi-card.border-top-danger {
  border-top-color: var(--danger-crimson);
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.kpi-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-status-badge {
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.text-success { color: var(--solar-emerald); }
.text-warning { color: var(--solar-amber); }
.text-danger  { color: var(--danger-crimson); }
.text-primary { color: var(--accent-electric); }

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.enterprise-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.card-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* ==========================================================================
   RECIPE C: DATA TABLES & OPTIONS MENU (more_vert)
   ========================================================================== */
.table-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #FAFAFA;
}

.search-input-box {
  position: relative;
  width: 320px;
}

.search-input-box .material-symbols-outlined {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 18px;
}

.search-input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--accent-electric);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.enterprise-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.enterprise-table th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.enterprise-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.enterprise-table tr:hover td {
  background-color: #F8FAFC;
}

/* 3-Dot Options Action Button */
.btn-more-options {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  position: relative;
}

.btn-more-options:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Options Dropdown Menu */
.table-options-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  min-width: 180px;
  z-index: 120;
  display: none;
  flex-direction: column;
  padding: 4px 0;
}

.table-options-dropdown.open {
  display: flex;
}

.table-options-dropdown a, 
.table-options-dropdown button {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.table-options-dropdown a:hover,
.table-options-dropdown button:hover {
  background: var(--surface-subtle);
  color: var(--accent-electric);
}

/* Archetype Pills */
.badge-archetype {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-ground-mount {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.badge-metal-roof {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-rcc-roof {
  background: #F3E8FF;
  color: #6B21A8;
  border: 1px solid #E9D5FF;
}

.badge-residential {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

/* Status Badges */
.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-completed {
  background: var(--solar-emerald-bg);
  color: var(--solar-emerald);
}

.status-in-progress {
  background: var(--solar-amber-bg);
  color: var(--solar-amber);
}

.status-scheduled {
  background: var(--solar-cyan-bg);
  color: var(--solar-cyan);
}

.status-hold {
  background: var(--danger-bg);
  color: var(--danger-crimson);
}

/* ==========================================================================
   SOLAR EPC 7-STAGE PROGRESS PIPELINE
   ========================================================================== */
.epc-stages-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.epc-stage-card {
  min-width: 220px;
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.epc-stage-card.is-active {
  border-color: var(--accent-electric);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.epc-stage-card.is-locked {
  background: #F8FAFC;
  opacity: 0.75;
}

.stage-number-badge {
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
}

.stage-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.stage-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.stage-progress-bar-fill {
  height: 100%;
  background: var(--accent-electric);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.stage-progress-bar-fill.fill-completed {
  background: var(--solar-emerald);
}

/* ==========================================================================
   MICRO-INTERACTIVE CALENDAR GRID & DISPATCH SYSTEM
   ========================================================================== */
.calendar-workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.calendar-month-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-cell {
  min-height: 100px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.calendar-cell:hover {
  border-color: var(--solar-cyan);
  background: var(--solar-cyan-bg);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
  z-index: 2;
}

.calendar-cell.is-today {
  border-color: var(--accent-electric);
  background: rgba(37, 99, 235, 0.03);
}

.calendar-cell.other-month {
  background: #F8FAFC;
  opacity: 0.45;
}

.cell-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cell-day-num {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.is-today .cell-day-num {
  background: var(--accent-electric);
  color: #FFFFFF;
}

/* Event Pill */
.calendar-event-pill {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #F1F5F9;
  color: #334155;
  border-left: 3px solid var(--accent-electric);
  cursor: grab;
  transition: all 0.15s ease;
}

.calendar-event-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.12);
}

.calendar-event-pill.pill-critical {
  border-left-color: var(--danger-crimson);
  background: #FEF2F2;
  color: #991B1B;
}

.calendar-event-pill.pill-high {
  border-left-color: var(--solar-amber);
  background: #FFFBEB;
  color: #92400E;
}

.calendar-event-pill.pill-completed {
  border-left-color: var(--solar-emerald);
  background: #ECFDF5;
  color: #065F46;
}

/* Popover Floating Card (450ms Intent, 500ms Grace Leave, Pin 📌) */
.solar-popover-portal {
  position: fixed;
  z-index: 1060;
  width: 340px;
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.solar-popover-portal.visible {
  display: flex;
}

.popover-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.popover-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #EFF6FF;
  color: var(--accent-electric);
}

.popover-pin-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #94A3B8;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.popover-pin-btn:hover,
.popover-pin-btn.is-pinned {
  color: var(--solar-amber);
  background: #FEF3C7;
}

.popover-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #94A3B8;
  margin-left: 6px;
}

.popover-close-btn:hover {
  color: var(--danger-crimson);
}

/* Inline Expandable Crew Dossier */
.inline-crew-accordion {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.accordion-body {
  padding: 10px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  display: none;
  flex-direction: column;
  gap: 6px;
}

.accordion-body.open {
  display: flex;
}

/* ==========================================================================
   CERTIFIED SOLAR GANGS & TECHNICIANS CARDS
   ========================================================================== */
.crews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.crew-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.crew-card-header {
  padding: 16px 20px;
  background: var(--navy-deep);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crew-gang-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.crew-gang-subtitle {
  font-size: 11px;
  color: #94A3B8;
  margin: 0;
}

.crew-members-list {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.crew-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.member-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-badge-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.safety-checklist-box {
  padding: 14px 20px;
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

/* ==========================================================================
   ZERO-TRUST ACCOUNTING & ERP STYLES
   ========================================================================== */
.accounting-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.statement-table-box {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.statement-subhead {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-medium);
  margin-bottom: 12px;
}

.statement-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 13px;
}

.statement-line.total-line {
  border-top: 2px solid #0F172A;
  border-bottom: 3px double #0F172A;
  font-weight: 800;
  font-size: 14px;
  color: #0F172A;
  padding-top: 10px;
}

/* ==========================================================================
   MODAL WINDOWS & BACKDROPS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-window {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #FAFAFA;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--accent-electric);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Responsive Rules */
@media (max-width: 1200px) {
  .kpi-strip-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .crews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none;
  }
  .kpi-strip-grid {
    grid-template-columns: 1fr;
  }
  .enterprise-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
