/* ==========================================================================
   Leocap Consultancy - Premium Dark Theme (Slightly Darker Burnt Orange & Mobile Optimized)
   ========================================================================== */

:root {
  /* Color Palette - Rich Slightly Darker Burnt Orange Primary Theme */
  --bg-dark: #090d16;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(28, 39, 64, 0.85);
  --bg-sidebar: #0b111e;
  --bg-modal: #101726;

  /* Primary Accent - Rich Darker Orange */
  --accent-emerald: #ea580c;       /* Tailwind Orange 600 */
  --accent-emerald-dark: #c2410c;  /* Tailwind Orange 700 */
  --accent-emerald-light: rgba(234, 88, 12, 0.15);
  --accent-emerald-glow: rgba(234, 88, 12, 0.35);

  /* Status Accents */
  --accent-warning: #d97706;
  --accent-danger: #dc2626;
  --accent-info: #2563eb;
  --accent-purple: #7c3aed;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Border & Shadows */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-strong: rgba(234, 88, 12, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--accent-emerald-glow);

  /* Radii & Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-emerald);
}

/* Glassmorphism Cards */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-color-strong);
  box-shadow: var(--shadow-lg);
}

/* App Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 190;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-mobile-backdrop.active {
  display: block;
  opacity: 1;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

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

.brand-info h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brand-info h2 span {
  color: var(--accent-emerald);
}

.brand-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item i {
  width: 20px;
  height: 20px;
  transition: color 0.2s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: var(--accent-emerald-light);
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.nav-item.active i {
  color: var(--accent-emerald);
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-warning);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-emerald-light);
  border: 1px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
}

.user-details h4 {
  font-size: 0.88rem;
  font-weight: 700;
}

.user-details p.role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-icon.danger:hover {
  color: var(--accent-danger);
  border-color: rgba(220, 38, 38, 0.4);
}

/* Main Content Area */
.main-content {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 270px);
}

.topbar {
  min-height: 70px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
}

.topbar-left h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.topbar-left p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.early-rule-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-emerald-light);
  border: 1px solid rgba(234, 88, 12, 0.3);
  color: var(--accent-emerald);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
}

.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Content Body & Views */
.content-body {
  padding: 28px;
  flex: 1;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.kpi-icon.emerald { background: rgba(234, 88, 12, 0.15); color: var(--accent-emerald); }
.kpi-icon.warning { background: rgba(217, 119, 6, 0.15); color: var(--accent-warning); }
.kpi-icon.info { background: rgba(37, 99, 235, 0.15); color: var(--accent-info); }
.kpi-icon.purple { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 4px 0 2px 0;
  letter-spacing: -0.5px;
}

.kpi-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Banner Alert */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border-left: 4px solid var(--accent-emerald);
}

.banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  padding: 20px;
}

.chart-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  height: 250px;
  width: 100%;
}

/* Dashboard Tables Grid */
.dashboard-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.table-card {
  padding: 20px;
}

.table-card.full-width {
  grid-column: 1 / -1;
}

.table-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-card h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Data Table Styling */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
  white-space: nowrap;
}

.data-table th {
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-filed {
  background: rgba(234, 88, 12, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.badge-progress {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent-info);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.badge-flagged {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-partial {
  background: rgba(217, 119, 6, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.obligations-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px; /* 8px vertical gap, 10px horizontal gap */
  margin-top: 6px;
  align-items: center;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald-dark), var(--accent-emerald));
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-emerald-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
}

.btn-whatsapp:hover {
  background: #1eb956;
}

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

/* View Header Controls */
.view-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 260px;
}

.search-box i {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  width: 100%;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-control {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

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

.client-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-menu-actions {
  display: flex;
  align-items: center;
  gap: 10px; /* Spacing between Edit & Delete buttons */
}

.client-id-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-emerald);
}

.client-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 4px;
}

.client-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.client-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.info-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}

.retainer-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.retainer-amount {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

/* Vault Info Banner */
.vault-info-banner {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(14, 21, 38, 0.8), rgba(234, 88, 12, 0.12));
  border-left: 4px solid var(--accent-emerald);
}

/* Proposals & Documents Grid */
.proposals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.proposal-card {
  padding: 20px;
}

/* Modals System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-container {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-lg);
}

.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1020px; }

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

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

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

.form-grid {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

.readonly-highlight {
  background: rgba(234, 88, 12, 0.1) !important;
  color: var(--accent-emerald) !important;
  font-weight: 700;
  border-color: rgba(234, 88, 12, 0.4) !important;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90vw;
}

.toast {
  background: var(--bg-modal);
  border: 1px solid var(--accent-emerald);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Printable PDF Document Sheet */
.doc-preview-container {
  padding: 24px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* Login Screen Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #172438 0%, #090d16 100%);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

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

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.login-header h2 span { color: var(--accent-emerald); }

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.input-with-icon i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.input-with-icon input {
  padding-left: 44px !important;
  width: 100%;
}

.full-width-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

/* ==========================================================================
   Comprehensive Mobile & Custom Window Size Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .charts-grid, .dashboard-tables-grid {
    grid-template-columns: 1fr;
  }
  .topbar-user-badge {
    display: none;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 10px 16px;
  }
  .topbar-left h1 {
    font-size: 1.1rem;
  }
  .topbar-left p {
    display: none;
  }
  .early-rule-badge span {
    font-size: 0.72rem;
  }

  .content-body {
    padding: 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 14px;
    gap: 10px;
  }

  .kpi-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .kpi-value {
    font-size: 1.25rem;
  }

  .alert-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .search-box {
    min-width: 100%;
  }

  .filter-group, .action-buttons {
    width: 100%;
  }

  .action-buttons button, .filter-group select {
    flex: 1;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .modal-container {
    max-width: 95vw;
  }

  .login-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .clients-grid, .proposals-grid {
    grid-template-columns: 1fr;
  }

  .topbar-right button span {
    display: none;
  }
}
