:root { 
  --fg: #1d1d1f; 
  --bg: #f5f5f7; 
  --muted: #86868b; 
  --primary: #007aff; 
  --danger: #ff3b30; 
  --success: #34c759;
  --surface: #ffffff;
  --border: #d2d2d7;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark theme variables */
[data-theme="dark"] {
  --fg: #f5f5f7;
  --bg: #1d1d1f;
  --muted: #86868b;
  --primary: #0a84ff;
  --danger: #ff453a;
  --success: #30d158;
  --surface: #2c2c2e;
  --border: #38383a;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Form input text color for dark theme */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  color: #ffffff !important;
}

/* Form input text color for light theme */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="url"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  color: #000000 !important;
}

/* Placeholder text styling for dark theme */
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #8e8e93 !important;
  opacity: 1;
}

/* Placeholder text styling for light theme */
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #8e8e93 !important;
  opacity: 1;
}

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

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif; 
  color: var(--fg); 
  background: var(--bg); 
  line-height: 1.5;
  font-size: 17px;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Performance optimizations */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { 
  width: 100%; 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 20px; 
}

main.container {
  flex: 1;
  padding-top: 80px; /* Fixed navbar height is 60px + 20px buffer */
  padding-bottom: 0;
}

.navbar { 
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 16px 20px;
}

.brand { 
  font-weight: 600; 
  font-size: 20px;
  color: var(--fg);
}

nav a { 
  margin-left: 24px; 
  text-decoration: none; 
  color: var(--fg);
  font-weight: 500;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--primary);
}

/* Nav group styling for better alignment */
nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-group a {
  margin-left: 24px;
}

.nav-group a:first-child {
  margin-left: 0;
}

/* Theme Toggle Button in Navbar - iOS Style */
nav .theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid #000000;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  margin-right: 16px;
  margin-left: 0;
  align-self: center;
}

nav .theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

nav .theme-toggle:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

/* Button rotation animation on theme change */
[data-theme="dark"] nav .theme-toggle {
  background: #1c1c1e;
  border: 1px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotate(180deg);
}

[data-theme="dark"] nav .theme-toggle:hover {
  transform: rotate(180deg) scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] nav .theme-toggle:active {
  transform: rotate(180deg) scale(0.95);
}

nav .theme-icon {
  position: absolute;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark theme transitions with rotation animation */
[data-theme="dark"] nav .theme-icon {
  transform: rotate(180deg);
}

.hero { 
  padding: 80px 0; 
  text-align: center; 
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--fg) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 21px;
  color: var(--muted);
  margin-bottom: 32px;
}

.btn { 
  display: inline-block; 
  background: var(--primary); 
  color: white; 
  padding: 14px 28px; 
  border-radius: 12px; 
  text-decoration: none; 
  border: 0; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 17px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

.btn-secondary { 
  background: var(--muted);
  box-shadow: 0 4px 16px rgba(134, 134, 139, 0.3);
}

.btn-danger { 
  background: var(--danger);
  color: white;
  border: 2px solid var(--danger);
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
  background: #d70015;
  border-color: #d70015;
  color: white;
  transform: translateY(-2px);
}

.form { 
  display: grid; 
  gap: 20px; 
  max-width: 400px; 
  width: 100%;
}

label { 
  display: grid; 
  gap: 8px; 
  font-size: 16px; 
  color: var(--fg);
  font-weight: 500;
}

input, select { 
  padding: 16px; 
  border: 2px solid var(--border); 
  border-radius: 12px; 
  font-size: 17px; 
  background: var(--surface);
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Number input wrapper with custom arrows */
.number-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.number-input {
  width: 100%;
  padding-right: 50px;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-arrows {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
}

.arrow-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 20px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: #333333;
  transition: color 0.2s ease;
  user-select: none;
}

.arrow-btn:hover {
  color: #000000;
}

.arrow-btn:active {
  color: #007aff;
}

/* Dark theme arrow adjustments */
[data-theme="dark"] .arrow-btn {
  color: #cccccc;
}

[data-theme="dark"] .arrow-btn:hover {
  color: #ffffff;
}

[data-theme="dark"] .arrow-btn:active {
  color: #007aff;
}

.table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 16px auto; 
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow);
  max-width: 1200px;
}

.table th, .table td { 
  padding: 20px 16px; 
  border-bottom: 1px solid var(--border); 
  text-align: left; 
  white-space: nowrap;
  min-width: 120px;
}

.table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--fg);
  font-size: 16px;
}

.table td {
  font-size: 18px;
}

.table tr:hover {
  background: rgba(0, 122, 255, 0.05);
}

/* Specific column widths for better spacing */
.table th:nth-child(1), .table td:nth-child(1) { min-width: 150px; } /* Service */
.table th:nth-child(2), .table td:nth-child(2) { min-width: 100px; } /* Category */
.table th:nth-child(3), .table td:nth-child(3) { min-width: 100px; } /* Amount */
.table th:nth-child(4), .table td:nth-child(4) { min-width: 120px; text-align: center; } /* Due Date */
.table th:nth-child(5), .table td:nth-child(5) { min-width: 100px; text-align: center; } /* Days Left */
.table th:nth-child(6), .table td:nth-child(6) { min-width: 140px; text-align: center; } /* Remind Before */
.table th:nth-child(7), .table td:nth-child(7) { min-width: 200px; } /* Actions */

.flash-list { 
  list-style: none; 
  padding: 0; 
}

.flash { 
  padding: 16px 20px; 
  border-radius: 12px; 
  background: var(--surface);
  margin-bottom: 16px; 
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 12px var(--shadow);
}

/* Center helpers */
.centered { 
  max-width: 350px; 
  margin: 0 auto; 
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px; 
  padding: 20px;
}

/* Account page specific styling */
/* Account Page - 2 Column Grid Layout */
.account-page {
  max-width: 1000px !important; /* Wider for 2 columns */
  padding: 40px 20px;
}

/* Email Settings - Close gaps between elements */
.account-page .auth-card:nth-child(4) .info-text {
  margin-bottom: 0px !important;
  margin-top: 0px !important;
  padding: 8px 16px !important;
  line-height: 1.3 !important;
}

.account-page .auth-card:nth-child(4) .form {
  margin-top: 4px !important;
  gap: 4px !important;
}

/* Mobile spacing for email settings */
@media (max-width: 768px) {
  .account-page .auth-card:nth-child(4) .info-text {
    margin-bottom: 8px !important;
    padding: 12px 16px !important;
    line-height: 1.4 !important;
  }
  
  .account-page .auth-card:nth-child(4) .form {
    margin-top: 12px !important;
    gap: 8px !important;
  }
}

.account-page .account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 columns on desktop */
  gap: 24px;
  margin-top: 24px;
}

.account-page .auth-card {
  max-width: 100%;
  margin: 0; /* Remove margin since grid handles spacing */
}

.account-page h3 {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  justify-items: center;
  gap: 24px;
}

/* Mobile and Tablet Responsive Design */
@media (max-width: 1024px) {
  .dashboard-container h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 12px;
    width: 100%;
  }
  
  /* Tablet cards layout */
  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 12px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card {
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  
  .card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
  }
}

@media (max-width: 768px) {
  .dashboard-container h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 16px;
    width: 100%;
  }
  
  /* Mobile cards layout - single column */
  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 0; /* Remove bottom margin to eliminate gap */
    padding: 0 16px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card {
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  
  .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg);
  }
}

@media (max-width: 480px) {
  .dashboard-container h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 16px;
    width: 100%;
  }
  
  /* Small mobile cards layout */
  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
    padding: 0 12px;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card {
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }
  
  .card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
  }
}

@media (max-width: 320px) {
  .dashboard-container h2 {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 14px;
    width: 100%;
  }
  
  /* Very small mobile cards layout */
  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
    padding: 0 8px;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card {
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
  }
}

.table-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.actions { 
  display: flex; 
  gap: 12px; 
  justify-content: center; 
  margin: 0; /* Remove bottom margin */
}

/* iOS-Inspired Pill Buttons for Dashboard */
.btn-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.btn-group .btn-secondary {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 16px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-width: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-group .btn-secondary:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: rgba(0, 122, 255, 0.3);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.btn-group .btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: #FF3B30;
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 16px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-width: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-group .btn-danger:hover {
  background: rgba(255, 59, 48, 0.15);
  border-color: rgba(255, 59, 48, 0.3);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

/* Dark theme adjustments */
[data-theme="dark"] .btn-group .btn-secondary {
  background: rgba(0, 122, 255, 0.15);
  color: #5AC8FA;
  border-color: rgba(0, 122, 255, 0.3);
}

[data-theme="dark"] .btn-group .btn-secondary:hover {
  background: rgba(0, 122, 255, 0.2);
  border-color: rgba(0, 122, 255, 0.4);
}

[data-theme="dark"] .btn-group .btn-danger {
  background: rgba(255, 69, 58, 0.15);
  color: #FF6B6B;
  border-color: rgba(255, 69, 58, 0.3);
}

[data-theme="dark"] .btn-group .btn-danger:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: rgba(255, 69, 58, 0.4);
}

.auth-card { 
  padding: 40px; 
  border: 1px solid var(--border); 
  border-radius: 20px; 
  width: 100%; 
  max-width: 100%; 
  background: var(--surface);
  box-shadow: 0 8px 32px var(--shadow);
  backdrop-filter: blur(20px);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-links {
  margin-top: 20px;
  text-align: center;
}

.forgot-password-link, .back-to-login-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password-link:hover, .back-to-login-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.forgot-password-text, .reset-password-text {
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.4;
}

/* iOS-style hint bar */
.hint-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border: 1px solid #e1e8ff;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.08);
}

.hint-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.hint-content {
  flex: 1;
}

.hint-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 4px;
}

.hint-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* Password hint field styling */
.hint-label {
  opacity: 0.8;
  font-style: italic;
}

.hint-label input {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  font-style: normal;
}

