/* ==========================================================================
   Corporate Financial Suite - Modern Dark Theme System
   Primary Accent Color: #1d4ed8 (Royal Blue)
   ========================================================================== */

:root {
  /* Core Dark Color System */
  --bg-app: #0b0f19;
  --bg-sidebar: #090d16;
  --bg-card: #151c2c;
  --bg-card-hover: #1b2438;
  --bg-input: #1b2438;
  --bg-modal: #151c2c;
  
  --border-color: #27344d;
  --border-focus: #1d4ed8;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Brand & Accent Palette - #1d4ed8 Primary */
  --accent-primary: #1d4ed8;
  --accent-primary-hover: #2563eb;
  --accent-primary-light: rgba(29, 78, 216, 0.2);

  --accent-income: #10b981;
  --accent-income-light: rgba(16, 185, 129, 0.15);

  --accent-expense: #f43f5e;
  --accent-expense-light: rgba(244, 63, 94, 0.15);

  --accent-net: #3b82f6;
  --accent-net-light: rgba(59, 130, 246, 0.15);

  --accent-amber: #f59e0b;
  --accent-amber-light: rgba(245, 158, 11, 0.15);

  --accent-purple: #a855f7;
  --accent-purple-light: rgba(168, 85, 247, 0.15);

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.6);

  /* Border Radius System */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Main App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

.brand-text h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

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

.nav-item i {
  font-size: 18px;
}

.nav-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--accent-income);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-income);
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 32px;
  max-width: 1400px;
}

/* Topbar Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar-title h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.topbar-title p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.btn.primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn.secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn.secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #475569;
}

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

.btn.block {
  width: 100%;
}

/* Metrics Grid Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #3b82f6;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-header span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.metric-income .metric-icon {
  background-color: var(--accent-income-light);
  color: var(--accent-income);
}

.metric-expense .metric-icon {
  background-color: var(--accent-expense-light);
  color: var(--accent-expense);
}

.metric-net .metric-icon {
  background-color: var(--accent-primary-light);
  color: #3b82f6;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.metric-value.green { color: var(--accent-income); }
.metric-value.red { color: var(--accent-expense); }
.metric-value.blue { color: #60a5fa; }

.metric-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

.trend-badge.positive {
  background-color: var(--accent-income-light);
  color: var(--accent-income);
}

.trend-badge.negative {
  background-color: var(--accent-expense-light);
  color: var(--accent-expense);
}

.trend-badge.info {
  background-color: var(--accent-primary-light);
  color: #60a5fa;
}

.metric-subtext {
  color: var(--text-muted);
}

/* Card System */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

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

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

.card-body {
  padding: 24px;
}

.card-body.no-padding {
  padding: 0;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.input-group.span-2 {
  grid-column: span 2;
}

.input-group label, .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-group input, 
.input-group select, 
.form-group input, 
.form-group select, 
.form-group textarea {
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus, 
.input-group select:focus, 
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.3);
}

.input-group select option, .form-group select option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* Table Design */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

th {
  background-color: #111827;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: var(--bg-card-hover);
}

td.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

td.empty i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

/* Status Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-in {
  background-color: var(--accent-income-light);
  color: var(--accent-income);
}

.badge-ex {
  background-color: var(--accent-expense-light);
  color: var(--accent-expense);
}

.badge-pending {
  background-color: var(--accent-amber-light);
  color: var(--accent-amber);
}

.badge-reimbursed {
  background-color: var(--accent-income-light);
  color: var(--accent-income);
}

.badge-na {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  background-color: rgba(29, 78, 216, 0.2);
  color: #93c5fd;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* Action Buttons inside Table */
.action-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

.action-btn.del:hover {
  background-color: var(--accent-expense-light);
  color: var(--accent-expense);
}

.action-btn.edit:hover {
  background-color: var(--accent-primary-light);
  color: #60a5fa;
}

