/* Umsögn – útlit appsins: einkunnasíða, mælaborð og QR-prentun. Tákn, letur og hnappar eru í base.css. */
:root { --max: 1040px; }

h1 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
h2 { font-size: 1.125rem; letter-spacing: -.01em; }
a { text-underline-offset: 3px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .8rem; }
.error { color: var(--error); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.flow > * + * { margin-top: var(--flow, 16px); }

.panel {
  --flow: 16px;
  padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow);
}

/* Stjörnur (SVG úr html.js) */
.star { flex: none; width: 1em; height: 1em; color: var(--accent); fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.star.off { color: var(--star-off); }
.star-row { display: inline-flex; gap: 2px; vertical-align: middle; }

/* ---- Eitt spjald á miðjum skjá: einkunnasíða, takk-síða, innskráning, villur ---- */
.stage {
  min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: center;
  gap: 20px; padding: 24px var(--gutter);
}
.stage > .panel { width: 100%; max-width: 440px; }
.rate, .thanks { position: relative; padding-top: 48px; text-align: center; }
.lang { position: absolute; top: 14px; right: 18px; font-size: .875rem; font-weight: 600; color: var(--muted); }
.logo { display: block; max-height: 64px; max-width: 180px; margin-inline: auto; }
.mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin-inline: auto; border-radius: 16px;
  background: var(--brand); color: var(--on-brand); font-size: 1.6rem; font-weight: 700;
}
.rate h1, .thanks h1 { margin-top: 18px; font-size: 1.625rem; line-height: 1.2; }
.rate .muted { margin-top: 10px; font-size: .95rem; }

.stars { display: flex; justify-content: center; margin-top: 22px; }
.stars button {
  padding: 6px; border: 0; border-radius: 12px; background: none; cursor: pointer;
  color: var(--star-off); font-size: 44px; line-height: 0; transition: color .15s, transform .15s;
}
.stars .star { color: inherit; }
.stars:hover button, .stars:focus-within button { color: var(--accent); }
.stars button:hover ~ button, .stars button:focus ~ button { color: var(--star-off); }
.stars button:active { transform: scale(.9); }
.stars button:focus-visible { outline-offset: 0; }
@media (min-width: 400px) { .stars button { font-size: 52px; } }

