/* Stash Partner Onboarding — Design System
   Ported from React inline styles to CSS custom properties + utility classes.
   Colors match stashrewards.com brand palette.
*/

:root {
  --navy: #333E43;
  --orange: #E18A26;
  --orange-hover: #C97A1E;
  --orange-light: #FEF5E7;
  --cream: #FAFAF8;
  --border: #E5E3DD;
  --muted: #6B7280;
  --white: #FFFFFF;
  --error-bg: #FEF2F2;
  --error-border: #FECACA;
  --error-text: #B91C1C;
  --success-bg: #F0FDF4;
  --success-border: #BBF7D0;
  --success-text: #166534;
  --info-bg: #F3F6FA;
  --info-border: #D1D9E6;
  --gold-bg: #FEF5E7;
  --gold-border: #F0D4A0;
  --green-bg: #F0FDF4;
  --green-border: #BBF7D0;
  --card-bg: #F7F6F3;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: 32px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }

/* === Flash Messages === */
.flash {
  padding: 12px 20px;
  font-size: 14px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  animation: flash-fade 4s ease-in-out forwards;
}
.flash-notice { background: var(--success-bg); color: var(--success-text); border-bottom: 1px solid var(--success-border); }
.flash-alert { background: var(--error-bg); color: var(--error-text); border-bottom: 1px solid var(--error-border); }
@keyframes flash-fade {
  0%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-100%); pointer-events: none; }
}

/* === Form Elements === */
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="tel"], input[type="number"],
input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(225, 138, 38, 0.1);
}
textarea { min-height: 80px; resize: vertical; }
select { cursor: pointer; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}
.label-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.field { margin-bottom: 22px; }

/* === Grid === */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  border: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--orange-hover); }

.btn-secondary { background: var(--orange-light); color: var(--orange); border: 1px solid var(--orange); }
.btn-secondary:hover:not(:disabled) { background: #fdecd0; }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover:not(:disabled) { background: var(--orange); }

.btn-back {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-back:hover { border-color: var(--navy); color: var(--navy); }

.btn-add {
  background: none;
  border: 1px dashed var(--orange);
  color: var(--orange);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
}
.btn-add:hover { background: var(--orange-light); }

.btn-remove {
  background: none;
  border: none;
  color: #B34444;
  font-size: 13px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 4px 8px;
}
.btn-remove:hover { text-decoration: underline; }

.btn-submit { background: var(--navy); color: var(--white); padding: 14px 32px; font-size: 15px; border-radius: var(--radius); }
.btn-submit:hover:not(:disabled) { background: var(--orange-hover); }

/* === Cards & Boxes === */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 1px 8px rgba(27, 43, 74, 0.05);
}

.item-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
}
.item-card .btn-remove { position: absolute; top: 12px; right: 12px; }

.info-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.info-box.gold { background: var(--gold-bg); border-color: var(--gold-border); }
.info-box.green { background: var(--green-bg); border-color: var(--green-border); }
.info-box.error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }

/* === Chips === */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  background: var(--white);
  color: var(--navy);
  transition: all 0.15s;
  user-select: none;
}
.chip:hover { border-color: var(--orange); }
.chip.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

/* === Status Badges === */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-draft { background: #F3F4F6; color: #6B7280; }
.badge-invited { background: var(--orange-light); color: var(--orange); }
.badge-in_progress, .badge-in-progress { background: #DBEAFE; color: #1D4ED8; }
.badge-submitted { background: var(--green-bg); color: var(--success-text); }
.badge-pending_kickoff { background: #FEF3C7; color: #92400E; }

/* === Auth Pages (Login, Check Email) === */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 1px 8px rgba(27, 43, 74, 0.05);
  text-align: center;
}
.auth-card img.logo { height: 36px; margin: 0 auto 28px; display: block; }
.auth-card h1 { font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.auth-card .subtitle { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.auth-card input[type="email"],
.auth-card input[type="password"] {
  padding: 12px 16px;
  font-size: 15px;
  margin-bottom: 16px;
}
.auth-card .btn-primary {
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
}
.auth-card .footer-text { margin-top: 24px; font-size: 12px; color: var(--muted); line-height: 1.5; }

.email-icon {
  width: 56px;
  height: 56px;
  background: var(--orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 1px solid var(--gold-border);
  font-size: 24px;
}

/* === Onboarding Layout === */
.onboarding-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar-overlay {
  display: none;
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-header img { height: 28px; }

.sidebar-steps { list-style: none; }
.sidebar-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.sidebar-step:hover { background: var(--cream); color: var(--navy); text-decoration: none; }
.sidebar-step.active { color: var(--navy); font-weight: 600; border-left-color: var(--orange); background: var(--orange-light); }
.sidebar-step.completed { color: var(--navy); }

.step-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.step-check.done { background: var(--orange); border-color: var(--orange); color: var(--white); }

.progress-bar-wrap {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.progress-text { font-size: 12px; color: var(--muted); margin-top: 6px; }

.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-left { display: flex; align-items: center; gap: 16px; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.save-status { font-size: 12px; color: var(--muted); }

.step-content {
  padding: 32px;
  max-width: 800px;
}
.step-title { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.step-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 28px; line-height: 1.6; }

.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* === Admin Layout === */
.admin-body { background: var(--cream); }

.admin-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
}
.admin-nav-link:hover { color: var(--orange); text-decoration: none; }

.admin-content { padding: 24px; max-width: 1200px; margin: 0 auto; }

/* Admin table */
.hotel-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hotel-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.hotel-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.hotel-table tr:hover td { background: var(--cream); }
.hotel-table tr:last-child td { border-bottom: none; }

/* === Tooltips === */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltip-text {
  visibility: hidden;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 10;
}
.tooltip:hover .tooltip-text { visibility: visible; }

/* === Responsive === */
@media (max-width: 768px) {
  .onboarding-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    z-index: 100;
    transition: left 0.2s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.1);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
  }
  .sidebar-overlay.open { display: block; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .step-content { padding: 20px; }
  .top-bar { padding: 12px 20px; }
  .auth-card { padding: 32px 24px; }
}

/* === Utility === */
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
