/* TripDraft Design System */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0f1a;
  --surface: #111827;
  --surface-2: #1a2236;
  --surface-3: #1f2a3f;
  --accent: #22d3ee;
  --accent-warm: #f59e0b;
  --accent-green: #34d399;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #f8fafc;
  --border: rgba(255,255,255,0.06);
  --border-accent: rgba(34,211,238,0.2);
  --danger: #f87171;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Ambient glow */
.glow-top {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(34,211,238,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.glow-right {
  position: fixed;
  top: 40%;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Nav */
nav {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

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

.btn-primary:hover {
  background: #06b6d4;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34,211,238,0.3);
}

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

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

.btn-warm {
  background: var(--accent-warm);
  color: var(--bg);
}

.btn-warm:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.card:hover {
  border-color: var(--border-accent);
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tags / Chips */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.tag-warm {
  color: var(--accent-warm);
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.2);
}

/* Loading */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,26,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  gap: 24px;
}

.loading-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  color: var(--text-bright);
}

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

.pulse-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Page header */
.page-header {
  position: relative;
  z-index: 1;
  padding: 48px 0 32px;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Proposal list */
.proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.proposal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.proposal-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.proposal-card h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 8px;
  line-height: 1.3;
}

.proposal-card .meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.proposal-card .destination {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
}

.proposal-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proposal-status.ready { background: rgba(52,211,153,0.15); color: var(--accent-green); }
.proposal-status.generating { background: rgba(34,211,238,0.15); color: var(--accent); }
.proposal-status.error { background: rgba(248,113,113,0.15); color: var(--danger); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 32px;
}

.empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Proposal view */
.proposal-hero {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.proposal-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.proposal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}

.proposal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proposal-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.proposal-meta-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.95rem;
}

.proposal-summary {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 700px;
}

/* Day cards */
.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
}

.day-card:hover {
  border-color: var(--border-accent);
}

.day-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.day-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(34,211,238,0.3);
  line-height: 1;
  min-width: 50px;
}

.day-title {
  font-size: 1.15rem;
  color: var(--text-bright);
}

.day-theme {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 2px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 66px;
}

.activity {
  position: relative;
  padding-left: 20px;
}

.activity::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-name {
  font-weight: 500;
  color: var(--text-bright);
  margin: 2px 0;
}

.activity-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Pricing */
.pricing-section {
  margin-top: 48px;
}

.pricing-section h2 {
  font-size: 1.5rem;
  color: var(--text-bright);
  margin-bottom: 24px;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pricing-table th,
.pricing-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.pricing-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-table td {
  font-size: 0.95rem;
  color: var(--text);
}

.pricing-table .total-row td {
  border-top: 2px solid var(--border-accent);
  border-bottom: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-bright);
  padding-top: 20px;
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
  font-style: italic;
}

/* Highlights */
.highlights-section {
  margin-top: 48px;
}

.highlights-section h2 {
  font-size: 1.5rem;
  color: var(--text-bright);
  margin-bottom: 24px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.highlight-card h4 {
  color: var(--text-bright);
  font-size: 1rem;
  margin-bottom: 6px;
}

.highlight-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Actions bar */
.actions-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,15,26,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.actions-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.actions-bar .logo {
  font-size: 1.1rem;
}

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

/* Footer */
footer {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
}

footer .logo { font-size: 1.1rem; }
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* Alert/Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-color: rgba(52,211,153,0.3); }
.toast.error { border-color: rgba(248,113,113,0.3); }

/* Responsive */
@media (max-width: 640px) {
  .container, .container-wide { padding: 0 20px; }
  nav { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .activity-list { padding-left: 24px; }
  .proposal-meta { gap: 16px; }
  footer { flex-direction: column; gap: 12px; padding: 24px 20px; }
  .actions-bar-inner { padding: 0 20px; }
  .actions-right { gap: 6px; }
  .btn { padding: 10px 18px; font-size: 0.85rem; }
  .proposal-grid { grid-template-columns: 1fr; }
}

/* Print / PDF */
@media print {
  .glow-top, .glow-right, .actions-bar, nav, footer, .btn, .no-print { display: none !important; }
  body { background: white; color: #1a1a1a; }
  .card, .day-card, .highlight-card { border: 1px solid #e5e5e5; background: white; }
  .proposal-hero h1 { color: #1a1a1a; }
  .proposal-meta-value { color: #1a1a1a; }
  .day-title { color: #1a1a1a; }
  .activity-name { color: #1a1a1a; }
  .highlight-card h4 { color: #1a1a1a; }
  .pricing-table .total-row td { color: #1a1a1a; }
  a { color: #1a1a1a; }
}
