/* Dr Ock dockpage — delad CSS */

:root {
  --bg: #0e1116;
  --card: #161b22;
  --card-hi: #1c2129;
  --border: #22272e;
  --fg: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --orange: #db6d28;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

code {
  background: var(--card-hi);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Layout */
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }

header.site {
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
header.site h1 {
  font-size: 28px;
  margin: 0 0 4px;
}
header.site .meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

h2 {
  font-size: 20px;
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 16px; margin: 16px 0 8px; }

/* Navigation */
nav.main {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  padding: 0;
}
nav.main a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--fg);
}
nav.main a:hover { background: var(--card-hi); text-decoration: none; }
nav.main a.active { background: var(--accent); color: #0e1116; border-color: var(--accent); font-weight: 600; }

/* Status-pill */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.pill-ok   { background: rgba(63,185,80,0.15);  color: var(--green); }
.pill-warn { background: rgba(210,153,34,0.15); color: var(--yellow); }
.pill-bad  { background: rgba(248,81,73,0.15);  color: var(--red); }
.pill-off  { background: rgba(139,148,158,0.15); color: var(--muted); }

/* Cards grid */
.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: 12px 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.card .big { font-size: 28px; font-weight: 600; line-height: 1.1; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
}
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat .value { font-size: 20px; font-weight: 600; margin-top: 2px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
th, td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th { background: var(--card-hi); color: var(--accent); font-weight: 600; }
tr:nth-child(even) td { background: #131820; }

td.right { text-align: right; }
td.mono  { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.ok   { color: var(--green);  font-weight: 600; }
.warn { color: var(--yellow); }
.bad  { color: var(--red);    font-weight: 600; }
.muted { color: var(--muted); }

/* Progress bars (diskar) */
.progress {
  background: var(--card-hi);
  border-radius: 4px;
  overflow: hidden;
  height: 18px;
  position: relative;
  margin: 4px 0;
}
.progress > .fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}
.progress > .label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  mix-blend-mode: difference;
}
.fill.green  { background: var(--green); }
.fill.yellow { background: var(--yellow); }
.fill.red    { background: var(--red); }

/* Movie/series cards */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.media-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 13px;
}
.media-card .poster {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #1c2129, #131820);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 28px;
  overflow: hidden;
}
.media-card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-card .info {
  padding: 8px 10px;
}
.media-card .info .title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card .info .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.media-card .info .rating {
  color: var(--yellow);
  margin-top: 2px;
  font-size: 12px;
}

/* Active session banner */
.now-playing {
  background: linear-gradient(135deg, #1a3a52, #1c2129);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  display: flex;
  gap: 16px;
  align-items: center;
}
.now-playing .poster {
  width: 80px;
  aspect-ratio: 2/3;
  background: var(--card);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.now-playing .poster img { width: 100%; height: 100%; object-fit: cover; }
.now-playing .info { flex: 1; }
.now-playing .info .title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.now-playing .info .meta { color: var(--muted); font-size: 13px; }
.now-playing .info .progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.now-playing .info .progress-bar > .fill {
  height: 100%;
  background: var(--accent);
}
.now-playing .info .pct-line {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Weather cards */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.weather-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.weather-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.weather-card .loc-name { font-weight: 600; }
.weather-card .updated { color: var(--muted); font-size: 11px; }
.weather-card .current {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 14px;
}
.weather-card .icon {
  font-size: 48px;
  line-height: 1;
}
.weather-card .temp {
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
}
.weather-card .temp .deg { font-size: 24px; vertical-align: top; }
.weather-card .desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.weather-card .now-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  font-size: 13px;
  margin: 10px 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.weather-card .now-meta div { color: var(--muted); }
.weather-card .now-meta div b { color: var(--fg); font-weight: 500; }

.weather-card .forecast {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.weather-card .forecast .day {
  text-align: center;
  font-size: 12px;
  padding: 6px 4px;
  background: var(--card-hi);
  border-radius: 4px;
}
.weather-card .forecast .day .dow { color: var(--muted); font-weight: 600; }
.weather-card .forecast .day .icon { font-size: 22px; margin: 2px 0; line-height: 1; }
.weather-card .forecast .day .tmax { color: var(--fg); }
.weather-card .forecast .day .tmin { color: var(--muted); margin-left: 4px; }
.weather-card .forecast .day .pop { color: var(--accent); font-size: 10px; margin-top: 2px; }

/* Tailscale */
.ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.ts-peer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.ts-peer h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.ts-peer .role { color: var(--muted); font-size: 12px; }
.ts-peer .ips { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Empty / error */
.empty {
  color: var(--muted);
  font-style: italic;
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: 8px;
  margin: 16px 0;
}

footer.site {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Mobilanpassning */
@media (max-width: 600px) {
  .wrap { padding: 16px 12px 60px; }
  h1 { font-size: 22px; }
  header.site h1 { font-size: 22px; }
  table { font-size: 12px; }
  th, td { padding: 6px 8px; }
  .weather-card .temp { font-size: 32px; }
  .now-playing { flex-direction: column; align-items: stretch; }
  .now-playing .poster { width: 60px; align-self: flex-start; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* Generators (används av JS) */
.gen { display: none; }
.loading { color: var(--muted); font-style: italic; padding: 12px; }
.error { color: var(--red); padding: 12px; background: rgba(248,81,73,0.08); border-radius: 6px; margin: 8px 0; }

/* === Meny-sida (Dr Ock) === */
.menu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 16px 0;
}
.menu-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.menu-card-head h2 {
  font-size: 22px;
  margin: 0;
  border: none;
  padding: 0;
}
.week-badge {
  background: var(--accent);
  color: #0e1116;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}
.menu-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 14px;
}
.menu-card-meta a { color: var(--accent); }
.menu-week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .menu-week { grid-template-columns: repeat(2, 1fr); }
}
.menu-day {
  background: var(--card-hi);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 90px;
}
.menu-day.today {
  border-color: var(--accent);
  background: rgba(88,166,255,0.10);
  box-shadow: 0 0 0 1px var(--accent);
}
.menu-day-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.menu-day.today .menu-day-label {
  color: var(--accent);
}
.dish-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}
.dish-list li {
  margin-bottom: 5px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
}
.dish-list li:last-child { margin-bottom: 0; }
.menu-today-callout {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(88,166,255,0.10);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 14px;
  color: var(--fg);
}

/* === Dagens lunch (home) === */
.today-lunch {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
}
.today-lunch-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.today-lunch-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.today-lunch-head .when {
  color: var(--muted);
  font-size: 13px;
}
.today-lunch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.today-lunch-rest {
  background: var(--card-hi);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
.today-lunch-rest h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.today-lunch-rest .price {
  color: var(--muted);
  font-size: 12px;
  font-weight: normal;
}
.today-lunch-rest .dishes {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}
.today-lunch-rest .dishes li {
  margin-bottom: 3px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
}
.today-lunch-rest ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.today-lunch-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.today-lunch-foot a { color: var(--accent); }
