﻿/* ============================================================
   Fixloggen â€“ Global stylesheet
   ============================================================ */

:root {
  --primary:    #1a1a2e;
  --accent:     #e85d04;
  --accent-dark:#c94d00;
  --bg:         #f5f5f0;
  --card:       #ffffff;
  --text:       #2d2d2d;
  --text-muted: #6b7280;
  --border:     #e5e7eb;
  --radius:     8px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);

  --status-new:         #3b82f6;
  --status-new-bg:      #eff6ff;
  --status-progress:    #f59e0b;
  --status-progress-bg: #fffbeb;
  --status-done:        #10b981;
  --status-done-bg:     #f0fdf4;
  --status-dismissed:   #9ca3af;
  --status-dismissed-bg:#f9fafb;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
}

/* â”€â”€ Typography â”€â”€ */
h1 { font-size: 1.35rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem;    font-weight: 600; }

/* â”€â”€ Header â”€â”€ */
.header {
  background: var(--primary);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  text-decoration: none;
}

.header-logo span { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* â”€â”€ Buttons â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, opacity .15s, transform .1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary  { background: var(--accent);  color: #fff; }
.btn-primary:hover  { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.btn-secondary:hover { background: rgba(255,255,255,.1); }

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover { color: var(--text); background: var(--bg); }

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
.btn-danger:hover { background: #fecaca; }

.btn-sm {
  min-height: 36px;
  padding: 0 .875rem;
  font-size: .83rem;
}

.btn-lg {
  min-height: 52px;
  font-size: 1.05rem;
  width: 100%;
}

/* â”€â”€ Forms â”€â”€ */
.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,.12);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
}

/* â”€â”€ Cards â”€â”€ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body { padding: 1rem; }

/* â”€â”€ Status badges â”€â”€ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.badge-new        { background: var(--status-new-bg);         color: var(--status-new); }
.badge-in_progress{ background: var(--status-progress-bg);    color: var(--status-progress); }
.badge-done       { background: var(--status-done-bg);        color: var(--status-done); }
.badge-dismissed  { background: var(--status-dismissed-bg);   color: var(--status-dismissed); }

/* â”€â”€ Status select colors â”€â”€ */
.status-select[data-status="new"]         { border-color: var(--status-new);      color: var(--status-new); }
.status-select[data-status="in_progress"] { border-color: var(--status-progress); color: var(--status-progress); }
.status-select[data-status="done"]        { border-color: var(--status-done);     color: var(--status-done); }
.status-select[data-status="dismissed"]   { border-color: var(--status-dismissed);color: var(--status-dismissed); }

/* â”€â”€ Layout containers â”€â”€ */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.page-container-sm {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* â”€â”€ Login page â”€â”€ */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  padding: 1.5rem;
}

.login-box {
  background: var(--card);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo h1 {
  font-size: 1.8rem;
  color: var(--primary);
}

.login-logo h1 span { color: var(--accent); }

.login-logo p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }

.login-error {
  background: #fee2e2;
  color: #dc2626;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .88rem;
  display: none;
}

.login-error.visible { display: block; }

/* â”€â”€ Create page â”€â”€ */
.create-page { max-width: 520px; margin: 0 auto; padding-bottom: 2rem; }

.camera-zone {
  position: relative;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow: hidden;
  margin: 1rem 0;
}

.camera-zone:hover,
.camera-zone.dragover { border-color: var(--accent); background: #fff8f5; }

.camera-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 0;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  pointer-events: none;
}

.camera-icon {
  font-size: 3rem;
  line-height: 1;
}

.camera-placeholder p { font-size: .9rem; font-weight: 500; }
.camera-placeholder small { font-size: .78rem; }

.image-preview {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: none;
  border-radius: calc(var(--radius) - 2px);
}

.image-preview.visible { display: block; }

.location-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  color: var(--text-muted);
  padding: .5rem .75rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.location-row .loc-icon { font-size: 1rem; }

.location-ok    { color: #10b981; }
.location-error { color: #f59e0b; }

.create-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

.success-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: 2rem 1rem;
}

.success-panel.visible { display: flex; }
.success-panel .success-icon { font-size: 4rem; line-height: 1; }
.success-panel h2 { font-size: 1.4rem; }
.success-panel p { color: var(--text-muted); }
.success-actions { display: flex; flex-direction: column; gap: .75rem; width: 100%; max-width: 320px; }

/* â”€â”€ Dashboard â”€â”€ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.search-input {
  flex: 1;
  min-width: 180px;
  padding: .6rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  min-height: 44px;
  background: var(--card);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  transition: all .15s;
  min-height: 36px;
}

.filter-tab:hover { border-color: var(--primary); color: var(--text); }

.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-tab .count {
  background: rgba(255,255,255,.25);
  color: inherit;
  padding: .05rem .4rem;
  border-radius: 999px;
  font-size: .75rem;
}

.filter-tab:not(.active) .count {
  background: var(--bg);
  color: var(--text-muted);
}

.logs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.log-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s;
}

.log-card:hover { box-shadow: var(--shadow-md); }

.log-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  cursor: pointer;
  background: var(--bg);
  display: block;
}

.log-card-no-image {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--border);
  font-size: 2rem;
}

.log-card-body {
  padding: .875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.log-card-note {
  font-size: .93rem;
  line-height: 1.5;
  color: var(--text);
  flex: 1;
}

.log-card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
}

.log-card-footer {
  padding: .625rem .875rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.log-card-footer .status-select {
  flex: 1;
  min-width: 120px;
  padding: .35rem .6rem;
  font-size: .82rem;
  min-height: 36px;
  border-width: 1.5px;
  font-weight: 600;
  border-radius: 6px;
}

.map-link {
  font-size: .8rem;
  color: var(--status-new);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-weight: 500;
}

.map-link:hover { text-decoration: underline; }

.delete-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: all .15s;
  flex-shrink: 0;
}

.delete-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: .5rem; }

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 3rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* â”€â”€ Lightbox â”€â”€ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.visible { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* â”€â”€ Map page â”€â”€ */
.map-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

#map {
  flex: 1;
  min-height: 0;
}

.map-header {
  background: var(--primary);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  flex-shrink: 0;
}

.map-header a {
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.map-header a:hover { opacity: .85; }
.map-header h1 { font-size: 1.1rem; }

/* â”€â”€ Leaflet popup styling â”€â”€ */
.leaflet-popup-content { max-width: 220px; }
.popup-img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; margin-bottom: .5rem; display: block; }
.popup-note { font-size: .85rem; line-height: 1.4; margin-bottom: .35rem; }
.popup-meta { font-size: .75rem; color: var(--text-muted); }

/* â”€â”€ Toast â”€â”€ */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  background: var(--primary);
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  box-shadow: var(--shadow-md);
  animation: toast-in .2s ease;
  white-space: nowrap;
}

.toast.error { background: #dc2626; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* â”€â”€ Responsive â”€â”€ */
@media (min-width: 640px) {
  .page-container { padding: 1.5rem; }
  .header { padding: 0 1.5rem; }
}

@media (max-width: 400px) {
  .filter-tabs { gap: .3rem; }
  .filter-tab  { padding: .35rem .7rem; font-size: .78rem; }
}

/* ============================================================
   Dashboard card updates
   ============================================================ */

.dash-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dc-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.dc-no-img {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg);
  color: var(--border);
}

.dc-body {
  padding: .875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.dc-note {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text);
}

.dc-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.assignee-tag {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.assignee-tag.unassigned {
  color: var(--text-muted);
  font-weight: 400;
}

.dc-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
}

.dc-footer {
  padding: .625rem .875rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.action-btn {
  flex: 1;
  min-height: 42px;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active { transform: scale(.97); opacity: .85; }

.fixa-btn { background: var(--accent); color: #fff; }
.klar-btn { background: #10b981; color: #fff; }

/* ============================================================
   Kamera-sida (create.html) – mobil-first
   ============================================================ */

/* Skärm-gemensam grund */
.camera-body {
  background: #000;
  height: 100svh;
  overflow: hidden;
}

.cam-screen,
.preview-screen,
.saved-screen {
  background: #000;
}

/* ── Skärm 1: kamera ── */
/* ── Skärm 1: kamera ── */
.cam-screen {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

/* Live video-flöde – täcker hela skärmen */
.cam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: none;           /* visas av JS när stream är redo */
}

/* Fallback-text när kamera ej är tillgänglig */
.cam-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 160px;
  pointer-events: none;
}

/* Viewfinder-hörn */
.vf-tl, .vf-tr, .vf-bl, .vf-br {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(255,255,255,.65);
  border-style: solid;
  z-index: 3;
}
.vf-tl { top: 72px; left: 22px; border-width: 3px 0 0 3px; }
.vf-tr { top: 72px; right: 22px; border-width: 3px 3px 0 0; }
.vf-bl { bottom: 175px; left: 22px; border-width: 0 0 3px 3px; }
.vf-br { bottom: 175px; right: 22px; border-width: 0 3px 3px 0; }

/* Dummy för gammal klass */
.cam-text {
  font-size: 1rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .02em;
}

/* Bottenrad – fast längst ner, ovanpå videon */
.cam-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: 160px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* GPS-indikator */
.cam-gps-box {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.gps-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse 1.4s ease infinite;
}
.gps-dot.ok    { background: #10b981; animation: none; }
.gps-dot.error { background: #ef4444; animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

.gps-lbl {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  text-align: center;
}

/* Slutarknapp – stor orange cirkel med vit ram */
.shutter {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  border: 5px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px rgba(255,255,255,.25);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, opacity .1s;
}
.shutter:active { transform: scale(.88); opacity: .85; }

/* Dashboard-länk */
.cam-nav {
  width: 64px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  opacity: .8;
  text-decoration: none;
}
.cam-nav:active { opacity: .5; }

/* ── Skärm 2: förhandsvisning ── */
.preview-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.preview-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.preview-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 5rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(0,0,0,.93) 28%);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.preview-coords {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  min-height: 1em;
}

.preview-textarea {
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 14px;
  color: #fff;
  font-size: 1.05rem;
  font-family: inherit;
  padding: 1rem 1.1rem;
  resize: none;
  outline: none;
  line-height: 1.55;
  -webkit-appearance: none;
}
.preview-textarea::placeholder { color: rgba(255,255,255,.38); }
.preview-textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.18);
}

/* FIXA-knapp */
.btn-fixa {
  display: block;
  width: 100%;
  min-height: 62px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .05em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .12s, transform .1s;
  text-align: center;
  text-decoration: none;
  line-height: 62px;
  padding: 0;
  box-sizing: border-box;
}
.btn-fixa:active   { opacity: .82; transform: scale(.98); }
.btn-fixa:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Kasta-knapp */
.btn-kasta {
  display: block;
  background: transparent;
  color: rgba(255,255,255,.5);
  border: none;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  padding: .6rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-kasta:active { opacity: .5; }

/* ── Skärm 3: sparat ── */
.saved-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saved-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
  color: #fff;
  width: 100%;
  max-width: 340px;
}

.saved-check {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
  animation: pop-in .3s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.saved-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}


