/* Impact360 Command Center - UI Components Styles */

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-navy);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-navy-dark);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: var(--bg-main);
  border-color: var(--border-color);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

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

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-green { background-color: #DCFCE7; color: #15803D; }
.badge-amber { background-color: #FEF9C3; color: #A16207; }
.badge-red { background-color: #FEE2E2; color: #B91C1C; }
.badge-blue { background-color: #DBEAFE; color: #1D4ED8; }

.tag-pill {
  display: inline-block;
  padding: 2px 8px;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Data Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background-color: #F8FAFC;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.data-table tbody tr:hover {
  background-color: var(--bg-main);
}

/* Project Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
}

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

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy-dark);
}

.project-card-owner {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  background-color: #E2E8F0;
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-navy), var(--success-green));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Innovation Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
}

@media (max-width: 1200px) {
  .kanban-board {
    grid-template-columns: repeat(5, 280px);
  }
}

.kanban-column {
  background-color: #F1F5F9;
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border-color);
}

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

.kanban-column-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.kanban-count {
  background: #CBD5E1;
  color: #334155;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kanban-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
}

.kanban-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.kanban-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.kanban-actions {
  display: flex;
  gap: 4px;
}

/* Citizen Impact Flow Diagram */
.impact-chain-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.impact-chain-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.impact-step {
  flex: 1;
  background: #F8FAFC;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  text-align: center;
}

.impact-step-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.impact-step-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-top: 4px;
}

.impact-arrow {
  font-size: 20px;
  color: var(--primary-navy);
  font-weight: bold;
}

/* Modals & Drawers */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-navy-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Slide-out Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 999;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.drawer-panel.active {
  right: 0;
}

.btn-danger {
  background-color: var(--danger-crimson);
  color: #FFFFFF;
}

.btn-danger:hover {
  background-color: #991B1B;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary-navy);
  color: var(--primary-navy);
}

.btn-outline-primary:hover {
  background: var(--primary-navy);
  color: #FFFFFF;
}

.btn-outline-danger {
  background: transparent;
  border-color: #FCA5A5;
  color: var(--danger-crimson);
}

.btn-outline-danger:hover {
  background: #FEE2E2;
  border-color: var(--danger-crimson);
}

.btn-icon {
  padding: 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dark);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: #E2E8F0;
}

.btn-icon.btn-delete:hover {
  background: #FEE2E2;
  color: var(--danger-crimson);
  border-color: #FCA5A5;
}

.btn-icon.btn-edit:hover {
  background: #DBEAFE;
  color: var(--primary-navy);
  border-color: #93C5FD;
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Quick Add Dropdown in Topbar */
.quick-add-container {
  position: relative;
}

.quick-add-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.quick-add-dropdown.active {
  display: block;
}

.quick-add-item {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color var(--transition-fast);
}

.quick-add-item:hover {
  background-color: var(--bg-main);
  color: var(--primary-navy);
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  border-left: 5px solid var(--primary-navy);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all var(--transition-normal);
}

.toast.toast-success {
  border-left-color: var(--success-green);
}

.toast.toast-danger {
  border-left-color: var(--danger-crimson);
}

.toast.toast-warning {
  border-left-color: var(--warning-amber);
}

.toast.toast-fadeout {
  opacity: 0;
  transform: translateX(30px);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Facilities & Spatial Hierarchy Styles
   ========================================== */

/* Breadcrumb Navigator */
.spatial-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.breadcrumb-crumb {
  color: var(--primary-navy);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-crumb:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-active {
  color: var(--text-dark);
  font-weight: 700;
}

/* MetaModel Tag Selector & Filter Bar */
.metamodel-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.metamodel-filter-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-navy-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metamodel-tag-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.metamodel-tag-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: monospace;
}

.metamodel-tag-chip:hover {
  background: #E2E8F0;
  border-color: #CBD5E1;
}

.metamodel-tag-chip.active {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy-dark);
  box-shadow: var(--shadow-sm);
}

/* Facilities Campus Cards */
.location-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
}

.location-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #93C5FD;
}

.location-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.location-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-navy-dark);
}

.location-card-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
}

.location-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #F8FAFC;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  text-align: center;
}

.location-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.location-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 2px;
}

