/* Design Tokens & Theme Setup */
:root {
  --bg-main: #0d0e12;
  --bg-app: #0d0e12;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(6, 182, 212, 0.15);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  --color-blue: #06b6d4; /* Accent Cyan */
  --color-blue-dark: #0891b2;
  --color-cyan: #06b6d4;
  --color-green: #10b981; /* Accent Emerald */
  --color-orange: #f59e0b; /* Accent Amber */
  --color-red: #ef4444;
  
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.25s var(--easing);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Blur Background Orbs for Premium Mesh Gradient Effect */
body::before, body::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.12;
  pointer-events: none;
}

body::before {
  top: 15%;
  left: calc(50% - 250px);
  background: var(--color-blue);
}

body::after {
  bottom: 15%;
  right: calc(50% - 250px);
  background: var(--color-green);
}

/* App Viewport Frame (Centered Smartphone / Desktop Wrapper) */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 480px; /* Locked mobile width */
  background: radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 60%),
              #0d0e12;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  border-left: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Header Styling */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-blue), var(--color-blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.4));
}

.logo-icon-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.6));
  transition: var(--transition);
}

.brand:hover .logo-icon-svg {
  transform: scale(1.1) rotate(-5deg);
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.9));
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(to bottom right, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.balance-badge {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.05);
}

.balance-badge .label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1px;
}

.balance-badge .value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--color-green);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)); /* Cushion above navbar */
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}

.main-content::-webkit-scrollbar {
  display: none;
}

/* Premium Glassmorphic Cards */
.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.18), inset -1px -1px 0px rgba(0, 0, 0, 0.2), 0 16px 40px rgba(0, 0, 0, 0.55);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.glass-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.025) 100%);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: inset 1.5px 1.5px 0px rgba(255, 255, 255, 0.28), 0 0 30px rgba(6, 182, 212, 0.15), 0 16px 40px rgba(0, 0, 0, 0.55);
  transform: translateY(-3px);
}

.glass-card p {
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-icon {
  color: var(--text-muted);
  font-size: 1.15rem;
  opacity: 0.7;
}

.card-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  letter-spacing: -0.04em;
  margin-bottom: 2px;
}

.stat-card.highlight h2 {
  background: linear-gradient(135deg, #ffffff, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Grid Layout */
.widgets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.widgets-grid .glass-card {
  margin-bottom: 0;
}

/* Debt progress items */
.debt-bar-group {
  margin-bottom: 18px;
}

.debt-bar-group:last-child {
  margin-bottom: 0;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.bar-labels span:last-child {
  font-weight: 600;
  color: var(--text-main);
}

.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s var(--easing);
}

.red-fill {
  background: linear-gradient(90deg, #f87171, #ef4444);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.orange-fill {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.blue-fill {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.green-fill {
  background: linear-gradient(90deg, #34d399, #059669);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

/* Calendar Timeline Items */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calendar-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  gap: 14px;
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.calendar-item:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.18), 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.cal-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
  transition: var(--transition);
}

.cal-icon-wrapper.red-glow {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-red);
  border-color: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.08);
}

.cal-icon-wrapper.orange-glow {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-orange);
  border-color: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.08);
}

.cal-icon-wrapper.blue-glow {
  background: rgba(6, 182, 212, 0.08);
  color: var(--color-cyan);
  border-color: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.08);
}

.cal-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.cal-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cal-value-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cal-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.cal-countdown {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Interactive Action Buttons inside list items */
.btn-action-small {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--color-blue);
  font-weight: 600;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-action-small:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.45);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25), 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn-action-small:active {
  transform: translateY(0) scale(0.97);
}

