/* ══════════════════════════════════════════════════════════════════════════════
   Sjöbåt — Naturinspirerat tema: vatten, trä, himmel
   ══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --water:    #1a3a52;
  --water2:   #244f70;
  --sky:      #e8f4f8;
  --sky2:     #cce4ef;
  --birch:    #f5f0e8;
  --wood:     #8b6340;
  --wood2:    #a07548;
  --reed:     #4a7c59;
  --reed2:    #5c9470;
  --sand:     #d4b896;
  --ink:      #1a1612;
  --text:     #2a2420;
  --muted:    #6a5a4a;
  --muted2:   #9a8a7a;
  --border:   #d8c8b8;
  --border2:  #e8ddd0;
  --white:    #fdfaf5;
  --red:      #c84040;
  --yellow:   #e8a020;
  --shadow:   0 4px 24px rgba(26,58,82,.12);
  --shadow-sm:0 2px 8px rgba(26,58,82,.08);
  --radius:   10px;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--birch);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.2;
  color: var(--water);
}
h1 { font-size: clamp(32px, 5vw, 58px); font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 600; }
h3 { font-size: clamp(16px, 2.5vw, 22px); font-weight: 600; }
a  { color: var(--water2); text-decoration: none; }
a:hover { color: var(--water); }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,250,245,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 700;
  color: var(--water);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo .icon { font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: var(--muted);
  font-size: 13px; font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--water); background: var(--sky); }
.nav-btn {
  background: var(--water); color: #fff !important;
  padding: 7px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.nav-btn:hover { background: var(--water2); color: #fff !important; }

/* ── Flash ────────────────────────────────────────────────────────────────── */
.flash-wrap { padding: 0 28px; margin-top: 16px; }
.flash {
  padding: 12px 18px; border-radius: 8px;
  font-size: 14px; margin-bottom: 8px;
}
.flash-success { background: #e8f5ee; border: 1px solid var(--reed);  color: #1a5a30; }
.flash-error   { background: #fce8e8; border: 1px solid var(--red);   color: #7a1010; }
.flash-info    { background: var(--sky2); border: 1px solid var(--water2); color: var(--water); }
.flash-warning { background: #fef5e0; border: 1px solid var(--yellow); color: #7a4a00; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all .15s; text-decoration: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary { background: var(--water); color: #fff; }
.btn-primary:hover { background: var(--water2); color: #fff; }
.btn-wood    { background: var(--wood); color: #fff; }
.btn-wood:hover { background: var(--wood2); color: #fff; }
.btn-green   { background: var(--reed); color: #fff; }
.btn-green:hover { background: var(--reed2); color: #fff; }
.btn-ghost   { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted2); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--water) 0%, var(--water2) 60%, #2d6a8a 100%);
  color: #fff; text-align: center;
  padding: 80px 28px 70px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--birch);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero h1 { color: #fff; margin-bottom: 18px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }
.hero p { font-size: 18px; opacity: .85; max-width: 560px; margin: 0 auto 32px; }
.hero-waves {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(ellipse 80% 40% at 20% 80%, rgba(255,255,255,.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 80% 20%, rgba(255,255,255,.03) 0%, transparent 70%);
}

/* ── Boat cards ───────────────────────────────────────────────────────────── */
.boats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.boat-card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.boat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}
.boat-card-photo {
  height: 180px; background: var(--sky2);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
.boat-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.boat-card-type {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--reed); font-weight: 600; margin-bottom: 6px;
}
.boat-card-name { font-family: 'Fraunces', serif; font-size: 20px; color: var(--water); margin-bottom: 8px; }
.boat-card-desc { color: var(--muted); font-size: 13px; flex: 1; margin-bottom: 14px; line-height: 1.5; }
.boat-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border2);
}
.boat-price { font-family: 'Fraunces', serif; font-size: 22px; color: var(--water); font-weight: 700; }
.boat-price small { font-size: 13px; color: var(--muted); font-family: 'DM Sans', sans-serif; font-weight: 400; }

/* ── Detail page ──────────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }

.info-row {
  display: flex; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border2);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); min-width: 130px; }
.info-value { font-weight: 500; }

/* ── Calendar / availability ──────────────────────────────────────────────── */
.availability-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-free    { background: #e8f5ee; color: #1a5a30; border: 1px solid var(--reed); }
.badge-booked  { background: #fce8e8; color: #7a1010; border: 1px solid var(--red); }
.badge-pending { background: #fef5e0; color: #7a4a00; border: 1px solid var(--yellow); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); color: var(--text);
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--water2);
  box-shadow: 0 0 0 3px rgba(36,79,112,.12);
}
.form-control select { appearance: none; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.form-check input[type=checkbox] { margin-top: 3px; accent-color: var(--water); width: 16px; height: 16px; }
.form-check label { font-size: 14px; line-height: 1.5; }
.form-hint { font-size: 12px; color: var(--muted2); margin-top: 4px; }

/* ── Auth pages ───────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.auth-card h2 { margin-bottom: 8px; }
.auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 2px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--sky); }

/* ── Status badges ────────────────────────────────────────────────────────── */
.status {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.status-confirmed { background: #e8f5ee; color: #1a5a30; }
.status-pending   { background: #fef5e0; color: #7a4a00; }
.status-cancelled { background: #f0f0f0; color: #6a6a6a; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.dash-card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 14px; padding: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-card-icon { font-size: 32px; margin-bottom: 12px; }
.dash-card-title { font-family: 'Fraunces', serif; font-size: 18px; color: var(--water); margin-bottom: 6px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--water);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 40px 28px;
  margin-top: 80px;
  font-size: 13px;
}
.footer strong { color: #fff; }
.footer a { color: rgba(255,255,255,.6); }
.footer a:hover { color: #fff; }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.page-header { padding: 48px 0 32px; }
.page-header h1 { margin-bottom: 8px; }
.page-header p { color: var(--muted); font-size: 16px; }

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 15px;
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

.terms-text {
  white-space: pre-wrap;
  font-size: 14px; line-height: 1.8;
  color: var(--text);
  background: var(--sky);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  max-height: 300px; overflow-y: auto;
}

@media (max-width: 640px) {
  .nav-links .nav-link:not(.nav-btn) { display: none; }
  .boats-grid { grid-template-columns: 1fr; }
}
