/* =====================================================================
   PSM QR Studio — design system
   Brand: PSM Softtech (ink black + indigo accent, Poppins)
   ===================================================================== */
:root {
  --ink: #0e0e12;
  --ink-2: #1c1c24;
  --ink-3: #2c2c38;
  --text: #16161d;
  --muted: #6b6f7b;
  --line: #e7e7ef;
  --line-2: #d9d9e4;
  --bg: #f6f6fa;
  --surface: #ffffff;
  --surface-2: #fafafd;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --accent-ink: #312e81;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 14, 18, .06);
  --shadow: 0 1px 2px rgba(14, 14, 18, .04), 0 8px 24px -8px rgba(14, 14, 18, .12);
  --shadow-lg: 0 24px 60px -20px rgba(14, 14, 18, .28);
  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  --bs-body-font-family: var(--font);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-primary: var(--accent);
  --bs-primary-rgb: 79, 70, 229;
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: var(--accent-ink);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius-sm);
  --bs-focus-ring-color: rgba(79, 70, 229, .25);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: .95rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5 { font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.text-muted { color: var(--muted) !important; }
.small-caps { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
a { text-decoration: none; }
::selection { background: #c7c4ff; }

/* ---------- buttons ---------- */
.btn { font-weight: 500; border-radius: 999px; padding: .55rem 1.15rem; transition: all .15s ease; }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn-ink { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus { background: var(--ink-3); color: #fff; border-color: var(--ink-3); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus { background: #4338ca; border-color: #4338ca; }
.btn-gradient { color: #fff; border: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .7); }
.btn-gradient:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid transparent; }
.btn-soft:hover { background: #e0e3ff; color: var(--accent-ink); }
.btn-outline-ink { border: 1px solid var(--line-2); color: var(--ink); background: #fff; }
.btn-outline-ink:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-google { background: #fff; border: 1px solid var(--line-2); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: .6rem; }
.btn-google:hover { border-color: var(--ink); background: #fff; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }

.form-control, .form-select { background-color: #fff; border-radius: var(--radius-sm); border-color: var(--line-2); padding: .6rem .85rem; font-size: .92rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.form-label { font-weight: 500; font-size: .84rem; color: var(--ink-3); margin-bottom: .35rem; }
.form-control::placeholder { color: #b4b7c3; opacity: 1; }
.form-check-input { border-color: #c4c6d2; }
.form-switch .form-check-input { width: 2.2em; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-range::-webkit-slider-thumb { background: var(--accent); }
.form-range::-moz-range-thumb { background: var(--accent); }
.input-group-text { border-color: var(--line-2); background: var(--surface-2); }

.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--surface); }
.card-soft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.badge-soft { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; border-radius: 999px; padding: .3em .7em; }
.badge-dyn { background: #ecfdf5; color: #047857; }
.badge-static { background: #f1f5f9; color: #334155; }
.badge-off { background: #fef2f2; color: #b91c1c; }

/* ---------- navbar ---------- */
.site-nav { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-nav .navbar-brand img { height: 30px; width: auto; }
.site-nav .nav-link { color: var(--ink-3); font-weight: 500; font-size: .9rem; padding: .5rem .85rem !important; border-radius: 999px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--ink); background: #f0f0f5; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .78rem; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 3.2rem 0 2.2rem; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 0%, rgba(124, 58, 237, .14), transparent 60%),
  radial-gradient(500px 260px at 5% 10%, rgba(79, 70, 229, .12), transparent 60%); pointer-events: none; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; font-weight: 700; }
.text-gradient { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--muted); max-width: 640px; font-size: 1.05rem; }
.hero-pills span { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; color: var(--ink-3); margin: .2rem; }
.hero-pills i { color: var(--accent); }

/* ---------- designer ---------- */
.designer { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.designer-main { padding: 1.4rem; }
.designer-side { background: linear-gradient(180deg, #fbfbfe, #f4f4fa); border-left: 1px solid var(--line); padding: 1.4rem; }
@media (max-width: 991.98px) { .designer-side { border-left: 0; border-top: 1px solid var(--line); } }

.type-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; margin-bottom: 1.2rem; }
.type-tab { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem .3rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--ink-3); font-size: .76rem; font-weight: 500; cursor: pointer; transition: all .12s ease; position: relative; }
.type-tab i { font-size: 1.2rem; color: var(--ink); }
.type-tab:hover { border-color: var(--ink); }
.type-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 16px -6px rgba(14, 14, 18, .5); }
.type-tab.active i { color: #fff; }
.type-tab .pro { position: absolute; top: 4px; right: 5px; font-size: .55rem; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .35rem; letter-spacing: .04em; }
.type-tab.active .pro { background: #fff; color: var(--accent); }

.content-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; background: var(--surface-2); }
.content-panel h5 { font-size: 1rem; margin-bottom: .1rem; }

.opt-accordion .accordion-item { border: 1px solid var(--line); border-radius: var(--radius) !important; margin-bottom: .65rem; overflow: hidden; }
.opt-accordion .accordion-button { font-weight: 600; font-size: .92rem; color: var(--ink); background: #fff; padding: .9rem 1.1rem; box-shadow: none !important; }
.opt-accordion .accordion-button:not(.collapsed) { background: #fff; color: var(--ink); }
.opt-accordion .accordion-button .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-right: .7rem; }
.opt-accordion .accordion-body { border-top: 1px solid var(--line); padding: 1.1rem; }

.color-field { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .3rem .4rem .3rem .3rem; background: #fff; }
.color-field input[type=color] { width: 38px; height: 34px; padding: 0; border: 0; background: none; border-radius: 8px; cursor: pointer; flex: none; }
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .1); border-radius: 8px; }
.color-field input[type=text] { border: 0; outline: 0; width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; text-transform: lowercase; }

.seg { display: inline-flex; background: #eef0f5; border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg input { display: none; }
.seg label { padding: .32rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 500; cursor: pointer; color: var(--ink-3); margin: 0; }
.seg input:checked + label { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.shape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .45rem; }
.shape-btn { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px; cursor: pointer; transition: all .12s; display: flex; align-items: center; justify-content: center; }
.shape-btn img { width: 100%; height: 100%; }
.shape-btn:hover { border-color: var(--ink); }
.shape-btn.active { border: 2px solid var(--accent); background: var(--accent-soft); padding: 7px; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.tpl-btn { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: .45rem; cursor: pointer; text-align: center; font-size: .72rem; color: var(--ink-3); transition: all .12s; }
.tpl-btn img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; margin-bottom: .3rem; }
.tpl-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.tpl-btn.active { border: 2px solid var(--accent); }

.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: .45rem; }
.logo-btn { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; cursor: pointer; }
.logo-btn img { width: 100%; height: 100%; object-fit: contain; }
.logo-btn:hover { border-color: var(--ink); }
.logo-btn.active { border: 2px solid var(--accent); padding: 5px; }
.logo-btn.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.2rem; }

.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 1rem; text-align: center; background: #fff; cursor: pointer; transition: all .15s; color: var(--muted); font-size: .85rem; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.dropzone i { font-size: 1.6rem; color: var(--accent); display: block; margin-bottom: .2rem; }

.preview-sticky { position: sticky; top: 88px; }
.preview-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem; box-shadow: var(--shadow); }
.preview-box { position: relative; aspect-ratio: 1; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background-color: #fff; background-image: linear-gradient(45deg, #f1f1f6 25%, transparent 25%), linear-gradient(-45deg, #f1f1f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f1f6 75%), linear-gradient(-45deg, transparent 75%, #f1f1f6 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; }
.preview-box img { max-width: 92%; max-height: 92%; filter: drop-shadow(0 6px 18px rgba(14, 14, 18, .12)); transition: opacity .15s; }
.preview-box.loading img { opacity: .45; }
.preview-box.is-sample img { opacity: .35; filter: grayscale(.3); }
.preview-box .spinner-border { position: absolute; display: none; color: var(--accent); }
.preview-box.loading .spinner-border { display: block; }
.preview-error { position: absolute; inset: 12px; display: none; align-items: center; justify-content: center; text-align: center; background: rgba(255, 255, 255, .94); border-radius: 12px; color: var(--danger); font-size: .88rem; padding: 1rem; }
.preview-box.has-error .preview-error { display: flex; }
.meta-chips { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin: .75rem 0 .25rem; }
.meta-chips span { font-size: .7rem; background: #f3f4f8; color: var(--ink-3); border-radius: 999px; padding: .15rem .6rem; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.dl-grid .btn { border-radius: 12px; }
.quality-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: -.2rem; }
.warn-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.warn-list li { font-size: .76rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: .4rem .6rem; margin-top: .35rem; }

.save-bar { background: var(--ink); color: #fff; border-radius: 18px; padding: .9rem 1rem; margin-bottom: 1rem; }
.save-bar .form-control, .save-bar .form-select { background: var(--ink-2); border-color: var(--ink-3); color: #fff; }
.save-bar .form-control::placeholder { color: #9ca3af; }
.save-bar .form-label { color: #c7c9d3; }
.short-link { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; background: var(--ink-2); border-radius: 999px; padding: .25rem .75rem; color: #a5b4fc; display: inline-flex; gap: .4rem; align-items: center; }

.map-box { height: 260px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; margin-top: .5rem; }
.upload-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.upload-list li { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .6rem; margin-top: .35rem; font-size: .82rem; }
.upload-list img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }

.signin-cta { border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 1.2rem; text-align: center; }

/* ---------- features / sections ---------- */
.section { padding: 4rem 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; height: 100%; transition: all .15s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .8rem; }
.feature h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .88rem; margin: 0; }
.steps .step { counter-increment: step; position: relative; padding-left: 3.2rem; margin-bottom: 1.4rem; }
.steps .step::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.band-dark { background: var(--ink); color: #d4d6de; border-radius: 28px; padding: 3rem; position: relative; overflow: hidden; }
.band-dark h2 { color: #fff; }
.band-dark::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 58, 237, .5), transparent 65%); }
.faq .accordion-button { font-weight: 500; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #9ca0ad; padding: 3rem 0 1.5rem; margin-top: 4rem; font-size: .88rem; }
.site-footer img { height: 34px; }
.site-footer h6 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { color: #c9ccd6; display: block; padding: .18rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid #262631; margin-top: 2rem; padding-top: 1.2rem; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-brand { display: none !important; } }
.auth-brand { background: var(--ink); color: #c9ccd6; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px 380px at 90% 10%, rgba(124, 58, 237, .45), transparent 60%), radial-gradient(420px 320px at 0% 100%, rgba(79, 70, 229, .35), transparent 60%); }
.auth-brand > * { position: relative; }
.auth-brand img.logo { height: 38px; }
.auth-brand h2 { color: #fff; font-size: 2rem; line-height: 1.2; }
.auth-brand .qr-art { width: 170px; border-radius: 22px; background: #fff; padding: 12px; box-shadow: var(--shadow-lg); transform: rotate(-4deg); }
.auth-brand ul { list-style: none; padding: 0; }
.auth-brand li { margin: .55rem 0; display: flex; gap: .6rem; align-items: center; }
.auth-brand li i { color: #a5b4fc; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.2rem; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 1.7rem; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .78rem; margin: 1.2rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.otp-inputs { display: flex; gap: .5rem; justify-content: space-between; }
.otp-inputs input { width: 100%; max-width: 56px; height: 60px; text-align: center; font-size: 1.5rem; font-weight: 600; border-radius: 12px; border: 1px solid var(--line-2); }
.otp-inputs input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.dev-otp { background: #fffbeb; border: 1px dashed #f59e0b; border-radius: 12px; padding: .6rem .8rem; font-size: .82rem; color: #92400e; }
.auth-tabs .nav-link { border-radius: 999px; color: var(--ink-3); font-weight: 500; font-size: .88rem; }
.auth-tabs .nav-link.active { background: var(--ink); color: #fff; }

/* ---------- app shell (dashboard) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 250px; background: var(--ink); color: #b6b9c6; padding: 1.2rem .9rem; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1030; transition: transform .2s; display: flex; flex-direction: column; }
.app-sidebar .brand img { height: 28px; margin: .3rem .5rem 1.5rem; }
.app-sidebar .nav-section { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: #6b6f7d; margin: 1.1rem .7rem .4rem; }
.app-sidebar a.nav-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 10px; color: #c3c6d2; font-size: .88rem; font-weight: 500; }
.app-sidebar a.nav-item i { font-size: 1.05rem; width: 20px; text-align: center; }
.app-sidebar a.nav-item:hover { background: var(--ink-2); color: #fff; }
.app-sidebar a.nav-item.active { background: #fff; color: var(--ink); }
.app-sidebar button.nav-item { background: none; border: 0; width: 100%; text-align: left; font-family: inherit; }
.app-sidebar .create-btn { margin: .2rem .2rem .6rem; }
.app-sidebar .sidebar-foot { margin-top: auto; padding: 1rem .5rem 0; font-size: .72rem; color: #6b6f7d; }
.app-main { margin-left: 250px; flex: 1; min-width: 0; }
.app-topbar { height: 64px; background: rgba(246, 246, 250, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1020; gap: 1rem; }
.app-topbar h1 { font-size: 1.15rem; margin: 0; }
.app-content { padding: 1.5rem; max-width: 1400px; }
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .app-main { margin-left: 0; }
}

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; height: 100%; }
.stat-card .label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .ico { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 1.1rem; }
.stat-card.dark { background: var(--ink); border-color: var(--ink); }
.stat-card.dark .value { color: #fff; }
.stat-card.dark .label { color: #a6a9b6; }
.stat-card.dark .ico { background: var(--ink-3); color: #a5b4fc; }

.qr-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; gap: 1rem; align-items: center; transition: all .12s; height: 100%; }
.qr-card:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.qr-thumb { width: 84px; height: 84px; border-radius: 12px; background: #fff; border: 1px solid var(--line); flex: none; padding: 4px; display: flex; align-items: center; justify-content: center; }
.qr-thumb img { width: 100%; height: 100%; object-fit: contain; }
.qr-card .title { font-weight: 600; color: var(--ink); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-card .summary { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.table-clean { --bs-table-bg: transparent; font-size: .88rem; }
.table-clean thead th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom-color: var(--line); }
.table-clean td { border-bottom-color: var(--line); vertical-align: middle; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .ico { width: 72px; height: 72px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.code-block { background: var(--ink); color: #e4e4ec; border-radius: 14px; padding: 1rem 1.2rem; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; overflow-x: auto; white-space: pre; }
.code-block .k { color: #a5b4fc; }
.code-block .s { color: #86efac; }
.new-key { font-family: ui-monospace, Consolas, monospace; background: #ecfdf5; border: 1px dashed #10b981; border-radius: 12px; padding: .7rem 1rem; word-break: break-all; }

.list-group-item.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.list-group-item { font-size: .88rem; }
.pagination { --bs-pagination-active-bg: var(--ink); --bs-pagination-active-border-color: var(--ink); --bs-pagination-color: var(--ink); }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: 380px; }
.toast-msg { background: var(--ink); color: #fff; border-radius: 14px; padding: .75rem 1rem; box-shadow: var(--shadow-lg); display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; animation: toastIn .25s ease; }
.toast-msg.success i { color: #34d399; }
.toast-msg.error i { color: #f87171; }
.toast-msg.info i { color: #a5b4fc; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- landing (dynamic QR pages) ---------- */
.landing-body { background: linear-gradient(160deg, #eef0ff, #f6f6fa 40%, #fdf4ff); min-height: 100vh; }
.landing { max-width: 480px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.landing-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden; }
.landing-hero { background: var(--ink); color: #fff; padding: 2rem 1.5rem 3.8rem; text-align: center; position: relative; }
.landing-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(300px 200px at 90% 0%, rgba(124, 58, 237, .55), transparent 70%); }
.landing-hero > * { position: relative; }
.landing-hero h1 { color: #fff; font-size: 1.5rem; margin: .8rem 0 .2rem; }
.landing-photo { width: 104px; height: 104px; border-radius: 50%; border: 4px solid #fff; object-fit: cover; margin: -52px auto 0; display: block; position: relative; background: var(--accent); color: #fff; font-size: 2.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.landing-body-inner { padding: 1.2rem 1.4rem 1.6rem; }
.landing-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.landing-actions a { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .2rem; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); font-size: .74rem; font-weight: 500; }
.landing-actions a i { font-size: 1.25rem; }
.info-row { display: flex; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.info-row:last-child { border-bottom: 0; }
.info-row i { color: var(--accent); font-size: 1.1rem; margin-top: .1rem; }
.info-row .lbl { font-size: .72rem; color: var(--muted); }
.info-row .val { font-weight: 500; color: var(--ink); word-break: break-word; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.landing-foot { text-align: center; margin-top: 1.4rem; font-size: .72rem; color: var(--muted); }
.landing-foot img { height: 18px; opacity: .8; }

/* ---------- error ---------- */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-code { font-size: 6rem; font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.prose p, .prose li { color: #3b3e49; line-height: 1.7; }

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

/* ---------------------------------------------------------------- rating / feedback landing forms */
.rating-picker {
    display: flex;
    justify-content: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.rating-star {
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: var(--line, #d8d8e0);
    background: none;
    border: 0;
    padding: .1rem .15rem;
    transition: color .12s ease, transform .12s ease;
    min-width: 2.2rem;
    text-align: center;
}

.rating-picker label:not(:has(i)) {
    font-size: 1.05rem;
    font-weight: 600;
    border: 1px solid var(--line, #d8d8e0);
    border-radius: 10px;
    padding: .35rem 0;
}

.rating-star:hover,
.rating-star:focus-visible {
    color: #f59e0b;
    transform: scale(1.08);
}

/* highlight the chosen star and everything before it */
.rating-picker:not(:hover) .btn-check:checked ~ .rating-star,
.rating-picker .btn-check:checked + .rating-star {
    color: #f59e0b;
}

.rating-picker .btn-check:checked + .rating-star:not(:has(i)) {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .12);
}

.rating-picker .btn-check:focus-visible + .rating-star {
    outline: 2px solid var(--accent, #4f46e5);
    outline-offset: 2px;
    border-radius: 8px;
}

.respond-form .form-label {
    font-weight: 500;
}

/* rating summary bars on the statistics page */
.rating-bar {
    display: grid;
    grid-template-columns: 3.4rem 1fr 3rem;
    align-items: center;
    gap: .6rem;
    margin-bottom: .4rem;
}

.rating-bar .track {
    height: 8px;
    border-radius: 99px;
    background: rgba(14, 14, 18, .07);
    overflow: hidden;
}

.rating-bar .fill {
    height: 100%;
    border-radius: 99px;
    background: #f59e0b;
}