.given { display: flex; justify-content: center; margin-top: 18px; font-size: 30px; }
.thanks > p { margin-top: 10px; }
.thanks .google { margin-top: 16px; }
.private { margin-top: 24px; padding: 18px; border-radius: var(--r-inner); background: var(--surface-2); text-align: left; }
.private > p { margin-top: 6px; font-size: .95rem; }
.thanks .fine { margin-top: 20px; }
.thanks .qr { width: 180px; margin: 16px auto 0; padding: 10px; border-radius: 12px; background: #fff; }
.thanks .qr + .muted { font-size: .95rem; }
.thanks .done { margin-top: 16px; }
.screen-link { padding-block: 16px 0; overflow-wrap: anywhere; }
.receipt { padding-block: 16px 8px; }
.receipt h2 { margin: 0 0 4px; font-size: 1.1rem; }
.receipt img { display: block; width: 100%; max-width: 288px; margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; }
.receipt [hidden] { display: none; } /* .btn og img hér að ofan myndu annars yfirskrifa hidden */

.by .brand { gap: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.by .brand svg { width: 18px; height: 18px; }
.stage > .brand { margin-bottom: 4px; }

/* ---- Form ---- */
label { display: block; margin-top: 14px; font-weight: 600; font-size: .95rem; }
form > label:first-child, form > input[type="hidden"]:first-child + label { margin-top: 0; }
form > .btn { margin-top: 18px; }
form > .error { margin-top: 14px; }
.logout > .btn, .messages form > .btn { margin-top: 0; }
.private form { margin-top: 12px; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; font-weight: 400;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }
textarea { resize: vertical; }
input[type="color"] { padding: 3px; height: 46px; }
.row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.row label { flex: 1 1 180px; }
.narrow { max-width: 560px; }
.hint { display: block; margin-top: 2px; font-weight: 400; font-size: .88rem; color: var(--muted); }
p.hint { margin: 6px 0 0; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.logo-now { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.logo-now img { max-height: 48px; max-width: 140px; border-radius: 8px; }
.logo-now label.check { margin-top: 0; }
.box { margin-top: 20px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; }
.box h3 { margin: 0; font-size: 1rem; }

/* ---- Eigendasíður ---- */
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; min-height: 64px; }
.topbar .logout, .topbar .end { order: 2; margin-left: auto; }
.tabs { order: 3; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 10px; }
.tabs a { padding: 8px 12px; border-radius: 999px; font-size: .95rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
@media (min-width: 720px) {
  .tabs { order: 2; flex: 0 1 auto; padding-bottom: 0; }
  .topbar .logout, .topbar .end { order: 3; }
}
.topbar .url { flex: 1 1 200px; min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }

.wide { --flow: 20px; padding-block: 28px 56px; }
.wide p { overflow-wrap: anywhere; }
.wide h1 + p { margin-top: 8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--surface); }
.tile b { display: block; font-size: 2rem; line-height: 1.1; letter-spacing: -.03em; }
.tile .lbl { display: block; margin-top: 4px; color: var(--muted); font-size: .9rem; }
.tile .star-row { display: flex; margin-top: 6px; font-size: 16px; }

.cols { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.bars { width: 100%; margin-top: 12px; border-collapse: collapse; }
.bars th { width: 3rem; padding: 5px 0; font-weight: 600; text-align: left; white-space: nowrap; }
.bars th .star { display: inline-block; margin-left: 4px; font-size: 15px; vertical-align: -2px; }
.bars td { padding: 5px 0; }
.bars .num { width: 3rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.track { display: block; height: 12px; border-radius: 6px; background: var(--surface-2); }
.fill { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--accent); }

.messages { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.messages li { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--surface); }
.messages .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.messages .star-row { font-size: 16px; }
.messages p { margin-top: 8px; white-space: pre-wrap; }
.messages form { margin-top: 10px; }
.cols h2 + .muted { margin-top: 12px; }

.biz { display: grid; gap: 10px; max-width: 560px; margin-bottom: 0; padding: 0; list-style: none; }
.biz li {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r-inner); background: var(--surface);
}
.biz li:hover { border-color: var(--muted); }
.biz .mark { flex: none; width: 40px; height: 40px; margin: 0; border-radius: 12px; font-size: 1.1rem; }
.biz .name { flex: 1; min-width: 0; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.biz .name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.biz .name small { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.biz .edit { position: relative; z-index: 1; font-size: .9rem; font-weight: 600; }
.biz .go { color: var(--muted); }

.app-foot { padding-block: 24px 32px; }

/* ---- QR-prentun ---- */
.sheet { display: flex; flex-wrap: wrap; gap: 8mm; justify-content: center; padding: 24px 16px; }
.qr-item {
  background: #fff; color: #111; border: 1px dashed #bbb; border-radius: 4mm; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6mm;
}
.qr-name { font-weight: 700; color: var(--brand); }
.qr-title { font-weight: 700; margin: 2mm 0 4mm; letter-spacing: -.02em; }
.qr-sub { font-size: 9pt; color: #555; margin-top: 3mm; }
.qr-by { font-size: 8pt; font-weight: 600; color: #777; margin-top: 4mm; letter-spacing: .04em; }
.qr img, .qr canvas { display: block; width: 100% !important; height: auto !important; }
.a5 { width: 148mm; height: 210mm; } .a5 .qr { width: 95mm; } .a5 .qr-name { font-size: 20pt; } .a5 .qr-title { font-size: 26pt; }
.a6 { width: 105mm; height: 148mm; } .a6 .qr { width: 65mm; } .a6 .qr-name { font-size: 14pt; } .a6 .qr-title { font-size: 17pt; }
.sticker { width: 50mm; height: 60mm; padding: 3mm; } .sticker .qr { width: 36mm; } .sticker .qr-name { font-size: 8pt; }
.sticker .qr-title { font-size: 9pt; margin: 1mm 0 2mm; } .sticker .qr-sub { font-size: 7pt; margin-top: 1mm; }
@media screen and (max-width: 600px) {
  .a5, .a6 { width: 100%; height: auto; aspect-ratio: auto; box-sizing: border-box; }
  .qr { max-width: 100%; }
}
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .sheet { padding: 0; }
  .qr-item { break-inside: avoid; }
  @page { size: A4; margin: 10mm; }
}