.hint-label input:focus {
  background-color: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.cards { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 20px; 
  width: 100%; 
  margin-bottom: 32px;
  min-height: 120px; /* Prevent cards from moving during search */
}

.card { 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 24px; 
  background: var(--surface);
  width: 100%; 
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-title { 
  color: var(--muted); 
  font-size: 1.1rem;
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  font-weight: 600;
  margin-bottom: 8px;
}

.card-value { 
  font-size: 32px; 
  font-weight: 700; 
  color: var(--fg);
}

/* Paid and Remaining card styles to match email colors */
.paid-card {
  border-left: 4px solid #28a745;
}

.paid-card .card-title {
  color: #28a745;
}

.paid-amount {
  color: #28a745 !important;
}

.remaining-card {
  border-left: 4px solid #007aff;
}

.remaining-card .card-title {
  color: #007aff;
}

.remaining-amount {
  color: #007aff !important;
}

/* Due date cell styling */
.due-date-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.passed-indicator {
  color: #28a745;
  font-weight: bold;
  font-size: 16px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #28a745;
  animation: checkmark-pulse 2s ease-in-out infinite;
}

@keyframes checkmark-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Dark theme adjustments for paid indicator */
[data-theme="dark"] .passed-indicator {
  background: rgba(40, 167, 69, 0.2);
  border-color: #34ce57;
  color: #34ce57;
}

/* Calendar checkmark animation */
@keyframes checkmark-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Landing page iOS-inspired container */
.ios-text-container {
  background: var(--surface);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  margin: 0 auto 40px auto;
}

.ios-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 20px 0;
  line-height: 1.1;
  letter-spacing: -1px;
}

.ios-description {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* Dark theme adjustments for iOS container */
[data-theme="dark"] .ios-text-container {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .ios-title {
  color: var(--fg);
}

[data-theme="dark"] .ios-description {
  color: var(--muted);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .ios-text-container {
    padding: 32px 24px;
    border-radius: 20px;
    margin: 0 auto 32px auto;
    max-width: 100%;
  }
  
  .ios-title {
    font-size: 28px;
    margin-bottom: 16px;
  }
  
  .ios-description {
    font-size: 16px;
  }
}

/* ========================================
   RESPONSIVE DESIGN SYSTEM
   Breakpoints: 320px, 768px, 1024px, 1440px
   ======================================== */

/* Base styles for all devices */
* {
  box-sizing: border-box;
}


/* Container system */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navigation - Responsive */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  min-height: 60px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  flex-shrink: 0;
}

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

.nav-group a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-group a:hover {
  background: var(--primary);
  color: white;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-icon {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(180deg);
}

/* Hamburger menu - Mobile only */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-menu span {
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu.hamburger-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.hamburger-active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.hamburger-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}


.centered {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

/* Cards - Responsive Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

.card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

/* Forms - Responsive */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}

.form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
  display: block;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--fg);
  font-size: 16px;
  transition: all 0.2s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Buttons - Responsive */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
}

/* Auth card button centering */
.auth-card .btn {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Auth cards */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  margin: 20px auto;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 20px;
  text-align: center;
}

/* Subscription cards - Responsive */
.subscription-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.subscription-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
}

.subscription-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.subscription-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.subscription-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.subscription-detail:last-child {
  border-bottom: none;
}

.subscription-detail-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.subscription-detail-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}

.subscription-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.subscription-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  min-height: 40px;
}

/* Table - Responsive */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--fg);
}

.table td {
  color: var(--fg);
}


.copyright {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Mobile Small (320px - 479px) */
@media (max-width: 479px) {
  .container {
    padding: 0 12px;
  }
  
  .navbar .container {
    padding: 10px 12px;
    min-height: 56px;
  }
  
  .brand {
    font-size: 18px;
  }
  
  .nav-group {
    gap: 8px;
  }
  
  .nav-group a {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  main.container {
    flex: 1;
    padding: 16px 12px;
    padding-top: 80px; /* Keep top padding for fixed navbar */
  }
  
  .centered {
    padding: 16px 12px;
  }
  
  .card {
    padding: 12px;
  }
  
  .card-title {
    font-size: 13px;
  }
  
  .card-value {
    font-size: 18px;
  }
  
  .auth-card {
    padding: 20px;
    margin: 16px auto;
  }
  
  .auth-card h2 {
    font-size: 20px;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 10px 12px;
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 40px;
  }
  
  .subscription-card {
    padding: 12px;
  }
  
  .subscription-name {
    font-size: 14px;
  }
  
  .subscription-amount {
    font-size: 16px;
  }
  
  .subscription-detail-label,
  .subscription-detail-value {
    font-size: 12px;
  }
  
  .subscription-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
  }
  
  .table {
    font-size: 11px;
  }
  
  .table th,
  .table td {
    padding: 6px 4px;
  }
}

/* Mobile Large (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .container {
    padding: 0 16px;
  }
  
  .navbar .container {
    padding: 12px 16px;
    min-height: 60px;
  }
  
  .brand {
    font-size: 20px;
  }
  
  .nav-group {
    gap: 12px;
  }
  
  .nav-group a {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  main.container {
    flex: 1;
    padding: 20px 16px;
    padding-top: 80px; /* Keep top padding for fixed navbar */
  }
  
  .centered {
    padding: 20px 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  .card-title {
    font-size: 14px;
  }
  
  .card-value {
    font-size: 20px;
  }
  
  .auth-card {
    padding: 24px;
    margin: 20px auto;
  }
  
  .auth-card h2 {
    font-size: 24px;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 12px 16px;
    font-size: 16px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .subscription-card {
    padding: 16px;
  }
  
  .subscription-name {
    font-size: 16px;
  }
  
  .subscription-amount {
    font-size: 18px;
  }
  
  .subscription-detail-label,
  .subscription-detail-value {
    font-size: 13px;
  }
  
  .subscription-actions .btn {
    padding: 10px 16px;
    font-size: 13px;
    min-height: 40px;
  }
  
  .table {
    font-size: 13px;
  }
  
  .table th,
  .table td {
    padding: 8px 6px;
  }
  
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 24px;
    max-width: 768px;
  }
  
  .navbar .container {
    padding: 16px 24px;
    min-height: 64px;
  }
  
  .brand {
    font-size: 22px;
  }
  
  .nav-group {
    gap: 16px;
  }
  
  .nav-group a {
    padding: 8px 16px;
    font-size: 15px;
  }
  
  main.container {
    flex: 1;
    padding: 24px 24px;
    padding-top: 80px; /* Keep top padding for fixed navbar */
  }
  
  .centered {
    padding: 24px 24px;
  }
  
  /* 2x2 grid for cards */
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .card {
    padding: 20px;
  }
  
  .card-title {
    font-size: 15px;
  }
  
  .card-value {
    font-size: 22px;
  }
  
  .auth-card {
    padding: 32px;
    margin: 32px auto;
    max-width: 500px;
  }
  
  .auth-card h2 {
    font-size: 26px;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 14px 18px;
    font-size: 16px;
  }
  
  .btn {
    padding: 14px 24px;
    font-size: 15px;
    min-height: 48px;
    max-width: 300px;
  }
  
  .subscription-card {
    padding: 20px;
  }
  
  .subscription-name {
    font-size: 17px;
  }
  
  .subscription-amount {
    font-size: 19px;
  }
  
  .subscription-detail-label,
  .subscription-detail-value {
    font-size: 14px;
  }
  
  .subscription-actions .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .table {
    font-size: 14px;
  }
  
  .table th,
  .table td {
    padding: 10px 8px;
  }
  
}

