/* ==========================================================================
   مصروفي الذكي (Masroofi Pro) - Laravel Edition Design System & Modern CSS
   ========================================================================== */

:root {
  color-scheme: dark;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.22);
  --secondary: #3b82f6;
  --danger: #ef4444;
  --warning: #f97316;
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-numbers: 'Plus Jakarta Sans', 'Cairo', sans-serif;
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.theme-dark {
  color-scheme: dark;
  --bg-main: #090d16;
  --bg-gradient: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
                 radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
                 #090d16;
  --card-bg: rgba(17, 24, 39, 0.85);
  --card-bg-subtle: rgba(31, 41, 55, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(16, 185, 129, 0.35);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --nav-bg: rgba(15, 23, 42, 0.88);
  --nav-border: rgba(255, 255, 255, 0.06);
  --input-bg: #111827;
  --input-border: #374151;
  --modal-backdrop: rgba(3, 7, 18, 0.8);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.theme-light {
  color-scheme: light;
  --bg-main: #f8fafc;
  --bg-gradient: radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 35%),
                 #f8fafc;
  --card-bg: #ffffff;
  --card-bg-subtle: #f1f5f9;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-border-hover: rgba(16, 185, 129, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(0, 0, 0, 0.08);
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --modal-backdrop: rgba(15, 23, 42, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.04);
}

body.theme-light .golden-safe-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, #ffffff 45%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12), var(--shadow-card);
}

body.theme-light .gauge-bg {
  stroke: rgba(0, 0, 0, 0.08);
}

body.theme-light .dual-progress-bar {
  background: rgba(0, 0, 0, 0.08);
}

body.theme-light .progress-bar-time {
  background: rgba(0, 0, 0, 0.22);
}

body.theme-light .dot-time {
  background: rgba(0, 0, 0, 0.35);
}

body.theme-light .debt-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

body.theme-light .debt-harvest-pot-card {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

body.theme-light .harvest-logs-table th {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-light .harvest-logs-table td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

body.theme-light .harvest-logs-table tr:hover {
  background: #f8fafc;
}

body.theme-light .empty-state-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

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

body {
  font-family: var(--font-arabic);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem 1.5rem;
}

/* ==========================================================================
   TOP NAVIGATION - LUXURY MODERN HEADER DESIGN
   ========================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.65rem 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--nav-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0.75rem;
  z-index: 100;
  margin-bottom: 1.5rem;
  transition: all var(--transition-smooth);
  box-sizing: border-box;
  width: 100%;
}

/* Brand Link & Identity */
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.logo-icon-wrap {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.brand-link:hover .logo-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}
.logo-icon { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.badge-pro {
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  padding: 1px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}
.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cycle Context Widget */
.nav-cycle-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
body.theme-light .nav-cycle-widget {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.cycle-icon { font-size: 0.95rem; }
.cycle-title { font-weight: 700; color: var(--text-primary); font-size: 0.82rem; }
.cycle-sep { color: var(--text-muted); font-size: 0.75rem; }
.cycle-days-badge {
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Nav Actions Container */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Currency Group */
.currency-nav-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
body.theme-light .currency-nav-group {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.rate-indicator-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
  font-family: inherit;
  direction: ltr;
}
.rate-indicator-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}
.currency-select-compact {
  background-color: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  color-scheme: dark;
  transition: all var(--transition-fast);
}
.currency-select-compact:hover {
  background-color: #24344d;
  border-color: rgba(16, 185, 129, 0.4);
}
.currency-select-compact:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.currency-select-compact option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}
body.theme-light .currency-select-compact {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
  color-scheme: light;
}
body.theme-light .currency-select-compact:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}
body.theme-light .currency-select-compact option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Network / Offline Status Indicator */
.network-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.network-status-indicator:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
}
.net-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.net-status-text {
  color: #10b981;
  font-size: 0.75rem;
}
.network-status-indicator.offline {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
.network-status-indicator.offline .net-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.network-status-indicator.offline .net-status-text {
  color: #f59e0b;
}

/* Action Icon Buttons */
.nav-action-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-smooth);
  text-decoration: none;
  font-family: inherit;
  flex-shrink: 0;
}
body.theme-light .nav-action-icon-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.nav-action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}
.nav-action-icon-btn.admin-btn:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.nav-action-icon-btn.lock-btn:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.nav-action-icon-btn.key-btn:hover {
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.nav-action-icon-btn.logout-btn:hover {
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   👤 LUXURY USER PROFILE DROPDOWN MENU
   ========================================================================== */
.user-profile-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.65rem 0.25rem 0.45rem;
  border-radius: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  user-select: none;
}
body.theme-light .user-pill-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.user-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.user-pill-btn:active {
  transform: translateY(0);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

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

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 1px;
}
.badge-admin {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-member {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-dropdown-caret {
  font-size: 0.62rem;
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 1px;
}
.user-profile-menu-wrap.open .user-dropdown-caret {
  transform: rotate(180deg);
}

.user-dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 260px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 1050;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  animation: menuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
body.theme-light .user-dropdown-panel {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.user-profile-menu-wrap.open .user-dropdown-panel {
  display: flex;
}

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

.user-dropdown-header {
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
}
body.theme-light .user-dropdown-header {
  border-bottom-color: #e2e8f0;
}
.user-dropdown-avatar-lg {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.user-dropdown-user-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #f8fafc;
}
body.theme-light .user-dropdown-user-title {
  color: #0f172a;
}
.user-dropdown-workspace-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 1px;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.theme-light .user-dropdown-workspace-subtitle {
  color: #64748b;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  box-sizing: border-box;
}
body.theme-light .user-dropdown-item {
  color: #1e293b;
}
.user-dropdown-item:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
body.theme-light .user-dropdown-item:hover {
  background: #f1f5f9;
  color: #059669;
}
.user-dropdown-item .dropdown-item-icon {
  font-size: 1rem;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-dropdown-item .dropdown-item-text {
  display: flex;
  flex-direction: column;
}
.user-dropdown-item .item-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: inherit;
}
.user-dropdown-item .item-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 400;
}
body.theme-light .user-dropdown-item .item-desc {
  color: #64748b;
}
.user-dropdown-item.danger {
  color: #f87171;
}
.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.user-dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.3rem 0;
}

/* 🔐 Interactive PIN Boxes in Modal */
.pin-digit-box {
  width: 52px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}
.pin-digit-box:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
}
.pin-auth-tab.active {
  background: #10b981 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.pin-auth-tab:not(.active) {
  background: transparent !important;
  color: var(--text-secondary) !important;
}

/* User Profile Group */
.user-profile-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3px 4px 3px 8px;
  border-radius: 14px;
}
body.theme-light .user-profile-group {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.4rem;
}
.user-avatar {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 1px;
}
.badge-admin {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-member {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.user-actions-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.45rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 0.55rem;
  padding-left: 0.2rem;
}
body.theme-light .user-actions-btns {
  border-right-color: #cbd5e1;
}


/* TABS */
.main-tabs-bar {
  display: flex; gap: 0.5rem;
  background: var(--card-bg); backdrop-filter: blur(12px);
  padding: 0.45rem; border-radius: 16px; border: 1px solid var(--card-border);
  margin-bottom: 2rem; box-shadow: var(--shadow-card); overflow-x: auto;
}
.tab-btn {
  flex: 1; min-width: 140px; display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1rem; background: transparent; border: none;
  border-radius: 12px; color: var(--text-secondary); font-weight: 700;
  font-size: 0.95rem; cursor: pointer; transition: all var(--transition-smooth);
}
.tab-btn:hover { color: var(--text-primary); background: var(--card-bg-subtle); }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.05));
  color: var(--primary); border: 1px solid var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }

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

