/* WeddingBudget Styles */
* { box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: 150ms ease;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  font-weight: 700;
}

header .tagline {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

nav {
  margin-top: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  font-weight: 500;
}

nav a:hover,
nav a:focus {
  background: rgba(255,255,255,0.1);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  margin-top: 0;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.section h3 {
  color: var(--text);
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.input-group input[type="number"] {
  width: 100%;
  max-width: 300px;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition);
}

.input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
}

.help-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--card-shadow);
}

.category-card label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.category-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition);
}

.category-input:focus {
  outline: none;
  border-color: var(--primary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  width: 0%;
  transition: width var(--transition);
}

.summary-bar {
  display: flex;
  justify-content: space-between;
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 500;
}

.remaining {
  color: var(--danger);
}

.remaining.positive {
  color: var(--success);
}

.vendor-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.primary-btn, .secondary-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
  font-size: 1rem;
}

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

.primary-btn:hover,
.primary-btn:focus {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.secondary-btn:hover,
.secondary-btn:focus {
  background: var(--bg-alt);
}

.vendor-table, #scheduleTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.vendor-table th,
.vendor-table td,
#scheduleTable th,
#scheduleTable td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vendor-table th,
#scheduleTable th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
}

.vendor-table tr:last-child td,
#scheduleTable tr:last-child td {
  border-bottom: none;
}

.vendor-table input,
.vendor-table select,
#scheduleTable input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: white;
  transition: border-color var(--transition);
}

.vendor-table input:focus,
.vendor-table select:focus,
#scheduleTable input:focus {
  outline: none;
  border-color: var(--primary);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-pending {
  background: var(--bg-alt);
  color: var(--secondary);
}

.status-booked {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-paid {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.vendor-summary {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.vendor-summary strong {
  color: var(--primary);
}

.schedule-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.preset-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.preset-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1.1rem;
}

.preset-card ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.apply-preset {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.apply-preset:hover,
.apply-preset:focus {
  background: var(--primary-dark);
}

.tip-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.tip-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.tip-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

footer {
  background: var(--bg-alt);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.75rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .summary-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .vendor-summary {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  nav a {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem 1rem;
  }

  .section {
    margin-bottom: 1.5rem;
  }

  .primary-btn, .secondary-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