/* Desktop Small (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
  .container {
    padding: 0 32px;
    max-width: 1024px;
  }
  
  .navbar .container {
    padding: 16px 32px;
    min-height: 68px;
  }
  
  .brand {
    font-size: 24px;
  }
  
  .nav-group {
    gap: 20px;
  }
  
  .nav-group a {
    padding: 8px 16px;
    font-size: 16px;
  }
  
  main.container {
    flex: 1;
    padding: 32px 32px;
    padding-top: 80px; /* Keep top padding for fixed navbar */
  }
  
  .centered {
    padding: 32px 32px;
  }
  
  /* 2x2 grid for cards */
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .card {
    padding: 24px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .card-value {
    font-size: 24px;
  }
  
  .auth-card {
    padding: 40px;
    margin: 40px auto;
    max-width: 500px;
  }
  
  .auth-card h2 {
    font-size: 28px;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  .btn {
    padding: 16px 32px;
    font-size: 16px;
    min-height: 52px;
    max-width: 300px;
  }
  
  .subscription-card {
    padding: 24px;
  }
  
  .subscription-name {
    font-size: 18px;
  }
  
  .subscription-amount {
    font-size: 20px;
  }
  
  .subscription-detail-label,
  .subscription-detail-value {
    font-size: 15px;
  }
  
  .subscription-actions .btn {
    padding: 14px 24px;
    font-size: 15px;
    min-height: 48px;
  }
  
  .table {
    font-size: 15px;
  }
  
  .table th,
  .table td {
    padding: 12px 10px;
  }
  
}

/* Desktop Large (1440px+) */
@media (min-width: 1440px) {
  .container {
    padding: 0 40px;
    max-width: 1440px;
  }
  
  .navbar .container {
    padding: 20px 40px;
    min-height: 72px;
  }
  
  .brand {
    font-size: 26px;
  }
  
  .nav-group {
    gap: 24px;
  }
  
  .nav-group a {
    padding: 10px 20px;
    font-size: 17px;
  }
  
  main.container {
    flex: 1;
    padding: 40px 40px;
    padding-top: 80px; /* Keep top padding for fixed navbar */
  }
  
  .centered {
    padding: 40px 40px;
  }
  
  /* 2x2 grid for cards */
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  
  .card {
    padding: 32px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .card-value {
    font-size: 28px;
  }
  
  .auth-card {
    padding: 48px;
    margin: 48px auto;
    max-width: 600px;
  }
  
  .auth-card h2 {
    font-size: 32px;
  }
  
  .form input,
  .form textarea,
  .form select {
    padding: 20px 24px;
    font-size: 17px;
  }
  
  .btn {
    padding: 20px 40px;
    font-size: 17px;
    min-height: 56px;
    max-width: 350px;
  }
  
  .subscription-card {
    padding: 32px;
  }
  
  .subscription-name {
    font-size: 20px;
  }
  
  .subscription-amount {
    font-size: 22px;
  }
  
  .subscription-detail-label,
  .subscription-detail-value {
    font-size: 16px;
  }
  
  .subscription-actions .btn {
    padding: 16px 28px;
    font-size: 16px;
    min-height: 52px;
  }
  
  .table {
    font-size: 16px;
  }
  
  .table th,
  .table td {
    padding: 16px 12px;
  }
  
}

/* Mobile Navigation Overlay */
@media (max-width: 767px) {
  .hamburger-menu {
    display: flex;
  }
  
  .nav-group {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 80px 20px 20px;
    flex-direction: column;
    gap: 12px;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .nav-group.mobile-menu-open {
    right: 0;
  }
  
  .nav-group a {
    padding: 16px 20px;
    text-align: left;
    border-radius: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.2s ease;
    width: 100%;
  }
  
  .nav-group a:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
  }
  
  .theme-toggle {
    position: fixed;
    top: 16px;
    right: 60px;
    z-index: 1001;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Dark theme adjustments */
[data-theme="dark"] {
  --background: #1a1a1a;
  --surface: #2d2d2d;
  --fg: #ffffff;
  --muted: #888888;
  --border: #404040;
  --primary: #007aff;
}

/* Light theme */
[data-theme="light"] {
  --background: #ffffff;
  --surface: #f8f9fa;
  --fg: #000000;
  --muted: #666666;
  --border: #e0e0e0;
  --primary: #007aff;
}

/* Dark theme footer */
[data-theme="dark"] .footer {
  border-top-color: #333;
}

[data-theme="dark"] .copyright {
  color: #888;
}

/* Footer - Fixed at bottom, container just big enough for text */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
  z-index: 1000;
}

.footer .container {
  text-align: center;
  width: 100%;
}

.copyright {
  font-size: 12px;
  color: var(--text);
  margin: 0;
}

/* Copyright footer - Shows at bottom of page */
.copyright-footer {
  padding: 8px 20px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
  margin-top: auto;
}

.muted {
  color: var(--muted);
  text-align: center;
  font-size: 18px;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 16px;
}


.danger-section h3 {
  color: var(--danger);
}

.danger-card {
  border-color: var(--danger);
  background: rgba(255, 59, 48, 0.05);
}

.warning-text {
  color: var(--danger);
  font-weight: 500;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 59, 48, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--danger);
}

.info-text {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}


.search-input {
  width: 100%;
  max-width: 400px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 17px;
  background: var(--surface);
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Color picker */
.color-section {
  display: grid;
  gap: 12px;
  text-align: center;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 16px;
  justify-content: center;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: var(--fg);
}

.color-option.selected {
  border-color: var(--fg);
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.custom-color-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.custom-color-section label {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.custom-color-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: all 0.2s ease;
  cursor: pointer;
}

.custom-color-container:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
}

.custom-color-container.custom-selected {
  border-color: var(--primary);
  background: rgba(0, 122, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.custom-color-input {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  position: absolute;
  z-index: 2;
}

.custom-color-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #ff0000;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-color-container:hover .custom-color-preview {
  transform: scale(1.05);
  border-color: var(--primary);
}

.custom-color-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.custom-color-container.custom-selected .custom-color-label {
  color: var(--primary);
  font-weight: 600;
}

.custom-color-container.custom-selected .custom-color-preview::after {
  content: "✓";
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border: 2px solid white;
}

/* Service cell with color indicator */
.service-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-cell .color-indicator {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Desktop table color indicators */
.table .service-cell .color-indicator {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  border-radius: 50%;
  flex-shrink: 0;
}

/* General color indicator for desktop */
.color-indicator {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Desktop media query to ensure larger dots - Updated 2024 */
@media (min-width: 769px) {
  .color-indicator {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
  
  .service-cell .color-indicator {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
  
  .table .service-cell .color-indicator {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
  
  /* Target the exact HTML structure */
  .table tbody tr td .service-cell .color-indicator {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
  
  /* Nuclear option - target any color-indicator with inline styles */
  .color-indicator[style*="background-color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
}

/* Hide rows and cards during search */
.subscription-row.hidden,
.subscription-card.hidden {
  display: none;
}

/* Search and filter container */
.search-filter-container {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 0; /* Remove bottom margin */
  justify-content: center;
  flex-wrap: wrap;
}

.search-section {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

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

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  background: var(--surface);
  color: var(--fg);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.filter-section label {
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
}

.filter-section select {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  color: var(--fg);
  transition: all 0.2s ease;
  min-width: 150px;
}

.filter-section select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* iOS-inspired Calendar */
.calendar-section {
  margin-top: 40px;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.calendar-section h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--fg);
  font-weight: 600;
  font-size: 28px;
}

.calendar-container {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid var(--border);
  width: 100%;
}

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

.calendar-header h4 {
  font-size: 26px;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.calendar-nav {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-nav:hover {
  background: #0056b3;
  transform: scale(1.05);
}

.calendar-grid {
  width: 100%;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 600;
  color: var(--fg);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-height: 80px;
  background: var(--surface);
  padding: 4px;
}


.calendar-day:hover {
  background: var(--bg);
}

.calendar-day.other-month {
  color: var(--muted);
  opacity: 0.4;
}

.calendar-day.today {
  background: var(--primary);
  color: black;
  font-weight: 800;
  font-size: 42px;
  border: 3px solid var(--primary);
}

.calendar-day.has-subscription {
  background: var(--surface);
}

.calendar-day.has-subscription:hover {
  background: var(--bg);
  transform: scale(1.05);
}

.calendar-indicators {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.subscription-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.subscription-checkmark {
  color: #28a745;
  font-weight: bold;
  font-size: 12px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #28a745;
  margin: 1px auto 0;
  animation: checkmark-pulse 2s ease-in-out infinite;
}

.calendar-indicators {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 0;
}

.calendar-day-number {
  display: block;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
  line-height: 1;
}

.calendar-day.today .subscription-dot {
  border-color: black;
}

/* Reminder Toggle Section */
.reminder-section {
  margin: 16px 0;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.reminder-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reminder-toggle-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
}

.ios-toggle-container {
  display: flex;
  align-items: center;
}

.ios-toggle {
  display: none;
}

.ios-toggle-label {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  cursor: pointer;
}

.ios-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 31px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ios-toggle-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ios-toggle:checked + .ios-toggle-label .ios-toggle-slider {
  background-color: #34c759;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ios-toggle:checked + .ios-toggle-label .ios-toggle-slider:before {
  transform: translateX(20px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.ios-toggle-label:hover .ios-toggle-slider {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(52, 199, 89, 0.1);
}

.ios-toggle:checked + .ios-toggle-label:hover .ios-toggle-slider {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(52, 199, 89, 0.2);
}

.reminder-days-container {
  transition: all 0.3s ease;
}

.reminder-days-container label {
  font-size: 0.95rem;
  color: var(--fg);
  opacity: 0.9;
}

/* Dark theme adjustments for toggle */
[data-theme="dark"] .ios-toggle-slider {
  background-color: #48484a;
}

[data-theme="dark"] .ios-toggle-slider:before {
  background-color: #f2f2f7;
}

[data-theme="dark"] .ios-toggle:checked + .ios-toggle-label .ios-toggle-slider {
  background-color: #30d158;
}

/* Reminder Off Styling */
.reminder-off {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
  opacity: 0.8;
}

/* Responsive */
/* Color Customization Section */
.color-customization {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.color-customization h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 16px;
  text-align: center;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  justify-items: stretch;
  align-items: center;
}

.color-picker-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: 12px;
  border: 2px solid var(--border);
  transition: all 0.2s ease;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.color-picker-item:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.color-picker-label {
  flex: 1;
  font-size: 1.1rem;
  color: var(--fg);
  margin-right: 20px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.color-picker-input {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  position: relative;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.color-picker-input:hover {
  transform: scale(1.1);
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
  border: none;
  width: 100%;
  height: 100%;
  margin: 0;
}

.color-picker-input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.color-picker-input::-moz-color-swatch {
  border: none;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.analytics-container {
  background: var(--bg-primary);
  min-height: auto;
  padding: 40px 20px;
}

.analytics-header {
  text-align: center;
  margin-bottom: 30px;
}

.analytics-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.analytics-subtitle {
  font-size: 1.3rem;
  color: var(--muted);
  margin: 0;
}

.analytics-summary {
  margin-bottom: 30px;
}

.summary-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

.summary-content {
  flex: 1;
}

.summary-label {
  font-size: 1.5rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
}

.chart-container {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

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

.chart-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.total-spending {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.spending-summary {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.saved-amount {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 8px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.saved-amount.zero-saved {
  opacity: 1;
}

/* Dark theme saved amount */
[data-theme="dark"] .saved-amount {
  color: var(--success);
}

.instruction-text {
  font-size: 1.3rem;
  color: var(--muted);
  margin-bottom: 16px;
  font-style: italic;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .spending-summary {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .total-spending,
  .saved-amount {
    font-size: 1.3rem;
  }
  
  .instruction-text {
    font-size: 1.1rem;
    text-align: center;
    padding: 0 16px;
  }
  
  /* Mobile legend organization */
  .chartjs-legend {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 0 16px;
  }
  
  .chartjs-legend-item {
    width: 100%;
    max-width: 300px;
    justify-content: flex-start;
    padding: 6px 12px;
    margin: 2px 0;
  }
  
  .chartjs-legend-text {
    font-size: 13px;
  }
  
  .chartjs-legend-color {
    width: 10px;
    height: 10px;
  }
  
  /* Mobile custom legend */
  .custom-legend {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 16px;
  }
  
  .custom-legend-item {
    width: 100%;
    max-width: 280px;
    justify-content: flex-start;
    padding: 6px 10px;
  }
  
  .custom-legend-text {
    font-size: 13px;
  }
  
  .custom-legend-color {
    width: 12px;
    height: 12px;
  }
}

.savings-display {
  background: var(--success);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.savings-amount {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.savings-description {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Dark theme savings display */
[data-theme="dark"] .savings-display {
  background: var(--success);
  box-shadow: 0 2px 8px rgba(48, 209, 88, 0.4);
}

.chart-period {
  font-size: 1.5rem;
  color: var(--muted);
}

.chart-wrapper {
  position: relative;
  height: 800px;
  width: 100%;
}

/* Organize legend under pie chart */
.chartjs-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0 20px;
}

.chartjs-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.chartjs-legend-item:hover {
  background-color: rgba(0, 122, 255, 0.1);
}

.chartjs-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.chartjs-legend-text {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Custom organized legend */
.custom-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 0 20px;
}

.custom-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.custom-legend-item:hover {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  transform: translateY(-1px);
}

.custom-legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.custom-legend-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}




.analytics-insights {
  margin-bottom: 30px;
}

.analytics-insights h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 16px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.insight-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
}

.insight-content {
  flex: 1;
}

.insight-title {
  font-size: 1.4rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.insight-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg);
}

@media (max-width: 768px) {
  /* iOS-Inspired Mobile Design System */
  
  /* Dashboard container optimization */
  .dashboard-container {
    padding: 20px 16px 0 16px; /* Remove bottom padding */
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .dashboard-container h2 {
    font-size: 24px;
    margin-bottom: 16px;
    text-align: center;
  }
  
  /* Base container - iOS safe area inspired */
  .container {
    padding: 16px 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    margin: 0 auto;
  }
  
  /* iOS-Inspired Centered Layout */
  .centered {
    padding: 20px;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
  }
  
  /* Account Page Mobile - Single Column */
  .account-page {
    max-width: 100% !important;
    padding: 20px 16px;
  }
  
  .account-page .account-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  
  .account-page .auth-card {
    padding: 24px;
    margin: 0; /* Remove margin since grid handles spacing */
  }
  
  .account-page h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .account-page .centered h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  /* iOS-Inspired Cards */
  .auth-card {
    padding: 32px 24px;
    min-height: auto;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* iOS-Inspired Forms */
  .form {
    gap: 20px;
    max-width: 100%;
    width: 100%;
  }
  
  .form label {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fg);
    display: block;
  }
  
  .form input,
  .form textarea,
  .form select {
    font-size: 17px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: var(--background);
    color: var(--fg);
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .form input:focus,
  .form textarea:focus,
  .form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    outline: none;
  }
  
  /* iOS-Inspired Buttons */
  .btn {
    font-size: 17px;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 16px;
    min-height: 56px;
    touch-action: manipulation;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
    color: white;
  }
  
  .btn-secondary {
    background: var(--surface);
    color: var(--fg);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .btn-secondary:hover {
    background: var(--background);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 16px;
    line-height: 1.4;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: 12px; /* Reduced gap */
    margin-bottom: 20px; /* Reduced margin */
    padding: 0 4px; /* Small padding to prevent edge cutoff */
  }
  
  .card {
    padding: 16px; /* Reduced padding */
    border-radius: 12px; /* Slightly less rounded */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Lighter shadow */
    margin: 0;
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
  }
  
  .card-title {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
  }
  
  .card-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
  }
  
  /* Mobile Dashboard - Fix Content Cutoff */
  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
  }
  
  .card {
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--fg);
  }
  
  .card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
  }
  
  /* Hide table on mobile, use card layout instead */
  .table-container {
    display: none;
  }
  
  /* Mobile Subscription Cards - Smaller */
  .subscription-card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--surface);
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
  }
  
  .subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .subscription-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    flex: 1;
    min-width: 0;
  }
  
  .subscription-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 122, 255, 0.2);
  }
  
  .subscription-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .subscription-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  
  .subscription-detail:last-child {
    border-bottom: none;
  }
  
  .subscription-detail-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
  }
  
  .subscription-detail-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--fg);
  }
  
  /* Mobile Action Buttons - Smaller */
  .subscription-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }
  
  .subscription-actions .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 600;
    min-height: 40px;
    transition: all 0.3s ease;
    margin: 0;
    max-width: none;
  }
  
  .btn-edit {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  }
  
  .btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
  }
  
  .btn-delete {
    background: #ff3b30;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
  }
  
  .btn-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
  }
  
  /* Mobile-friendly subscription cards */
  .subscription-card {
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: var(--surface);
    border: 1px solid var(--border);
    max-width: 100%;
    overflow: hidden;
  }
  
  .subscription-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
  }
  
  .subscription-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--fg);
    word-wrap: break-word;
  }
  
  .subscription-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 122, 255, 0.2);
  }
  
  .subscription-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .subscription-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  
  .subscription-detail:last-child {
    border-bottom: none;
  }
  
  .subscription-detail-label {
    font-size: 16px;
    color: var(--muted);
    font-weight: 600;
  }
  
  .subscription-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
  }
  
  /* Mobile action buttons */
  .subscription-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
  }
  
  .subscription-actions .btn {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 16px;
    font-weight: 700;
    min-height: 48px;
    transition: all 0.3s ease;
  }
  
  .btn-edit {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  }
  
  .btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
  }
  
  .btn-delete {
    background: #ff3b30;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
  }
  
  .btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 59, 48, 0.4);
  }
  
  
  .card-title {
    font-size: 18px;
    line-height: 1.3;
  }
  
  /* iOS-Inspired Mobile Navigation */
  .navbar .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    min-height: 88px; /* iOS standard header height */
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  
  .brand {
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--fg);
  }
  
  /* iOS-Inspired Hamburger Menu */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }
  
  .hamburger-menu:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  .hamburger-menu span {
    width: 100%;
    height: 2px;
    background: var(--fg);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }
  
  .hamburger-menu.hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }
  
  .hamburger-menu.hamburger-active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }
  
  .hamburger-menu.hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  /* iOS-Inspired Mobile Navigation Menu */
  .nav-group {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 100px 24px 24px;
    flex-direction: column;
    gap: 12px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
  }
  
  .nav-group.mobile-menu-open {
    right: 0;
  }
  
  /* Hamburger Menu Buttons - All Same Size */
  .nav-group a {
    padding: 16px 20px;
    text-align: center;
    border-radius: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    min-height: 48px; /* Same height for all buttons */
    width: 100%; /* Same width for all buttons */
  }
  
  .nav-group a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
    border-color: var(--primary);
  }
  
  /* Theme Toggle - Aligned with Hamburger */
  .theme-toggle {
    position: absolute;
    top: 50%;
    right: 60px; /* Position next to hamburger menu */
    transform: translateY(-50%);
    z-index: 1001;
    width: 32px; /* Same size as hamburger */
    height: 32px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .theme-toggle:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .theme-icon {
    font-size: 16px; /* Smaller icon */
    transition: transform 0.3s ease;
  }
  
  .theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
  }
  
  /* Login page mobile optimization */
  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 40px auto;
    max-width: 400px;
  }
  
  /* Login page spacing */
  .centered {
    padding: 20px 16px;
    gap: 20px;
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .auth-card h2 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 700;
    color: var(--fg);
  }
  
  .form {
    gap: 20px;
    max-width: 100%;
  }
  
  .form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--fg);
    font-size: 16px;
  }
  
  .form input,
  .form textarea,
  .form select {
    font-size: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: var(--background);
    color: var(--fg);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
  }
  
  .form input:focus,
  .form textarea:focus,
  .form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: translateY(-1px);
  }
  
  .btn {
    font-size: 18px;
    padding: 18px 32px;
    border-radius: 16px;
    width: 100%;
    max-width: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    color: white;
  }
  
  .btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 2px solid var(--border);
  }
  
  .btn-secondary:hover {
    background: var(--background);
    transform: translateY(-1px);
  }
  
  /* iOS-inspired login/register toggle */
  .auth-toggle {
    display: flex;
    background: var(--background);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
  }
  
  .auth-toggle a {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    color: var(--muted);
  }
  
  .auth-toggle a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  }
  
  /* Subscription cards mobile */
  .subscription-card {
    padding: 16px;
    border-radius: 16px;
  }
  
  .subscription-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .subscription-amount {
    font-size: 20px;
    align-self: flex-end;
  }
  
  /* Contact form mobile */
  .contact-form-card {
    padding: 20px;
  }
  
  .contact-intro h3 {
    font-size: 24px;
  }
  
  /* Theme toggle mobile */
  .theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--primary);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  }
  
  .theme-icon {
    font-size: 24px;
  }
  
  .table {
    font-size: 14px;
    overflow-x: auto;
  }
}