/* Adjust action buttons for red/orange statuses */
.calendar-item.due-soon .btn-action-small {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.calendar-item.due-soon .btn-action-small:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.calendar-item.split-payment .btn-action-small {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #fde047;
}

.calendar-item.split-payment .btn-action-small:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Custom Chart card layout */
.chart-card {
  padding-bottom: 25px;
}

.chart-container {
  position: relative;
  height: 220px;
  width: 100%;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.input-group.full-width {
  grid-column: span 2;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  box-sizing: border-box;
}

input, select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus, select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

/* Category Grid Selector Styles */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.category-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.category-btn.active {
  background: rgba(96, 165, 250, 0.08);
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
}

.category-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: var(--transition);
}

.category-btn.active .category-icon-wrapper {
  background: var(--color-blue-dark);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.category-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.category-btn.active .category-label {
  color: var(--text-main);
}

/* Custom primary and secondary action buttons */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--color-blue-dark), #0891b2);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
  transition: var(--transition);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--color-red);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-danger:hover {
  background: var(--color-red);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
}

.row-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Shift calculation preview card */
.calc-preview {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.preview-divider {
  border: 0;
  height: 1px;
  background: var(--border-default);
  margin: 10px 0;
}

.preview-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-green);
  margin-bottom: 0;
}

/* History table */
.history-list-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.history-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-default);
}

.history-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-default);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  cursor: pointer;
  font-size: 0.95rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.btn-delete:active {
  transform: scale(0.95);
}

/* Debt items */
.debt-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.debt-list-item:last-child {
  margin-bottom: 0;
}

.debt-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.debt-label {
  font-weight: 600;
  font-size: 1rem;
}

.debt-details {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.debt-details b {
  color: var(--text-main);
}

.btn-edit {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-edit:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* Prepayment Simulator details panel */
.sim-results {
  background: rgba(52, 211, 153, 0.03);
  border: 1px dashed rgba(52, 211, 153, 0.35);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
  animation: fadeIn 0.4s var(--easing);
}

.results-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-green);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.res-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.res-box:last-child {
  border-bottom: none;
}

.res-box .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.res-box .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.comparison-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  background: rgba(96, 165, 250, 0.05);
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-blue);
}

/* Bottom Navigation Bar (Floating/Fitted Mobile Navbar) */
.bottom-nav {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 64px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 0 8px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  flex: 1;
  height: 100%;
  padding: 6px 0;
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  font-size: 1.25rem;
}

.nav-item span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-item.active {
  color: var(--color-blue);
}

.nav-item.active i {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
  animation: iosPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
}

/* Dialog Dialog Overlays (Modal style) */
.dialog-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(3, 7, 18, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: overlayFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#custom-confirm-modal, #custom-alert-modal {
  z-index: 200;
}

