/* ==========================================================================
   style.css - Styling for EPFO Customer Records & Claim Tracker
   Faithfully reproduces and enhances the desktop GUI application layout
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --success-hover: #15803d;
  --teal: #0d9488;
  --teal-hover: #0f766e;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --warning: #d97706;
  --dark-header: #0f172a;
  --dark-header-subtle: #1e293b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #cbd5e1;
  --border-dark: #000000;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 6px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  font-size: 13px;
}

body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   APP SHELL & WELCOME LOGIN PAGE
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.welcome-login-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  background:
    linear-gradient(180deg,
      #0ea5e9 0%,       /* bright sky blue top */
      #38bdf8 25%,      /* light sky mid */
      #7dd3fc 55%,      /* soft blue */
      #bae6fd 78%,      /* pale horizon */
      #e0f2fe 90%,      /* near-horizon haze */
      #f0f9ff 100%      /* horizon white glow */
    );
  background-attachment: fixed;
  padding: 12px 16px;
  overflow: hidden;
}

/* Sky decorations: sun + clouds */
.welcome-login-page::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 0%, #fde047 40%, #facc15 70%, rgba(250,204,21,0) 100%);
  box-shadow: 0 0 60px 30px rgba(253,224,71,0.45), 0 0 120px 60px rgba(253,224,71,0.2);
  pointer-events: none;
  z-index: 0;
}

.welcome-login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 120px 50px at 15% 30%, rgba(255,255,255,0.75) 0%, transparent 70%),
    radial-gradient(ellipse 80px 35px at 12% 32%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 150px 55px at 80% 20%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(ellipse 100px 40px at 77% 22%, rgba(255,255,255,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 90px 38px at 55% 65%, rgba(255,255,255,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 60px 28px at 52% 67%, rgba(255,255,255,0.4) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: cloudDrift 18s ease-in-out infinite alternate;
}

@keyframes cloudDrift {
  0%   { background-position: 0px 0px; }
  100% { background-position: 30px 8px; }
}

.welcome-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: auto;
  animation: welcomeFadeIn 0.3s ease-out;
}

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

.welcome-hero {
  text-align: center;
  color: #ffffff;
}

.welcome-brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.welcome-logo-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px -2px rgba(37, 99, 235, 0.45);
}

.welcome-svg-logo {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

.welcome-app-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 2px;
  line-height: 1.2;
}

.welcome-app-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Card Styling */
.welcome-card {
  width: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 18px 22px 14px 22px;
  position: relative;
}

.welcome-card-header {
  text-align: center;
  margin-bottom: 12px;
}

.welcome-header-icon {
  display: none;
}

.welcome-card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.welcome-card-header p {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.3;
}

.welcome-card .alert {
  padding: 6px 10px;
  font-size: 11.5px;
  margin-bottom: 10px;
}

.welcome-card .form-group {
  margin-bottom: 10px;
}

/* Inputs */
.welcome-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.welcome-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.welcome-input-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.welcome-input {
  width: 100%;
  padding: 7px 36px 7px 32px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  font-size: 12.5px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.15s ease;
}

.welcome-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.welcome-pwd-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  color: #64748b;
  border-radius: 4px;
}

.welcome-pwd-toggle:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.welcome-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 10px 0;
}

.welcome-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.welcome-checkbox-label input {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.welcome-submit-btn {
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.welcome-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.35);
}

.welcome-submit-btn:active {
  transform: translateY(0);
}

/* Quick Admin Login Box */
.welcome-quick-box {
  margin-top: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-box-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #334155;
}

.quick-box-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-cred-tags {
  display: flex;
  gap: 5px;
}

.cred-tag {
  font-size: 10.5px;
  color: #475569;
  background: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.cred-tag code {
  font-weight: 700;
  color: #0f172a;
}

.quick-fill-btn {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Security Note */
.welcome-card-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.welcome-security-note {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.welcome-security-note code {
  color: #64748b;
  font-weight: 600;
}

.dot-sep {
  color: #cbd5e1;
}

/* Features Pills */
.welcome-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 440px;
}

.feat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   TOP APPLICATION HEADER
   ========================================================================== */
.app-header {
  background-color: var(--dark-header);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 2px solid #0284c7;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon svg {
  width: 32px;
  height: 32px;
  color: #38bdf8;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
  margin: 0;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}

/* Top Right KPI Chips */
.header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  min-width: 95px;
  transition: all 0.2s ease;
}

.kpi-chip.cursor-pointer:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  cursor: pointer;
}