/* Additional mobile optimizations for smaller screens */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  .centered {
    padding: 8px;
    max-width: calc(100vw - 16px);
  }
  
  .auth-card {
    padding: 16px;
  }
  
  .form input,
  .form textarea,
  .form select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
  }
  
  .btn {
    padding: 16px 24px;
    font-size: 16px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 15px;
  }
  
  .navbar .brand {
    font-size: 20px;
  }
  
  .subscription-card {
    padding: 12px;
  }
  
  .subscription-amount {
    font-size: 18px;
  }
  
  .contact-form-card {
    padding: 16px;
  }
  
  .contact-intro h3 {
    font-size: 22px;
  }
  
  /* Make sure text is readable on small screens */
  .info-text {
    font-size: 14px;
    line-height: 1.4;
  }
  
  /* Form help text styling */
  .form-text {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    display: block;
    line-height: 1.3;
  }
  
  .warning-text {
    font-size: 14px;
    line-height: 1.4;
  }
}
  
  .table th, .table td {
    padding: 12px 8px;
    min-width: 80px;
  }
  
  .auth-card {
    padding: 24px;
    min-height: 150px;
  }
  
  /* Analytics mobile styling */
  .analytics-container {
    padding: 16px;
    overflow: visible !important;
    min-height: auto !important;
    background: transparent !important;
  }
  
  .analytics-header h1 {
    font-size: 2rem;
  }
  
  .analytics-subtitle {
    font-size: 1.1rem;
  }
  
  .summary-label {
    font-size: 1.4rem;
  }
  
  .chart-period {
    font-size: 1.4rem;
  }
  
  .insight-title {
    font-size: 1.3rem;
  }
  
  .summary-card {
    padding: 20px;
  }
  
  .summary-value {
    font-size: 1.5rem;
  }
  
  .chart-container {
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
  }
  
  .chart-wrapper {
    height: 500px !important;
    margin: 8px 0 !important;
  }
  
  .chart-header h2 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
  }
  
  .color-picker-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .color-picker-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    background: var(--bg) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 20px !important;
    width: auto !important;
    min-width: 100px !important;
    max-width: 140px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    gap: 8px !important;
  }
  
  .color-picker-item::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }
  
  .color-picker-item:hover {
    background: var(--surface) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  
  .color-picker-item:hover::before {
    opacity: 1 !important;
  }
  
  .color-picker-item:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  }
  
  .color-picker-label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: center !important;
    color: var(--fg) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  
  .color-picker-input {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  
  .color-picker-input::before {
    content: '' !important;
    position: absolute !important;
    top: -1px !important;
    left: -1px !important;
    right: -1px !important;
    bottom: -1px !important;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }
  
  .color-picker-input:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 1) !important;
  }
  
  .color-picker-input:hover::before {
    opacity: 1 !important;
  }
  
  .color-picker-input:active {
    transform: scale(1.1) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
  }
  
  .reminder-section {
    margin: 12px 0;
    padding: 12px;
  }
  
  .reminder-toggle-container {
    margin-bottom: 8px;
  }
  
  .reminder-toggle-label {
    font-size: 0.95rem;
  }
  
  .ios-toggle-label {
    width: 47px;
    height: 29px;
  }
  
  .ios-toggle-slider:before {
    height: 25px;
    width: 25px;
  }
  
  .ios-toggle:checked + .ios-toggle-label .ios-toggle-slider:before {
    transform: translateX(18px);
  }
  
  .hint-bar {
    padding: 12px;
    gap: 8px;
  }
  
  .hint-icon {
    font-size: 18px;
  }
  
  .hint-title {
    font-size: 14px;
  }
  
  .hint-text {
    font-size: 13px;
  }
  
  .hint-label {
    font-size: 14px;
  }
  
  .hint-label input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Mobile number input adjustments */
  .number-input {
    padding-right: 40px;
  }
  
  .number-arrows {
    right: 6px;
  }
  
  .arrow-btn {
    width: 18px;
    height: 14px;
    font-size: 10px;
  }
  
  /* Mobile navbar theme toggle */
  nav .theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    margin-right: 12px;
    margin-left: 0;
  }
  
  /* Mobile dark theme border */
  [data-theme="dark"] nav .theme-toggle {
    border: 1px solid #ffffff;
  }
  
  nav .theme-icon {
    font-size: 14px;
  }
  
  .nav-group a {
    margin-left: 16px;
  }
  
  .nav-group a:first-child {
    margin-left: 0;
  }
  
  .calendar-section {
    margin-top: 30px;
  }
  
  .calendar-container {
    padding: 12px;
  }
  
  .calendar-header h4 {
    font-size: 16px;
  }
  
  .calendar-nav {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .calendar-day {
    min-height: 32px;
    font-size: 12px;
  }
  
  .calendar-day.today {
    font-size: 13px;
  }
  
  .weekday {
    font-size: 10px;
    padding: 6px 1px;
  }
  
  .calendar-section h3 {
    font-size: 24px;
  }
  
  .calendar-header h4 {
    font-size: 22px;
  }
  
  .weekday {
    font-size: 14px;
    padding: 10px 4px;
  }
  
  /* Mobile color options adjustments */
  .color-options {
    grid-template-columns: repeat(5, 1fr);
    max-width: 250px;
    gap: 16px;
  }
  
  .color-option {
    width: 36px;
    height: 36px;
  }
}

