/* ============================================
   CrewBoard — Custom CSS
   Dark-first design with CSS custom properties
   ============================================ */

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

/* --- CSS Custom Properties (Dark theme default) --- */
:root {
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-border: #334155;
  --color-shadow: rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: "SF Mono", "Fira Code", monospace;
}

[data-theme="light"] {
  --color-bg-primary: #f1f5f9;
  --color-bg-secondary: #ffffff;
  --color-bg-tertiary: #e2e8f0;
  --color-text-primary: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #cbd5e1;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

/* --- Typography --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }

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

.text-secondary { color: var(--color-text-secondary); }
.text-sm { font-size: 0.875rem; }

/* --- Navbar --- */
.navbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 56px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand { margin-right: auto; }

.navbar-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-tenant {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.navbar-links {
  display: flex;
  gap: 0.5rem;
}

.navbar-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.navbar-link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
  text-decoration: none;
}
.navbar-link.active {
  color: var(--color-accent);
  background: rgba(59, 130, 246, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--color-text-primary);
  font-size: 1.125rem;
}
.theme-toggle:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
  line-height: 1.5;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

.btn-secondary {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-bg-primary);
  text-decoration: none;
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

.btn-full { width: 100%; justify-content: center; }
.btn-disabled { opacity: 0.5; pointer-events: none; cursor: default; }

/* --- Forms --- */
.form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1rem;
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.form-row {
  display: flex;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* --- Alerts --- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-accent {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-accent);
}
.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-success);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}
.badge-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: var(--color-text-secondary);
}

/* --- Tables --- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr {
  transition: background var(--transition);
}
.table tbody tr:hover {
  background: var(--color-bg-tertiary);
}
.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

/* --- Main Content --- */
.main-content {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Cards --- */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  transition: width 0.4s ease;
}
.progress-bar-fill.progress-bar-success { background: var(--color-success); }
.progress-bar-fill.progress-bar-warning { background: var(--color-warning); }
.progress-bar-fill.progress-bar-accent { background: var(--color-accent); }
.progress-bar-fill.progress-bar-secondary { background: var(--color-text-muted); }

.progress-bar-sm {
  width: 80px;
  height: 4px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}
.progress-bar-sm .progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

/* --- Avatars --- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  transition: all var(--transition);
  position: relative;
  flex-shrink: 0;
}
.avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--color-bg-primary), 0 0 0 5px var(--color-accent);
}
.avatar.dragging {
  opacity: 0.4;
  transform: scale(0.9);
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.6875rem;
  cursor: default;
}
.avatar-sm:hover {
  transform: none;
  box-shadow: none;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-initials {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* Color variety for avatars */
.avatar:nth-child(6n+1) { background: #3b82f6; }
.avatar:nth-child(6n+2) { background: #8b5cf6; }
.avatar:nth-child(6n+3) { background: #06b6d4; }
.avatar:nth-child(6n+4) { background: #10b981; }
.avatar:nth-child(6n+5) { background: #f59e0b; }
.avatar:nth-child(6n+6) { background: #ef4444; }

/* --- Dashboard --- */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 56px - 3rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-content: start;
  flex: 1;
}

.dashboard-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-secondary);
}
.dashboard-empty p {
  margin-bottom: 1rem;
}

/* --- Usage Indicators --- */
.usage-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
}
.usage-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.usage-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.usage-label {
  color: var(--color-text-secondary);
  font-weight: 500;
}
.usage-count {
  font-weight: 600;
  color: var(--color-text-primary);
}
.usage-unlimited {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}
.usage-warning {
  font-size: 0.75rem;
  color: var(--color-warning);
}
.usage-warning a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
.usage-warning a:hover {
  text-decoration: underline;
}
.usage-plan {
  margin-left: auto;
}

/* --- Project Card (Dashboard) --- */
.project-card {
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
  position: relative;
}
.project-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px var(--color-shadow);
}
.project-card.drop-hover {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.05);
}

.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-card-link:hover { text-decoration: none; }

.project-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text-primary);
}

.project-card-location {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.project-card-status {
  margin-bottom: 0.75rem;
}

.project-card-progress-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  display: block;
}

.project-card-crew {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  min-height: 48px;
}

/* --- Unassigned Crew Bar --- */
.unassigned-bar {
  background: var(--color-bg-secondary);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: all var(--transition);
  margin-top: auto;
}
.unassigned-bar.drop-hover {
  border-color: var(--color-warning);
  background: rgba(245, 158, 11, 0.05);
}