.kpi-chip.highlight-fee {
  background: rgba(13, 148, 136, 0.25);
  border-color: #14b8a6;
}

.kpi-chip.highlight-fee:hover {
  background: rgba(13, 148, 136, 0.45);
}

.kpi-label {
  font-size: 10px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-value {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

#stat-total-balance {
  color: #38bdf8;
}

#stat-total-fee {
  color: #34d399;
}

/* ==========================================================================
   ACTION TOOLBAR
   ========================================================================== */
.action-toolbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
  margin: 0 4px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.kbd-hint {
  font-size: 10px;
  opacity: 0.8;
  font-weight: normal;
  padding: 1px 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  margin-left: 2px;
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}
.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-teal {
  background-color: var(--teal);
  color: #ffffff;
}
.btn-teal:hover {
  background-color: var(--teal-hover);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-dark {
  background-color: #334155;
  color: #ffffff;
}
.btn-dark:hover {
  background-color: #1e293b;
}

.btn-outline {
  background-color: #ffffff;
  border-color: var(--border-color);
  color: #334155;
}
.btn-outline:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.btn-danger-outline {
  background-color: #ffffff;
  border-color: #fca5a5;
  color: var(--danger);
}
.btn-danger-outline:hover {
  background-color: #fef2f2;
  border-color: var(--danger);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background-color: var(--danger-hover);
}

/* ==========================================================================
   SEARCH & FILTERS BAR
   ========================================================================== */
.filter-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  padding: 5px 26px 5px 28px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 280px;
  font-size: 12px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.search-icon {
  position: absolute;
  left: 8px;
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.form-select {
  padding: 5px 24px 5px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  background-color: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.activity-select {
  min-width: 140px;
}

.status-select {
  min-width: 135px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  cursor: pointer;
}

/* View Style Switcher */
.view-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.segmented-control {
  display: inline-flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
}

.seg-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   MAIN CONTENT AREA & VIEWS
   ========================================================================== */
.view-container,
.main-content {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view-pane {
  display: none;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.view-pane.active {
  display: flex;
  flex-direction: column;
}

/* 1. BOX GRID TABLE (Faithful spreadsheet look) */
.table-container {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
}

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

/* Box Grid Specific Borders */
.box-grid-table {
  border: 1px solid #000000;
}

.box-grid-table th,
.box-grid-table td {
  border: 1px solid #000000;
  padding: 6px 10px;
  vertical-align: middle;
}

.box-grid-table thead th {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: inset 0 -1px 0 #000000;
  user-select: none;
}

.box-grid-table tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.box-grid-table tbody tr:nth-child(odd) {
  background-color: #fcfcfd;
}

.box-grid-table tbody tr:hover {
  background-color: #e0f2fe;
}

.box-grid-table tbody tr.selected-row {
  background-color: #bae6fd !important;
}

/* Sorting Indicators */
.th-sortable {
  cursor: pointer;
}

.th-sortable:hover {
  background-color: #e2e8f0;
}

.sort-icon {
  font-size: 9px;
  margin-left: 4px;
  color: #64748b;
}

/* Numeric & Monospace columns */
.font-mono {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.font-bold {
  font-weight: 700;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.col-sl { width: 55px; text-align: center; }
.col-uan { width: 130px; }
.col-pwd { width: 115px; min-width: 105px; }
.col-balance { width: 110px; }
.col-activity { width: 145px; }
.col-status { width: 130px; }
.col-fee { width: 95px; }
.col-actions { width: 115px; }

/* Password Cell & Eye Sign */
.pwd-cell-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.pwd-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}

.btn-pwd-eye {
  background: transparent;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #64748b;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-pwd-eye:hover {
  color: #0f172a;
  background-color: #e2e8f0;
}

.btn-pwd-eye.revealed {
  color: #2563eb;
}

.btn-pwd-eye.revealed:hover {
  background-color: #dbeafe;
}

.eye-svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* Activity Badges */
.activity-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.status-settled {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-in-process {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.status-rejected {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.status-form {
  background-color: #e0e7ff;
  color: #4338ca;
  border: 1px solid #a5b4fc;
}

.status-pending {
  background-color: #fae8ff;
  color: #86198f;
  border: 1px solid #f0abfc;
}

.status-not-applied {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Action icons inside table row */
.row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.icon-action-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 12px;
  color: #475569;
  transition: all 0.1s ease;
}

.icon-action-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #cbd5e1;
}

.icon-action-btn.btn-row-delete:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

/* 2. CARD GRID VIEW */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  padding: 18px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}

.record-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.record-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #94a3b8;
}

.record-card.selected-card {
  border-color: var(--primary);
  background-color: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.card-header-info {
  flex: 1;
  min-width: 0;
}

.card-member-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subline {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.card-body-info {
  border-top: 1px dashed var(--border-light);
  border-bottom: 1px dashed var(--border-light);
  padding: 10px 0;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
}

.card-info-label {
  color: #64748b;
}

.card-info-val {
  font-weight: 600;
  color: #1e293b;
  text-align: right;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 3. CLASSIC TABLE */
.classic-table th,
.classic-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.classic-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.classic-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Empty State & Loader */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  max-width: 400px;
  margin-bottom: 16px;
}

.loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
  font-weight: 600;
  color: #334155;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #cbd5e1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   BOTTOM STATUS BAR
   ========================================================================== */
.app-statusbar {
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #475569;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.statusbar-left,
.statusbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-sep {
  color: #cbd5e1;
}

.highlight-text {
  color: #0d9488;
  font-weight: 700;
}

.db-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.db-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
}

.status-pill {
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
}

.status-ready {
  background: #dcfce7;
  color: #15803d;
}

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

.modal-dialog {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-sm { max-width: 440px; }
.modal-md { max-width: 580px; }
.modal-lg { max-width: 740px; }

.modal-dialog > form,
.modal-dialog form#record-form,
.modal-dialog form#login-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

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

.modal-header.header-dark {
  background-color: var(--dark-header);
  color: #ffffff;
  border-bottom: 2px solid #0284c7;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-icon {
  font-size: 18px;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: inherit;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  padding: 0 4px;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-close-btn.text-white:hover {
  color: #ffffff;
}

.modal-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  flex-shrink: 0;
  gap: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #ffffff;
}

/* Modal Tab Panes - Only show active tab */
.modal-body .tab-pane {
  display: none;
}

.modal-body .tab-pane.active {
  display: block;
  animation: tabFadeIn 0.15s ease-out;
}

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

.modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

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

/* FORMS */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.form-group:last-child {
  margin-bottom: 0;
}

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

.required {
  color: var(--danger);
}

.form-control {
  padding: 5px 9px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  height: 31px;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

textarea.form-control {
  height: auto;
  min-height: 52px;
  resize: vertical;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.uppercase {
  text-transform: uppercase;
}

.input-with-actions {
  display: flex;
  align-items: center;
  position: relative;
}

.input-with-actions .form-control {
  width: 100%;
  padding-right: 60px;
}

.btn-icon-addon {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
  color: #64748b;
  border-radius: 3px;
}

.btn-icon-addon:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

#btn-gen-rec-pwd {
  right: 30px;
}

/* VIEW DETAILS MODAL */
.member-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.view-member-name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.member-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-meta-row {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.view-quick-actions {
  background: #1e293b;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.quick-action-btn.btn-wa {
  background: #25d366;
  color: #ffffff;
  border-color: #22c55e;
}

.quick-action-btn.btn-wa:hover {
  background: #16a34a;
}

.quick-action-btn.btn-mail {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
}

.details-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
}

.card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.detail-label {
  color: #64748b;
}

.detail-val {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  max-width: 220px;
  word-break: break-word;
}

.text-success { color: #16a34a; }
.text-teal { color: #0d9488; }

.remarks-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 8px;
  font-size: 12px;
  color: #334155;
  min-height: 50px;
  white-space: pre-wrap;
}

.history-section {
  margin-top: 14px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* TOTAL INCOME & ANALYTICS MODAL */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.analytics-card.highlight-income {
  background: #f0fdf4;
  border-color: #86efac;
}

.analytics-card.highlight-income .analytics-val {
  color: #15803d;
}

.analytics-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.analytics-val {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 2px 0;
}

.analytics-hint {
  font-size: 10px;
  color: #94a3b8;
}

.analytics-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.analytics-box {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  background: #ffffff;
}

.box-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1e293b;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.simple-table th,
.simple-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-light);
}

.simple-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}

/* IMPORT WIZARD MODAL */
.dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dropzone-input {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 6px;
}

.dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.dropzone-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 6px 0;
}

.dropzone-browse {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.dropzone-hint {
  font-size: 10.5px;
  color: #94a3b8;
}

.import-file-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  margin: 10px 0;
}

.btn-text-danger {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
}

.import-mode-section {
  margin: 14px 0;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.radio-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.radio-card {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.radio-card:hover {
  border-color: #94a3b8;
}

.radio-card.active {
  border-color: var(--primary);
  background: #eff6ff;
}

.radio-card.danger-card.active {
  border-color: var(--danger);
  background: #fef2f2;
}

.radio-card-content strong {
  display: block;
  font-size: 11.5px;
  color: #0f172a;
}

.radio-card-content span {
  font-size: 10px;
  color: #64748b;
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}

.preview-table-container {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--border-color);
}

.preview-table th,
.preview-table td {
  padding: 4px 8px;
  border: 1px solid var(--border-light);
  font-size: 11px;
}

/* DELETE CONFIRMATION */
.delete-target-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px;
  margin: 10px 0;
  text-align: center;
}

.delete-target-card h4 {
  font-size: 15px;
  color: #b91c1c;
}

.delete-target-card span {
  font-size: 12px;
  color: #7f1d1d;
  font-family: monospace;
}

.confirm-message {
  font-size: 13px;
  color: #334155;
}

.confirm-warning {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s ease-out;
  pointer-events: auto;
}

.toast-success {
  background: #065f46;
  border-left: 4px solid #34d399;
}

.toast-error {
  background: #991b1b;
  border-left: 4px solid #f87171;
}

.toast-info {
  background: #1e293b;
  border-left: 4px solid #38bdf8;
}

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

/* Fullscreen Toggle Button */
.btn-fullscreen-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-fullscreen-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-fullscreen-toggle.active {
  background: #0284c7;
  border-color: #38bdf8;
}

/* ==========================================================================
   USER PROFILE & AUTHENTICATION WIDGET
   ========================================================================== */
.user-profile-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.user-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 4px 10px 4px 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  transition: all 0.2s ease;
  user-select: none;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.user-avatar-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.user-meta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
}

.user-status-dot {
  font-size: 9.5px;
  color: #86efac;
}

.user-caret {
  font-size: 8px;
  color: #94a3b8;
  margin-left: 2px;
}

/* User Profile Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 100;
  padding: 6px 0;
  animation: dropdownIn 0.15s ease-out;
}

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

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}

.dropdown-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-user-info strong {
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-info small {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-item {
  width: 100%;
  padding: 7px 14px;
  background: none;
  border: none;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s ease;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Modal sizing */
.modal-md { max-width: 540px; }

/* Login Modal */
.login-brand-banner {
  text-align: center;
  margin-bottom: 16px;
}

.login-icon {
  font-size: 38px;
  display: block;
  margin-bottom: 4px;
}

.login-brand-banner h3 {
  font-size: 16px;
  color: #0f172a;
  font-weight: 700;
}

.login-brand-banner p {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.login-footer-hint {
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 10px;
  text-align: center;
}

.alert-danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}

/* Profile Modal Details */
.profile-header-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 14px;
}

.profile-avatar-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.profile-meta-info h3 {
  font-size: 15px;
  color: #0f172a;
  font-weight: 700;
}

.user-role-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  margin: 3px 0 2px 0;
}

.profile-last-login {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
}

/* Utility Helpers */
.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-stats {
    width: 100%;
    justify-content: space-between;
  }
  .kpi-chip {
    flex: 1;
    min-width: 80px;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-left {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrapper input {
    width: 100%;
  }
  .view-switcher {
    justify-content: flex-end;
  }
  .details-cards-grid,
  .analytics-kpi-grid,
  .analytics-sections-grid,
  .radio-cards-grid,
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}
