:root {
  --ocean-deep: #0D47A1;
  --ocean:      #1565C0;
  --ocean-mid:  #1976D2;
  --ocean-light:#E3F2FD;
  --sun:        #FFB300;
  --coral:      #FF7043;
  --sand:       #FFF8E1;
  --text:       #1a2a3a;
}

/* ── Base ── */
body {
  font-family: 'Nunito', sans-serif;
  background: #f0f4f8;
  color: var(--text);
}
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Navbar ── */
.nav-main {
  background: linear-gradient(135deg, #0a3880 0%, #1565C0 55%, #0277BD 100%);
  box-shadow: 0 2px 16px rgba(13,71,161,.35);
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.nav-main .navbar-brand { font-size: 1.15rem; letter-spacing: -.3px; }
.badge-apt {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: .68em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  font-weight: 700;
}
.nav-main .nav-link { font-weight: 600; font-size: .9rem; }
.nav-main .nav-link.active { color: #fff !important; }
.user-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  border: 2px solid rgba(255,255,255,.5);
  vertical-align: middle;
}

/* ── Layout ── */
.main-content { min-height: calc(100vh - 130px); }
.footer-bar {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  margin-top: 2rem;
}

/* ── Login ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-hero {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(155deg, #0a3880 0%, #1976D2 45%, #29B6F6 78%, #B3E5FC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.waves-bg {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220'%3E%3Cpath fill='rgba(255,255,255,0.08)' d='M0,110 C400,220 1040,0 1440,110 L1440,220 L0,220 Z'/%3E%3Cpath fill='rgba(255,255,255,0.05)' d='M0,155 C360,70 1080,195 1440,135 L1440,220 L0,220 Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2.2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  position: relative;
  z-index: 1;
}
.login-icon { font-size: 3rem; color: var(--sun); line-height: 1; margin-bottom: .4rem; }
.login-title { font-size: 1.75rem; font-weight: 800; color: var(--ocean-deep); }
.login-subtitle { color: #6c757d; font-size: .88rem; }
.btn-login {
  background: linear-gradient(135deg, #1565C0, #0277BD);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}
.btn-login:hover { background: linear-gradient(135deg, #0D47A1, #01579B); }

/* ── Resort banner ── */
.resort-banner {
  border-radius: 16px;
  background: linear-gradient(130deg, #0a3880 0%, #1976D2 40%, #0288D1 70%, #26C6DA 100%);
  padding: 1.6rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(13,71,161,.22);
}
.resort-banner::before {
  content: '🌊';
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  opacity: .18;
}
.resort-banner::after {
  content: '☀️';
  position: absolute;
  right: 1.5rem;
  top: .8rem;
  font-size: 2.8rem;
  opacity: .25;
}
.resort-banner-content { position: relative; z-index: 1; }
.resort-banner-title  { color: #fff; font-weight: 800; font-size: 1.6rem; margin-bottom: .2rem; }
.resort-banner-sub    { color: rgba(255,255,255,.85); margin: 0; font-size: .9rem; }

/* ── Legend / status ── */
.user-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .82rem;
  font-weight: 600;
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}
.status-avventer { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.status-godkjent { background: #d1e7dd; color: #0a3622; border: 1px solid #4caf50; }

/* ── Calendar ── */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
}
.calendar-month-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ocean-deep);
  text-transform: capitalize;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day-name {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  padding: 4px 0 6px;
}
.cal-day {
  min-height: 62px;
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  transition: all .13s ease;
  position: relative;
  background: #fff;
  border: 2px solid transparent;
  overflow: hidden;
}
.cal-day:hover:not(.cal-empty):not(.cal-past) {
  border-color: var(--ocean-mid);
  background: var(--ocean-light);
  transform: scale(1.03);
  z-index: 2;
}
.cal-empty   { background: transparent; cursor: default; border: none; }
.cal-past    { opacity: .4; cursor: default; }
.cal-today .cal-day-num {
  background: var(--ocean-deep);
  color: #fff;
  border-radius: 50%;
}
.cal-day-num {
  font-size: .78rem;
  font-weight: 700;
  color: #333;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.cal-bookings { display: flex; flex-direction: column; gap: 2px; }
.cal-booking-bar {
  height: 14px;
  border-radius: 3px;
  font-size: .59rem;
  font-weight: 700;
  color: #fff;
  padding: 0 3px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.cal-booking-bar:hover { opacity: .85; }
.cal-booking-bar.pending {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 3px,
    rgba(255,255,255,.35) 3px, rgba(255,255,255,.35) 6px
  );
}
/* Range selection */
.cal-selected   { background: var(--ocean-light) !important; border-color: var(--ocean-mid) !important; }
.cal-range-start {
  background: var(--ocean-mid) !important;
  border-color: var(--ocean-mid) !important;
  border-radius: 8px 0 0 8px !important;
}
.cal-range-start .cal-day-num { color: #fff; }
.cal-range-end {
  background: var(--ocean-mid) !important;
  border-color: var(--ocean-mid) !important;
  border-radius: 0 8px 8px 0 !important;
}
.cal-range-end .cal-day-num { color: #fff; }
.cal-in-range {
  background: #BBDEFB !important;
  border-color: #90CAF9 !important;
  border-radius: 0 !important;
}

/* ── Booking bar (sticky bottom) ── */
.booking-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 3px solid var(--ocean-mid);
  padding: .9rem 1.5rem;
  box-shadow: 0 -6px 24px rgba(0,0,0,.1);
  z-index: 1000;
}

/* ── Booking modal ── */
.booking-summary-box {
  background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.alert-sm { padding: .45rem .75rem; }

/* ── User avatars ── */
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
}
.user-avatar-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.5rem;
}

/* ── Hyttebok ── */
.hyttebok-card { position: relative; overflow: hidden; }
.hyttebok-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.hyttebok-text { line-height: 1.65; white-space: pre-wrap; }

/* ── Hendelse icon ── */
.hendelse-icon { padding-top: 2px; }

/* ── Avvik ── */
.avvik-card.avvik-løst { opacity: .65; }

/* ── Misc ── */
.card { border-radius: 12px !important; }
.card-header { border-radius: 12px 12px 0 0 !important; padding: .8rem 1.2rem; }