/* GOLDEN SAFE CARD */
.golden-safe-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(17, 24, 39, 0.95) 45%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35); border-radius: 24px;
  padding: 2rem 2.2rem; box-shadow: 0 12px 35px -5px var(--primary-glow), var(--shadow-card);
  position: relative; overflow: hidden; margin-bottom: 2rem;
}
.golden-safe-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold), #06b6d4);
}
.safe-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.safe-card-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(16, 185, 129, 0.18); color: var(--primary);
  padding: 0.35rem 0.9rem; border-radius: 20px; font-size: 0.85rem; font-weight: 700;
}
.pulse-dot {
  width: 8px; height: 8px; background: var(--primary);
  border-radius: 50%; animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.btn-text-action {
  background: transparent; border: 1px dashed var(--text-secondary);
  color: var(--text-secondary); padding: 0.35rem 0.85rem; border-radius: 10px;
  font-size: 0.85rem; cursor: pointer;
}
.btn-text-action:hover { border-color: var(--primary); color: var(--primary); }

.safe-card-body {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: center;
}
.safe-label { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; display: block; }
.safe-value-display { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.75rem; }
.safe-amount {
  font-family: var(--font-numbers); font-size: 3.8rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, #10b981 30%, #34d399 70%, #a7f3d0);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.safe-curr { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.safe-description { font-size: 0.95rem; color: var(--text-secondary); max-width: 580px; }

.pacing-gauge-col { display: flex; flex-direction: column; align-items: center; }
.gauge-ring-wrap { position: relative; width: 140px; height: 140px; }
.gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 10; }
.gauge-fill {
  fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 314.159; transition: stroke-dashoffset 1s ease;
}
.gauge-inner-info {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gauge-percent { font-family: var(--font-numbers); font-size: 1.8rem; font-weight: 800; }
.gauge-sub { font-size: 0.75rem; color: var(--text-secondary); }
.pacing-status-badge {
  margin-top: 0.85rem; font-size: 0.85rem; font-weight: 700;
  background: rgba(16, 185, 129, 0.15); color: var(--primary);
  padding: 0.35rem 0.9rem; border-radius: 12px;
}

.month-pace-comparison {
  margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--card-border);
}
.pace-row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.dual-progress-bar { height: 9px; background: rgba(255, 255, 255, 0.08); border-radius: 10px; position: relative; overflow: hidden; }
.progress-bar-time { position: absolute; height: 100%; background: rgba(255, 255, 255, 0.25); border-radius: 10px; }
.progress-bar-spent { position: absolute; height: 100%; background: linear-gradient(90deg, #10b981, #06b6d4); border-radius: 10px; }
.dual-progress-legend { display: flex; gap: 1.5rem; margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-muted); }
.dot-time { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); display: inline-block; }
.dot-spent { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; }

/* 4 STATS CARDS */
.stats-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.35rem; display: flex; align-items: flex-start;
  gap: 1rem; box-shadow: var(--shadow-card);
}
.stat-icon-badge {
  font-size: 1.6rem; width: 48px; height: 48px; border-radius: 14px;
  background: var(--card-bg-subtle); display: flex; align-items: center; justify-content: center;
}
.stat-details { display: flex; flex-direction: column; }
.stat-title { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.stat-number-wrap { display: flex; align-items: baseline; gap: 0.4rem; }
.stat-number { font-family: var(--font-numbers); font-size: 1.75rem; font-weight: 800; }
.stat-income .stat-number { color: #10b981; }
.stat-spent .stat-number { color: #ef4444; }
.stat-remaining .stat-number { color: #3b82f6; }
.stat-savings .stat-number { color: #f59e0b; }
.stat-subtext { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* QUICK ACTIONS */
.quick-action-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  padding: 0.95rem 1.25rem; border-radius: 16px; font-weight: 700;
  font-size: 0.95rem; border: none; cursor: pointer; box-shadow: var(--shadow-card);
  transition: all var(--transition-bounce);
}
.action-btn:hover { transform: translateY(-3px) scale(1.02); }
.action-add-expense { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.action-add-income { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.action-feed-goal { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.action-cool-off { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }

/* CHARTS & RECENT */
.dashboard-analytics-grid {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.5rem; margin-bottom: 2rem;
}
.chart-box {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-card);
}
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.chart-title { font-size: 1.05rem; font-weight: 700; }
.chart-canvas-container { position: relative; height: 280px; width: 100%; }

.recent-transactions-widget {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-card);
}
.widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.widget-title { font-size: 1.05rem; font-weight: 700; }
.btn-link { background: transparent; border: none; color: var(--primary); font-weight: 700; cursor: pointer; }

.transactions-list { display: flex; flex-direction: column; gap: 0.65rem; }
.tx-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; background: var(--card-bg-subtle);
  border-radius: 14px; border: 1px solid var(--card-border);
}
.tx-item-left { display: flex; align-items: center; gap: 0.85rem; }
.tx-category-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.tx-details { display: flex; flex-direction: column; }
.tx-name { font-weight: 700; font-size: 0.95rem; }
.tx-meta { font-size: 0.75rem; color: var(--text-muted); }
.tx-item-right { display: flex; align-items: center; gap: 1rem; }
.tx-amount-display { font-family: var(--font-numbers); font-weight: 800; font-size: 1.15rem; }
.tx-amount-display.expense { color: #ef4444; }
.tx-amount-display.income { color: #10b981; }
.tx-amount-display.savings { color: #f59e0b; }
.btn-delete-tx {
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1rem;
}
.btn-delete-tx:hover { color: var(--danger); }
.btn-edit-tx {
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1rem; padding: 0.15rem 0.25rem;
  border-radius: 6px; transition: all 0.2s; display: inline-flex;
  align-items: center; justify-content: center;
}
.btn-edit-tx:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  transform: scale(1.1);
}


/* 50/30/20 & ENVELOPES */
.rule-50-30-20-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.75rem; margin-bottom: 2rem; box-shadow: var(--shadow-card);
}
.rule-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; }
.rule-badge {
  background: rgba(245, 158, 11, 0.15); color: var(--accent-gold);
  padding: 3px 10px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
}
.rule-bars-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.rule-pillar { background: var(--card-bg-subtle); border-radius: 16px; padding: 1.15rem; border: 1px solid var(--card-border); }
.pillar-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.65rem; }
.pillar-progress { height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 8px; overflow: hidden; margin-bottom: 0.5rem; }
.pillar-fill { height: 100%; border-radius: 8px; transition: width 0.6s ease; }
.pillar-needs .pillar-fill { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.pillar-wants .pillar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.pillar-savings .pillar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.pillar-note { font-size: 0.75rem; color: var(--text-muted); }

.section-action-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.section-desc { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.2rem; }
.envelopes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.envelope-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-card);
}
.envelope-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.15rem; }
.envelope-title-wrap { display: flex; align-items: center; gap: 0.65rem; }
.env-icon-box {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.env-name { font-weight: 800; font-size: 1.05rem; }
.env-pillar-badge { font-size: 0.7rem; color: var(--text-muted); }
.env-status-badge { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.env-status-safe { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.env-status-warning { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.env-status-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.env-amounts-row { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.env-amount-col { display: flex; flex-direction: column; }
.env-amount-lbl { font-size: 0.75rem; color: var(--text-muted); }
.env-amount-val { font-family: var(--font-numbers); font-weight: 800; font-size: 1.1rem; }
.env-bar-wrap { height: 10px; background: rgba(255, 255, 255, 0.08); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.env-bar-fill { height: 100%; border-radius: 10px; transition: width 0.6s ease; }
.envelope-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--card-border); padding-top: 0.85rem; }
.env-spent-percent { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.btn-add-env-tx {
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  color: var(--text-primary); font-size: 0.8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.btn-add-env-tx:hover { border-color: var(--primary); color: var(--primary); }

/* SAVINGS GOALS */
.goals-summary-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 1.75rem; margin-bottom: 2rem; box-shadow: var(--shadow-card);
}
.goals-sub { font-size: 0.85rem; color: var(--text-secondary); }
.goals-hero-number { font-family: var(--font-numbers); font-size: 2.2rem; font-weight: 900; color: #10b981; }
.goals-hero-number.secondary { color: var(--text-primary); }
.goals-hero-number.highlight { color: #f59e0b; }
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.goal-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 1.75rem; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; justify-content: space-between;
}
.goal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.goal-title-wrap { display: flex; align-items: center; gap: 0.75rem; }
.goal-icon {
  font-size: 2rem; width: 52px; height: 52px; border-radius: 16px;
  background: rgba(245, 158, 11, 0.12); display: flex; align-items: center; justify-content: center;
}
.goal-name { font-size: 1.15rem; font-weight: 800; }
.goal-deadline { font-size: 0.75rem; color: var(--text-muted); }
.goal-numbers-row { display: flex; justify-content: space-between; margin-bottom: 0.85rem; }
.goal-cur-saved { font-family: var(--font-numbers); font-size: 1.5rem; font-weight: 900; color: #10b981; }
.goal-target-val { font-size: 0.85rem; color: var(--text-secondary); }
.goal-progress-wrap { height: 12px; background: rgba(255, 255, 255, 0.08); border-radius: 12px; overflow: hidden; margin-bottom: 1.25rem; }
.goal-progress-fill { height: 100%; background: linear-gradient(90deg, #10b981, #f59e0b); border-radius: 12px; }
.goal-actions-row { display: flex; gap: 0.65rem; }
.btn-feed-single-goal {
  flex: 1; background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white; border: none; padding: 0.65rem; border-radius: 12px;
  font-weight: 700; cursor: pointer;
}

/* LEAKS AUDIT */
.leaks-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.leak-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 1.75rem; box-shadow: var(--shadow-card);
}
.full-width-card { grid-column: 1 / -1; }
.leak-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.leak-title-actions { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 1rem; flex-wrap: wrap; }
.leak-icon {
  font-size: 2rem; width: 52px; height: 52px; border-radius: 16px;
  background: var(--card-bg-subtle); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.leak-inputs { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.leak-results-box {
  background: var(--card-bg-subtle); border-radius: 16px; padding: 1.25rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: 1rem; border: 1px solid var(--card-border);
}
.leak-result-item { display: flex; flex-direction: column; text-align: center; }
.leak-period { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.leak-sum { font-family: var(--font-numbers); font-weight: 800; font-size: 1.2rem; }
.leak-result-item.shock .leak-sum { color: #ef4444; font-size: 1.35rem; }
.leak-result-item.compound .leak-sum { color: #f59e0b; }
.leak-tip {
  font-size: 0.85rem; color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.1); padding: 0.75rem 1rem;
  border-radius: 12px; border-right: 3px solid var(--primary);
}

.work-hours-result {
  background: var(--card-bg-subtle); border-radius: 16px; padding: 1.5rem;
  text-align: center; margin-bottom: 1rem; border: 1px solid var(--card-border);
}
.work-big-metric { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; }
.work-hours-count { font-family: var(--font-numbers); font-size: 3.5rem; font-weight: 900; color: #ef4444; line-height: 1; }
.work-hours-unit { font-size: 1.2rem; font-weight: 700; color: var(--text-secondary); }
.work-sentence { font-size: 1rem; color: var(--text-primary); }

.wishlist-saved-badge {
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary); padding: 0.75rem 1.25rem; border-radius: 14px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem;
}
.wishlist-container { display: flex; flex-direction: column; gap: 0.85rem; }
.wish-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card-bg-subtle); border-radius: 16px; padding: 1rem 1.25rem;
  border: 1px solid var(--card-border); gap: 1rem;
}
.wish-item-info { display: flex; align-items: center; gap: 1rem; }
.wish-countdown {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(245, 158, 11, 0.15); color: var(--accent-gold);
  padding: 0.4rem 0.85rem; border-radius: 10px; font-weight: 800; font-size: 0.85rem;
}
.wish-actions { display: flex; gap: 0.5rem; }
.btn-wish-saved {
  background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid #10b981;
  padding: 0.4rem 0.85rem; border-radius: 10px; font-weight: 700; cursor: pointer;
}
.btn-wish-saved:hover { background: #10b981; color: white; }
.btn-wish-bought {
  background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid #ef4444;
  padding: 0.4rem 0.85rem; border-radius: 10px; font-weight: 700; cursor: pointer;
}

.subs-summary-bar {
  display: flex; gap: 2rem; background: var(--card-bg-subtle);
  padding: 1rem 1.25rem; border-radius: 14px; margin-bottom: 1.25rem;
}
.subs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.sub-item-card {
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 1rem; display: flex; align-items: center; justify-content: space-between;
}

/* LEDGER */
.ledger-top-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ledger-filter-bar { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-search-wrap { flex: 2; min-width: 260px; position: relative; }
.search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.filter-search-wrap input { padding-right: 2.4rem; }
.filter-select-wrap { flex: 1; min-width: 180px; }
.ledger-table-wrapper {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card);
}
.ledger-table { width: 100%; border-collapse: collapse; text-align: right; font-size: 0.9rem; }
.ledger-table th {
  background: var(--card-bg-subtle); padding: 1rem 1.25rem;
  font-weight: 700; color: var(--text-secondary); border-bottom: 1px solid var(--card-border);
}
.ledger-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--card-border); vertical-align: middle; }
.ledger-table tr:hover td { background: var(--card-bg-subtle); }

/* BUTTONS & MODALS */
.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669); color: white;
  border: none; padding: 0.75rem 1.5rem; border-radius: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-secondary {
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  color: var(--text-primary); padding: 0.65rem 1.25rem; border-radius: 12px;
  font-weight: 700; cursor: pointer;
}
.btn-subtle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  color: var(--text-primary); padding: 0.45rem 0.85rem; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.modal-backdrop {
  position: fixed; inset: 0; background: var(--modal-backdrop);
  backdrop-filter: blur(8px); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 0.75rem;
}
.modal-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); overflow: hidden;
  max-height: 96vh; display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.35rem; border-bottom: 1px solid var(--card-border); flex-shrink: 0;
}
.modal-header h3 { font-size: 0.95rem; margin: 0; }
.modal-close-btn { background: transparent; border: none; font-size: 1.5rem; color: var(--text-secondary); cursor: pointer; line-height: 1; }
.modal-form { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto; flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.styled-input,
.styled-select {
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: all 0.2s ease;
}

.styled-select {
  padding-left: 2.5rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.85rem center;
  background-size: 14px 14px;
}

.styled-select option {
  background-color: #1e293b;
  color: #f8fafc;
  padding: 0.5rem;
}

body.theme-light .styled-select option {
  background-color: #ffffff;
  color: #0f172a;
}

select {
  color-scheme: dark;
}

body.theme-light select {
  color-scheme: light;
}

select option {
  background-color: #0f172a;
  color: #f8fafc;
}

body.theme-light select option {
  background-color: #ffffff;
  color: #0f172a;
}

.styled-input:focus,
.styled-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.styled-input[type="date"] {
  color-scheme: dark;
}
.large-number { font-family: var(--font-numbers); font-size: 1.4rem; font-weight: 800; }
.input-with-curr { position: relative; display: flex; align-items: center; }
.curr-badge { position: absolute; left: 14px; font-weight: 800; color: var(--text-secondary); }
.form-type-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; background: var(--card-bg-subtle); padding: 0.3rem; border-radius: 12px; }
.type-pill {
  display: flex; align-items: center; justify-content: center; padding: 0.45rem 0.3rem;
  border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.8rem; color: var(--text-secondary);
}
.type-pill input { display: none; }
.type-pill.active { background: var(--card-bg); color: var(--text-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 0.25rem; flex-shrink: 0; padding: 0.75rem 1.25rem; border-top: 1px solid var(--card-border); }

.toast-container { position: fixed; bottom: 2rem; left: 2rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.75rem; }
.toast {
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-primary);
  padding: 0.9rem 1.35rem; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 0.9rem;
}
.hidden { display: none !important; }

/* CURRENCY CONVERTER & RATE INDICATOR */
.rate-indicator-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12); color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 999px;
  padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
}
.rate-indicator-pill:hover {
  background: rgba(16, 185, 129, 0.22); transform: translateY(-1px);
}
.converter-selection-row {
  display: flex; align-items: flex-end; gap: 0.75rem;
}
.btn-swap-currency {
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  color: var(--text-primary); border-radius: 12px; height: 44px; width: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; cursor: pointer; transition: all 0.25s ease; margin-bottom: 2px;
}
.btn-swap-currency:hover {
  background: var(--primary); color: white; border-color: var(--primary); transform: rotate(180deg);
}
.converter-result-card {
  background: var(--card-bg-subtle); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 1.25rem; text-align: center;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.converter-result-label {
  font-size: 0.85rem; color: var(--text-secondary); font-weight: 600;
}
.converter-result-val {
  font-family: var(--font-numbers); font-size: 2.2rem; font-weight: 900;
  color: var(--text-primary); display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.converter-rate-badge {
  font-size: 0.82rem; color: #10b981; font-weight: 700;
  background: rgba(16, 185, 129, 0.1); border-radius: 8px; padding: 0.3rem 0.75rem;
  align-self: center;
}
.live-sync-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px; padding: 0.65rem 0.95rem; font-size: 0.82rem;
  margin-bottom: 0.5rem;
}
.pulse-indicator-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 10px #10b981;
  display: inline-block; animation: pulse 2s infinite ease-in-out;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-income-tag {
  background: rgba(16, 185, 129, 0.12); color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28); border-radius: 999px;
  padding: 0.35rem 0.75rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-income-tag:hover {
  background: #10b981; color: white; transform: translateY(-1px);
}

/* MULTI-SALARY MANAGEMENT & INFLOW SYSTEM */
.modal-card-lg {
  max-width: 780px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-body-scrollable {
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.salary-tabs-switcher {
  display: flex;
  gap: 0.5rem;
  background: var(--card-bg-subtle);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
}
.salary-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.salary-tab-btn.active {
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
}
.salary-summary-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 18px;
  padding: 1.1rem;
}
.salary-sum-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}
.salary-sum-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.salary-sum-val {
  font-family: var(--font-numbers);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}
.salary-list-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.salary-item-card {
  background: var(--card-bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.25s ease;
}
.salary-item-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.salary-item-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
}
.salary-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}
.salary-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.salary-item-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.salary-item-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}
.salary-badge {
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.salary-badge-method {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.salary-badge-cash {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.salary-badge-day {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.salary-item-amount-col {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  min-width: 140px;
}
.salary-item-amount {
  font-family: var(--font-numbers);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}
.salary-item-equiv {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.salary-item-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-icon-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.btn-icon-action.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}
.salary-add-box {
  background: var(--card-bg-subtle);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.salary-add-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

/* SALARY INFLOW TIMELINE WIDGET IN DASHBOARD */
.salary-schedule-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.salary-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.salary-timeline-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}
.salary-timeline-pill {
  background: var(--card-bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.salary-timeline-pill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
}
.salary-timeline-pill.cash-pill::after {
  background: #f59e0b;
}

/* PURCHASE IMPACT CALCULATOR */
.impact-calc-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.impact-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.impact-stat-box {
  background: var(--card-bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.impact-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
}
.impact-stat-val {
  font-family: var(--font-numbers);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}
.impact-verdict-banner {
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.impact-verdict-safe {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.impact-verdict-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.impact-verdict-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Professional Buying Strategy */
.buying-strategy-box {
  background: var(--card-bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: 1rem;
}
.strategy-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.strategy-path-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.strategy-path-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.strategy-path-card.highlighted {
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
}
.strategy-path-card.highlight-amber {
  border: 2px solid #f59e0b !important;
  background: rgba(245, 158, 11, 0.06) !important;
}
.strategy-path-card.highlight-blue {
  border: 2px solid #3b82f6 !important;
  background: rgba(59, 130, 246, 0.06) !important;
}
.strategy-path-card.highlight-emerald {
  border: 2px solid #10b981 !important;
  background: rgba(16, 185, 129, 0.06) !important;
}
.strategy-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.strategy-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.strategy-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.btn-strategy-action {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  transition: all 0.2s ease;
}
.btn-strategy-action.btn-cooldown {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-strategy-action.btn-cooldown:hover {
  background: #f59e0b;
  color: #111827;
}
.btn-strategy-action.btn-daily-cut {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.btn-strategy-action.btn-daily-cut:hover {
  background: #3b82f6;
  color: white;
}
.btn-strategy-action.btn-sinking {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-strategy-action.btn-sinking:hover {
  background: #10b981;
  color: white;
}
.cost-per-use-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* PWA Install Elements */
.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-pwa-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}
.pwa-install-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.4);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: pwaSlideUp 0.35s ease-out;
}
.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
@keyframes pwaSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 992px) {
  .dashboard-analytics-grid, .leaks-tools-grid, .safe-card-body { grid-template-columns: 1fr; }
  .pacing-gauge-col { display: none; }
  .salary-summary-banner { grid-template-columns: 1fr; }
  .impact-results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-container { padding: 0.75rem 0.85rem 5rem 0.85rem; }
  .top-nav { flex-wrap: wrap; position: static; }
  .nav-cycle-widget { order: 3; width: 100%; justify-content: center; }
  .safe-amount { font-size: 2.8rem; }
  .form-row, .quick-action-strip { grid-template-columns: 1fr; }
  .main-tabs-bar { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; border-radius: 0; z-index: 100; }
  .salary-item-card { flex-direction: column; align-items: flex-start; }
  .salary-item-amount-col { align-items: flex-start; text-align: right; }
  .payment-method-pills { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================== */
/* PAYMENT METHOD PILLS                           */
/* ============================================== */
.payment-method-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.pay-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.3rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--card-bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: center;
}

.pay-pill:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.08);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.pay-pill-icon { font-size: 1.15rem; line-height: 1; }
.pay-pill-label { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.pay-pill-sub { font-size: 0.65rem; color: var(--text-muted); line-height: 1.2; }

.pay-pill.active[data-value="transfer"] {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.pay-pill.active[data-value="transfer"] .pay-pill-label { color: #60a5fa; }

.pay-pill.active[data-value="cash"] {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.pay-pill.active[data-value="cash"] .pay-pill-label { color: #fbbf24; }

.pay-pill.active[data-value="card"] {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.pay-pill.active[data-value="card"] .pay-pill-label { color: #a78bfa; }

.pay-pill.active[data-value="credit"] {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.pay-pill.active[data-value="credit"] .pay-pill-label { color: #f87171; }

/* Payment Hint Bar */
.payment-hint-bar {
  margin-top: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.76rem;
  border-right: 3px solid transparent;
  transition: all 0.25s ease;
}
.payment-hint-bar.hint-transfer {
  background: rgba(59, 130, 246, 0.08);
  border-right-color: #3b82f6;
  color: #93c5fd;
}
.payment-hint-bar.hint-cash {
  background: rgba(245, 158, 11, 0.08);
  border-right-color: #f59e0b;
  color: #fcd34d;
}
.payment-hint-bar.hint-card {
  background: rgba(139, 92, 246, 0.08);
  border-right-color: #8b5cf6;
  color: #c4b5fd;
}
.payment-hint-bar.hint-credit {
  background: rgba(239, 68, 68, 0.08);
  border-right-color: #ef4444;
  color: #fca5a5;
}

/* Envelope Card Action Buttons */
.btn-env-action {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.2rem 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  transition: all 0.18s ease;
  opacity: 0.6;
}
.btn-env-action:hover {
  opacity: 1;
  background: var(--card-bg-subtle);
  border-color: var(--primary);
}
.btn-env-action.danger:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Cycle Navigator Bar */
.cycle-banner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--card-bg, #1e293b);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 0.9rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.25);
}
.cycle-banner-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.cycle-banner-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cycle-icon {
  font-size: 1.7rem;
  line-height: 1;
}
.cycle-banner-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary, #fff);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cycle-banner-dates {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  display: block;
  margin-top: 0.15rem;
}
.cycle-badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cycle-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.cycle-status-pill.pill-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.cycle-status-pill.pill-archived {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.cycle-status-pill.pill-future {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.cycle-status-pill.pill-surplus {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.cycle-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-cycle-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  background: var(--card-bg-subtle, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  color: var(--text-primary, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-cycle-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary, #10b981);
  color: #fff;
}
.btn-cycle-nav.btn-cycle-today {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}
.btn-cycle-nav.btn-cycle-today:hover {
  background: #10b981;
  color: #fff;
}
.btn-cycle-gear {
  background: transparent;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-cycle-gear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--primary, #10b981);
}

/* ========================================================
   PWA Installation Banner & Button
   ======================================================== */
.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 10px;
  color: #10b981;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

.btn-pwa-install:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.pwa-install-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 540px;
  margin: 0 auto;
  z-index: 9999;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideUpPwa 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpPwa {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pwa-banner-icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.pwa-banner-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #f9fafb;
  margin-bottom: 0.15rem;
}

.pwa-banner-desc {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.35;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-pwa-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-pwa-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

.btn-pwa-dismiss {
  background: transparent;
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pwa-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}

@media (max-width: 640px) {
  .pwa-install-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    gap: 0.85rem;
  }
  .pwa-banner-actions {
    justify-content: stretch;
  }
  .btn-pwa-primary {
    flex: 1;
    justify-content: center;
  }
}

/* ========================================================
   Offline-First & Auto-Sync UI Styles
   ======================================================== */
.network-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.network-status-pill .net-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.network-status-pill.online {
  border-color: rgba(16, 185, 129, 0.25);
}

.network-status-pill.offline {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.network-status-pill.offline .net-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  animation: pulseOffline 1.5s infinite ease-in-out;
}

.network-status-pill.has-pending {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.network-status-pill.has-pending .net-dot {
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  animation: pulseOffline 1.2s infinite ease-in-out;
}

@keyframes pulseOffline {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.pending-count-badge {
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.2rem;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

/* Reusable Offline Toast */
.masroofi-offline-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 90%;
  width: 480px;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
  animation: slideUpToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  color: #f9fafb;
}

.masroofi-offline-toast.toast-warning {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
}

.masroofi-offline-toast.toast-error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
}

@keyframes slideUpToast {
  from { opacity: 0; transform: translate(-50%, 25px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.offline-toast-body {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.offline-toast-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.offline-toast-close:hover {
  color: #ffffff;
}

/* Offline Sync Manager Modal Items */
.offline-sync-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  margin: 1rem 0;
  padding-left: 0.25rem;
}

.offline-item-card {
  background: var(--card-inner-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.2s ease;
}

.offline-item-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

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

.offline-item-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.offline-item-type-badge.type-expense {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.offline-item-type-badge.type-income {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.offline-item-type-badge.type-savings {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.offline-item-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f9fafb;
}

.offline-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
}

.offline-item-target {
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
}

.offline-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.offline-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.btn-del-offline-item {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-del-offline-item:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* ========================================================
   Debts & Payables Tracker (دفتر الديون والذمم المؤجلة)
   ======================================================== */
.tab-alert-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  animation: pulseOffline 2s infinite ease-in-out;
}

.debts-summary-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.debts-summary-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.debts-summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.debts-summary-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: 0.25rem;
}

.debts-summary-desc {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
}

.debts-summary-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.debt-stat-box {
  text-align: center;
}

.debt-stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.2rem;
}

.debt-stat-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ef4444;
}

.debt-stat-val.settled {
  color: #10b981;
}

.debts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.debt-card {
  background: var(--card-bg, #1f2937);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s ease;
  position: relative;
}

.debt-card:hover {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.debt-card.is-settled {
  border-color: rgba(16, 185, 129, 0.25);
  opacity: 0.85;
}

.debt-card.is-settled:hover {
  opacity: 1;
  border-color: rgba(16, 185, 129, 0.5);
}

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

.debt-creditor-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.debt-creditor-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.debt-creditor-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #f9fafb;
}

.debt-creditor-type {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.debt-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.debt-status-badge.active {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.debt-status-badge.settled {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.debt-balance-block {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debt-balance-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

.debt-balance-amount {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ef4444;
}

.debt-card.is-settled .debt-balance-amount {
  color: #10b981;
}

.debt-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-debt-add {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f3f4f6;
  border-radius: 10px;
  padding: 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-debt-add:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-debt-repay {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-debt-repay:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.debt-history-preview {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.75rem;
}

.debt-history-title {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.debt-record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.25rem 0;
  color: #d1d5db;
}

.debt-record-item .rec-amount.add {
  color: #f87171;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.debt-record-item .rec-amount.repay {
  color: #34d399;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ========================================================
   Daily Surplus Debt Harvester (مقتنص فوائض اليومية)
   ======================================================== */
.debt-harvest-complete-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(245, 158, 11, 0.15));
  border: 2px solid #10b981;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
  animation: slideUpPwa 0.4s ease forwards;
}

.harvest-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.harvest-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.harvest-banner-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: 0.2rem;
}

.harvest-banner-desc {
  font-size: 0.85rem;
  color: #d1d5db;
  line-height: 1.4;
}

.harvest-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.debt-harvest-pot-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.harvest-pot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.harvest-pot-progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.harvest-pot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.harvest-forecast-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.harvest-logs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.harvest-logs-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.6rem 0.75rem;
  text-align: right;
  color: #9ca3af;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.harvest-logs-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

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

/* ==========================================================================
   🔐 Professional PIN Change & PIN Input Styles
   ========================================================================== */
.pin-auth-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--card-bg-subtle);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  width: 100%;
}

.pin-auth-tab {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
}

.pin-auth-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.pin-auth-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 10px var(--primary-glow);
}

.pin-box-row {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  direction: ltr;
}

.pin-digit-box {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  caret-color: transparent;
  outline: none;
  font-family: var(--font-numbers);
}

.pin-digit-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--card-bg);
  transform: translateY(-2px);
}

.pin-digit-box.filled {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
}

/* ==========================================================================
   📱 Responsive Header & Navigation Polish
   ========================================================================== */
@media (max-width: 1280px) {
  .rate-indicator-btn span.rate-value {
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-subtitle {
    max-width: 130px;
  }
}

@media (max-width: 1100px) {
  .nav-cycle-widget {
    padding: 0.35rem 0.65rem;
    font-size: 0.76rem;
  }
  .brand-subtitle {
    display: none;
  }
}

@media (max-width: 980px) {
  .nav-cycle-widget {
    display: none;
  }
  .rate-indicator-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0.55rem 0.75rem;
    gap: 0.45rem;
    border-radius: 14px;
  }
  .user-meta {
    display: none;
  }
  .user-pill-btn {
    padding: 0.25rem 0.4rem;
  }
  .network-status-indicator .net-status-text {
    display: none;
  }
}

/* ==========================================================================
   ⚡ Offline-First Optimistic UI Indicators
   ========================================================================== */
.badge-offline-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.35rem;
  animation: optimisticPulse 2.5s infinite ease-in-out;
}

@keyframes optimisticPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
}

.optimistic-tx-row,
.optimistic-tx-card {
  border-right: 3px solid #f59e0b !important;
  background: rgba(245, 158, 11, 0.05) !important;
  transition: all 0.25s ease;
}

.optimistic-tx-row:hover,
.optimistic-tx-card:hover {
  background: rgba(245, 158, 11, 0.09) !important;
}

/* ==========================================================================
   🎯 Smart Daily Wallet & Live Impact Indicator Styles
   ========================================================================== */
.daily-hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.today-date-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.safe-amount-depleted {
  color: #ef4444 !important;
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.35) !important;
}

/* Today's Trio Strip */
.today-trio-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin: 0.75rem 0;
  max-width: 480px;
}

.trio-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.trio-title {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 600;
}

.trio-value {
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-numbers);
  color: var(--text-main);
}

.trio-divider {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

/* Today's Burn Bar */
.today-burn-wrap {
  max-width: 480px;
  margin-bottom: 0.85rem;
}

.today-burn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.today-month-pace {
  font-size: 0.76rem;
  color: #94a3b8;
}

.today-month-pace strong {
  color: var(--text-main);
}

.today-burn-bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.today-burn-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background 0.35s ease;
}

.fill-primary {
  background: linear-gradient(90deg, #10b981, #059669);
}

.fill-warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.fill-danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.badge-overspent {
  color: #ef4444;
  font-weight: 700;
}

.badge-untouched {
  color: #10b981;
  font-weight: 600;
}

/* Modal Live Impact Box */
.daily-impact-live-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-top: 0.55rem;
  transition: all 0.25s ease;
}

.impact-live-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 0.45rem;
}

.impact-live-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}

.impact-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.impact-step .step-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.impact-step .step-val {
  font-size: 0.98rem;
  font-weight: 800;
  font-family: var(--font-numbers);
}

.impact-step .step-val.current {
  color: #cbd5e1;
}

.impact-step .step-val.next {
  color: #10b981;
  transition: color 0.2s ease;
}

.impact-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.impact-live-note {
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.45;
}

/* ==========================================================================
   🛡️ Universal Custom Confirmation Modal (Modern Glassmorphism)
   ========================================================================== */
.modal-confirm-card {
  max-width: 440px !important;
  width: 90% !important;
  text-align: center;
  padding: 2.2rem 1.85rem 1.6rem !important;
  border-radius: 24px !important;
  background: var(--bg-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.65), 0 0 40px rgba(239, 68, 68, 0.08) !important;
  animation: modalConfirmPop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalConfirmPop {
  0% { transform: scale(0.82); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.confirm-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 0.35rem;
  animation: pulseConfirmIcon 2.2s infinite ease-in-out;
}

@keyframes pulseConfirmIcon {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.confirm-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.confirm-message {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.confirm-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  width: 100%;
}

.confirm-actions button {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-danger-confirm {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.btn-danger-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5) !important;
}

.btn-primary-confirm {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-primary-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

/* ==========================================================================
   👥 Modern Admin Users Management Table & Badges
   ========================================================================== */
.admin-users-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg-subtle);
  border-bottom: 1px solid var(--card-border);
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-users-search {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.admin-users-search input {
  width: 100%;
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 0.6rem 2.4rem 0.6rem 1rem;
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.admin-users-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.admin-users-search .search-ico {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.admin-users-filters {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-filter-pill {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-filter-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.user-filter-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--primary);
  color: #34d399;
}

.username-pill {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-numbers), monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

.user-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}

.btn-user-action {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  background: var(--card-bg-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.btn-user-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-user-action.edit:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.btn-user-action.pin:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.btn-user-action.delete:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.user-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  margin-right: 0.35rem;
}

/* ========================================================
   Password Visibility Eye Toggle Component
======================================================== */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap input {
  width: 100% !important;
  padding-left: 2.75rem !important; /* Space for the eye icon in RTL */
  box-sizing: border-box;
}

.btn-password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 2;
  user-select: none;
}

.btn-password-toggle:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.btn-password-toggle:focus {
  outline: none;
  color: #10b981;
}

.btn-password-toggle svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.1;
  display: block;
}