/* Main page scroll prevention - only when body has main-page class */
body.main-page {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: transparent;
}

/* Fresh & Clean Landing Page - Wix Skincare Template Inspired */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--fg);
  line-height: 1.6;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: transparent;
  border-radius: 0 0 32px 0;
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: left;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual .visual-card {
  background: var(--surface) !important;
  border-radius: 32px !important;
  padding: 2rem !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid var(--border) !important;
  max-width: 350px !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  overflow: hidden !important;
}

.visual-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 16px;
  overflow: hidden;
}

.subscription-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.subscription-item:hover {
  background: var(--surface);
  transform: translateX(4px);
}

.sub-info {
  flex: 1;
}

.sub-name {
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.sub-date {
  font-size: 0.9rem;
  color: var(--muted);
}

.sub-amount {
  font-weight: 700;
  color: #667eea;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.btn-outline {
  background: transparent;
  color: #6e6e73;
  border: 2px solid #e5e5e5;
}

.btn-outline:hover {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

/* Features Section */
.features {
  padding: 8rem 2rem;
  background: var(--bg);
  border-radius: 32px 32px 0 0;
  margin-top: -32px;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 400;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
}

.feature-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Plans Section */
.plans {
  padding: 8rem 2rem;
  background: transparent;
  border-radius: 32px;
  margin: 0.5rem auto;
  max-width: 1200px;
  position: relative;
  z-index: 2;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
  cursor: pointer;
}

.plan-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.pro-plan {
  border: 2px solid #667eea;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(102, 126, 234, 0.02) 100%);
}

.plan-badge {
  position: absolute;
  top: -1px;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 12px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.plan-header {
  margin-bottom: 2rem;
}

.plan-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.plan-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #667eea;
}

.period {
  font-size: 1rem;
  color: var(--muted);
}

.plan-description {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--muted);
}

.feature-item svg {
  color: #28a745;
  flex-shrink: 0;
}

.plan-cta {
  margin-top: 2rem;
}

/* CTA Section */
.cta {
  padding: 8rem 2rem;
  background: var(--bg);
  border-radius: 32px 32px 0 0;
  margin-top: -32px;
  position: relative;
  z-index: 3;
}

.cta-content {
  background: var(--surface);
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.cta-content:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--fg);
}

.cta-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--muted);
}

.cta-actions {
  margin-bottom: 2rem;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--muted);
}

.cta-feature svg {
  color: #28a745;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
    border-radius: 0 0 24px 24px;
    min-height: 90vh;
  }
  
  .hero::before {
    border-radius: 0 0 24px 0;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
    padding: 0;
  }
  
  .hero-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }
  
  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .features {
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
    padding: 3rem 1rem;
  }
  
  .plans {
    border-radius: 0 0 24px 24px;
    margin-top: -24px;
    padding: 3rem 1rem;
  }
  
  .cta {
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .plan-card {
    padding: 2rem;
  }
  
  .cta-title {
    font-size: 1.8rem;
  }
  
  .cta-description {
    font-size: 1rem;
  }
  
  .cta-features {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn-primary, .btn-secondary, .btn-outline {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .hero-visual .visual-card {
    border-radius: 24px !important;
    overflow: hidden !important;
    padding: 1.5rem;
    max-width: 320px;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    padding: 3rem 2rem;
    min-height: 85vh;
  }
  
  .hero-container {
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-description {
    font-size: 1.2rem;
  }
  
  .features, .plans, .cta {
    padding: 5rem 2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
  }
  
  .btn-primary, .btn-secondary, .btn-outline {
    padding: 1rem 2rem;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 1.5rem 1rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .hero-actions {
    margin-bottom: 1.5rem;
  }
  
  .hero-stats {
    gap: 1rem;
  }
  
  .features, .plans, .cta {
    padding: 2rem 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .feature-card, .plan-card {
    padding: 1.5rem;
  }
}

/* Desktop spacing optimization */
@media (min-width: 1025px) {
  .hero {
    padding: 2rem 2rem;
    min-height: 80vh;
  }
  
  .features {
    padding: 4rem 2rem;
  }
  
  .plans {
    padding: 4rem 2rem;
  }
  
  .cta {
    padding: 4rem 2rem;
  }
}

/* Force dashboard card corner radius - Highest specificity */
.landing-page .hero .hero-visual .visual-card {
  border-radius: 32px !important;
  overflow: hidden !important;
}

.landing-page .hero .hero-visual .visual-card * {
  border-radius: inherit !important;
}

.landing-page .hero .hero-visual .visual-card .card-header {
  border-radius: 32px 32px 0 0 !important;
}

.landing-page .hero .hero-visual .visual-card .card-content {
  border-radius: 0 0 32px 32px !important;
}

.landing-page .hero .hero-visual .visual-card .subscription-item {
  border-radius: 16px !important;
  margin: 0.25rem 0 !important;
}

/* Welcome Section */
.welcome-section {
  min-height: 60vh;
  display: flex;
  align-items: flex-start;
  padding: 2rem 1rem 0.5rem 1rem;
  background: transparent;
}

.welcome-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.welcome-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
}

.welcome-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.welcome-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary.btn-large {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.btn-primary.btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
}

.btn-secondary.btn-large {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--border);
}

.btn-secondary.btn-large:hover {
  background: var(--surface);
  border-color: var(--primary);
}

/* Intro Section */
.intro-section {
  padding: 1.5rem 1rem;
  background: transparent;
}

.intro-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.intro-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 2rem 2.5rem;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
}

.intro-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.intro-description {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 2rem;
}

.intro-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.stat-pill {
  background: rgba(0, 122, 255, 0.1);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Benefits Section */
.benefits-section {
  padding: 1.5rem 1rem;
  background: transparent;
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
}

.benefits-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  color: var(--fg);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

/* Ensure desktop benefits grid stays correct */
@media (min-width: 769px) {
  .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    justify-items: center;
  }
}

.benefit-circle {
  width: 280px;
  height: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px var(--shadow);
  position: relative;
}

.benefit-circle:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--primary);
}

.circle-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
}

.benefit-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}

.benefit-description {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Closure Section */
.closure-section {
  padding: 1.5rem 1rem;
  background: transparent;
  color: var(--fg);
}

.closure-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.closure-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 2rem 3rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
}

