:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  
  /* Modern Translucent Palette */
  --bg-canvas: #f2f5fa;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-card: rgba(255, 255, 255, 0.78);
  --bg-glass-card-hover: rgba(255, 255, 255, 0.92);
  --bg-glass-input: rgba(255, 255, 255, 0.6);
  --bg-glass-pill: rgba(255, 255, 255, 0.85);

  --text-main: #0f172a;
  --text-muted: #526079;
  --text-dim: #7f8fa4;

  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-border-subtle: rgba(226, 232, 240, 0.8);
  --glass-border-highlight: rgba(255, 255, 255, 0.95);
  
  --shadow-liquid-sm: 0 2px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-liquid-md: 0 12px 32px -4px rgba(31, 38, 135, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --shadow-liquid-lg: 0 20px 48px -6px rgba(15, 23, 42, 0.12), 0 8px 24px -4px rgba(0, 0, 0, 0.06);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --spring-easing: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--spring-easing);
  --transition-smooth: 0.35s var(--spring-easing);
  --transition-slow: 0.6s var(--spring-easing);

  /* Default Dynamic Accent: Violet / Indigo */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  --glow-color: rgba(99, 102, 241, 0.25);
  --mesh-orb-1: rgba(99, 102, 241, 0.18);
  --mesh-orb-2: rgba(219, 39, 119, 0.15);
  --mesh-orb-3: rgba(245, 158, 11, 0.12);

  --urgent-red: #e11d48;
  --urgent-red-bg: rgba(254, 226, 226, 0.8);
  --success-green: #059669;
  --success-green-bg: rgba(209, 250, 229, 0.8);
}

/* Event Theme Overrides: Wedding */
body[data-theme="wedding"] {
  --accent-primary: #e11d48;
  --accent-primary-hover: #be123c;
  --accent-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 40%, #fbbf24 100%);
  --glow-color: rgba(225, 29, 72, 0.22);
  --mesh-orb-1: rgba(244, 63, 94, 0.2);
  --mesh-orb-2: rgba(251, 191, 36, 0.16);
  --mesh-orb-3: rgba(236, 72, 153, 0.15);
}

/* Event Theme Overrides: Birthday */
body[data-theme="birthday"] {
  --accent-primary: #8b5cf6;
  --accent-primary-hover: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
  --glow-color: rgba(139, 92, 246, 0.25);
  --mesh-orb-1: rgba(139, 92, 246, 0.22);
  --mesh-orb-2: rgba(249, 115, 22, 0.18);
  --mesh-orb-3: rgba(236, 72, 153, 0.18);
}

/* Event Theme Overrides: Community */
body[data-theme="community"] {
  --accent-primary: #059669;
  --accent-primary-hover: #047857;
  --accent-gradient: linear-gradient(135deg, #059669 0%, #0284c7 50%, #eab308 100%);
  --glow-color: rgba(5, 150, 105, 0.22);
  --mesh-orb-1: rgba(5, 150, 105, 0.2);
  --mesh-orb-2: rgba(2, 132, 199, 0.18);
  --mesh-orb-3: rgba(234, 179, 8, 0.16);
}

/* Dark Mode Liquid Glass */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-canvas: #060911;
    --bg-glass: rgba(18, 24, 38, 0.72);
    --bg-glass-card: rgba(23, 31, 48, 0.76);
    --bg-glass-card-hover: rgba(29, 39, 60, 0.88);
    --bg-glass-input: rgba(15, 21, 34, 0.75);
    --bg-glass-pill: rgba(30, 41, 59, 0.85);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-border-subtle: rgba(255, 255, 255, 0.08);
    --glass-border-highlight: rgba(255, 255, 255, 0.22);

    --shadow-liquid-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-liquid-md: 0 16px 40px -4px rgba(0, 0, 0, 0.55);
    --shadow-liquid-lg: 0 24px 64px -6px rgba(0, 0, 0, 0.75);

    --mesh-orb-1: rgba(99, 102, 241, 0.24);
    --mesh-orb-2: rgba(219, 39, 119, 0.2);
    --mesh-orb-3: rgba(245, 158, 11, 0.14);

    --urgent-red-bg: rgba(127, 29, 29, 0.5);
    --success-green-bg: rgba(20, 83, 45, 0.5);
  }

  body[data-theme="wedding"] {
    --mesh-orb-1: rgba(225, 29, 72, 0.26);
    --mesh-orb-2: rgba(251, 191, 36, 0.18);
    --mesh-orb-3: rgba(244, 63, 94, 0.2);
  }

  body[data-theme="birthday"] {
    --mesh-orb-1: rgba(139, 92, 246, 0.28);
    --mesh-orb-2: rgba(249, 115, 22, 0.2);
    --mesh-orb-3: rgba(236, 72, 153, 0.22);
  }

  body[data-theme="community"] {
    --mesh-orb-1: rgba(5, 150, 105, 0.26);
    --mesh-orb-2: rgba(2, 132, 199, 0.24);
    --mesh-orb-3: rgba(234, 179, 8, 0.18);
  }
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-slow);
}

