/* KRONKER BIGDAYS - Life Event Tracker Styles */

:root {
  /* Colors */
  --primary-orange: #f97316;
  --secondary-orange: #ea580c;
  --success-green: #10b981;
  --warning-yellow: #f59e0b;
  --danger-orange: #f97316;
  --urgent-red: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Borders */
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;

  /* Animations */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

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

html {
  background: #1a1a1a;
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: #ffffff;
  background: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* App Container */
.app-container {
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* Header */
.header {
  background: #1a1a1a;
  padding: 40px 0 20px 0;
  margin-bottom: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 42px;
}

.app-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.logo-section {
  position: relative;
  display: flex;
  align-items: center;
}

.logo-section img[src="icons/kronker-logo.png"] {
  filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.8));
}

.logo-section img[src="icons/BIGDAYS.png"] {
  position: absolute;
  left: calc(50% - 21px);
  top: 50%;
  transform: translate(-50%, -50%);
  height: 19px;
  filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.8));
}

.sync-btn {
  background: none;
  border: none;
  padding: var(--space-2);
  margin-left: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.sync-btn.syncing .gear-icon {
  animation: spin 1s linear infinite;
}

.sync-btn.success {
  color: var(--success-green);
  border-color: var(--success-green);
}

.sync-container {
  position: relative;
  display: inline-block;
}

.sync-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.sync-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sync-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sync-item:last-child {
  border-bottom: none;
}

.sync-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sync-item span {
  font-size: 0.9rem;
  font-weight: 500;
}

.sync-section {
  padding: 8px 0;
}

.sync-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 16px 8px 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sync-section:first-child .sync-section-title {
  padding-top: 12px;
}

.sync-checkbox-group {
  padding: 0 16px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sync-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}

.sync-checkbox-label input[type="checkbox"],
.sync-checkbox-label input[type="radio"] {
  width: auto;
  margin-right: 8px;
  transform: scale(1.1);
  cursor: pointer;
  background: #000000 !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 3px;
  width: 16px;
  height: 16px;
  position: relative;
}

.sync-checkbox-label input[type="radio"] {
  border-radius: 50%;
}

.sync-checkbox-label input[type="checkbox"]:checked,
.sync-checkbox-label input[type="radio"]:checked {
  background: #26a11c !important;
  border-color: #26a11c !important;
}

.sync-checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sync-checkbox-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sync-checkbox-label span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  user-select: none;
}

.export-password-field input {
  width: calc(100% - 16px) !important;
  margin: 8px 8px !important;
}

.sync-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 8px 0;
}

.sync-action-btn {
  width: calc(100% - 32px);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
  margin: 0 16px 8px 16px;
}

.sync-action-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.6);
  color: #a7f3d0;
  font-weight: 500;
}

/* User Avatar */
.user-avatar {
  position: relative;
  display: inline-block;
}

.avatar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.15);
}

.avatar-btn.authenticated {
  color: #10b981;
  background: rgba(255, 255, 255, 0.1);
}

.avatar-dot {
  display: none;
}

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
}