.closure-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.closure-subtitle {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.closure-actions {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.closure-actions .btn-primary.btn-large {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.closure-actions .btn-primary.btn-large:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
}

.closure-benefits {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--fg);
}

.benefit-item svg {
  color: #34c759;
}

/* Responsive Design */
@media (max-width: 768px) {
  .welcome-section {
    min-height: 50vh;
    padding: 1.5rem 1rem 0.5rem 1rem;
  }
  
  .welcome-title {
    font-size: 3rem;
  }
  
  .welcome-subtitle {
    font-size: 1.2rem;
  }
  
  .welcome-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .welcome-pill {
    padding: 1.5rem 2rem;
  }
  
  .intro-section {
    padding: 1rem;
  }
  
  .intro-pill {
    padding: 1.5rem 2rem;
  }
  
  .intro-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .benefits-section {
    padding: 1rem;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .benefit-circle {
    width: 250px;
    height: 250px;
  }
  
  .closure-section {
    padding: 1rem;
  }
  
  .closure-benefits {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    align-items: center;
  }
  
  .benefits-title {
    font-size: 2.5rem;
  }
  
  .closure-title {
    font-size: 2.5rem;
  }
  
  .closure-pill {
    padding: 1.5rem 2rem;
  }
}

/* Mobile landscape ONLY - very specific targeting */
@media screen and (max-width: 768px) and (orientation: landscape) and (max-height: 500px) and (min-width: 480px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    justify-items: center;
    align-items: center;
    max-width: 100%;
  }
  
  .benefit-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }
  
  .benefits-section {
    padding: 0.3rem;
  }
  
  .benefit-title {
    font-size: 0.9rem;
  }
  
  .benefit-description {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .welcome-section {
    min-height: 45vh;
    padding: 1rem 1rem 0.5rem 1rem;
  }
  
  .welcome-title {
    font-size: 2.5rem;
  }
  
  .welcome-subtitle {
    font-size: 1.1rem;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .welcome-pill {
    padding: 1rem 1.5rem;
  }
  
  .intro-section {
    padding: 0.75rem;
  }
  
  .intro-pill {
    padding: 1rem 1.5rem;
  }
  
  .benefits-section {
    padding: 0.75rem;
  }
  
  .benefit-circle {
    width: 220px;
    height: 220px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .closure-section {
    padding: 0.75rem;
  }
  
  .closure-benefits {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .closure-benefits .benefit-item {
    margin: 0;
    padding: 0;
  }
  
  .closure-pill {
    padding: 1rem 1.5rem;
  }
}

/* Main page iOS-inspired styling */
.main-container {
  height: 100vh;
  display: flex;
  align-items: flex-start; /* Change from center to flex-start to move content up */
  justify-content: center;
  padding: 8px;
  padding-top: 40px; /* Reduced top padding to move content closer to header */
  background: transparent;
  overflow: visible; /* Allow content to be visible and clickable */
  transform: none; /* Remove transform that might cause positioning issues */
}

.hero-section {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.hero-content {
  background: transparent;
  border-radius: 24px;
  padding: 20px 16px;
  box-shadow: none;
  border: none;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.app-icon {
  margin-bottom: 16px;
}

.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.icon-symbol {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero-description {
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  min-width: 140px;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 2px solid var(--border);
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--fg);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* Force white text on all btn-primary hover states */
.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
input.btn-primary:hover,
button.btn-primary:hover {
  color: white !important;
}

/* SPECIFIC FIX for Upgrade to Pro button */
a.btn-primary[href*="upgrade"]:hover,
a.btn-primary:hover {
  color: white !important;
  background: #0056b3 !important;
}

/* Additional specificity for account page buttons */
.account-section a.btn-primary:hover {
  color: white !important;
  background: #0056b3 !important;
}

/* SPECIFIC FIX for pricing page Upgrade to Pro button */
.pro-btn:hover,
.plan-btn.pro-btn:hover,
button.pro-btn:hover,
#upgrade-button:hover {
  color: white !important;
  background: #0056b3 !important;
}

/* Additional specificity for upgrade page buttons */
.upgrade-container .pro-btn:hover,
.upgrade-container button.pro-btn:hover {
  color: white !important;
  background: #0056b3 !important;
}

/* ========================================
   iOS-INSPIRED MOBILE DESIGN SYSTEM
   Mobile-first approach with iOS aesthetics
   ======================================== */

/* iOS Mobile Navigation */
@media (max-width: 768px) {
  .navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    padding: 0;
    margin: 0;
  }
  
  [data-theme="dark"] .navbar {
    background: rgba(28, 28, 30, 0.8);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar .container {
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    max-width: none;
  }
  
  /* Button group container for theme toggle and hamburger */
  .navbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 60px;
  }
  
  /* Ensure both buttons are perfectly aligned */
  .theme-toggle,
  .hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
  }
  
  .brand {
    font-size: 20px;
    font-weight: 600;
    color: var(--fg);
    flex: 1;
  }
  
  /* iOS-style hamburger menu */
  .hamburger-menu {
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  
  .hamburger-menu span {
    width: 20px;
    height: 2px;
    background: var(--fg);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }
  
  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* iOS-style slide-out menu */
  .nav-group {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 0.5px solid var(--border);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 60px 0 0 0;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1001;
    pointer-events: auto;
  }
  
  .nav-group.active {
    right: 0;
  }
  
  /* Ensure mobile menu links are clickable */
  .nav-group a {
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-size: 17px;
    font-weight: 400;
    text-align: left;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--fg);
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    z-index: 1002 !important;
    position: relative !important;
    -webkit-tap-highlight-color: rgba(0, 122, 255, 0.3);
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
  }
  
  .nav-group a:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    transform: none;
    box-shadow: none;
  }
  
  /* iOS-style theme toggle */
  .theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    flex-shrink: 0;
    position: relative;
    top: 0;
    left: 0;
    transform: none;
  }
  
  [data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
  }
  
  [data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .theme-toggle:active {
    background: rgba(0, 0, 0, 0.15);
  }
  
  [data-theme="dark"] .theme-toggle:active {
    background: rgba(255, 255, 255, 0.25);
  }
  
  .theme-toggle:focus {
    outline: none;
  }
  
  .theme-icon {
    font-size: 18px;
  }
  
  /* Hamburger menu positioning */
  .hamburger-menu {
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin: 0;
  }
}

/* iOS Mobile Main Content - REMOVED CONFLICTING RULES */
  
  /* iOS-style cards */
  .card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
  }
  
  [data-theme="dark"] .card {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  [data-theme="dark"] .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  
  .card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.1;
  }
  
  /* iOS-style dashboard cards grid */
  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 8px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Paid and Remaining cards with iOS styling */
  .paid-card {
    border-left: 4px solid var(--success);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, rgba(52, 199, 89, 0.02) 100%);
  }
  
  .paid-card .card-title {
    color: var(--success);
  }
  
  .paid-amount {
    color: var(--success) !important;
  }
  
  .remaining-card {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%);
  }
  
  .remaining-card .card-title {
    color: var(--primary);
  }
  
  .remaining-amount {
    color: var(--primary) !important;
  }
}

/* iOS Mobile Forms */
@media (max-width: 768px) {
  .auth-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    margin: 20px auto;
    max-width: 100%;
  }
  
  [data-theme="dark"] .auth-card {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 32px;
    text-align: center;
  }
  
  .form {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  
  .form label {
    font-size: 17px;
    font-weight: 400;
    color: var(--fg);
    margin-bottom: 8px;
    display: block;
  }
  
  .form input,
  .form textarea,
  .form select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--fg);
    font-size: 17px;
    font-weight: 400;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .form input:focus,
  .form textarea:focus,
  .form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: scale(1.02);
  }
  
  /* iOS-style buttons */
  .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }
  
  .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
  }
  
  .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    color: white !important;
  }
  
  .btn-primary:active {
    transform: scale(0.98);
  }
  
  .btn-secondary {
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
  }
  
  .btn-secondary:hover {
    background: var(--border);
    transform: translateY(-1px);
  }
  
  /* iOS-style form groups */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--fg);
  }
  
  .form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--fg);
    font-size: 17px;
    font-weight: 400;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: scale(1.02);
  }
  
  /* iOS-style auth links */
  .auth-links {
    text-align: center;
    margin-top: 24px;
  }
  
  .auth-switch {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
  }
  
  .auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
  }
  
  .auth-switch a:hover {
    text-decoration: underline;
  }
  
  .forgot-password-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
  }
  
  .forgot-password-link:hover {
    text-decoration: underline;
  }
}

/* iOS Mobile Subscription Cards */
@media (max-width: 768px) {
  .subscription-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  [data-theme="dark"] .subscription-card {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .subscription-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .mobile-subscriptions {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 8px;
  }
  
  .subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    position: relative;
  }
  
  .subscription-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--fg);
    flex: 1;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 80px);
  }
  
  .subscription-name .color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  
  .subscription-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    position: absolute;
    top: 0;
    right: 0;
    flex-shrink: 0;
  }
  
  .subscription-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .subscription-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
  }
  
  [data-theme="dark"] .subscription-detail {
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  }
  
  .subscription-detail:last-child {
    border-bottom: none;
  }
  
  .subscription-detail-label {
    font-size: 15px;
    color: var(--muted);
    font-weight: 400;
  }
  
  .subscription-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .subscription-detail-value .passed-indicator {
    color: white;
    font-weight: 600;
    font-size: 10px;
    background: var(--success);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--success);
  }
  
  .subscription-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    width: 100%;
  }
  
  .subscription-actions .btn {
    flex: 1 1 0;
    padding: 12px 8px;
    font-size: 15px;
    font-weight: 600;
    min-height: 44px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
  }
  
  .subscription-actions .delete-form {
    flex: 1 1 0;
    margin: 0;
    padding: 0;
    display: flex;
  }
  
  .subscription-actions .delete-form button {
    width: 100%;
    margin: 0;
    padding: 12px 8px;
    font-size: 15px;
    font-weight: 600;
    min-height: 44px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  
  .btn-edit {
    background: var(--primary);
    color: white;
  }
  
  .btn-edit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
  }
  
  .btn-delete {
    background: var(--danger);
    color: white;
  }
  
  .btn-delete:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
  }
}

/* iOS Mobile Table */
@media (max-width: 768px) {
  .table-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  [data-theme="dark"] .table-container {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 15px;
  }
  
  .table th,
  .table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
  }
  
  [data-theme="dark"] .table th,
  [data-theme="dark"] .table td {
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  }
  
  .table th {
    background: transparent;
    font-weight: 600;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .table td {
    color: var(--fg);
    font-weight: 400;
  }
  
  /* Due date cell with iOS styling */
  .due-date-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  
  .passed-indicator {
    color: var(--success);
    font-weight: 600;
    font-size: 12px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 8px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--success);
    animation: checkmark-pulse 2s ease-in-out infinite;
  }
  
  @keyframes checkmark-pulse {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.1);
      opacity: 0.8;
    }
  }
  
  [data-theme="dark"] .passed-indicator {
    background: rgba(52, 199, 89, 0.2);
    border-color: var(--success);
    color: var(--success);
  }
}