.dialog-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  padding: 24px;
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.18), 0 30px 60px rgba(0, 0, 0, 0.6);
  animation: iosModalOpen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.dialog-box h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.dialog-box form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes overlayFadeIn {
  0% {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  100% {
    opacity: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

@keyframes iosModalOpen {
  0% {
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    filter: blur(5px);
  }
  70% {
    transform: scale(1.02) translateY(-2px);
    filter: blur(0px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes iosTabTransition {
  0% {
    opacity: 0;
    transform: scale(0.975) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes iosSubTabTransition {
  0% {
    opacity: 0;
    transform: translateX(15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes iosPop {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-4px) scale(0.82); }
  60% { transform: translateY(-2px) scale(1.18); }
  100% { transform: translateY(-2px) scale(1); }
}

/* Transition switching logic for tabs */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: iosTabTransition 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Media adjustments for small mobile viewports */
@media (max-width: 480px) {
  .app-container {
    border-left: none;
    border-right: none;
    max-width: 100vw;
  }
  
  .main-content {
    padding: 16px 16px calc(90px + env(safe-area-inset-bottom, 0px)) 16px;
  }
  
  .glass-card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 16px;
  }
  
  .simulator-card-details .card-body {
    padding: 0 16px 16px 16px !important;
  }
  

  input, select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .widgets-grid {
    gap: 12px;
  }
  
  .history-table th, .history-table td {
    padding: 10px 6px;
    font-size: 0.8rem;
  }
}

/* Timer Widget Styles */
.timer-card {
  text-align: center;
  padding: 24px;
}

.timer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.timer-circle-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 6px;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--color-cyan);
  stroke-width: 6px;
  stroke-linecap: round;
  stroke-dasharray: 534; /* 2 * PI * r = 2 * 3.14159 * 85 ≈ 534 */
  stroke-dashoffset: 534;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
}

.timer-card.running .timer-circle-progress {
  stroke-dashoffset: 133; /* 25% empty, 75% full */
  animation: rotate-arc 4s linear infinite, pulse-ring 2s infinite ease-in-out;
  transform-origin: center;
}

@keyframes rotate-arc {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

@keyframes pulse-ring {
  0% {
    filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.8));
    stroke-width: 7px;
  }
  100% {
    filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4));
  }
}

.timer-circle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.timer-circle-content .timer-display {
  font-family: 'JetBrains Mono', 'Outfit', monospace;
  font-weight: 800;
  font-size: 2.2rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  background: transparent;
  border: none;
  padding: 0;
  min-width: auto;
  text-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.timer-circle-content .timer-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  font-weight: 600;
}

.timer-card.running .timer-status {
  color: var(--color-cyan);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.btn-timer {
  flex: 1;
  max-width: 150px;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-timer.btn-start {
  background: linear-gradient(135deg, var(--color-green), #059669);
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.25);
}

.btn-timer.btn-start:hover {
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
  transform: translateY(-1px);
}

.btn-timer.btn-pause {
  background: linear-gradient(135deg, var(--color-orange), #d97706);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.25);
}

.btn-timer.btn-pause:hover {
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.btn-timer.btn-stop {
  background: linear-gradient(135deg, var(--color-red), #dc2626);
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.25);
}

.btn-timer.btn-stop:hover {
  box-shadow: 0 4px 20px rgba(248, 113, 113, 0.4);
  transform: translateY(-1px);
}

.btn-timer:active {
  transform: translateY(0) scale(0.97);
}

/* Category Badges for General Transactions */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-expense {
  background: rgba(248, 113, 113, 0.08);
  color: var(--color-red);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.badge-income {
  background: rgba(52, 211, 153, 0.08);
  color: var(--color-green);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

/* AI Recommendation Box */
.ai-box {
  background: rgba(8, 13, 26, 0.5);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
  text-align: left;
}

.ai-box h1, .ai-box h2, .ai-box h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  margin-top: 14px;
  margin-bottom: 8px;
}

.ai-box h3 {
  font-size: 1rem;
  color: var(--color-blue);
}

.ai-box p {
  margin-bottom: 10px;
  color: var(--text-main);
}

.ai-box ul, .ai-box ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.ai-box li {
  margin-bottom: 6px;
  color: var(--text-muted);
}

.ai-box li strong {
  color: var(--text-main);
}

.ai-box hr {
  border: 0;
  height: 1px;
  background: var(--border-default);
  margin: 14px 0;
}

.ai-box blockquote {
  border-left: 3px solid var(--color-blue);
  background: rgba(96, 165, 250, 0.04);
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* Spinner rotation animation for AI Loading state */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

/* Redesign & Decluttering Styles */

/* Floating Action Button (FAB) */
.btn-fab-add {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-blue-dark));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.45rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.45);
  transition: var(--transition);
  transform: translateY(-16px); /* Pop out from the navigation bar */
  z-index: 12;
}

.btn-fab-add:hover {
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.65);
  transform: translateY(-20px) scale(1.06);
}

.btn-fab-add:active {
  transform: translateY(-16px) scale(0.94);
}

/* Modal form adjustments */
.modal-large {
  max-width: 440px;
  width: 100%;
}

.modal-tabs-header {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 8px;
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-tab-btn.active {
  background: var(--color-blue-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Feed filters */
.feed-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.filter-btn.active {
  background: rgba(96, 165, 250, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.15);
}

/* Card-based Feed */
.unified-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.unified-feed-list::-webkit-scrollbar {
  display: none;
}

.feed-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.feed-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 1px 1px 0px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.feed-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feed-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.feed-card-icon.shift-type {
  background: rgba(6, 182, 212, 0.08);
  color: var(--color-blue);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.feed-card-icon.income-type {
  background: rgba(52, 211, 153, 0.08);
  color: var(--color-green);
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.feed-card-icon.expense-type {
  background: rgba(248, 113, 113, 0.08);
  color: var(--color-red);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.feed-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-card-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.feed-card-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.feed-card-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feed-card-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}

.feed-card-actions {
  display: flex;
  align-items: center;
}

/* Collapsible Simulator card */
.simulator-card-details {
  margin-bottom: 20px;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.simulator-card-details[open] {
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.simulator-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px;
  user-select: none;
}

.simulator-summary::-webkit-details-marker {
  display: none;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.simulator-card-details .accordion-icon {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.3s var(--easing);
}

.simulator-card-details[open] .accordion-icon {
  transform: rotate(180deg);
  color: var(--color-blue);
}

/* Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.3);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

th, td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-blue);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Header Settings Top Bar Button */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-settings-top {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.btn-settings-top i {
  font-size: 1.15rem;
}

.btn-settings-top:hover, .btn-settings-top.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--color-blue);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.2);
}

/* Full Tab Analytics Styling */
.ai-full-card {
  padding: 24px;
  margin-bottom: 0;
}

.ai-full-box {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 10px;
  max-height: calc(100vh - 270px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-full-box p {
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--text-main);
}

.ai-full-box h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.05rem;
  color: var(--color-blue);
  font-family: var(--font-display);
}

.ai-full-box ul, .ai-full-box ol {
  margin-left: 20px;
  margin-bottom: 14px;
}

.ai-full-box li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.ai-full-box blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(96, 165, 250, 0.06);
  border-left: 4px solid var(--color-blue);
  border-radius: var(--radius-sm);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Dedicated Taxi Tab Components */
.taxi-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.stat-mini-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.02);
  transition: var(--transition);
}

.stat-mini-box:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.stat-mini-box .sub-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-mini-box h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
}

.stat-mini-box h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Scrollable card elements under Taxi history */
.taxi-history-card .unified-feed-list {
  max-height: 380px;
}

.direct-shift-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Sub-navigation inside tabs (e.g. Taxi) */
.sub-tabs-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.sub-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.sub-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.sub-tab-btn.active {
  color: var(--color-blue);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Sub-tab Content Toggle */
.subtab-content {
  display: none;
}

.subtab-content.active {
  display: block;
  animation: iosSubTabTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Form Auto-hiding under Active Timer */
#direct-shift-card {
  transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  max-height: 1000px;
  opacity: 1;
}

#direct-shift-card.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

/* Custom Select Dropdown Component styling */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.custom-select-trigger:focus, .custom-select-trigger.open {
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  display: none;
  z-index: 150;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.custom-select-options.open {
  display: block;
}

.custom-option {
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.custom-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.custom-option.selected {
  background: rgba(96, 165, 250, 0.12);
  color: var(--color-blue);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.15);
}

/* Ambient Glowing Orbs inside App Container for Liquid Glass effect */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  will-change: transform;
}

.orb-1 {
  width: 250px;
  height: 250px;
  top: 15%;
  left: -60px;
  background: var(--color-cyan);
  animation: floatOrb1 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 220px;
  height: 220px;
  top: 50%;
  right: -70px;
  background: var(--color-green);
  animation: floatOrb2 14s ease-in-out infinite alternate;
}

.orb-3 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 10%;
  background: var(--color-orange);
  animation: floatOrb3 20s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, -40px) scale(1.1); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -20px) scale(1.2); }
}

/* Universal Tactile Spring Press Effect for Clickable Elements */
.btn-primary:active,
.btn-secondary:active,
.btn-danger:active,
.btn-action-small:active,
.btn-timer:active,
.category-btn:active,
.filter-btn:active,
.modal-tab-btn:active,
.sub-tab-btn:active,
.btn-settings-top:active,
.nav-item:active {
  transform: scale(0.94) !important;
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Auth Screen Specific Styles */
.auth-dialog-box {
  max-width: 360px;
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.15), 0 30px 60px rgba(0, 0, 0, 0.6);
}

.auth-error-msg {
  display: flex;
  align-items: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
  animation: slideUp 0.3s var(--easing);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes shake {
  0%, 100% { transform: translateX(0) scale(1); }
  20%, 60% { transform: translateX(-6px) scale(1); }
  40%, 80% { transform: translateX(6px) scale(1); }
}

.shake-anim {
  animation: shake 0.35s ease-in-out !important;
}

/* Color Themes Selection Grid */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.btn-theme-select {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.btn-theme-select:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-theme-select.active {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-blue);
  box-shadow: 0 0 12px var(--border-glow);
}

.theme-color-preview {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.theme-name {
  font-weight: 600;
  color: var(--text-main);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 1px 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.4s var(--easing), transform 0.4s var(--easing);
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  color: var(--color-green);
  font-size: 1.1rem;
}

.feed-card {
  background: linear-gradient(135deg, #1b1c23 0%, #111217 100%) !important;
  position: relative;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease !important;
  will-change: transform;
  touch-action: pan-y;
}

.feed-card.swiping {
  transition: none !important;
}

.feed-card:hover {
  background: linear-gradient(135deg, #242630 0%, #151720 100%) !important;
}

/* Swipe to Delete Styles */
.feed-card-swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  width: 100%;
  background: #0d0e12; /* Matches the layout's deep background */
  touch-action: pan-y;
}

.swipe-delete-btn {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-radius: var(--radius-md);
  cursor: pointer;
  z-index: 1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.swipe-delete-btn-inner {
  width: 80px;
  height: 100%;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.swipe-delete-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #ef4444;
  box-shadow: inset -10px 0 20px rgba(239, 68, 68, 0.06);
}

.swipe-delete-btn:active {
  background: rgba(239, 68, 68, 0.35);
}

.swipe-delete-btn i {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swipe-delete-btn:hover i {
  transform: scale(1.18);
}

/* Wallets Panel */
.wallets-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.wallet-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.005) 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.wallet-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.wallet-card.cash-wallet:hover {
  border-color: var(--color-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.wallet-card.card-wallet:hover {
  border-color: var(--color-blue);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}
.wallet-card.credit-wallet:hover {
  border-color: var(--color-orange);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.wallet-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  transition: var(--transition);
}

/* Coloring theme tokens */
.total-wallet .wallet-icon-wrapper {
  color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.2);
}
.cash-wallet .wallet-icon-wrapper {
  color: var(--color-green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.2);
}
.card-wallet .wallet-icon-wrapper {
  color: var(--color-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.2);
}
.credit-wallet .wallet-icon-wrapper {
  color: var(--color-orange);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.2);
}

.wallet-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.wallet-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Mobile responsive layout for wallets */
@media (max-width: 768px) {
  .wallets-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .wallet-card {
    padding: 10px;
    gap: 8px;
  }
  .wallet-icon-wrapper {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .wallet-value {
    font-size: 0.85rem;
  }
}

/* Custom Datepicker Component styling */
.custom-datepicker {
  position: relative;
  width: 100%;
}

.datepicker-trigger {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.datepicker-trigger:focus, .datepicker-trigger.open {
  border-color: var(--color-blue);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.datepicker-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 290px;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 200;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.datepicker-popup.open {
  display: block;
}

.datepicker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.datepicker-month-year {
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.datepicker-nav {
  display: flex;
  gap: 6px;
}

.datepicker-nav button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.datepicker-nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.datepicker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.datepicker-day {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.datepicker-day:hover:not(.prev-month):not(.next-month) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-blue);
}

.datepicker-day.prev-month,
.datepicker-day.next-month {
  color: var(--text-muted);
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

.datepicker-day.selected {
  background: var(--color-blue);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.datepicker-day.today {
  border-color: var(--color-blue);
  color: var(--color-blue);
  font-weight: 700;
}

.datepicker-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.datepicker-footer button {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
  transition: var(--transition);
}

.datepicker-clear-btn {
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.datepicker-clear-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.datepicker-today-btn {
  border: 1px solid var(--color-blue);
  color: var(--color-blue);
}

.datepicker-today-btn:hover {
  background: rgba(96, 165, 250, 0.08);
}





