/* =====================================================================
   Sophie Caffe & Snacks — Feedback System
   CSS i pastër me CSS Variables (Light / Dark), pa framework.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --brand: #C1221D;
  --brand-600: #A61D19;
  --brand-700: #8F1714;
  --brand-50: #FCEDEB;
  --brand-100: #F9E3E0;
  --on-brand: #FFFFFF;

  --bg: #FBF4F3;
  --surface: #FFFFFF;
  --surface-2: #FDF8F7;
  --surface-3: #F7ECEA;
  --text: #2A1715;
  --text-2: #4E3532;
  --muted: #806966;
  --border: #EFDCD9;
  --border-strong: #E2C4C0;
  --focus: #C1221D;

  --success: #17834A;
  --success-bg: #E6F6EC;
  --warning: #B26B00;
  --warning-bg: #FFF4DC;
  --danger: #D1241F;
  --danger-bg: #FDE8E7;
  --info: #2457C5;
  --info-bg: #E8EFFD;

  --chart-1: #C1221D;
  --chart-2: #E08A3C;
  --chart-3: #6B4E3D;
  --chart-4: #2F8F83;
  --chart-5: #8E6CC2;
  --chart-grid: rgba(42, 23, 21, .08);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(80, 20, 15, .06);
  --shadow: 0 6px 24px -8px rgba(110, 25, 20, .18), 0 1px 3px rgba(80, 20, 15, .06);
  --shadow-lg: 0 24px 60px -20px rgba(110, 25, 20, .35);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;
  --sidebar-w: 256px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --brand: #E2443E;
  --brand-600: #C9302A;
  --brand-700: #A82420;
  --brand-50: #2C1716;
  --brand-100: #3A1C1A;
  --on-brand: #FFFFFF;

  --bg: #120B0A;
  --surface: #1C1312;
  --surface-2: #231817;
  --surface-3: #2C1F1D;
  --text: #F7EDEB;
  --text-2: #E2D2CF;
  --muted: #B29C98;
  --border: #3A2927;
  --border-strong: #523A37;
  --focus: #FF7A73;

  --success: #4CC786;
  --success-bg: #12291D;
  --warning: #F2B347;
  --warning-bg: #2E2310;
  --danger: #FF6B65;
  --danger-bg: #3A1513;
  --info: #7EA6FF;
  --info-bg: #15203A;

  --chart-1: #FF5E57;
  --chart-2: #F2A65A;
  --chart-3: #C9A58E;
  --chart-4: #4DC2B3;
  --chart-5: #B394E8;
  --chart-grid: rgba(247, 237, 235, .09);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 28px -10px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  touch-action: manipulation;           /* pa zoom me prekje të dyfishtë */
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;                    /* asnjë rrëshqitje anash në celular */
  min-height: 100vh;
  min-height: 100dvh;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 .75em; }
