:root {
  --bg: #0f172a;
  --card-bg: #111827;
  --header-bg: #111827;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #22c55e;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  --cell-bg: #bbb;
}

/* =========================
   BASE
========================= */

body.vaktliste {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

.page {
  min-height: 100vh;
  padding: 28px 10px;
  background: radial-gradient(circle at top, #1e293b 0, #0f172a 48%, #020617 100%);
}

.app-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
}

/* =========================
   PAGE TITLE
========================= */

.page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.menu-button {
  all: unset;
  width: 42px;
  height: 42px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-button:hover {
  background: transparent;
}

.menu-button:focus {
  outline: none;
}

.app-title {
  margin: 0;
  flex: 1;
  font-size: 32px;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
}

/* =========================
   CARDS
========================= */

.vakt-header-card,
.vakt-card {
  background: var(--card-bg);
  border: 1px solid #1e293b;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.vakt-header-card {
  padding: 12px 14px;
}

.vakt-card {
  padding: 10px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

/* =========================
   HEADER
========================= */

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  color: var(--text);
}

.header-center {
  flex: 1;
  text-align: center;
}

.user-title {
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* =========================
   NAV
========================= */

.nav-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  text-align: center;
}

.year {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.month {
  font-size: 14px;
  color: var(--muted);
}

.swipe-hint {
  font-size: 12px;
  color: #8fa2c7;
  margin-top: 4px;
  animation: swipeHint 2s infinite;
}

@keyframes swipeHint {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  50% {
    transform: translateX(0);
  }

  75% {
    transform: translateX(6px);
  }

  100% {
    transform: translateX(0);
  }
}

/* =========================
   BUTTONS
========================= */

.btn-icon {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  min-width: 38px;
  min-height: 38px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.btn-icon:hover {
  background: var(--blue-dark);
}

.btn-base {
  background: var(--blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 800;
}

.btn-base:hover {
  background: var(--blue-dark);
}

/* =========================
   TABLE
========================= */

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #0b1120;
  color: var(--text);
}

td,
th {
  border: 1px solid var(--border);
  text-align: center;
  padding: 0;
}

th {
  background: #1e293b;
  color: #f8fafc;
  padding: 7px 8px;
  font-weight: 800;
}

td {
  height: 32px;
  color: #020617;
}

/* =========================
   CELLS
========================= */

.editable-cell {
  background: var(--cell-bg);
  cursor: pointer;
}

.editable-cell:hover {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
}

.celle-navn {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-weight: 600;
}

.hidden-name {
  color: transparent;
}

/* OFF */
.offcelle {
  background: #000000 !important;
  color: #ffffff !important;
}

.offcelle .celle-navn {
  color: #ffffff !important;
}

/* DATO KOLONNE */
table td:first-child {
  background: #111827;
  color: #f8fafc !important;
  font-weight: 800;
}

/* =========================
   DATO
========================= */

.rod-dato {
  color: #f87171;
  font-weight: 900;
}

/* =========================
   UKE START
========================= */

.uke-start td {
  border-top: 3px solid #64748b;
}

/* =========================
   TODAY MARKER
========================= */

.today-row td:first-child {
  background: #1e3a8a;
}

.today-row td:first-child::before {
  content: "👉";
  margin-right: 5px;
}

/* =========================
   HAMBURGER MENU
========================= */

.side-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #020617;
  padding: 20px;
  transition: 0.25s;
  z-index: 1000;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.side-menu.open {
  left: 0;
}

.side-menu a {
  display: block;
  padding: 10px 0;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
}

.side-menu a:hover {
  color: #60a5fa;
}

/* =========================
   OVERLAY
========================= */

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 900;
}

#overlay.open {
  display: block;
}

/* =========================
   LOGIN
========================= */

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.login-box {
  background: #111827;
  padding: 25px;
  border-radius: 16px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
  border: 1px solid #334155;
  box-shadow: var(--shadow);
}

.login-box h2 {
  margin: 0 0 10px 0;
  color: #f8fafc;
}

.login-box input {
  background: #020617;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 10px;
  border-radius: 8px;
}

.login-box button {
  padding: 10px;
  background: var(--blue);
  border: none;
  color: #ffffff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.login-box button:hover {
  background: var(--blue-dark);
}

/* =========================
   MENU DROPDOWN
========================= */

.menu-group {
  margin-top: 10px;
}

.menu-title {
  cursor: pointer;
  padding: 10px 0;
  color: #f8fafc;
  font-weight: 800;
}

.submenu {
  display: none;
  padding-left: 10px;
}

.submenu a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #cbd5e1;
}

.menu-group.open .submenu {
  display: block;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .page {
    padding: 18px 6px;
  }

  .page-title-row {
    gap: 10px;
    margin-bottom: 15px;
  }

  .menu-button {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .app-title {
    font-size: 27px;
  }

  .vakt-header-card,
  .vakt-card {
    border-radius: 12px;
  }

  .vakt-card {
    padding: 6px;
  }

  th {
    font-size: 13px;
    padding: 6px 4px;
  }

  td {
    height: 30px;
    font-size: 13px;
  }

}
/* =====================================
   FLYTENDE TILBAKEKNAPP
===================================== */

.floating-back {
    position: fixed;

    left: 15px;
    bottom: 15px;

    width: 52px;
    height: 52px;

    border-radius: 50%;

    background: #1e293b;
    border: 1px solid #334155;

    color: #ffffff;
    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    font-weight: bold;

    box-shadow: 0 4px 15px rgba(0,0,0,.35);

    z-index: 9999;
}

.floating-back:hover {
    background: #334155;
}

.floating-back:active {
    transform: scale(0.95);
}