/* Boatwise — Shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0d1b2a;
  --navy-mid:  #162436;
  --ocean:     #1a5f8a;
  --sky:       #3b8ec4;
  --white:     #ffffff;
  --off-white: #f5f7fa;
  --text:      #1a2332;
  --muted:     #64748b;
  --border:    #dde3ec;
  --error:     #dc2626;
  --success:   #16a34a;
  --warning:   #d97706;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,0.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

/* ── Nav ────────────────────────────────────────── */
.dash-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.dash-nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.dash-nav-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}

.nav-link:hover { background: var(--off-white); color: var(--text); }
.nav-link.active { background: var(--off-white); color: var(--navy); font-weight: 600; }

.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-boat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 11px;
}

.nav-settings {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 15px;
  transition: background 0.12s, color 0.12s;
}

.nav-settings:hover { background: var(--off-white); color: var(--text); }
.nav-settings.active { background: var(--off-white); color: var(--navy); }

.btn-signout {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-signout:hover { border-color: var(--error); color: var(--error); }

/* ── Page layout ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  padding: 28px 24px;
  color: var(--white);
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-hero h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.page-hero p { font-size: 13px; opacity: 0.7; margin-top: 3px; }

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ── Buttons ─────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--ocean), var(--sky));
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,95,138,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover { border-color: var(--sky); color: var(--sky); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: none;
  color: var(--error);
  border: 1.5px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn-danger:hover { background: #fee2e2; border-color: #fecaca; }

/* ── Form elements ───────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-label .opt { font-weight: 400; text-transform: none; letter-spacing: 0; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(59,142,196,0.10);
}

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

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

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-pending  { background: #fef3c7; color: var(--warning); }
.badge-progress { background: #dbeafe; color: #1d4ed8; }
.badge-done     { background: #dcfce7; color: var(--success); }

/* ── Messages ────────────────────────────────────── */
.msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 12px;
}

.msg.success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }
.msg.error   { background: #fee2e2; color: var(--error);   border: 1px solid #fecaca; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,42,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* ── Section ─────────────────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Guide card (multi-step tutorial) ───────────── */
.guide-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
  position: relative;
}

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

.guide-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
}

.guide-dots {
  display: flex;
  gap: 5px;
}

.guide-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.2s;
}

.guide-dot.active { background: var(--white); }

.guide-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.12s;
}

.guide-close:hover { color: var(--white); }

.guide-step-icon { font-size: 26px; margin-bottom: 8px; display: block; }

.guide-step-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.guide-step-text {
  font-size: 13px;
  opacity: 0.82;
  line-height: 1.6;
}

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

.guide-counter {
  font-size: 11px;
  opacity: 0.5;
  font-weight: 600;
}

.guide-nav {
  display: flex;
  gap: 8px;
}

.guide-btn {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  border: none;
}

.guide-btn-outline {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.guide-btn-outline:hover { background: rgba(255,255,255,0.25); }

.guide-btn-solid {
  background: var(--white);
  color: var(--navy);
}

.guide-btn-solid:hover { opacity: 0.92; }

/* ── Welcome banner ──────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #e8f4ff, #f0f9ff);
  border: 1.5px solid #b8d9f5;
  border-radius: var(--radius);
  padding: 20px 48px 20px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

.welcome-banner-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }

.welcome-banner-body { flex: 1; }

.welcome-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
}

.welcome-banner-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.welcome-banner-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  line-height: 1;
  padding: 4px;
  transition: color 0.12s;
}

.welcome-banner-close:hover { color: var(--text); }

/* ── Empty state ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state .icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 14px; line-height: 1.5; }

/* ── Loading ─────────────────────────────────────── */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-boat-name { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .page-hero { padding: 22px 20px; }
  .page-content { padding: 22px 18px; }
}