/* Ambient Liquid Mesh Glow (Apple iOS Wallpaper Style) */
body::before {
  content: "";
  position: fixed;
  top: -15%;
  left: -10%;
  width: 65vw;
  height: 65vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mesh-orb-1) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
  transition: all var(--transition-slow);
  animation: floatAmbient1 20s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mesh-orb-2) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: -2;
  transition: all var(--transition-slow);
  animation: floatAmbient2 24s ease-in-out infinite alternate;
}

@keyframes floatAmbient1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6vw, 8vh) scale(1.1); }
}

@keyframes floatAmbient2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-8vw, -6vh) scale(1.12); }
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 10px 20px;
  z-index: 999;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-liquid-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

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

/* Header & Glass Nav */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-liquid-sm);
  transition: all var(--transition-smooth);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 4px 12px var(--glow-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass-pill);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.header-badge .theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

/* Main Studio Layout */
.app-main {
  padding: 40px 0 96px 0;
}

.page-intro {
  margin-bottom: 36px;
}

.page-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-main) 60%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 820px;
  line-height: 1.6;
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-liquid-md);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--glass-border-highlight) 50%, transparent 100%);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Glass Form Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 32px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-glass-input);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--glow-color), inset 0 1px 2px rgba(0, 0, 0, 0.04);
  background-color: var(--bg-glass-card);
}

/* Buttons & iOS Segmented Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  user-select: none;
}

.btn:active {
  transform: scale(0.975);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--glow-color);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 8px 24px var(--glow-color);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-large {
  padding: 15px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-glass {
  background: var(--bg-glass-pill);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-liquid-sm);
}

.btn-glass:hover:not(:disabled) {
  background: var(--bg-glass-card-hover);
  border-color: var(--glass-border-highlight);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--bg-glass-pill);
  color: var(--text-main);
}

.btn-danger {
  color: var(--urgent-red);
  background: var(--urgent-red-bg);
  border-color: rgba(225, 29, 72, 0.2);
}

/* Alerts */
.alert-banner {
  padding: 16px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  margin-bottom: 28px;
  backdrop-filter: blur(16px);
}

.alert-error {
  background-color: var(--urgent-red-bg);
  color: var(--urgent-red);
  border: 1px solid rgba(225, 29, 72, 0.4);
}

/* Loading Glass Box */
.loading-box {
  background: var(--bg-glass-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  box-shadow: var(--shadow-liquid-lg);
  margin-bottom: 36px;
  animation: fadeIn 0.4s var(--spring-easing);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--glass-border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
  margin: 0 auto 24px auto;
  box-shadow: 0 0 16px var(--glow-color);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.loading-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.loading-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Blueprint Header Bar */
.blueprint-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--glass-border-subtle);
}

.blueprint-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.blueprint-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blueprint-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Summary Card */
.summary-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-liquid-md);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s var(--spring-easing);
}

.summary-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.summary-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 12px 0 14px 0;
  letter-spacing: -0.01em;
}

.summary-text {
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.75;
  margin-bottom: 24px;
}

.summary-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-pill {
  background: var(--bg-glass-pill);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-liquid-sm);
}

/* Section Containers */
.budget-section,
.timeline-section,
.vendors-section,
.ideas-section,
.risks-section,
.rfp-section {
  background: var(--bg-glass-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-liquid-md);
  animation: fadeIn 0.45s var(--spring-easing);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.count-badge, .total-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass-pill);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  box-shadow: var(--shadow-liquid-sm);
}

/* Accessible Semantic Budget Table */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--bg-glass-card);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.budget-table th,
.budget-table td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.budget-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-glass-input);
  border-bottom: 1px solid var(--glass-border);
}

.budget-table tbody th {
  font-weight: 600;
  color: var(--text-main);
}

.budget-col-share {
  min-width: 8.5rem;
  white-space: nowrap;
}