/* iOS Mobile Calendar */
@media (max-width: 768px) {
  .calendar-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0 40px 0; /* Add bottom margin for footer spacing */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  [data-theme="dark"] .calendar-container {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
  
  .calendar {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
  }
  
  .calendar th,
  .calendar td {
    padding: 8px 4px;
    font-size: 13px;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    text-align: center;
  }
  
  [data-theme="dark"] .calendar th,
  [data-theme="dark"] .calendar td {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
  }
  
  .calendar th {
    background: transparent;
    font-weight: 600;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .calendar td {
    height: 36px;
    vertical-align: top;
    position: relative;
  }
  
  .calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 36px;
    background: transparent;
    padding: 2px;
  }
  
  .calendar-day:hover {
    background: rgba(0, 122, 255, 0.1);
  }
  
  .calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
  }
  
  .calendar-day-number {
    display: block;
    font-weight: 500;
    margin: 0;
    color: inherit;
    line-height: 1;
  }
  
  .calendar-indicators {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
    margin-bottom: 0;
  }
  
  .subscription-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
  }
  
  .subscription-checkmark {
    color: var(--success);
    font-weight: 600;
    font-size: 10px;
    background: rgba(52, 199, 89, 0.1);
    border-radius: 6px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--success);
    margin: 1px auto 0;
    animation: checkmark-pulse 2s ease-in-out infinite;
  }
  
  .calendar-day.today .subscription-dot {
    border: 1px solid white;
  }
}

/* iOS Mobile Landing Page */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 20px;
    text-align: center;
    background: transparent;
    color: var(--fg);
    margin-bottom: 40px;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
  }
  
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }
  
  .ios-text-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 60px auto 16px auto;
  }
  
  [data-theme="dark"] .ios-text-container {
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .ios-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 16px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
  }
  
  .ios-description {
    font-size: 16px;
    font-weight: 400;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.2px;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 4; /* Ensure hero actions are above other elements */
    pointer-events: auto !important; /* Ensure container allows clicks */
  }
  
  .hero-actions .btn {
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 14px;
    min-width: 200px;
    max-width: 280px;
    width: 100%;
    position: relative;
    z-index: 1000 !important; /* High z-index to ensure buttons are above other elements */
    pointer-events: auto !important; /* Force buttons to be clickable */
    cursor: pointer !important; /* Ensure cursor shows as clickable */
    touch-action: manipulation; /* Optimize for touch */
  }
  
/* =============================================================================
   SIMPLE MOBILE BUTTON FIX - NATURAL LIKE DESKTOP
   ============================================================================= */

/* Simple mobile button fixes - make them work naturally like desktop */
@media (max-width: 768px) {
  /* Just ensure buttons are clickable and properly sized for mobile */
  .hero-actions a.btn,
  .hero-actions a.btn-primary,
  .hero-actions a.btn-secondary {
    display: block !important;
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto !important;
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 16px !important;
    min-height: 48px !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1000 !important;
  }
  
  .hero-actions a.btn-primary {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%) !important;
    color: white !important;
    border: none !important;
  }
  
  .hero-actions a.btn-secondary {
    background: var(--surface) !important;
    color: var(--fg) !important;
    border: 2px solid var(--border) !important;
  }
  
  /* Ensure child elements don't interfere */
  .hero-actions a.btn *,
  .hero-actions a.btn-primary *,
  .hero-actions a.btn-secondary * {
    pointer-events: none !important;
  }
}
  
  .hero-actions a.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4) !important;
    color: white !important;
  }
  
  .hero-actions a.btn-primary:active {
    transform: scale(0.98) !important;
  }
  
  .hero-actions a.btn-secondary:hover {
    background: var(--bg) !important;
    border-color: var(--primary) !important;
    color: var(--fg) !important;
    transform: translateY(-2px) !important;
  }
  
  .hero-actions a.btn-secondary:active {
    transform: scale(0.98) !important;
  }
  
  /* Ensure link functionality works for both buttons */
  .hero-actions a.btn-primary:link,
  .hero-actions a.btn-primary:visited,
  .hero-actions a.btn-primary:hover,
  .hero-actions a.btn-primary:active,
  .hero-actions a.btn-secondary:link,
  .hero-actions a.btn-secondary:visited,
  .hero-actions a.btn-secondary:hover,
  .hero-actions a.btn-secondary:active {
    text-decoration: none !important;
    color: inherit !important;
  }
  
  /* Desktop-like btn-icon functionality for mobile */
  .hero-actions .btn-icon {
    font-size: 18px !important;
    transition: transform 0.3s ease !important;
  }
  
  .hero-actions a.btn-primary:hover .btn-icon {
    transform: translateX(4px) !important; /* Match desktop icon animation */
  }
  
  /* Force clickable area - prevent child elements from blocking clicks */
  .hero-actions a.btn-primary *,
  .hero-actions a.btn-secondary * {
    pointer-events: none !important; /* Prevent child elements from blocking clicks */
  }
  
  /* Ensure btn-text and btn-icon are clickable through parent */
  .hero-actions .btn-text,
  .hero-actions .btn-icon {
    pointer-events: none !important;
    user-select: none !important;
  }
}


/* iOS Mobile Animations */
@media (max-width: 768px) {
  @keyframes slideInFromRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideInFromBottom {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .card {
    animation: slideInFromBottom 0.3s ease-out;
  }
  
  .nav-group.active {
    animation: slideInFromRight 0.3s ease-out;
  }
  
  /* iOS-style button press animation */
  .btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
  }
  
  /* iOS-style card hover */
  .card:hover {
    transform: translateY(-4px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Desktop/Mobile View Controls */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }
}

/* Dark theme adjustments */
[data-theme="dark"] .main-container {
  background: transparent;
}

/* Mobile responsive for main page */
@media (max-width: 768px) {
  .main-container {
    padding: 0;
    margin: 0;
    width: 100%;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1; /* Ensure proper stacking context */
    overflow: visible; /* Ensure content is not clipped */
    padding-top: 0; /* Remove all top padding to move content closer to header */
  }
  
  .main-container .hero-section {
    flex: 1;
    display: flex;
    align-items: flex-start; /* Change from center to flex-start to move content up */
    justify-content: center;
    padding: 0; /* Remove all padding to move content closer to header */
    position: relative;
    z-index: 2; /* Ensure hero section is above other elements */
    padding-top: 5px; /* Minimal top padding */
  }
  
  .hero-content {
    padding: 4px 12px; /* Further reduced padding to move content closer to header */
    border-radius: 20px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3; /* Ensure hero content is above other elements */
  }
  
  .icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
  
  .icon-symbol {
    font-size: 24px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-description {
    font-size: 18px;
    margin-bottom: 20px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
  }
}

/* =============================================================================
   UPGRADE PAGE STYLING
   ============================================================================= */

.upgrade-container {
  min-height: auto;
  background: var(--bg-primary);
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-content {
  max-width: 1000px;
  width: 100%;
  text-align: center;
}

.upgrade-header {
  margin-bottom: 40px;
}

.upgrade-icon {
  margin-bottom: 20px;
}

.upgrade-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.upgrade-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.pricing-card {
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  border: 2px solid var(--border-color);
}

.pricing-header {
  margin-bottom: 32px;
}

.pricing-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.currency {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.amount {
  font-size: 48px;
  font-weight: 700;
  color: #007aff;
}

.plan-card .amount {
  font-size: 48px !important;
  font-weight: 700 !important;
}

.price .amount {
  font-size: 48px !important;
  font-weight: 700 !important;
}

/* Force Pro Plan dollar sign to be large */
.pro-plan .price .amount {
  font-size: 48px !important;
  font-weight: 700 !important;
  color: #007aff !important;
}

/* Force Free Plan text to be large */
.free-plan .price .amount {
  font-size: 48px !important;
  font-weight: 700 !important;
  color: #007aff !important;
}

/* Additional specificity for dollar sign */
.pro-plan .price .amount:first-child {
  font-size: 48px !important;
  font-weight: 700 !important;
  color: #007aff !important;
}

.period {
  font-size: 18px;
  color: var(--text-secondary);
}

.features-list {
  margin-bottom: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  min-height: 35px;
}

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


.feature-text {
  font-size: 22px;
  color: var(--text-primary);
  font-weight: 500;
}


.upgrade-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 20px 32px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.upgrade-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.3);
}

.upgrade-btn:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.upgrade-btn:hover .btn-icon {
  transform: translateX(4px);
}

.upgrade-note {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.upgrade-benefits {
  margin-top: 48px;
}

.upgrade-benefits h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.upgrade-benefits .benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.upgrade-benefits .benefit-item {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border-color);
  text-align: center;
  display: block !important;
}

.upgrade-benefits .benefit-item h4 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.upgrade-benefits .benefit-item p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Dark theme adjustments */
[data-theme="dark"] .upgrade-container {
  background: transparent;
}

/* Remove background colors for analytics page in dark theme */
[data-theme="dark"] .analytics-container {
  background: transparent;
}

[data-theme="dark"] .current-limits {
  background: #3d2f00;
  border-color: #6c5ce7;
}

[data-theme="dark"] .current-limits h3 {
  color: #fdcb6e;
}

[data-theme="dark"] .limit-text {
  color: #fdcb6e;
}

/* New Plans Grid Layout */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.plan-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px var(--shadow);
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.pro-plan {
  border: 2px solid var(--primary);
  transform: scale(1.05);
}

.pro-plan::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.plan-header {
  margin-bottom: 20px;
}

.plan-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.plan-limits {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
}

.limit-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

.plan-benefits {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
}

.benefit-text {
  font-size: 16px;
  color: var(--primary);
  margin: 0;
  font-weight: 600;
}

.plan-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 20px 32px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.free-btn {
  background: var(--surface);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.pro-btn {
  background: var(--primary);
  color: white;
}

.pro-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.3);
}

.pro-btn:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile responsive for upgrade page */
@media (max-width: 768px) {
  .upgrade-container {
    padding: 20px 16px;
  }
  
  .upgrade-content {
    padding: 24px;
  }
  
  .upgrade-title {
    font-size: 28px;
  }
  
  .upgrade-subtitle {
    font-size: 16px;
  }
  
  .pricing-card {
    padding: 24px;
    overflow: visible !important;
  }
  
  .amount {
    font-size: 36px;
  }
  
  .plans-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .pro-plan {
    transform: none;
  }
  
  .upgrade-benefits .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   TIER STATUS STYLING
   ============================================================================= */

.tier-status-container {
  margin: -8px 0 0 0;
}

.tier-status-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 12px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tier-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tier-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-badge.free {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

.tier-badge.pro {
  background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  color: white;
  border: 1px solid #007aff;
}

.tier-details {
  flex: 1;
  text-align: center;
}

.tier-details h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.tier-details p {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.upgrade-prompt {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.upgrade-prompt p {
  margin: 0 0 12px 0;
  color: #856404;
  font-weight: 500;
}

.upgrade-suggestion {
  margin-top: 12px;
}

.upgrade-suggestion p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.upgrade-suggestion a {
  color: #007aff;
  text-decoration: none;
  font-weight: 500;
}

.upgrade-suggestion a:hover {
  text-decoration: underline;
}

/* Dark theme adjustments */
[data-theme="dark"] .tier-badge.free {
  background: #1a237e;
  color: #90caf9;
  border-color: #3f51b5;
}

[data-theme="dark"] .upgrade-prompt {
  background: #3d2f00;
  border-color: #6c5ce7;
}

[data-theme="dark"] .upgrade-prompt p {
  color: #fdcb6e;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .tier-info {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .tier-status-card {
    padding: 10px;
  }
  
  .tier-details h3 {
    font-size: 22px;
  }
  
  .tier-details p {
    font-size: 16px;
  }
}

/* Contact Form Textarea Styling */
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Dark theme textarea */
[data-theme="dark"] textarea {
  background-color: #2c2c2e;
  border-color: #3a3a3c;
  color: #ffffff;
}

[data-theme="dark"] textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

[data-theme="dark"] textarea::placeholder {
  color: #8e8e93;
}

/* Contact Page Styling */
.contact-page {
  max-width: 600px !important; /* Better width for contact form */
  padding: 40px 20px;
}

.contact-page .auth-card {
  max-width: 100%;
  margin: 0 auto;
}

.contact-intro {
  text-align: center;
  margin-bottom: 40px;
}

.contact-intro h3 {
  color: var(--fg);
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

/* Responsive contact form improvements */
.contact-page .auth-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.contact-page .auth-card textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact form specific styling */
.contact-form-card .form {
  max-width: 100%;
  gap: 28px;
}

/* Contact form button centering for desktop */
.contact-form-card .btn {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
  text-align: center;
}

.contact-form-card label {
  display: block;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
}

.contact-form-card input[type="email"],
.contact-form-card input[type="text"] {
  width: 100%;
  padding: 20px;
  font-size: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--fg);
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.contact-form-card textarea {
  width: 100%;
  padding: 20px;
  font-size: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--fg);
  box-sizing: border-box;
  resize: vertical;
  min-height: 140px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Dark theme contact form */
[data-theme="dark"] .contact-form-card input[type="email"],
[data-theme="dark"] .contact-form-card input[type="text"],
[data-theme="dark"] .contact-form-card textarea {
  background-color: #2c2c2e;
  border-color: #3a3a3c;
  color: #ffffff;
}

[data-theme="dark"] .contact-form-card input:focus,
[data-theme="dark"] .contact-form-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}


/* Mobile responsive contact page */
@media (max-width: 768px) {
  .contact-page {
    max-width: 100% !important;
    padding: 20px 16px;
  }
  
  .contact-page .auth-card {
    padding: 24px;
  }
  
  .contact-intro h3 {
    font-size: 28px;
  }
  
  .contact-page .auth-card label {
    font-size: 16px;
  }
  
  .contact-page .auth-card input[type="email"],
  .contact-page .auth-card input[type="text"],
  .contact-page .auth-card textarea {
    font-size: 16px;
    padding: 16px;
  }
  
  .contact-page .auth-card .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    text-align: center;
  }
  
  
  /* Mobile container optimization */
  .container {
    padding: 20px 16px;
    max-width: 100%;
    min-height: calc(100vh - 140px);
  }
  
  .centered {
    padding: 20px 16px;
    gap: 20px;
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    min-height: calc(100vh - 140px);
  }
  
  /* Mobile form optimization */
  .form {
    gap: 20px;
    max-width: 100%;
  }
  
  .form input,
  .form textarea,
  .form select {
    font-size: 16px;
    padding: 16px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Mobile button optimization */
  .btn {
    font-size: 16px;
    padding: 16px 24px;
    border-radius: 12px;
    min-height: 48px;
    touch-action: manipulation;
  }
  
  /* Mobile search optimization */
  .search-container {
    margin-bottom: 20px;
  }
  
  .search-container input {
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 12px;
  }
  
  /* Mobile calendar optimization */
  .calendar-container {
    margin: 24px 0 40px 0; /* Add bottom margin for footer spacing */
    padding: 16px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
  }
  
  .calendar-header {
    margin-bottom: 16px;
  }
  
  .calendar-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
  }
  
  .calendar-nav {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .calendar-nav:hover {
    background: var(--surface);
    transform: translateY(-1px);
  }
  
  .calendar-grid {
    width: 100%;
  }
  
  .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
  }
  
  .weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  
  .calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 40px;
    background: var(--surface);
    padding: 2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  .calendar-day:hover {
    background: var(--bg);
    transform: translateY(-1px);
  }
  
  .calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
  }
  
  .calendar-day.has-subscription {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.3);
  }
  
  .calendar-day.paid {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
  }
  
  .calendar-day.paid::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: #28a745;
    font-weight: bold;
  }
  
  .subscription-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 1px;
    display: inline-block;
  }
  
  /* Mobile flash messages */
  .flash-list {
    margin: 16px 0;
  }
  
  .flash {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 8px;
  }
}