.unassigned-bar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.unassigned-bar-crew {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  align-items: center;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 48px var(--color-shadow);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-details {
  margin-top: 1.5rem;
}

.modal-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Inline Edit Form (Modal) --- */
.modal-edit-form { width: 100%; }

.inline-field { margin-bottom: 0.5rem; }

.inline-input,
.inline-textarea,
.inline-select {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--color-text-primary);
  font-family: inherit;
  width: 100%;
  padding: 0.375rem 0.5rem;
  transition: border-color var(--transition), background var(--transition);
}
.inline-input:hover,
.inline-textarea:hover,
.inline-select:hover {
  border-color: var(--color-border);
}
.inline-input:focus,
.inline-textarea:focus,
.inline-select:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg-tertiary);
}

.inline-input-title {
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
}
.inline-input-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}
.inline-input-date {
  width: auto;
  font-size: 0.875rem;
}

.inline-select {
  appearance: auto;
  cursor: pointer;
  width: auto;
  font-size: 0.875rem;
}

.inline-textarea {
  resize: vertical;
  min-height: 3rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.inline-range {
  flex: 1;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.inline-progress-value {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 3ch;
  text-align: right;
}

.inline-save-status {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}
.inline-save-success {
  color: var(--color-success, #22c55e);
}

/* --- Detail Rows (Modal & Show pages) --- */
.detail-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-width: 80px;
}

.detail-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.detail-section .detail-label {
  display: block;
  margin-bottom: 0.5rem;
}

/* --- Crew List (Modal) --- */
.crew-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.crew-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0;
}
.crew-list-item strong {
  font-size: 0.875rem;
}
.crew-list-item span {
  font-size: 0.8125rem;
}

/* --- Auth Pages --- */
.auth-body {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
}

.auth-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.auth-title {
  text-align: center;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

/* --- Password visibility toggle --- */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon input {
  padding-right: 2.75rem;
}

.input-icon-btn {
  position: absolute;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: color var(--transition);
}

.input-icon-btn:hover {
  color: var(--color-text-primary);
}

.hidden {
  display: none !important;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.pricing-card-featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.pricing-card-header {
  margin-bottom: 1.25rem;
}
.pricing-card-header h3 {
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
}
.pricing-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
  flex: 1;
}
.pricing-features li {
  padding: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}
.pricing-features li:last-child {
  border-bottom: none;
}

/* --- Admin --- */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  width: 220px;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  padding: 1.25rem 0;
  flex-shrink: 0;
}

.admin-sidebar-link {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.admin-sidebar-link:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
  text-decoration: none;
}
.admin-sidebar-link.active {
  color: var(--color-accent);
  background: rgba(59, 130, 246, 0.1);
}

.admin-main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
}

.admin-badge {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.stat-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.stat-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: 0.25rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  .navbar-links { display: none; }
  .main-content { padding: 1rem; }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .form-row { flex-direction: column; gap: 0; }
  .profile-grid, .billing-grid { grid-template-columns: 1fr; }
}

/* --- Settings Grids (Profile, Billing) --- */
.profile-grid,
.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* --- Marketing / Landing Page --- */
.marketing-body {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.marketing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.marketing-nav {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  background: var(--color-bg-primary);
  z-index: 100;
}

.marketing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.marketing-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.marketing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.marketing-nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.marketing-nav-links a:hover {
  color: var(--color-text-primary);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subheadline {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

/* Hero preview — abstract dashboard illustration */
.hero-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.hero-preview-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-preview-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--color-accent);
  width: 70%;
}
.hero-preview-bar.short { width: 35%; background: var(--color-warning); }
.hero-preview-bar.long { width: 90%; background: var(--color-success); }

.hero-preview-dots {
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-block;
}
.dot-blue { background: var(--color-accent); }
.dot-green { background: var(--color-success); }
.dot-amber { background: var(--color-warning); }

/* Features */
.features {
  padding: 4rem 0;
  background: var(--color-bg-secondary);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
}

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

.feature-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.feature-icon {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Pricing section (landing page) */
.pricing-section {
  padding: 4rem 0;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pricing-features li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.pricing-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.pricing-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* CTA */
.cta-section {
  padding: 4rem 0;
  background: var(--color-bg-secondary);
}

/* Footer */
.marketing-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: auto;
}

/* Button variants for marketing */
.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.0625rem;
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
}

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

/* --- Legal Pages --- */
.legal-page {
  padding: 3rem 0;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.legal-updated {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
  color: var(--color-text-secondary);
}

.legal-content p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

/* Footer links */
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-text-primary);
}

.footer-company {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}