/* Native <meter> elements: width is calculated natively by browser from value attribute */
.budget-meter {
  appearance: none;
  display: inline-block;
  inline-size: 4.5rem;
  block-size: 0.5rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.budget-meter::-webkit-meter-bar {
  block-size: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.budget-meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: var(--accent-primary);
}

.budget-meter::-moz-meter-bar {
  border-radius: 999px;
  background: var(--accent-primary);
}

.budget-share-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.budget-col-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-main);
}

.budget-col-tip {
  color: var(--text-muted);
  font-size: 0.88rem;
  min-width: 13rem;
  line-height: 1.4;
}

.budget-table tfoot th,
.budget-table tfoot td {
  font-weight: 800;
  background: var(--bg-glass-input);
  border-bottom: 0;
  color: var(--text-main);
}

/* Timeline */
.timeline-month-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 3px solid var(--accent-primary);
}

.timeline-list {
  list-style: none;
  border-left: 2px solid var(--glass-border);
  margin-left: 16px;
  padding-left: 24px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-marker {
  position: absolute;
  left: -31px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  border: 3px solid var(--bg-canvas);
  box-shadow: 0 0 10px var(--glow-color);
}

.timeline-item-urgent .timeline-marker {
  background-color: var(--urgent-red);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.4);
}

.timeline-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
}

.badge-urgent {
  background-color: var(--urgent-red-bg);
  color: var(--urgent-red);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.timeline-task {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-details {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Vendors */
.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.vendor-card {
  background: var(--bg-glass-card-hover);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: all var(--transition-fast);
}

.vendor-card-done {
  opacity: 0.6;
  background: var(--bg-glass-input);
}

.vendor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.vendor-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.vendor-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.vendor-category-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.vendor-deadline {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.vendor-look-for {
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.vendor-questions {
  font-size: 0.88rem;
}

.questions-list {
  padding-left: 20px;
  margin-top: 8px;
  color: var(--text-muted);
}

.questions-list li {
  margin-bottom: 5px;
}

/* Ideas Grid */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.idea-card {
  background: var(--bg-glass-card-hover);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.idea-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-liquid-sm);
}

.idea-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.idea-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.idea-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.idea-reason {
  background: var(--bg-glass-pill);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Risks Grid */
.risks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.risk-card {
  background: var(--bg-glass-card-hover);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.risk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.risk-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.impact-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.impact-high {
  background-color: var(--urgent-red-bg);
  color: var(--urgent-red);
}

.impact-medium {
  background-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.impact-low {
  background-color: var(--success-green-bg);
  color: var(--success-green);
}

.risk-mitigation {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* RFP Section */
.rfp-preview {
  background: var(--bg-glass-card-hover);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.rfp-subject {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.rfp-inquiries {
  padding-left: 20px;
  margin: 14px 0;
}

/* Refinement Section */
.refine-card {
  border-color: var(--accent-primary);
  box-shadow: 0 0 32px var(--glow-color);
}

.refine-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.refine-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.refine-input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.refine-input-group .form-input {
  flex: 1 1 320px;
}

/* History Modal / Drawer (iOS Slide-over Sheet) */
.history-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.history-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.history-drawer {
  width: 100%;
  max-width: 460px;
  height: 100%;
  background: var(--bg-glass-card);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow-liquid-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  overflow-y: auto;
}

.history-modal-backdrop.open .history-drawer {
  transform: translateX(0);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.history-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
  overflow-y: auto;
}

.history-item-card {
  background: var(--bg-glass-pill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.history-item-card:hover {
  background: var(--bg-glass-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-liquid-sm);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.history-item-type {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.history-item-date {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.history-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.history-item-budget {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
}

.history-item-actions {
  display: flex;
  gap: 8px;
}

.history-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.history-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--glass-border);
  padding: 32px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
}

/* Accessible Field Error Indicators */
.field-error {
  color: #ef4444;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 0.35rem;
  line-height: 1.3;
}

.field-error:empty {
  display: none;
}

.form-input[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

/* History Drawer Footer */
.history-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* Print Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body::before, body::after,
  .skip-link,
  .app-header,
  .form-card,
  .blueprint-actions,
  .refine-card,
  .app-footer,
  .alert-banner,
  .loading-box,
  .history-modal-backdrop {
    display: none !important;
  }

  .summary-card,
  .budget-section,
  .timeline-section,
  .vendors-section,
  .ideas-section,
  .risks-section,
  .rfp-section {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    background: #ffffff !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 24px !important;
  }
}