small, .small { font-size: .85em; }
.muted { color: var(--muted); }
abbr.req { color: var(--brand); text-decoration: none; font-weight: 700; cursor: help; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ---------- 3. Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 42px; padding: .55rem 1.05rem; border-radius: 11px;
  font: 600 14px/1.2 var(--font); letter-spacing: .01em;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd);
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: var(--brand); box-shadow: 0 6px 16px -6px rgba(193, 34, 29, .55); }
.btn-primary:hover { --btn-bg: var(--brand-600); }
.btn-danger { --btn-bg: var(--danger-bg); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: var(--danger); --btn-fg: #fff; }
.btn-ghost { --btn-bg: transparent; --btn-bd: var(--border); }
.btn-sm { min-height: 34px; padding: .35rem .75rem; font-size: 13px; border-radius: 9px; }
.btn-lg { min-height: 54px; padding: .8rem 1.75rem; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: inline-block; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Theme toggle */
.theme-toggle {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .3s var(--ease), background-color .2s;
}
.theme-toggle:hover { transform: rotate(15deg); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; grid-area: 1 / 1; transition: opacity .25s, transform .35s var(--ease); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
.theme-toggle.on-hero { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---------- 4. Cards, alerts, badges ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.25rem;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 1.02rem; margin: 0; }
.card-head .muted { font-size: .85rem; }

.alert {
  position: relative; padding: .85rem 2.5rem .85rem 1rem; border-radius: 12px; margin-bottom: 1rem;
  border: 1px solid transparent; font-size: 14px;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-close { position: absolute; right: .5rem; top: .45rem; border: 0; background: none; color: inherit; font-size: 20px; cursor: pointer; opacity: .7; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge-danger { background: var(--danger); color: #fff; }
.badge-danger-soft { background: var(--danger-bg); color: var(--danger); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-50); color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- 5. Form controls ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
input:not([type]), input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: 16px/1.4 var(--font);            /* ≥ 16px: Safari iOS nuk bën auto-zoom në fokus */
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea { resize: vertical; min-height: 110px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); background: var(--surface); }
input[type="date"] { min-height: 44px; display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: var(--date-icon-filter, none); cursor: pointer; }
[data-theme="dark"] { --date-icon-filter: invert(.85); }
.checkbox { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: 14px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); -webkit-appearance: checkbox; appearance: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-error { color: var(--danger); font-size: 13px; font-weight: 600; }
.help { color: var(--muted); font-size: 12.5px; }

/* ===================================================================
   6. PYETËSORI PUBLIK
   =================================================================== */
.public { background:
  radial-gradient(1200px 500px at 100% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
  var(--bg);
}
.survey-hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #C1221D 0%, #A61D19 55%, #8A1613 100%);
  border-bottom: 5px solid #7A1310;
}
[data-theme="dark"] .survey-hero { background: linear-gradient(120deg, #8E1915 0%, #6E1310 60%, #4E0D0B 100%); border-bottom-color: #3A0A08; }
.survey-hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; max-width: 1040px; margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) clamp(16px, 4vw, 32px);
  padding-top: max(clamp(18px, 4vw, 34px), env(safe-area-inset-top));
  padding-left: max(clamp(16px, 4vw, 32px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 4vw, 32px), env(safe-area-inset-right));
  display: grid; grid-template-columns: auto 1fr auto auto; gap: clamp(14px, 3vw, 32px); align-items: center;
}
.hero-logo { width: clamp(92px, 14vw, 140px); height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.hero-text h1 { font-family: var(--font-display); font-size: clamp(26px, 4.6vw, 42px); margin: 0 0 .25rem; letter-spacing: -.01em; }
.hero-text p { margin: 0 0 .7rem; opacity: .92; max-width: 34ch; font-size: clamp(14px, 1.8vw, 16px); }
.anon-pill {
  display: inline-block; padding: .3rem .85rem; border-radius: 999px; background: rgba(255,255,255,.16);
  font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.hero-meta { margin: 0; display: grid; gap: .35rem; min-width: 190px; }
.hero-meta div { display: grid; grid-template-columns: 64px 1fr; gap: .5rem; align-items: end; }
.hero-meta dt { font-size: 12px; opacity: .8; text-align: right; }
.hero-meta dd { margin: 0; border-bottom: 1px solid rgba(255,255,255,.55); font-weight: 600; font-size: 14px; min-height: 22px; padding-bottom: 1px; }

.survey-wrap { max-width: 1040px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) clamp(12px, 3vw, 24px) 40px;
  padding-left: max(clamp(12px, 3vw, 24px), env(safe-area-inset-left)); padding-right: max(clamp(12px, 3vw, 24px), env(safe-area-inset-right)); }
.survey-form { display: flex; flex-direction: column; gap: 1.25rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.branch-card { display: flex; flex-direction: column; gap: .6rem; }
.branch-locked { display: flex; align-items: center; gap: .9rem; }
.branch-locked small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.branch-locked strong { font-size: 1.15rem; }
.branch-icon { font-size: 26px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-50); }
.lock-pill, .table-pill {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--brand-50); color: var(--brand); margin-left: .4rem;
}
.lock-pill { margin-left: auto; }

.progress { position: sticky; top: 0; z-index: 20; height: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #E66A3C); transition: width .35s var(--ease); }

.section-title {
  display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .9rem;
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--brand); font-weight: 800;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.q-card {
  margin: 0; min-width: 0; padding: 1.05rem 1.15rem 1.15rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.q-card:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow); }
.q-card.wide { grid-column: 1 / -1; }
.q-card.has-error, .branch-card.has-error { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.q-card.is-answered .q-num { background: var(--brand); color: var(--on-brand); }
.q-title { display: flex; gap: .55rem; align-items: baseline; padding: 0; margin-bottom: .8rem; font-weight: 700; font-size: 15.5px; color: var(--text); text-transform: none; letter-spacing: 0; }
.q-num {
  flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px;
  background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 800; transition: background-color .2s, color .2s;
}
.q-hint { font-size: 12.5px; color: var(--muted); margin: -.4rem 0 .6rem; }
.q-error { display: block; color: var(--danger); font-size: 13px; font-weight: 600; margin-top: .45rem; min-height: 0; }
.q-error:empty { display: none; }
.q-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .35rem; }
.q-foot .q-error { margin-top: 0; }
.counter { color: var(--muted); margin-left: auto; }

/* Chips (radio / checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .5rem .95rem;
  border-radius: 11px; border: 1.5px solid var(--border-strong); background: var(--surface-2);
  font-size: 14.5px; font-weight: 500; color: var(--text-2); user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .12s var(--ease);
}
.chip span::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 5px; border: 1.5px solid var(--border-strong);
  background: var(--surface); transition: all .15s;
}
.chip input[type="radio"] + span::before { border-radius: 50%; }
.chip:hover span { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 700; }
.chip input:checked + span::before {
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
  border-color: var(--brand);
}
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:active + span { transform: scale(.97); }
.other-input { margin-top: .7rem; max-width: 420px; }

/* Rating 1–5 */
.rating { display: flex; align-items: center; gap: .6rem; flex-wrap: nowrap; }
.rating-end { font-size: 12px; color: var(--muted); font-weight: 600; flex: none; }
.rating-scale { display: flex; gap: .45rem; flex: 1; justify-content: center; }
.rating-pill { position: relative; cursor: pointer; flex: 0 1 52px; -webkit-tap-highlight-color: transparent; }
.rating-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rating-pill span {
  display: grid; place-items: center; aspect-ratio: 1 / 1; height: auto; width: 100%; max-width: 52px; min-width: 38px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--surface-2); font-weight: 800; font-size: 16px; color: var(--text-2);
  transition: all .18s var(--ease);
}
.rating-pill:hover span { border-color: var(--brand); transform: translateY(-2px); }
.rating-pill input:checked + span {
  background: var(--brand); border-color: var(--brand); color: var(--on-brand);
  transform: scale(1.08); box-shadow: 0 8px 18px -8px rgba(193, 34, 29, .8);
}
.rating-pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.rating[data-value="1"] .rating-pill:nth-child(-n+1) span,
.rating[data-value="2"] .rating-pill:nth-child(-n+1) span,
.rating[data-value="3"] .rating-pill:nth-child(-n+2) span,
.rating[data-value="4"] .rating-pill:nth-child(-n+3) span,
.rating[data-value="5"] .rating-pill:nth-child(-n+4) span { background: var(--brand-50); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); }

.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .5rem; }
.submit-row .btn-lg { min-width: 240px; }

/* Thank-you */
.thanks { text-align: center; padding: clamp(32px, 6vw, 64px) 1.5rem; max-width: 620px; margin: 2rem auto; animation: pop .5s var(--ease); }
.thanks h2 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 40px); color: var(--brand); margin-top: 1rem; }
.thanks .lead { font-size: 1.15rem; font-weight: 600; }
.thanks-sign { margin-top: 1.25rem; font-style: italic; color: var(--muted); }
.thanks-cup { width: 110px; margin: 0 auto; }
.thanks-ring { fill: var(--brand-50); stroke: var(--brand); stroke-width: 3; }
.thanks-check { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: draw .6s .25s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.survey-footer { text-align: center; padding: 26px 16px 34px; padding-bottom: max(34px, calc(env(safe-area-inset-bottom) + 20px)); background: #8F1714; color: #fff; }
[data-theme="dark"] .survey-footer { background: #3A0B09; }
.survey-footer p { margin: 0; font-size: 12.5px; opacity: .85; }
.survey-footer .footer-thanks { font-family: var(--font-display); font-style: italic; font-size: 17px; opacity: 1; margin-bottom: .3rem; }

/* ===================================================================
   7. ADMIN SHELL
   =================================================================== */
.admin { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 1rem;
  background: var(--surface); border-right: 1px solid var(--border); padding: 1.1rem .9rem; z-index: 60;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: .25rem .4rem 1rem; border-bottom: 1px solid var(--border); }
.sidebar-brand img { width: 58px; height: auto; }
.sidebar-brand strong { display: block; font-family: var(--font-display); font-size: 20px; color: var(--brand); line-height: 1.1; }
.sidebar-brand span { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.sidebar-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 11px;
  color: var(--text-2); font-weight: 600; text-decoration: none; transition: background-color .15s, color .15s;
}
.sidebar-nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar-nav a:hover { background: var(--surface-3); color: var(--text); }
.sidebar-nav a.active { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 18px -10px rgba(193, 34, 29, .9); }
.sidebar-backdrop { display: none; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .9rem;
  padding: .75rem clamp(14px, 2.5vw, 28px); min-height: 66px;
  padding-top: max(.75rem, env(safe-area-inset-top));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: clamp(17px, 2.2vw, 21px); margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.menu-btn { display: none; }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .25rem .7rem .25rem .3rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: 13px; }
.user-meta small { font-size: 11.5px; color: var(--muted); }
.admin-content { padding: clamp(14px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 1.25rem; flex: 1; }
.admin-content.standalone { max-width: 760px; margin: 0 auto; width: 100%; }
.admin-footer { padding: 1rem clamp(14px, 2.5vw, 28px) 1.5rem; color: var(--muted); font-size: 12.5px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 1.25rem; }
.page-head p { margin: .2rem 0 0; color: var(--muted); font-size: 14px; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: .85rem; align-items: flex-end; padding: 1rem 1.1rem; }
.filter-bar .field { flex: 1 1 170px; }
.filter-bar .field-actions { flex: 0 0 auto; }
.filter-bar .field-actions .btn { min-height: 44px; }
.filter-bar .field-check { flex: 0 0 auto; padding-bottom: .65rem; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .35rem;
  padding: 1.15rem 1.2rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand); opacity: .9; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kpi-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-icon { font-size: 20px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-50); }
.kpi-value { font-size: clamp(26px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: .2rem; padding: .12rem .5rem; border-radius: 999px; font-weight: 800; font-size: 12px; }
.delta.up { background: var(--success-bg); color: var(--success); }
.delta.down { background: var(--danger-bg); color: var(--danger); }
.delta.flat { background: var(--surface-3); color: var(--muted); }
.kpi-meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: .25rem; }
.kpi-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #E8774A); }

/* Charts */
.chart-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.chart-grid > .card { grid-column: span 6; min-width: 0; }
.chart-grid > .card.span-12 { grid-column: span 12; }
.chart-grid > .card.span-8 { grid-column: span 8; }
.chart-grid > .card.span-4 { grid-column: span 4; }
.chart-box { position: relative; height: 290px; }
.chart-box.tall { height: 340px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; }

/* Problem bars (pure CSS fallback/list) */
.bars { display: flex; flex-direction: column; gap: .6rem; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 38%) minmax(60px, 1fr) auto; gap: .7rem; align-items: center; font-size: 13.5px; }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--brand); }
.bar-row .val { white-space: nowrap; text-align: right; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Feed "Fjala Juaj" */
.feed { display: flex; flex-direction: column; gap: .75rem; }
.feed-item { display: grid; grid-template-columns: auto 1fr; gap: .85rem; padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.feed-item.is-alert { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: color-mix(in srgb, var(--danger-bg) 55%, var(--surface)); }
.feed-score { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--surface-3); color: var(--text); }
.feed-score.good { background: var(--success-bg); color: var(--success); }
.feed-score.mid { background: var(--warning-bg); color: var(--warning); }
.feed-score.bad { background: var(--danger); color: #fff; }
.feed-meta { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: .25rem; }
.feed-text { margin: 0; font-size: 14.5px; color: var(--text); }
.feed-text.empty { color: var(--muted); font-style: italic; }
.feed-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.row-alert td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn, .table .actions form + .btn, .table .actions .btn + form { margin-left: .35rem; }
.table .comment-cell { max-width: 360px; min-width: 200px; }
.table .comment-cell p { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.score-pill { display: inline-block; min-width: 44px; text-align: center; padding: .15rem .45rem; border-radius: 8px; font-weight: 800; font-size: 13px; }
.score-pill.good { background: var(--success-bg); color: var(--success); }
.score-pill.mid { background: var(--warning-bg); color: var(--warning); }
.score-pill.bad { background: var(--danger-bg); color: var(--danger); }

.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.bulk-bar { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-radius: 12px; background: var(--brand-50); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }

/* Detail / definition list */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1.5rem; }
.detail-grid .row { display: grid; grid-template-columns: 34px 1fr auto; gap: .6rem; padding: .6rem 0; border-bottom: 1px dashed var(--border); align-items: center; }
.detail-grid .row .q-num { min-width: 26px; }
.detail-grid .row .ans { font-weight: 700; text-align: right; }

/* Pagination */
.pagination { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0 .6rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .gap { border: 0; background: none; }

/* Modal (<dialog>) */
dialog.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(20, 8, 7, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.08rem; }
.modal-body { padding: 1.25rem; overflow-y: auto; max-height: calc(100vh - 190px); }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-2); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .empty-icon { font-size: 42px; margin-bottom: .5rem; }
.empty-state h2 { color: var(--text); }

/* Login */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 500px at 15% 0%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
              radial-gradient(700px 400px at 100% 100%, color-mix(in srgb, #E8774A 14%, transparent), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); padding: 2rem 1.75rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.auth-card .auth-logo { width: 120px; margin: 0 auto 1rem; }
.auth-card h1 { text-align: center; font-family: var(--font-display); font-size: 26px; margin-bottom: .25rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.5rem; font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 1rem; }
.auth-theme { position: fixed; top: 16px; right: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: .4rem; font-size: 13px; font-weight: 700; }

/* ---------- QR codes ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: .65rem; text-align: center; }
.qr-card .qr-canvas { width: 200px; height: 200px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.qr-card .qr-canvas canvas, .qr-card .qr-canvas img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-card h3 { margin: .2rem 0 0; font-size: 1.05rem; }
.qr-card code { font-size: 12px; word-break: break-all; color: var(--muted); background: var(--surface-2); padding: .3rem .5rem; border-radius: 8px; max-width: 100%; }
.qr-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }

/* Print-ready QR cards */
.print-sheet { background: #fff; color: #2A1715; }
.print-toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; padding: 12px; background: #2A1715; }
.print-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8mm; width: 210mm; margin: 10mm auto; padding: 0 10mm; }
.table-card {
  break-inside: avoid; page-break-inside: avoid; height: 128mm; border-radius: 6mm; overflow: hidden; position: relative;
  border: 0.4mm solid #E9CFCB; display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff;
}
.table-card .tc-head { width: 100%; background: linear-gradient(120deg, #C1221D, #8F1714); padding: 5mm 4mm 4mm; display: flex; flex-direction: column; align-items: center; gap: 1mm; }
.table-card .tc-head img { width: 30mm; height: auto; }
.table-card .tc-title { font-family: Georgia, serif; font-size: 15pt; font-weight: 700; color: #C1221D; margin: 4mm 4mm 2mm; line-height: 1.2; }
.table-card .tc-qr { width: 46mm; height: 46mm; }
.table-card .tc-qr canvas, .table-card .tc-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.table-card .tc-foot { margin-top: auto; padding: 0 4mm 5mm; font-size: 9pt; color: #806966; }
.table-card .tc-foot strong { display: block; color: #2A1715; font-size: 10.5pt; }
.table-card .tc-badge { position: absolute; top: 3mm; right: 3mm; background: #fff; color: #C1221D; font-weight: 800; font-size: 9pt; padding: 1mm 2.5mm; border-radius: 3mm; }

/* ---------- 8. Responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid > .card, .chart-grid > .card.span-8, .chart-grid > .card.span-4 { grid-column: span 12; }
}
@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 84vw); transform: translateX(-105%);
    transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20, 8, 7, .45); }
  .menu-btn { display: inline-grid; }
  .user-meta { display: none; }
  .user-chip { padding: .2rem; }
  .hero-inner { grid-template-columns: auto 1fr auto; }
  .hero-meta { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); min-width: 0; }
  .hero-meta div { grid-template-columns: auto 1fr; }
  .theme-toggle.on-hero { grid-row: 1; grid-column: 3; align-self: start; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .q-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .kpi { padding: .95rem; }
  .kpi-icon { display: none; }
  .chart-box { height: 250px; }
  .bar-row { grid-template-columns: 1fr 70px; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .hero-inner { grid-template-columns: auto 1fr; gap: 12px 14px; }
  .theme-toggle.on-hero { position: absolute; top: 14px; right: 14px; }
  .hero-text { padding-right: 46px; }
  .submit-row { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .submit-row .btn-lg { width: 100%; }
  .filter-bar .field { flex: 1 1 140px; }
  .table .hide-sm { display: none; }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta div { grid-template-columns: 64px 1fr; }
  .rating { gap: .35rem; }
  .rating-end { font-size: 10.5px; max-width: 46px; line-height: 1.15; }
  .rating-scale { gap: .3rem; }
  .chip span { padding: .45rem .75rem; font-size: 14px; }
  .lock-pill { display: none; }
}
/* Tablet te banaku: objektiva më të mëdha prekjeje */
@media (pointer: coarse) and (min-width: 721px) {
  .chip span { min-height: 48px; padding: .6rem 1.1rem; font-size: 15.5px; }
  .rating-pill span { min-width: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 9. Print ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; color: #000; }
  .no-print, .print-toolbar, .sidebar, .topbar, .admin-footer { display: none !important; }
  .print-grid { margin: 8mm auto; }
  .table-card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-card .tc-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Legend brenda kartës (jo mbi kufirin e fieldset-it) */
fieldset.q-card > legend.q-title { float: left; width: 100%; }
fieldset.q-card > legend.q-title + * { clear: both; }

/* ===================================================================
   10. KONCEPTET: seksionet, zgjedhja e njësisë, tema SOPHIE BOHEMIAN
   =================================================================== */
.section-note { font-size: 11px; letter-spacing: .02em; text-transform: none; color: var(--muted); font-weight: 500; }
.q-card[hidden] { display: none !important; }
.q-card[data-depends] { animation: pop .3s var(--ease); }

.wordmark { display: block; font-size: 12px; letter-spacing: .55em; font-weight: 700; margin-bottom: .35rem; opacity: .9; }

.branch-picker { display: flex; flex-direction: column; gap: .5rem; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.picker-card { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 3rem 1.1rem 1.2rem; color: var(--text); text-decoration: none !important; transition: transform .15s var(--ease), border-color .2s, box-shadow .2s; }
.picker-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow); }
.picker-card strong { font-size: 1.05rem; }
.picker-go { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--brand); }
.picker-bohemian { background: linear-gradient(135deg, var(--surface), #F6ECDC); }
[data-theme="dark"] .picker-bohemian { background: linear-gradient(135deg, var(--surface), #2A2016); }

.concept-badge { display: inline-block; padding: .12rem .5rem; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.concept-badge.caffe { background: var(--brand-50); color: var(--brand); }
.concept-badge.bohemian { background: #F3E6CF; color: #7A4E1D; }
[data-theme="dark"] .concept-badge.bohemian { background: #3A2B19; color: #E8C48F; }

/* ---------- Tema Bohemian (krem + e kuqe, si PDF-ja) ---------- */
.concept-bohemian {
  --bg: #F6EEE2;
  --surface: #FFFDF9;
  --surface-2: #FBF6EE;
  --surface-3: #F1E6D4;
  --border: #EADBC4;
  --border-strong: #DCC6A6;
  --brand-50: #F8E7DF;
  --text: #2B1C12;
  --text-2: #4D3626;
  --muted: #8A715C;
}
[data-theme="dark"].concept-bohemian,
[data-theme="dark"] .concept-bohemian {
  --bg: #120D09;
  --surface: #1C1510;
  --surface-2: #231A13;
  --surface-3: #2E2319;
  --border: #3A2C20;
  --border-strong: #574331;
  --brand: #EF5A4E;
  --brand-600: #D9443A;
  --brand-50: #3B1D16;
  --text: #F6ECDD;
  --text-2: #E6D6C0;
  --muted: #B9A287;
  --focus: #FF8A80;
  --chart-grid: rgba(246, 236, 221, .09);
}
body.concept-bohemian.public { background: radial-gradient(1200px 500px at 100% -10%, rgba(193, 34, 29, .06), transparent 60%), var(--bg); }
body.concept-bohemian .survey-hero {
  background: #EFE0C6; color: #C1221D; border-bottom: 5px solid #C1221D;
}
body.concept-bohemian .survey-hero::after { background: radial-gradient(circle, rgba(255, 255, 255, .5), transparent 70%); }
body.concept-bohemian .hero-text h1 { color: #C1221D; }
body.concept-bohemian .hero-text p { color: #6B4E3D; opacity: 1; }
body.concept-bohemian .wordmark { color: #C1221D; }
body.concept-bohemian .anon-pill { background: rgba(193, 34, 29, .1); color: #8F1714; }
body.concept-bohemian .hero-meta dt { color: #6B4E3D; opacity: 1; }
body.concept-bohemian .hero-meta dd { color: #2B1C12; border-bottom-color: rgba(43, 28, 18, .45); }
body.concept-bohemian .hero-logo { filter: drop-shadow(0 6px 14px rgba(120, 60, 20, .25)); }
body.concept-bohemian .theme-toggle.on-hero { background: rgba(255, 255, 255, .6); border-color: rgba(193, 34, 29, .25); color: #8F1714; }
body.concept-bohemian .survey-footer { background: #C1221D; }
/* Bohemian — Dark: espresso i errët + krem + e kuqe (pa njolla/gradient të turbullt) */
[data-theme="dark"] body.concept-bohemian .survey-hero {
  background: #1E1610;
  background-image: linear-gradient(180deg, #261B13 0%, #1B140E 100%);
  color: #F6ECDD; border-bottom: 4px solid #C1221D;
}
[data-theme="dark"] body.concept-bohemian .survey-hero::after { display: none; }
[data-theme="dark"] body.concept-bohemian .wordmark { color: #EF5A4E; }
[data-theme="dark"] body.concept-bohemian .hero-text h1 { color: #F3E2C4; }
[data-theme="dark"] body.concept-bohemian .hero-text p { color: #C7B297; }
[data-theme="dark"] body.concept-bohemian .anon-pill { background: rgba(239, 90, 78, .14); color: #FFB4AA; }
[data-theme="dark"] body.concept-bohemian .hero-meta dt { color: #B9A287; }
[data-theme="dark"] body.concept-bohemian .hero-meta dd { color: #F6ECDD; border-bottom-color: rgba(246, 236, 221, .28); }
[data-theme="dark"] body.concept-bohemian .hero-logo { filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .55)); }
[data-theme="dark"] body.concept-bohemian .theme-toggle.on-hero { background: rgba(246, 236, 221, .08); border-color: rgba(246, 236, 221, .2); color: #F6ECDD; }
[data-theme="dark"] body.concept-bohemian.public { background: var(--bg); }
[data-theme="dark"] body.concept-bohemian .survey-footer { background: #1E1610; border-top: 4px solid #C1221D; }
[data-theme="dark"] body.concept-bohemian .survey-footer .footer-thanks { color: #F3E2C4; }
[data-theme="dark"] body.concept-bohemian .chip input:checked + span { background: #3B1D16; border-color: #EF5A4E; color: #FFB4AA; }
[data-theme="dark"] body.concept-bohemian .rating-pill input:checked + span { background: #EF5A4E; border-color: #EF5A4E; color: #1B140E; box-shadow: 0 8px 18px -8px rgba(239, 90, 78, .7); }
[data-theme="dark"] body.concept-bohemian .section-title { color: #EF5A4E; }
[data-theme="dark"] body.concept-bohemian .q-num { background: #3B1D16; color: #FF8A80; }
[data-theme="dark"] body.concept-bohemian .q-card.is-answered .q-num { background: #EF5A4E; color: #1B140E; }
[data-theme="dark"] body.concept-bohemian .branch-icon { background: #2E2319; }
[data-theme="dark"] body.concept-bohemian .table-pill,
[data-theme="dark"] body.concept-bohemian .lock-pill { background: #3B1D16; color: #FFB4AA; }
[data-theme="dark"] body.concept-bohemian .thanks-ring { fill: #2E2319; stroke: #EF5A4E; }
[data-theme="dark"] body.concept-bohemian .thanks-check { stroke: #EF5A4E; }
[data-theme="dark"] body.concept-bohemian .thanks h2 { color: #F3E2C4; }

/* KPI grid me 8 karta */
.kpi-grid.kpi-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1380px) { .kpi-grid.kpi-8 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .kpi-grid.kpi-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px)  { .kpi-grid.kpi-8 { grid-template-columns: 1fr; } }

/* QR karta Bohemian */
.table-card.bohemian { border-color: #E4D2B5; background: #FFFCF6; }
.table-card.bohemian .tc-head { background: #EFE0C6; border-bottom: 1.2mm solid #C1221D; }
.table-card.bohemian .tc-word { font-size: 8pt; letter-spacing: 4mm; color: #C1221D; font-weight: 700; margin-left: 4mm; }

/* Zgjedhja e konceptit te profili i njësisë */
.concept-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .35rem; }
.concept-option { position: relative; cursor: pointer; }
.concept-option input { position: absolute; opacity: 0; }
.concept-option > span { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface-2); transition: border-color .15s, box-shadow .15s; }
.concept-option strong { font-size: 15px; }
.concept-option em { color: var(--brand); font-style: normal; font-weight: 600; font-size: 13.5px; }
.concept-option small { color: var(--muted); }
.concept-option-bohemian > span { background: linear-gradient(135deg, var(--surface-2), #F6ECDC); }
[data-theme="dark"] .concept-option-bohemian > span { background: linear-gradient(135deg, var(--surface-2), #2A2016); }
.concept-option input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.concept-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 720px) { .concept-choice { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .anon-pill { letter-spacing: .08em; font-size: 10px; white-space: nowrap; padding: .3rem .7rem; } }
@media (max-width: 720px) {
  .section-title { flex-wrap: wrap; row-gap: .2rem; }
  .section-title::after { order: 2; flex-basis: 100%; height: 0; }
  .section-title .section-note { order: 3; flex-basis: 100%; letter-spacing: 0; }
}


/* ===================================================================
   11. FALLBACK për shfletues pa color-mix() (Safari iOS < 16.2,
       Android WebView të vjetër, Samsung Internet i vjetër)
   =================================================================== */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .public { background: var(--bg); }
  .topbar { background: var(--bg); }
  input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(193, 34, 29, .2); }
  .q-card:focus-within { border-color: var(--brand); }
  .q-card.has-error, .branch-card.has-error { box-shadow: 0 0 0 3px rgba(209, 36, 31, .15); }
  .alert-success, .alert-error, .alert-warning, .alert-info { border-color: currentColor; }
  .rating[data-value] .rating-pill span { border-color: var(--border-strong); }
  .rating-pill input:checked + span { border-color: var(--brand); }
  .feed-item.is-alert { background: var(--danger-bg); border-color: var(--danger); }
  .bulk-bar { border-color: var(--brand); }
  .concept-option input:checked + span { box-shadow: 0 0 0 3px rgba(193, 34, 29, .2); }
  .auth-page { background: var(--bg); }
}
@supports not (aspect-ratio: 1 / 1) {
  .rating-pill span { height: 44px; width: 44px; }
}

/* ===================================================================
   12. SHKALLA 1–5 — përshtatet në çdo gjerësi (320px → desktop),
       pa dalë kurrë jashtë ekranit (pa scroll horizontal në celular).
   =================================================================== */
.rating { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .5rem; align-items: center; }
.rating-scale { grid-column: 1 / -1; grid-row: 1; display: flex; justify-content: space-between; gap: clamp(.3rem, 2.2vw, .65rem); min-width: 0; }
.rating > .rating-end:first-child { grid-row: 2; grid-column: 1; justify-self: start; }
.rating > .rating-end:last-child { grid-row: 2; grid-column: 2; justify-self: end; text-align: right; }
.rating-end { font-size: 12px; max-width: none; line-height: 1.2; }
.rating-end::before { font-weight: 800; color: var(--brand); }
.rating > .rating-end:first-child::before { content: "1 = "; }
.rating > .rating-end:last-child::before { content: "5 = "; }
.rating-pill { flex: 1 1 0; min-width: 0; max-width: 58px; }
.rating-pill span { width: 100%; min-width: 0; max-width: none; font-size: clamp(14px, 4vw, 17px); }
@media (max-width: 460px) {
  .rating { gap: .4rem; }
  .rating-scale { gap: .35rem; }
  .rating-end { font-size: 11.5px; }
}

/* ===================================================================
   13. NAVIGIMI — Desktop: sidebar · Celular/Tablet: shirit i poshtëm me ikona
   =================================================================== */
button.user-chip { font: inherit; color: inherit; cursor: pointer; text-align: left; }
button.user-chip:hover { border-color: var(--brand); }
.topbar-logo { display: none; }
.tabbar, .more-sheet, .sheet-backdrop { display: none; }

/* Filtrat: toggle vetëm në celular */
.filter-bar { flex-direction: column; align-items: stretch; }
.filter-fields { display: flex; flex-wrap: wrap; gap: .85rem; align-items: flex-end; width: 100%; }
.filter-fields .field { flex: 1 1 170px; }
.filter-fields .field-actions { flex: 0 0 auto; }
.filter-fields .field-check { flex: 0 0 auto; padding-bottom: .65rem; }
.filter-toggle { display: none; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar, .menu-btn, .sidebar-backdrop, .topbar-logout { display: none !important; }

  /* Topbar kompakt */
  .topbar { gap: .6rem; min-height: 58px; padding: .5rem max(12px, env(safe-area-inset-right)) .5rem max(12px, env(safe-area-inset-left));
    padding-top: max(.5rem, env(safe-area-inset-top)); }
  .topbar-logo { display: block; width: 40px; height: auto; flex: none; }
  .topbar-title { font-size: 17px; }
  .topbar-actions { gap: .45rem; }
  .topbar .theme-toggle { width: 40px; height: 40px; }
  .user-meta { display: none; }
  .user-chip { padding: 2px; border-radius: 50%; }

  .admin-content { padding: 14px max(12px, env(safe-area-inset-right)) 18px max(12px, env(safe-area-inset-left)); gap: 1rem; }
  body.has-tabbar .admin-main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .admin-footer { text-align: center; }

  /* Shiriti i poshtëm */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(64px + env(safe-area-inset-bottom)); padding: 4px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px -12px rgba(60, 15, 10, .25);
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .tabbar { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
    [data-theme="dark"] .tabbar { background: rgba(28, 19, 18, .86); }
  }
  .tab {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; padding: 6px 2px; border-radius: 12px; cursor: pointer;
    color: var(--muted); font: 600 11px/1.1 var(--font); text-decoration: none !important; -webkit-tap-highlight-color: transparent;
    position: relative;
  }
  .tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
  .tab circle { fill: currentColor; stroke: none; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.active { color: var(--brand); }
  .tab.active::before { content: ""; position: absolute; top: 2px; width: 28px; height: 3px; border-radius: 3px; background: var(--brand); }
  .tab:active svg { transform: scale(.9); }

  /* Fleta "Më shumë" (bottom sheet) */
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(20, 8, 7, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sheet-backdrop.show { opacity: 1; pointer-events: auto; }
  .more-sheet {
    display: flex; flex-direction: column; gap: .7rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 8px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(105%); transition: transform .3s var(--ease);
  }
  .more-sheet[hidden] { display: flex !important; visibility: hidden; }
  .more-sheet.open { transform: none; visibility: visible; }
  .sheet-handle { width: 40px; height: 5px; border-radius: 5px; background: var(--border-strong); margin: 2px auto 4px; }
  .sheet-user { display: flex; align-items: center; gap: .8rem; padding: .8rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
  .sheet-user .avatar { width: 44px; height: 44px; font-size: 18px; flex: none; }
  .sheet-user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
  .sheet-user-meta strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-user-meta small { color: var(--muted); font-size: 13px; }
  .sheet-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
  .sheet-item { display: flex; align-items: center; gap: .85rem; min-height: 54px; padding: .55rem 1rem; color: var(--text); text-decoration: none !important;
    font-weight: 600; font-size: 15.5px; background: var(--surface); }
  .sheet-item + .sheet-item { border-top: 1px solid var(--border); }
  .sheet-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); flex: none; }
  .sheet-item span { flex: 1; }
  .sheet-item i { font-style: normal; color: var(--muted); font-size: 18px; }
  .sheet-item.active { color: var(--brand); }
  .sheet-item.active svg { color: var(--brand); }
  .sheet-theme .theme-toggle { width: 38px; height: 38px; }
  .more-sheet .btn-danger svg { width: 18px; height: 18px; }
  .sheet-cancel { min-height: 46px; }
  body.sheet-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .filter-bar { padding: .35rem; gap: 0; }
  .filter-toggle {
    display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 52px; padding: .55rem .75rem;
    border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; border-radius: 10px;
  }
  .filter-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; flex: none; }
  .filter-summary { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
  .filter-summary strong { font-size: 14px; }
  .filter-summary small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .filter-chevron { color: var(--muted); transition: transform .2s; }
  .filter-bar.is-open .filter-chevron { transform: rotate(180deg); }
  .filter-bar .filter-fields { display: none; padding: .5rem .55rem .65rem; border-top: 1px solid var(--border); margin-top: .2rem;
    grid-template-columns: 1fr 1fr; gap: .7rem; }
  .filter-bar.is-open .filter-fields { display: grid; }
  .filter-fields .field { min-width: 0; }
  .filter-fields .field:first-child, .filter-fields .field-actions, .filter-fields .field-check,
  .filter-fields .field:has(#f-q), .filter-fields .field:has(#f-concept) { grid-column: 1 / -1; }
  .filter-fields .field-actions .btn { width: 100%; }
  .filter-fields .field-check { padding-bottom: 0; }
  /* QR: formulari pa toggle mbetet i hapur */
  .filter-bar:not([data-filter-form]) { padding: .9rem; gap: .7rem; }
  .page-head .toolbar { width: 100%; }
  .page-head .toolbar .btn { flex: 1; }
}
@supports not selector(:has(*)) {
  @media (max-width: 720px) { .filter-fields .field { grid-column: 1 / -1; } }
}
@media (max-width: 400px) {
  .filter-bar .filter-fields { grid-template-columns: 1fr; }
}

/* ===================================================================
   14. KARTAT MOBILE (Përgjigjet · Njësitë · Përdoruesit) + QR / Tavolinat
   =================================================================== */
.m-list { display: none; }
@media (max-width: 720px) {
  .table-wrap.has-cards { display: none; }
  .m-list { display: flex; flex-direction: column; gap: .75rem; }
}
.m-card {
  display: flex; flex-direction: column; gap: .6rem; padding: .95rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-width: 0;
}
.m-card.is-alert { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger), var(--shadow-sm); }
.m-card-top { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.m-card-top .avatar { width: 40px; height: 40px; flex: none; }
.m-card-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.m-card-title strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-card-title small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-card .score-pill { font-size: 15px; min-width: 48px; padding: .3rem .5rem; flex: none; }
.m-check { display: grid; place-items: center; width: 32px; height: 32px; flex: none; }
.m-check input { width: 22px; height: 22px; accent-color: var(--brand); }
.m-badges { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.m-badges code { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: .15rem .45rem; border-radius: 6px; word-break: break-all; }
.m-line { margin: 0; font-size: 13.5px; color: var(--text-2); }
.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: .4rem; margin: 0; }
.m-stats.m-stats-2 { grid-template-columns: 1fr 1fr; }
.m-stats div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .4rem .55rem; min-width: 0; }
.m-stats dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.m-stats dd { margin: 0; font-weight: 800; font-size: 14.5px; overflow-wrap: anywhere; }
.m-stats-2 dd { font-weight: 600; font-size: 13px; }
.m-comment { margin: 0; font-size: 14px; color: var(--text); background: var(--surface-2); border-left: 3px solid var(--brand); padding: .5rem .7rem; border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.m-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .45rem; }
.m-actions form { display: contents; }
.m-actions .btn { width: 100%; min-height: 42px; }

/* Tab-et e QR (QR i njësive | Tavolinat) */
.segmented { display: flex; gap: .3rem; padding: .3rem; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border); align-self: flex-start; max-width: 100%; }
.segmented a { flex: 1; text-align: center; padding: .6rem 1.1rem; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); text-decoration: none !important; white-space: nowrap; }
.segmented a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.qr-card-head { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; text-align: center; }
.qr-card-head strong { font-size: 1rem; }
.tables-form, .tables-count { display: flex; flex-wrap: wrap; gap: .85rem; align-items: flex-end; }
.tables-form .field, .tables-count .field { flex: 1 1 150px; }
.tables-form .tables-branch { flex: 2 1 260px; }
.tables-form .field-actions, .tables-count .field-actions { flex: 0 0 auto; }

@media (max-width: 720px) {
  .segmented { align-self: stretch; }
  .segmented a { padding: .65rem .5rem; }
  .qr-grid { grid-template-columns: 1fr; }
  .qr-card .qr-canvas { width: min(240px, 70vw); height: auto; aspect-ratio: 1 / 1; }
  .qr-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .qr-actions .btn { width: 100%; min-height: 42px; }
  .qr-card code { font-size: 11px; }
  .tables-form, .tables-count { display: grid; grid-template-columns: 1fr 1fr; }
  .tables-form .tables-branch, .tables-form .field-actions, .tables-count .field, .tables-count .field-actions { grid-column: 1 / -1; }
  .tables-form .btn, .tables-count .btn { width: 100%; }
  .page-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .page-head > .btn, .page-head .toolbar { width: 100%; }
  .page-head > .btn, .page-head .toolbar .btn { flex: 1; justify-content: center; }
  .page-head h2 { font-size: 1.12rem; }
  .form-grid .flex { flex-direction: column; align-items: stretch; }
  .form-grid .flex .btn { width: 100%; }
  .chart-grid { gap: .8rem; }
  .card { padding: 1rem; }
  .bulk-bar { position: sticky; top: 62px; z-index: 30; }
  .detail-grid .row { grid-template-columns: 30px 1fr; }
  .detail-grid .row .ans { grid-column: 2; text-align: left; }
}


/* ===================================================================
   15. LOGO SI LINK + BUTONI "KTHEHU NË FAQEN FILLESTARE"
   =================================================================== */
.hero-logo-link { display: block; border-radius: 16px; line-height: 0; transition: transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.hero-logo-link:hover { transform: scale(1.03); }
.hero-logo-link:active { transform: scale(.97); }
.hero-logo-link:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
body.concept-bohemian .hero-logo-link:focus-visible { outline-color: #C1221D; }
.thanks-home { margin-top: 1.5rem; }
.thanks-home svg { width: 20px; height: 20px; }
@media (max-width: 720px) { .thanks-home { width: 100%; } }

/* ===================================================================
   16. 2FA (TOTP) + NJOFTIMET TELEGRAM
   =================================================================== */
.twofa-icon { font-size: 34px; text-align: center; margin: -.25rem 0 .25rem; }
.otp-input { font: 700 26px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .45em; text-align: center; padding-left: .45em !important; }
.otp-input.recovery { letter-spacing: .15em; font-size: 22px !important; }
.otp-input::placeholder { color: var(--border-strong); }
.twofa-links { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1rem; font-size: 14px; }
.link-btn { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; padding: .3rem; }
.link-btn:hover { color: var(--brand); }

.twofa-setup { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem 2rem; align-items: start; }
.twofa-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .55rem; color: var(--text-2); grid-column: 1; }
.twofa-qr-wrap { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.twofa-qr { width: 220px; height: 220px; padding: 12px; background: #fff; border-radius: 16px; border: 1px solid var(--border); }
.twofa-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.twofa-manual { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.twofa-key { font: 700 15px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: .45rem .7rem; letter-spacing: .06em; word-break: break-all; user-select: all; }
.twofa-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; grid-column: 1; }
.twofa-form .field { flex: 1 1 200px; }
.twofa-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: .75rem; }
.twofa-actions .twofa-form { align-content: flex-start; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.recovery-box { border: 2px solid var(--warning); background: var(--warning-bg); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1.25rem; color: var(--text); }
.recovery-box > strong { color: var(--warning); }
.recovery-codes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: .75rem 0; padding: 0; list-style: none; counter-reset: rc; }
.recovery-codes li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .5rem; text-align: center; }
.recovery-codes code { font: 700 16px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }

.toggle-list { display: flex; flex-direction: column; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row > span { display: flex; flex-direction: column; min-width: 0; }
.toggle-row small { color: var(--muted); font-size: 12.5px; }
.toggle-row select { width: auto; min-width: 190px; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background-color .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch:checked { background: var(--success); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.chat-list { display: grid; gap: .5rem; }
.chat-pick { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; padding: .65rem .85rem; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.chat-pick small { color: var(--muted); }
.chat-pick:hover, .chat-pick.selected { border-color: var(--brand); background: var(--brand-50); }
.tg-help summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.tg-help ol { margin: .75rem 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }

@media (max-width: 860px) {
  .twofa-setup { grid-template-columns: 1fr; }
  .twofa-qr-wrap, .twofa-steps, .twofa-form { grid-column: 1; grid-row: auto; }
  .twofa-actions { grid-template-columns: 1fr; }
  .recovery-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .toggle-row { align-items: flex-start; }
  .toggle-row:has(select) { flex-direction: column; align-items: stretch; }
  .toggle-row select { width: 100%; }
  .twofa-form .btn { width: 100%; }
}
@media print {
  body.admin .admin-content > *:not(.chart-grid), .tabbar, .twofa-setup, .twofa-actions, .chart-grid > .card:not(#2fa) { display: none !important; }
}


/* ===================================================================
   17. PANELI I SURVEY-VE
   =================================================================== */
.custom-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cs-item { border: 1px solid var(--border); border-radius: 12px; padding: .85rem; background: var(--surface-2); display: flex; flex-direction: column; gap: .5rem; }
.cs-head { display: flex; flex-direction: column; }
.preview-banner a { margin-left: .5rem; font-weight: 700; }

.survey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.survey-card { display: flex; flex-direction: column; gap: .7rem; }
.survey-card .sv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.survey-card h3 { margin: 0; font-size: 1.1rem; }
.survey-card .sv-title { color: var(--brand); font-weight: 600; font-style: italic; }
.survey-card .sv-swatch { width: 38px; height: 38px; border-radius: 10px; flex: none; border: 1px solid var(--border); }
.sv-swatch.caffe { background: linear-gradient(135deg, #C1221D, #8F1714); }
.sv-swatch.bohemian { background: linear-gradient(135deg, #EFE0C6 60%, #C1221D 60%); }
.sv-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.sv-actions form { display: contents; }

.editor-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.editor-side { position: sticky; top: 80px; }
.sec-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.sec-card + .sec-card { margin-top: 1rem; }
.sec-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sec-head h3 { margin: 0; font-size: 1rem; flex: 1; min-width: 140px; }
.sec-head .sec-note { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-item { border-bottom: 1px solid var(--border); }
.q-item:last-child { border-bottom: 0; }
.q-item.inactive { opacity: .55; }
.q-row { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; }
.q-row .q-num { flex: none; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.q-main strong { font-weight: 600; overflow-wrap: anywhere; }
.q-meta { display: flex; flex-wrap: wrap; gap: .3rem; }
.q-tools { display: flex; gap: .3rem; flex: none; }
.q-tools form { display: inline; }
.icon-mini { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 14px; }
.icon-mini:hover { border-color: var(--brand); color: var(--brand); }
.icon-mini:disabled { opacity: .35; cursor: default; }
.q-edit { padding: 0 1rem 1rem 3.2rem; }
.q-edit summary { list-style: none; }
.q-edit[open] { background: var(--surface-2); }
.q-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding-top: .5rem; }
.q-edit-form .span-2 { grid-column: 1 / -1; }
.q-edit-form textarea { min-height: 90px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.std-note { font-size: 12.5px; color: var(--muted); }
.add-q { padding: .8rem 1rem 1rem; border-top: 1px dashed var(--border-strong); }
.add-q summary { cursor: pointer; font-weight: 700; color: var(--brand); }
@media (max-width: 960px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
@media (max-width: 720px) {
  .q-row { flex-wrap: wrap; }
  .q-tools { width: 100%; justify-content: flex-end; }
  .sec-head .q-tools { width: auto; }
  .sec-head h3 { min-width: 0; }
  .q-edit { padding-left: 1rem; }
  .q-edit-form { grid-template-columns: 1fr; }
}

.flash-hl { animation: flashhl 1.6s var(--ease); }
@keyframes flashhl { 0%, 40% { background: var(--brand-50); } 100% { background: transparent; } }
.sec-edit { position: relative; }
.sec-edit[open] { flex-basis: 100%; }
.sec-edit summary { list-style: none; }
.sec-edit summary::-webkit-details-marker, .q-edit summary::-webkit-details-marker { display: none; }