/* Transaction Ledger Controls */
.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.search-box i {
  position: absolute;
  left: 14px;
  font-size: 17px;
  color: #60a5fa;
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-box input {
  padding: 9px 16px 9px 40px;
  width: 280px;
  background: linear-gradient(145deg, #1b2438, #111827);
  border: 1px solid #27344d;
  border-radius: 20px;
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-box input::placeholder {
  color: #64748b;
  font-size: 13px;
}

.search-box input:focus {
  width: 320px;
  outline: none;
  border-color: #1d4ed8;
  background: #1b2438;
  box-shadow: 0 0 16px rgba(29, 78, 216, 0.45), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-box input:focus + i {
  color: #93c5fd;
}

/* Sleek Filter Dropdowns */
.filter-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-dropdown-wrap i.filter-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: #94a3b8;
  pointer-events: none;
}

.filter-dropdown-wrap i.chevron-icon {
  position: absolute;
  right: 12px;
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 9px 34px 9px 34px;
  background: linear-gradient(145deg, #1b2438, #151c2c);
  border: 1px solid #27344d;
  border-radius: 20px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.filter-select:hover {
  border-color: #1d4ed8;
  background: #1b2438;
  color: #ffffff;
}

.filter-select:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 12px rgba(29, 78, 216, 0.4);
}

.filter-select option {
  background-color: #151c2c;
  color: #f8fafc;
  padding: 10px;
  font-size: 13px;
}

/* ==========================================================================
   Clean & Simple Products Card Styling
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.product-card {
  background-color: #151c2c;
  border: 1px solid #27344d;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.product-card:hover {
  border-color: #3b82f6;
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(29, 78, 216, 0.2);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.product-title-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.product-category-pill {
  font-size: 11px;
  color: #94a3b8;
  background: #1b2438;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.product-revenue-box {
  background: #0b0f19;
  border: 1px solid #27344d;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-revenue-stat label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.product-revenue-stat .val {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-income);
}

/* Client Items inside Product Card */
.client-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-item {
  background-color: #0b0f19;
  border: 1px solid #27344d;
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  transition: border-color 0.2s ease;
}

.client-item:hover {
  border-color: #3b82f6;
}

.client-item-corner-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.status-toggle-btn {
  border: none;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.status-toggle-btn.active {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-toggle-btn.inactive {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.client-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 85px;
}

.client-info-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(29, 78, 216, 0.2);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.client-info strong {
  color: var(--text-main);
  font-size: 14px;
}

.client-item-divider {
  height: 1px;
  background-color: #27344d;
  margin: 10px 0;
}

.client-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-mrr {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-income);
}

/* Payment Status Badges */
.badge-payment {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-payment.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-payment.partial {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-payment.unpaid {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background-color: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-card.modal-lg {
  max-width: 680px;
}

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

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.avatar-indigo { background: var(--accent-primary-light); color: #60a5fa; }
.avatar-emerald { background: var(--accent-income-light); color: var(--accent-income); }

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-header p {
  font-size: 12px;
  color: var(--text-muted);
}

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

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

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

.form-grid-modal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.form-group.span-2 {
  grid-column: span 2;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Category Budgets Grid */
.budgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.budget-item {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.budget-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.budget-title {
  font-weight: 600;
  color: var(--text-main);
}

.budget-stats {
  color: var(--text-muted);
}

.progress-bar {
  height: 8px;
  background-color: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bg-emerald { background-color: var(--accent-income); }
.bg-rose { background-color: var(--accent-expense); }
.bg-amber { background-color: var(--accent-amber); }
.bg-indigo { background-color: var(--accent-primary); }

/* P&L Statement Layout */
.pl-statement {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pl-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.pl-row.highlight {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary);
  font-weight: 700;
  font-size: 16px;
  color: #60a5fa;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
}

.chart-container {
  height: 320px;
  position: relative;
}

/* Utility Classes */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 24px !important; }

.text-indigo { color: #60a5fa !important; }
.text-emerald { color: var(--accent-income) !important; }
.text-rose { color: var(--accent-expense) !important; }

/* Subtab Navigation Styling */
.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.subtab-btn.active {
  background: var(--accent-primary-light);
  color: #60a5fa;
  border-color: var(--accent-primary);
}

/* Client Badges */
.badge-type1 {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.independent-clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ==========================================================================
   User Authentication & Login Screen Styles (Glassmorphism & Glow Effects)
   ========================================================================== */

.hidden {
  display: none !important;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: var(--bg-app);
  overflow-y: auto;
  padding: 20px;
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  opacity: 0.15;
  pointer-events: none;
}

.login-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: 10%;
  left: 15%;
}

.login-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-income);
  bottom: 10%;
  right: 15%;
}

.login-card {
  background: rgba(21, 28, 44, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(39, 52, 77, 0.7);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 10;
  transition: all 0.3s ease;
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 20px 45px rgba(29, 78, 216, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.login-header .brand-icon {
  margin-bottom: 8px;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.login-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background-color: var(--accent-expense-light);
  color: var(--accent-expense);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid rgba(244, 63, 94, 0.3);
  animation: fadeIn 0.3s ease;
}

.login-alert.success {
  background-color: var(--accent-income-light);
  color: var(--accent-income);
  border-color: rgba(16, 185, 129, 0.3);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.login-footer a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* User profile section in sidebar */
.user-profile-section {
  margin-top: auto;
  padding: 14px 0 0 0;
  border-top: 1px solid var(--border-color);
  animation: fadeIn 0.4s ease;
}

.user-profile-section .user-avatar {
  background: linear-gradient(135deg, var(--accent-primary), #3b82f6);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
}

.user-profile-section button.logout-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile-section button.logout-btn:hover {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-expense);
}

/* Custom animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