/* Building Tabs & Cards */
.building-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.building-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.building-card:hover {
  border-color: #93C5FD;
  transform: translateY(-2px);
}

.building-card.active {
  border-color: var(--primary-navy);
  background: linear-gradient(180deg, #FFFFFF 0%, #EFF6FF 100%);
  box-shadow: var(--shadow-sm);
}

.building-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-navy-dark);
}

/* Floor Level Selector Tabs */
.floor-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  align-items: center;
}

.floor-tab-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.floor-tab-btn:hover {
  background: #F1F5F9;
}

.floor-tab-btn.active {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy-dark);
  box-shadow: var(--shadow-sm);
}

/* Interactive 2D Floor Plan Grid */
.floor-plan-viewport {
  background: #0F172A;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #334155;
  color: #F8FAFC;
}

.floor-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #1E293B;
  padding-bottom: 14px;
}

.floor-plan-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.room-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.room-card:hover {
  border-color: #60A5FA;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.room-card.status-alert {
  border-left: 4px solid var(--warning-amber);
}

.room-card.status-critical {
  border-left: 4px solid var(--danger-crimson);
  animation: roomPulseRed 2s infinite;
}

@keyframes roomPulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.room-number {
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  color: #93C5FD;
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.room-name {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 4px;
}

.room-type-tag {
  font-size: 11px;
  color: #94A3B8;
}

.room-telemetry-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
  color: #CBD5E1;
}

.room-telemetry-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-metamodel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.room-tag-pill {
  font-size: 10px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  padding: 2px 6px;
  border-radius: 4px;
}

.room-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #334155;
  padding-top: 10px;
}

/* ==========================================
   Routines, Trips & Shopping Lists Styles
   ========================================== */

.routine-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
}

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

.routine-card.routine-daily {
  border-top: 4px solid var(--primary-navy);
}

.routine-card.routine-weekly {
  border-top: 4px solid #6366F1;
}

.routine-card.routine-monthly {
  border-top: 4px solid var(--success-green);
}

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

.routine-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy-dark);
  line-height: 1.3;
}

.routine-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.routine-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

/* Checklist / Shopping List inside Card */
.routine-checklist-container {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.routine-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dark);
  padding: 4px 6px;
  border-radius: 4px;
  transition: background-color var(--transition-fast);
}

.routine-item-row:hover {
  background: #F1F5F9;
}

.routine-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.routine-item-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-navy);
  cursor: pointer;
}

.routine-item-text.completed {
  text-decoration: line-through;
  color: #94A3B8;
}

.routine-item-quantity {
  font-size: 11px;
  font-family: monospace;
  background: #E2E8F0;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Modal Dynamic Item Builder */
.dynamic-item-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #F8FAFC;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
}

.builder-item-row {
  display: grid;
  grid-template-columns: 1fr 120px 32px;
  gap: 8px;
  align-items: center;
}

/* ==========================================
   Financial Command & Balance Sheet Styles
   ========================================== */

.financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.fin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.fin-card.fin-income {
  border-left: 4px solid #10B981;
}

.fin-card.fin-spending {
  border-left: 4px solid #EF4444;
}

.fin-card.fin-asset {
  border-left: 4px solid #3B82F6;
}

.fin-card.fin-liability {
  border-left: 4px solid #F59E0B;
}

.fin-card.fin-networth {
  border-left: 4px solid #6366F1;
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%);
}

.fin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fin-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fin-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy-dark);
}

.fin-footer {
  font-size: 11px;
  color: var(--text-muted);
}

/* Financial Type Badges */
.badge-income {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.badge-spending {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.badge-asset {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.badge-liability {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

/* Balance Sheet Comparison Bar */
.balance-comparison-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.balance-bar-row {
  display: flex;
  height: 14px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 10px 0 6px 0;
  background: #E2E8F0;
}

.balance-bar-assets {
  background: #3B82F6;
  transition: width var(--transition-normal);
}

.balance-bar-liabilities {
  background: #F59E0B;
  transition: width var(--transition-normal);
}

.balance-bar-income {
  background: #10B981;
  transition: width var(--transition-normal);
}

.balance-bar-spending {
  background: #EF4444;
  transition: width var(--transition-normal);
}