/* Desktop navigation - hide hamburger menu */
@media (min-width: 769px) {
  .hamburger-menu {
    display: none;
  }
  
  .nav-group {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: row;
    gap: 8px;
    box-shadow: none;
    align-items: center;
  }
  
  .nav-group a {
    padding: 0;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: var(--fg);
    transition: color 0.2s ease;
  }
  
  .nav-group a:hover {
    background: transparent;
    color: var(--primary);
    transform: none;
  }
  
  .theme-toggle {
    position: static;
    top: auto;
    right: auto;
  }
  
  /* Desktop calendar indicators */
  .subscription-checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #28a745;
    margin: 1px auto 0;
    animation: checkmark-pulse 2s ease-in-out infinite;
  }
  
  .subscription-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
  }
  
  .calendar-indicators {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
    margin-bottom: 0;
  }
  
  .calendar-day-number {
    display: block;
    font-weight: 600;
    margin: 0;
    color: var(--fg);
    line-height: 1;
  }
}

/* Navigation tier badge styles removed - no longer needed */

/* MOBILE SCROLLING FIX - MOBILE ONLY */
@media (max-width: 767px) {
  /* Basic mobile scrolling optimization */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Fix main-page class for mobile */
  body.main-page {
    height: auto !important;
    overflow: visible !important;
    overflow-y: auto !important;
  }
  
  /* Ensure main container allows scrolling */
  main.container {
    overflow: visible !important;
  }
  
  /* Fix specific page containers */
  .analytics-container,
  .upgrade-container,
  .account-page .centered,
  .contact-page {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  /* Optimize scrolling performance */
  .chart-container,
  .plans-grid,
  .account-sections-grid,
  .contact-form-card {
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* DESKTOP ANALYTICS RESTORE - ORIGINAL LAYOUT */
@media (min-width: 769px) {
  .chart-container {
    padding: 24px !important;
    margin-bottom: 30px !important;
  }
  
  .chart-wrapper {
    height: 800px !important;
    margin: 0 !important;
  }
  
  .chart-header h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
  }
  
  /* Desktop analytics summary - side by side cards */
  .analytics-summary {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
  }
  
  .summary-card {
    margin-bottom: 0 !important;
  }
  
  /* Desktop color customization - iOS-inspired buttons */
  .color-customization {
    padding: 20px !important;
    background: var(--surface) !important;
    border-radius: 16px !important;
    border: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  }
  
  .color-customization h3 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    color: var(--fg) !important;
    letter-spacing: -0.01em !important;
  }
  
  .color-picker-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
    max-width: 900px !important;
    margin: 0 auto !important;
  }
  
  .color-picker-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 20px !important;
    background: var(--bg) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 25px !important;
    width: auto !important;
    min-width: 120px !important;
    max-width: 180px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    gap: 10px !important;
  }
  
  .color-picker-item::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }
  
  .color-picker-item:hover {
    background: var(--surface) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  
  .color-picker-item:hover::before {
    opacity: 1 !important;
  }
  
  .color-picker-item:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15) !important;
  }
  
  .color-picker-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-align: center !important;
    color: var(--fg) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  
  .color-picker-input {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  
  .color-picker-input::before {
    content: '' !important;
    position: absolute !important;
    top: -1px !important;
    left: -1px !important;
    right: -1px !important;
    bottom: -1px !important;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
  }
  
  .color-picker-input:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 1) !important;
  }
  
  .color-picker-input:hover::before {
    opacity: 1 !important;
  }
  
  .color-picker-input:active {
    transform: scale(1.1) !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25) !important;
  }
}

/* DESKTOP CARDS LAYOUT - 2x2 GRID */
@media (min-width: 769px) {
  .cards {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 32px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* MOBILE NAV-GROUP LINKS AND BUTTONS - MOBILE ONLY */
@media (max-width: 767px) {
  .nav-group a,
  .nav-group .nav-button {
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    z-index: 1001 !important;
    position: relative !important;
    -webkit-tap-highlight-color: rgba(0, 122, 255, 0.3) !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
  }
  
  .nav-group a:active,
  .nav-group .nav-button:active {
    background: rgba(0, 122, 255, 0.1) !important;
    transform: none !important;
  }
  
  /* Make nav-button look exactly like nav links */
  .nav-group .nav-button {
    padding: 16px 24px !important;
    border: none !important;
    background: transparent !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    text-align: left !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    color: var(--fg) !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
    font-family: inherit !important;
  }
}

/* Desktop calendar styling - Force override with !important */
@media (min-width: 769px) {
  .calendar-day {
    font-size: 32px !important;
    min-height: 70px !important;
    padding: 10px !important;
  }
  
  .calendar-day.today {
    font-size: 34px !important;
  }
  
  .weekday {
    font-size: 18px !important;
    padding: 14px 4px !important;
  }
  
  .calendar-header h4 {
    font-size: 28px !important;
  }
  
/* Auto-close mobile menu when links are clicked */
@media (max-width: 768px) {
  .nav-group a {
    display: block;
    transition: all 0.3s ease;
  }
  
  .nav-group a:active {
    background-color: rgba(0, 0, 0, 0.1);
  }
  
  /* Ensure menu closes when navigating */
  .nav-group a:focus {
    outline: none;
  }
}

