@font-face { font-family: 'Silkscreen'; src: url('https://xn--fjril-hra.com/fonts/silkscreen-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --night: #0b0e18; --panel: #111727; --panel2: #161e33; --line: #24304d; --line2: #33436a;
  --ink: #e4ebfb; --mute: #94a1c2; --dim: #6f7c9e; --yel: #ffd400; --fara: #ff6b6b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html.last { overflow: hidden; }
body {
  background: radial-gradient(ellipse 120% 60% at 50% -10%, #1a2342 0%, var(--night) 60%) fixed, var(--night);
  color: var(--ink); font: 14px/1.45 Verdana, "DejaVu Sans", system-ui, sans-serif; min-height: 100vh;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--yel); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 26px/1 Silkscreen, "Courier New", monospace; letter-spacing: .04em; color: var(--yel); }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; justify-content: space-between; margin-bottom: 10px; }
h3 small, h2 small { font-weight: 400; color: var(--dim); font-size: 12px; }
small { font-size: 11.5px; }

#app { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; display: grid; gap: 18px; }
.laddar { color: var(--mute); padding: 60px 0; text-align: center; }
.tomt { color: var(--dim); font-size: 13px; }
.felrad { color: var(--fara); font-size: 13px; min-height: 0; }
.felrad:empty { display: none; }

/* egen toppmeny tills fj.js har Schema i sin lista */
#egen-top { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; background: #070a12; border-bottom: 1px solid #1c2540; font-weight: 600; font-size: 12.5px; }
#egen-top .logo { font: 700 13px/1 Silkscreen, "Courier New", monospace; letter-spacing: .06em; color: var(--yel); text-decoration: none; padding-right: 10px; margin-right: 2px; border-right: 1px solid #1c2540; height: 20px; display: flex; align-items: center; }
#egen-top .tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
#egen-top .tabs a { color: var(--mute); text-decoration: none; padding: 0 11px; height: 28px; display: flex; align-items: center; border-radius: 4px; white-space: nowrap; position: relative; }
#egen-top .tabs a:hover { color: #fff; background: #111727; }
#egen-top .tabs a.on { color: #fff; }
#egen-top .tabs a.on::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 2px; background: #ff9d5c; border-radius: 2px; }
#egen-top .em { color: var(--dim); font-weight: 400; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#egen-top button { color: var(--mute); background: transparent; border: 1px solid var(--line); border-radius: 4px; height: 24px; padding: 0 9px; white-space: nowrap; }
@media (max-width: 640px) { #egen-top .em, #egen-top .logo { display: none; } #egen-top .tabs a { padding: 0 8px; } }

/* knappar */
.kn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.kn:hover { border-color: #4a5d8f; background: #1b2540; }
.kn.pri { background: var(--yel); border-color: var(--yel); color: #14110a; }
.kn.pri:hover { background: #ffe04d; }
.kn.tyst { background: transparent; border-color: transparent; color: var(--mute); font-weight: 400; }
.kn.tyst:hover { color: #fff; background: var(--panel2); }
.kn.liten { min-height: 28px; padding: 0 10px; font-size: 12px; }
.kn.ikon { width: 36px; padding: 0; font-size: 18px; line-height: 1; }
.kn.fara { background: transparent; border-color: #5a2b35; color: var(--fara); }
.kn.inne { background: #12301f; border-color: #2c7a4b; color: #b9f5cf; }
.kn.inne small { font-weight: 400; color: #7fc79b; }
.puls { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: puls 1.8s infinite; flex: none; }
@keyframes puls { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .puls { animation: none; } }

.ruta { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.ruta.smal { max-width: 380px; margin: 60px auto; display: grid; gap: 12px; }
.ruta.smal input { height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line2); background: var(--night); }

/* huvud */
.huvud { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.rubrik { display: grid; gap: 6px; }
.inne-nu { color: var(--mute); font-size: 13px; }
.huvud-kn { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* dashboard */
.dash { display: grid; gap: 12px; }
.dash-topp { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vaxel { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.vaxel button { border: 0; background: transparent; color: var(--mute); padding: 0 12px; min-height: 28px; border-radius: 5px; font-size: 12.5px; }
.vaxel button.on { background: var(--line2); color: #fff; font-weight: 600; }
.vaxel.bred { display: flex; } .vaxel.bred button { flex: 1; min-height: 34px; }
.kort { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.pk { text-align: left; display: grid; gap: 2px; padding: 12px 12px 11px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 10px; min-width: 0; transition: opacity .15s; }
.pk:hover { border-color: var(--line2); border-top-color: var(--c); background: #141b2f; }
.pk.vald { background: var(--panel2); border-color: var(--c); }
.pk.svag { opacity: .45; }
.pk-namn { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.pk-namn em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--dim); border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; }
.prick { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.pk-tim { font: 700 30px/1.15 Silkscreen, "Courier New", monospace; color: #fff; font-variant-numeric: tabular-nums; }
.pk-tim small { font: 400 13px Verdana, sans-serif; color: var(--mute); }
.pk-rad { color: var(--mute); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-nere { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
.staplar { display: grid; gap: 7px; }
.stapel { display: grid; grid-template-columns: 78px 1fr 52px; align-items: center; gap: 8px; font-size: 12.5px; }
.st-namn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bana { height: 10px; background: var(--night); border-radius: 5px; overflow: hidden; }
.st-bana i { display: block; height: 100%; border-radius: 5px; }
.st-tim { text-align: right; color: var(--mute); font-variant-numeric: tabular-nums; }
.trend { width: 100%; height: auto; display: block; }
.trend .rut { stroke: #1c2540; stroke-width: 1; }
.trend .ax { fill: var(--dim); font-size: 10px; font-family: Verdana, sans-serif; }
.trend .ax.sum { fill: var(--mute); } .trend .ax.nu { fill: var(--ink); font-weight: 700; }

/* kalender */
.kal { display: grid; gap: 10px; }
.kal-topp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kal-topp h2 { min-width: 150px; text-align: center; font-size: 17px; }
.forkl { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12px; }
.forkl i { width: 22px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.f-logg { background: #5bc8ff; } .f-plan { border: 1.5px dashed #b48cff; background: rgba(180, 140, 255, .12); }
.rutnat { display: grid; grid-template-columns: 26px repeat(7, minmax(0, 1fr)); gap: 5px; }
.vd { font-size: 11.5px; color: var(--dim); text-align: center; padding-bottom: 2px; text-transform: uppercase; letter-spacing: .05em; }
.vnr { font-size: 10.5px; color: var(--dim); display: flex; align-items: flex-start; justify-content: center; padding-top: 9px; }
.vd.vnr { padding-top: 0; }
.dag { display: flex; flex-direction: column; gap: 5px; text-align: left; min-height: 104px; padding: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; overflow: hidden; }
.dag:hover { border-color: var(--line2); background: #141b2f; }
.dag.helg { background: #0f1422; }
.dag.utanfor { opacity: .38; }
.dag.idag { border-color: var(--yel); box-shadow: inset 0 0 0 1px var(--yel); }
.d-topp { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.d-nr { font-weight: 700; font-size: 13px; }
.dag.idag .d-nr { color: var(--yel); }
.d-tot { font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.d-inneh { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pill { display: flex; justify-content: space-between; gap: 4px; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; line-height: 1; background: var(--c); color: #10131c; min-width: 0; }
.pill b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill span { white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.pill.plan { background: color-mix(in srgb, var(--c) 14%, transparent); border: 1.5px dashed var(--c); color: var(--ink); }
.pill.plan b { color: var(--c); flex: none; max-width: 100%; }
.pill.plan span { color: var(--mute); font-size: 10.5px; }
.kal-fot { color: var(--dim); font-size: 12px; }

/* lager */
#lager { display: none; } #lager.pa { display: block; }
.skugga { position: fixed; inset: 0; z-index: 2147482500; background: rgba(4, 6, 12, .72); display: flex; justify-content: flex-end; }
.blad { width: min(520px, 100%); height: 100%; background: var(--panel); border-left: 1px solid var(--line2); display: flex; flex-direction: column; }
.blad.brett { width: min(680px, 100%); }
.blad-topp { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex: none; }
.blad-topp h2 { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dagblad .blad-topp h2 { text-align: center; align-items: center; }
.blad-kropp { overflow-y: auto; padding: 14px; display: grid; gap: 16px; align-content: start; flex: 1; overscroll-behavior: contain; padding-bottom: max(20px, env(safe-area-inset-bottom)); }

.tidslinje { display: grid; gap: 4px; }
.tidslinje:empty { display: none; }
.tl-rad { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; }
.tl-namn { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.tl-axel { position: relative; height: 14px; }
.tl-axel span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--dim); }
.tl-axel span:first-child { transform: none; } .tl-axel span:last-child { transform: translateX(-100%); }
.tl-bana { position: relative; height: 24px; background: var(--night); border-radius: 5px; }
.tl-streck { position: absolute; top: 0; bottom: 0; width: 1px; background: #1c2540; }
.tl-block { position: absolute; top: 2px; bottom: 2px; min-width: 6px; border: 0; border-radius: 4px; background: var(--c); color: #10131c; font-size: 10.5px; font-weight: 700; padding: 0 5px; overflow: hidden; white-space: nowrap; text-align: left; }
.tl-block.plan { background: color-mix(in srgb, var(--c) 16%, transparent); border: 1.5px dashed var(--c); color: var(--c); }
.tl-block.pagar { background: repeating-linear-gradient(-45deg, var(--c), var(--c) 6px, color-mix(in srgb, var(--c) 70%, #000) 6px, color-mix(in srgb, var(--c) 70%, #000) 12px); }
.tl-block.vald { outline: 2px solid #fff; outline-offset: 1px; }

.passlista { display: grid; gap: 6px; }
.pr { display: flex; align-items: center; gap: 8px; background: var(--night); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 7px; padding-right: 8px; }
.pr.plan { border-style: dashed; border-left-style: dashed; }
.pr.vald { border-color: #fff; }
.pr-huvud { flex: 1; min-width: 0; background: transparent; border: 0; text-align: left; padding: 9px 10px; display: grid; gap: 4px; }
.pr-rad1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.pr-tid { font-variant-numeric: tabular-nums; } .pr-h { color: var(--mute); }
.pr-note { color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.etik { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--c, #94a1c2) 20%, transparent); color: var(--c, var(--mute)); border: 1px solid color-mix(in srgb, var(--c, #94a1c2) 45%, transparent); }
.etik.streck { border-style: dashed; background: transparent; }

.formular { display: grid; gap: 13px; border-top: 1px solid var(--line); padding-top: 16px; }
.formular h3 { margin: 0; align-items: center; }
.falt { display: grid; gap: 6px; }
.falt > span { font-size: 11.5px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 16px; background: var(--night); border: 1px solid var(--line2); color: var(--mute); font-size: 12.5px; }
.chip:hover { color: #fff; border-color: #4a5d8f; }
.chip.on { background: color-mix(in srgb, var(--c, #e4ebfb) 22%, var(--night)); border-color: var(--c, #e4ebfb); color: #fff; font-weight: 600; }
.chip small { color: var(--dim); }
.chips.snabb .chip { border-style: dashed; min-height: 28px; }
.tidrad { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tidrad small { color: var(--mute); }
input[type=time], textarea, .inst input[type=text] { background: var(--night); border: 1px solid var(--line2); border-radius: 6px; padding: 0 10px; min-height: 38px; }
input[type=time] { font-size: 16px; font-variant-numeric: tabular-nums; }
textarea { padding: 8px 10px; resize: vertical; width: 100%; font-size: 16px; }
.form-kn { display: flex; gap: 8px; justify-content: space-between; }
.form-kn .pri { flex: 1; min-height: 42px; }

.logg { display: grid; gap: 0; }
.lr { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; }
.lr-nar { color: var(--dim); font-variant-numeric: tabular-nums; }
.lr .gammal { color: var(--mute); text-decoration: line-through; text-decoration-color: #5a6788; }
.lr .ny { color: var(--ink); }

.inst { display: grid; gap: 22px; }
.inst section { display: grid; gap: 7px; }
.inst h3 { margin: 0; } .hjalp { color: var(--dim); font-size: 12px; margin-bottom: 3px; }
.ir { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.ir.av input[type=text] { opacity: .5; }
.ir input[type=color] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--line2); border-radius: 6px; background: var(--night); flex: none; }
.ir input[type=text] { flex: 1 1 110px; min-width: 0; } .ir input.mejl { flex: 2 1 190px; font-size: 12.5px; }
.bock { display: flex; align-items: center; gap: 5px; color: var(--mute); font-size: 12px; }

#toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 2147482600; background: #1f2a47; border: 1px solid var(--line2); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 24px); font-size: 13px; }
#toast.pa { opacity: 1; transform: translate(-50%, 0); }
#toast.fel { border-color: var(--fara); }

@media (max-width: 980px) { .kort { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-nere { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  #app { padding: 14px 8px 50px; gap: 14px; }
  .huvud-kn { width: 100%; } .huvud-kn .pri, .huvud-kn .inne { flex: 1 1 100%; min-height: 46px; font-size: 15px; }
  .kort { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pk-tim { font-size: 25px; }
  .rutnat { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; } .vnr { display: none; }
  .dag { min-height: 74px; padding: 4px 3px; gap: 3px; border-radius: 6px; }
  .d-tot { display: none; } .d-nr { font-size: 12px; padding-left: 2px; }
  .pill { height: 7px; padding: 0; border-radius: 3px; } .pill b, .pill span { display: none; }
  .pill.plan { height: 8px; border-width: 1.5px; }
  .forkl { width: 100%; margin: 0; } .forkl i:first-child { margin-left: 0; }
  .skugga { align-items: flex-end; } .blad, .blad.brett { width: 100%; height: 94%; border-left: 0; border-top: 1px solid var(--line2); border-radius: 14px 14px 0 0; }
}
