/* Review QR - shared styles for the admin area and the customer page */

:root {
    --brand: #0f766e;
    --brand-dark: #115e59;
    --brand-soft: #e6f4f1;
    --google: #1a73e8;
    --google-dark: #1557b0;
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #64707d;
    --border: #dfe3e8;
    --success-bg: #e8f5ec;
    --success: #1e6b3a;
    --error-bg: #fdecec;
    --error: #a12626;
    --warning-bg: #fff6e0;
    --warning: #7a5300;
    --info-bg: #eaf2fd;
    --info: #1d4f91;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: var(--brand);
}

h1, h2, h3 {
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
.h3 { font-size: 1.05rem; margin-top: 1.4em; }

code {
    background: #eef1f4;
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

[hidden] { display: none !important; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    min-height: 44px;
    padding: 0.55em 1.1em;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .option:focus-visible, a:focus-visible {
    outline: 3px solid #7cc4bb;
    outline-offset: 2px;
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--brand-dark); }
.btn-light { background: #fff; border-color: var(--border); }
.btn-light:hover:not([disabled]) { background: #f0f2f4; }
.btn-google { background: var(--google); color: #fff; }
.btn-google:hover { background: var(--google-dark); }
.btn-small { min-height: 36px; padding: 0.3em 0.8em; font-size: 0.9rem; }
.btn-icon { width: 44px; padding: 0; }
.btn-block { display: flex; width: 100%; }
.btn-xl { min-height: 58px; font-size: 1.1rem; border-radius: 14px; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brand);
    font: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- Alerts and badges ---------- */

.alert {
    border-radius: 10px;
    padding: 0.8em 1em;
    margin: 0 0 1em;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: #c4e5cf; }
.alert-error { background: var(--error-bg); color: var(--error); border-color: #f4c7c7; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f3dfa8; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c9dcf6; }
.alert a { color: inherit; font-weight: 600; }

.badge {
    display: inline-block;
    padding: 0.1em 0.6em;
    border-radius: 999px;
    background: #eceff2;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
}
.badge-ok { background: var(--success-bg); color: var(--success); }

/* ---------- Forms ---------- */

.form { display: grid; gap: 1rem; }
.form-narrow { max-width: 420px; }

.field { display: grid; gap: 0.35rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; padding: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }

input[type="text"],
input[type="url"],
input[type="password"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.6em 0.75em;
    border: 1px solid #c9d0d8;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    cursor: pointer;
}
.check input { width: 20px; height: 20px; margin: 0.15em 0 0; flex: none; accent-color: var(--brand); }

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.6rem 1rem;
    margin-top: 0.3rem;
}

.select-links { margin: 0; font-size: 0.9rem; color: var(--muted); }
.product-options { display: grid; gap: 1.25rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.repeat-list { display: grid; gap: 0.6rem; margin-bottom: 0.8rem; }
.repeat-row { display: flex; gap: 0.5rem; }
.question-block {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfc;
}
.question-block .btn { justify-self: start; }

.help { font-size: 0.92rem; color: var(--muted); }
.help summary { cursor: pointer; color: var(--brand); font-weight: 600; }

/* ---------- Admin layout ---------- */

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
}

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }

.nav a,
.nav-logout button {
    display: inline-block;
    padding: 0.5em 0.85em;
    border-radius: 8px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.nav a:hover, .nav-logout button:hover { background: #f0f2f4; }
.nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav-logout { margin: 0; }
.nav-logout button { color: var(--muted); }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.segmented a {
    padding: 0.4em 0.9em;
    border-radius: 7px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.segmented a.active { background: var(--brand); color: #fff; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
}
.stat-label { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-note { color: var(--muted); font-size: 0.8rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.table th { color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions-col { width: 1%; }
.row-muted td { color: var(--muted); }
.inline-form { display: inline; margin: 0; }

.qr-layout {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 1.25rem;
    align-items: start;
}
.print-card { text-align: center; }
.qr-image {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 1rem;
    image-rendering: pixelated;
}
.qr-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
.print-only { display: none; }

.details { margin: 0 0 1.5rem; }
.details dt { font-weight: 600; margin-top: 0.9rem; }
.details dd { margin: 0.25rem 0 0; }
.copy-row { display: flex; gap: 0.5rem; margin-bottom: 0.3rem; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.tag-list li { padding: 0.2em 0.7em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 0.9rem; }
.tag-list li.removed, .plain-list li.removed { background: #eef0f2; color: var(--muted); text-decoration: line-through; }
.plain-list { margin: 0; padding-left: 1.2rem; }

.mini-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0; padding: 0; }

.checklist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; }
.checklist small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.check-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}
.checklist .ok .check-icon { background: #2f8a4c; }
.checklist .fail .check-icon { background: #c23b3b; }
.checklist .warn .check-icon { background: #c98a0b; }

/* ---------- Login, install and message pages ---------- */

.auth-page, .message-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem 1rem;
}

.auth-box, .message-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
}
.auth-wide { max-width: 620px; }
.auth-brand { display: flex; align-items: center; gap: 0.5em; font-weight: 700; margin-bottom: 1rem; }
.message-box { text-align: center; }
.message-box h1 { font-size: 1.4rem; }

/* ---------- Messages (private notes) ---------- */

.nav-count {
    display: inline-block;
    min-width: 1.4em;
    margin-left: 0.2em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: #d93025;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4em;
    text-align: center;
}
.badge-new { background: #fdecec; color: var(--error); }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.note-item:first-child { padding-top: 0; }
.note-item:last-child { border-bottom: 0; padding-bottom: 0; }
.note-unread .note-text { font-weight: 600; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.92rem; }
.note-stars { color: #f5a623; letter-spacing: 0.05em; }
.note-text { margin: 0.4rem 0; white-space: normal; }
.note-contact { margin: 0 0 0.4rem; font-size: 0.92rem; color: var(--muted); }
.note-actions { display: flex; gap: 0.4rem; }

/* ---------- Customer page ---------- */

.guest {
    min-height: 100vh;
    font-size: 18px;
    background: linear-gradient(180deg, #e6f4f1 0, var(--bg) 260px) no-repeat, var(--bg);
}

.guest-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.guest-head { text-align: center; margin: 0.5rem 0 1.25rem; }
.guest-company {
    margin: 0 0 0.2rem;
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.guest-head h1 { font-size: 1.75rem; margin-bottom: 0.4rem; }
.guest-lead { margin: 0; color: var(--muted); font-size: 1rem; }

.guest-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.1rem;
    margin-bottom: 1rem;
}
.guest-card h2 {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.step-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    margin-top: -0.1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 0.9rem;
}

.optional {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    background: #eef1f4;
    border-radius: 999px;
    padding: 0.1em 0.55em;
}

.guest-hint { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.95rem; }
.guest-hint.center { margin: 0.6rem 0 0; }

.chips, .options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.options { margin-top: 0.75rem; }

.chip, .option {
    min-height: 52px;
    padding: 0.6em 1.05em;
    border: 2px solid #cfd6dd;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.option { border-radius: 14px; }
.chip[aria-pressed="true"], .option[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.chip[data-activity][aria-pressed="true"]::before { content: "✓ "; }

.guest-note summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 32px;
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-dark);
}
.guest-note textarea { margin-top: 0.75rem; font-size: 1rem; }

.guest-actions { margin: 1.25rem 0 1rem; }

.guest-error {
    background: var(--error-bg);
    color: var(--error);
    border-radius: 12px;
    padding: 0.8em 1em;
    font-size: 0.95rem;
}

/* Progress dots */
.progress {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0 auto 1rem;
    padding: 0;
    max-width: 220px;
}
.progress li { flex: 1; height: 5px; border-radius: 3px; background: #d5dbe1; transition: background-color 0.25s; }
.progress li.is-done { background: var(--brand); }

/* Star rating */
.stars { display: flex; justify-content: center; gap: 0.35rem; margin: 0.25rem 0 0.2rem; }
.star {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #cfd6dd;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, transform 0.15s;
}
.star:hover { color: #f5c451; }
.star.is-on { color: #f5a623; }
.star[aria-checked="true"] { animation: star-pop 0.3s ease-out; }
.star:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.35); outline-offset: 2px; }
@keyframes star-pop { 50% { transform: scale(1.25); } }
.star-word { text-align: center; margin: 0 0 1.25rem; color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
.star-word.is-set { color: var(--brand-dark); font-weight: 700; font-size: 1.05rem; }

/* Keeps the main button in view on step 1 */
.sticky-action {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 1rem -1rem 0;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(245, 246, 248, 0) 0, var(--bg) 30%);
}

/* Step headings and links */
.step-title { font-size: 1.35rem; text-align: center; margin: 0.5rem 0 0.3rem; outline: none; }
#step-pick > .guest-hint, #step-post > .guest-hint { text-align: center; }
.step-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 0.25rem; }
.link-btn {
    min-height: 44px;
    padding: 0.4em 0.2em;
    border: 0;
    background: none;
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.link-btn:disabled { color: var(--muted); cursor: default; }

/* Draft choices */
.choices { display: grid; gap: 0.75rem; }
.choice {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.choice-label {
    justify-self: start;
    padding: 0.1em 0.6em;
    border-radius: 999px;
    background: #eef1f4;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.choice[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18); }
.choice[aria-checked="true"] .choice-label { background: var(--brand); color: #fff; }
.choice[aria-checked="true"] .choice-label::before { content: "✓ "; }
.choice:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.35); outline-offset: 2px; }

/* Loading placeholders while drafts are written */
.choice.is-loading { cursor: default; }
.sk {
    display: block;
    height: 0.8em;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f4 25%, #f8f9fa 50%, #eef1f4 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}
.sk-label { width: 25%; height: 1em; }
.sk-short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Final review */
.draft-text {
    font-size: 1.05rem;
    line-height: 1.55;
    min-height: 150px;
    margin-bottom: 1rem;
    border: 2px solid var(--brand);
    border-radius: 14px;
}
#step-post .btn-block + .btn-block { margin-top: 0.6rem; }
.google-tip {
    margin: 0.6rem 0 0.75rem;
    padding: 0.6em 0.9em;
    border-radius: 12px;
    background: var(--warning-bg);
    color: var(--warning);
    font-size: 0.95rem;
    text-align: center;
}
.tip-stars { color: #f5a623; letter-spacing: 0.05em; }

/* Private message to the manager */
.manager-card { margin-top: 1.5rem; border-color: #f3dfa8; }
.manager-card h2 { margin-bottom: 0.3rem; }
.manager-card textarea { font-size: 1rem; margin-bottom: 0.75rem; }
.manager-card input { margin: 0.3rem 0 0.9rem; font-size: 1rem; }
.field-label { display: block; font-size: 0.95rem; font-weight: 600; }
.note-sent { margin: 0; color: var(--success); font-weight: 600; }

.spinner-dark {
    display: inline-block;
    vertical-align: -3px;
    border-color: rgba(0, 0, 0, 0.12);
    border-top-color: var(--brand);
}

/* Quick mode: a ready review */
.quick .guest-head h1 { font-size: 1.55rem; }
.quick-card {
    margin: 0 0 1rem;
    padding: 1.1rem 1.1rem 0.4rem;
    background: #fff;
    border: 2px solid var(--brand);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.quick-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    animation: fade-in 0.25s ease-out;
}
.quick-card .draft-text { margin: 0; border-width: 1px; }
.quick-loading { display: grid; gap: 0.6rem; padding: 0.3rem 0 0.6rem; }
.quick-loading .sk { height: 1em; }
.quick-tools {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.quick .google-tip { margin-bottom: 1.25rem; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

.guest-skip { text-align: center; font-size: 0.95rem; margin: 1.25rem 0 0.5rem; }
.guest-fine { text-align: center; font-size: 0.8rem; color: var(--muted); margin: 0; }

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.btn-light .spinner { border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    max-width: calc(100% - 2rem);
    background: #1f2933;
    color: #fff;
    padding: 0.75em 1.1em;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    font-size: 0.95rem;
    z-index: 50;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
    h1 { font-size: 1.35rem; }
    .container { padding-top: 1rem; }
    .card { padding: 1rem; }
    .qr-layout { grid-template-columns: 1fr; }
    .nav { width: 100%; }
    .nav a, .nav-logout button { padding: 0.45em 0.6em; }
    .stat-value { font-size: 1.6rem; }

    /* Tables become stacked cards */
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
    .table td { border: 0; padding: 0.15rem 0; text-align: left; }
    .table td.num, .table td.actions { text-align: left; }
    .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.85rem; }
    .table td.actions { padding-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation-duration: 0.01ms !important; }
}

/* ---------- Printing a QR card ---------- */

@media print {
    body { background: #fff; }
    .topbar, .no-print, .alert { display: none !important; }
    .container { padding: 0; }
    .qr-layout { display: block; }
    .print-card { border: 0; box-shadow: none; padding: 2rem 0; }
    .print-only { display: block; }
    .print-company { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
    .print-title { font-size: 2rem; margin: 0.3rem 0 1.5rem; }
    .qr-image { max-width: 9cm; }
    .print-cta { font-size: 1.4rem; font-weight: 600; }
}