.avatar-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.avatar-item {
  padding: var(--space-3) var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-item:last-child {
  border-bottom: none;
}

.avatar-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.avatar-item span {
  font-size: 0.875rem;
}

.avatar-account-info {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-email {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.account-plan {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-bottom: var(--space-3);
}

.cancel-subscription-btn {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #fca5a5;
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  width: 100%;
  transition: all var(--transition-fast);
}

.cancel-subscription-btn:hover {
  background: rgba(220, 38, 38, 0.3);
  border-color: rgba(220, 38, 38, 0.6);
  color: #fecaca;
  font-weight: 500;
}

/* App Picker */
.app-picker {
  position: relative;
  display: inline-block;
}

.picker-btn {
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.picker-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.picker-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.picker-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.picker-item:last-child {
  border-bottom: none;
}

.picker-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.picker-item.active {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
}

.picker-item span {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Main Content */
.main-content {
  background: #000000;
  margin: 0 40px 40px 40px;
  padding: 0 20px 40px 20px;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  min-height: calc(100vh - 200px);
  overflow: hidden;
  position: relative;
}

/* Date Header Row */
.date-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: var(--space-4);
  padding: 0 2px;
}

.archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: var(--space-4);
  padding: 0 2px;
}

.archive-title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

.back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.back-btn:hover {
  color: white;
}

.date-header {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Bills Grid */
.bills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* Bill Card */
.bill-card {
  background: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px 16px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

.bill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Urgency Colors - Full Card Backgrounds */
.bill-card.future { background: #1a1a1a; border: 2px solid #1e40af; }
.bill-card.week { background: #1a1a1a; border: 2px solid #d97706; }
.bill-card.soon { background: #1a1a1a; border: 2px solid #ea580c; }
.bill-card.urgent { background: #dc2626; box-shadow: 0 0 30px rgba(220, 38, 38, 0.8); }
.bill-card.urgent .bill-due,
.bill-card.urgent .bill-actual-date { color: #ffffff; }

.bill-card.overdue { background: #d946ef; box-shadow: 0 0 30px rgba(217, 70, 239, 0.8); }
.bill-card.overdue .bill-due,
.bill-card.overdue .bill-actual-date { color: #ffffff; }

.bill-card.completed {
  background: #059669;
  border: 2px solid #10b981;
  opacity: 0.6;
}

/* Color Classes */
.bill-card.color-blue {
  background: linear-gradient(to right, #3b82f6, #1e40af) !important;
  border-color: #3b82f6;
}
.bill-card.color-green {
  background: linear-gradient(to right, #10b981, #047857) !important;
  border-color: #10b981;
}
.bill-card.color-yellow {
  background: linear-gradient(to right, #f59e0b, #b45309) !important;
  border-color: #f59e0b;
}
.bill-card.color-orange {
  background: linear-gradient(to right, #f97316, #c2410c) !important;
  border-color: #f97316;
}
.bill-card.color-red {
  background: linear-gradient(to right, #ef4444, #b91c1c) !important;
  border-color: #ef4444;
}
.bill-card.color-pink {
  background: linear-gradient(to right, #ec4899, #be185d) !important;
  border-color: #ec4899;
}
.bill-card.color-purple {
  background: linear-gradient(to right, #a855f7, #7e22ce) !important;
  border-color: #a855f7;
}
.bill-card.color-gray {
  background: linear-gradient(to right, #6b7280, #4b5563) !important;
  border-color: #6b7280;
}

.bill-card.future.color-blue {
  background: linear-gradient(to right, #3b82f6, #1e40af) !important;
  border-color: #3b82f6;
}
.bill-card.future.color-green {
  background: linear-gradient(to right, #10b981, #047857) !important;
  border-color: #10b981;
}
.bill-card.future.color-yellow {
  background: linear-gradient(to right, #f59e0b, #b45309) !important;
  border-color: #f59e0b;
}
.bill-card.future.color-orange {
  background: linear-gradient(to right, #f97316, #c2410c) !important;
  border-color: #f97316;
}
.bill-card.future.color-red {
  background: linear-gradient(to right, #ef4444, #b91c1c) !important;
  border-color: #ef4444;
}
.bill-card.future.color-pink {
  background: linear-gradient(to right, #ec4899, #be185d) !important;
  border-color: #ec4899;
}
.bill-card.future.color-purple {
  background: linear-gradient(to right, #a855f7, #7e22ce) !important;
  border-color: #a855f7;
}
.bill-card.future.color-gray {
  background: linear-gradient(to right, #6b7280, #4b5563) !important;
  border-color: #6b7280;
}

.bill-card.week.color-blue {
  background: linear-gradient(to right, #3b82f6, #1e40af) !important;
  border-color: #3b82f6;
}
.bill-card.week.color-green {
  background: linear-gradient(to right, #10b981, #047857) !important;
  border-color: #10b981;
}
.bill-card.week.color-yellow {
  background: linear-gradient(to right, #f59e0b, #b45309) !important;
  border-color: #f59e0b;
}
.bill-card.week.color-orange {
  background: linear-gradient(to right, #f97316, #c2410c) !important;
  border-color: #f97316;
}
.bill-card.week.color-red {
  background: linear-gradient(to right, #ef4444, #b91c1c) !important;
  border-color: #ef4444;
}
.bill-card.week.color-pink {
  background: linear-gradient(to right, #ec4899, #be185d) !important;
  border-color: #ec4899;
}
.bill-card.week.color-purple {
  background: linear-gradient(to right, #a855f7, #7e22ce) !important;
  border-color: #a855f7;
}
.bill-card.week.color-gray {
  background: linear-gradient(to right, #6b7280, #4b5563) !important;
  border-color: #6b7280;
}

.bill-card.soon.color-blue {
  background: linear-gradient(to right, #3b82f6, #1e40af) !important;
  border-color: #3b82f6;
}
.bill-card.soon.color-green {
  background: linear-gradient(to right, #10b981, #047857) !important;
  border-color: #10b981;
}
.bill-card.soon.color-yellow {
  background: linear-gradient(to right, #f59e0b, #b45309) !important;
  border-color: #f59e0b;
}
.bill-card.soon.color-orange {
  background: linear-gradient(to right, #f97316, #c2410c) !important;
  border-color: #f97316;
}
.bill-card.soon.color-red {
  background: linear-gradient(to right, #ef4444, #b91c1c) !important;
  border-color: #ef4444;
}
.bill-card.soon.color-pink {
  background: linear-gradient(to right, #ec4899, #be185d) !important;
  border-color: #ec4899;
}
.bill-card.soon.color-purple {
  background: linear-gradient(to right, #a855f7, #7e22ce) !important;
  border-color: #a855f7;
}
.bill-card.soon.color-gray {
  background: linear-gradient(to right, #6b7280, #4b5563) !important;
  border-color: #6b7280;
}

.bill-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
  margin-top: 0;
}

.bill-name {
  font-size: 2.16rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  top: 18px;
}

.bill-description {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  margin-top: 8px;
  position: relative;
  z-index: 2;
}

.payment-favicon {
  border-radius: 3px;
  opacity: 0.8;
}

.bill-name a {
  padding: 8px;
  margin: -8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.bill-amount {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-sans);
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.bill-icon {
  position: absolute;
  top: 50%;
  right: var(--space-6);
  transform: translateY(-50%);
  opacity: 0.85;
  z-index: 1;
}

.bill-date-section {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  z-index: 2;
}

.bill-due {
  font-size: 0.84rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.bill-actual-date {
  font-size: 1.17rem;
  color: #ffffff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recurring-indicator {
  opacity: 0.7;
  display: flex;
  align-items: center;
  position: relative;
}

.recurring-indicator img {
  display: block;
}

.autopay-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  pointer-events: none;
}

.payment-link-indicator {
  opacity: 0.7;
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.payment-link-indicator img {
  display: block;
}

.edit-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bill-content:hover .edit-indicator {
  opacity: 1;
}

.bill-brandmark {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.bill-brandmark:hover {
  opacity: 1;
}

.bill-brandmark img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}


.bill-content {
  cursor: pointer;
  flex: 1;
  transition: all var(--transition-fast);
}

.bill-content:hover {
  opacity: 0.9;
}

/* Add Card */
.add-card {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: rgba(26, 26, 26, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  text-align: center;
}

.add-card[style*="display: none"] {
  display: none !important;
}

.add-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(26, 26, 26, 1);
}

.add-icon {
  margin: 0; opacity: 0.6; transition: opacity var(--transition-fast); display: flex; align-items: center; justify-content: center;
}

.add-icon img { display: block; width: 48px; height: 48px; object-fit: contain; }

.add-card:hover .add-icon {
  opacity: 1;
}

.add-text {
  font-weight: 600;
  font-size: 0.875rem;
}

/* Tooltip Card in Grid */
.tooltip-card { background: #26a11c !important; box-shadow: 0 0 30px rgba(38, 161, 28, 0.8) !important; }
.tooltip-close { position: absolute; top: 8px; right: 12px; background: none; border: none; color: white; cursor: pointer; font-size: 18px; }
.tooltip-title { font-size: 1.65rem; font-weight: 700; margin-bottom: 8px; color: white; }
.tooltip-text { font-size: 0.9rem; line-height: 1.4; color: white; margin-bottom: 12px; }
.tooltip-action { background: none; border: none; color: white; padding: 0; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.tooltip-action:hover { background: rgba(255, 255, 255, 0.3); }

.history-btn { background: none; border: none; color: rgba(255,255,255,0.8); padding: 8px 6px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; }
.history-btn:hover { color: white; }

.pagination { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.pagination button { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; padding: 8px 16px; border-radius: 4px; cursor: pointer; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
}

.modal-content {
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-xl);
  padding: 0.5rem var(--space-6) var(--space-6) var(--space-6);
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  backdrop-filter: blur(10px);
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: var(--space-1);
  transition: color var(--transition-fast);
}

.close-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Form */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  font-family: var(--font-sans);
  color: #888888;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #26a11c;
  box-shadow: 0 0 0 3px rgba(38, 161, 28, 0.1);
}

.checkbox-group .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: var(--space-2);
  transform: scale(1.1);
  cursor: pointer;
  background: #000000 !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.checkbox-text {
  font-weight: 600;
  color: #888888;
  font-size: 0.8rem;
  user-select: none;
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.submit-btn {
  flex: 1;
  background: #26a11c;
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: background var(--transition-fast);
}

.submit-btn:hover {
  background: #1e8a15;
}

.delete-btn {
  flex: 1;
  background: #333333;
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: background var(--transition-fast);
}

.color-picker {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.color-picker input[type="radio"] {
  display: none;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.color-picker input[type="radio"]:checked + .color-option {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.4);
  transform: scale(1.15);
}

.color-picker input[type="radio"]:checked + .color-option::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.delete-btn:hover {
  background: #555555;
}

.end-recur-btn {
  flex: 1;
  background: #333333;
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.end-recur-btn:hover {
  background: #555555;
}

/* Success Animation */
.success-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(38, 161, 28, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: successPulse 1s ease-out forwards;
}

.success-animation.show {
  display: flex;
}

.success-checkmark {
  animation: checkmarkPop 0.5s ease-out forwards;
}

/* Card completion animation */
.bill-card.completing {
  background: #26a11c !important;
  border: none !important;
  animation: greenFadeOut 1s ease-out forwards;
}


@keyframes greenFadeOut {
  0% {
    background: #26a11c;
    opacity: 1;
    transform: scale(1);
  }
  50% {
    background: #26a11c;
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    background: #26a11c;
    opacity: 0;
    transform: scale(0.98);
  }
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes successPulse {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes checkmarkPop {
  0% { transform: scale(0) rotate(45deg); }
  50% { transform: scale(1.2) rotate(45deg); }
  100% { transform: scale(1) rotate(45deg); }
}

@keyframes completeBounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
  40%, 43% { transform: translate3d(0, -8px, 0); }
  70% { transform: translate3d(0, -4px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    padding: var(--space-2);
  }

  .header-content {
    padding: var(--space-3) var(--space-4);
  }

  .app-title {
    font-size: 1.5rem;
  }

  .bills-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .modal-content {
    margin: var(--space-4);
    padding: var(--space-4);
  }

  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .header-actions {
    gap: var(--space-2);
  }

  .auth-btn {
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
  }

  .main-content {
    margin: 0 10px 40px 10px;
  }
}