/*!
 * IN QR Pro — Copyright (c) 2026. All rights reserved.
 */
:root {
  --font-heading: 'Roboto Slab', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --ink: #161a23;
  --muted: #667085;
  --border: #e4e7ec;
  --paper: #ffffff;
  --success: #16a34a;
  --success-bg: #ecfdf3;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fffaeb;
  --shadow-sm: 0 1px 2px rgba(16, 20, 30, .05);
  --shadow-md: 0 4px 16px rgba(16, 20, 30, .08);
  --shadow-lg: 0 16px 40px rgba(16, 20, 30, .14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #f8f9fb 0%, #eef0f4 100%);
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; }
a { color: var(--primary); }
::selection { background: #ddd6fe; color: var(--primary-dark); }

.topbar {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between;
  gap: 8px 16px; padding: 14px 28px; background: #fff;
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; display: block; }
.brand-mark.lg { width: 42px; height: 42px; }
.topbar h1 { font-family: var(--font-heading); font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.topbar .ws-name { font-size: 13px; color: var(--muted); }
.topbar .ws-switcher {
  font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; max-width: 220px; cursor: pointer;
}
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar .right a, .topbar .right button.link { color: var(--muted); cursor: pointer; background: none; border: none; font-size: 13px; text-decoration: underline; padding: 0; }
.topbar .right a:hover, .topbar .right button.link:hover { color: var(--primary); }

.container { max-width: 1040px; margin: 0 auto; padding: 32px 24px 64px; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 32px 24px 64px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { font-family: var(--font-heading); font-size: 22px; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--primary); text-decoration: none; cursor: pointer; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 38px 34px; width: 100%; max-width: 400px; border: 1px solid var(--border);
}
.login-card .login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card h1 { font-family: var(--font-heading); font-size: 19px; margin: 0 0 4px; }
.login-brand-name { font-family: var(--font-heading); font-weight: 800; font-size: 19px; }
.login-card p.hint { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.login-tabs { display: flex; gap: 4px; background: #f2f3f7; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.login-tabs button { flex: 1; border: none; background: none; padding: 8px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.login-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
label .req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url],
input[type=color], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
input[type=color] { width: 90px; padding: 3px; height: 38px; cursor: pointer; }
textarea { resize: vertical; min-height: 70px; }
.field-hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.field-error { font-size: 12px; color: var(--danger); margin: 4px 0 0; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.checkbox-row input { width: auto; accent-color: var(--primary); }
.checkbox-row label { margin: 0; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid transparent; border-radius: 9px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(79, 70, 229, .3); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c6c2; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; min-height: 32px; font-size: 13px; }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; font-family: inherit; }
.btn-link:hover { color: var(--primary); }

.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 22px; }
.card + .card { margin-top: 16px; }

/* Showcase design gallery (Feedback editor > Showcase card) — a scaled-down
   mirror of src/embed/feedback-results.js's .frw-* card styles under a
   .ds- prefix instead, since that file is built standalone with no shared
   import into the dashboard bundle (see build.js). Keep these two in sync
   by hand if the real widget's card styles ever change. */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 10px 0 18px; }
.ds-tile {
  border: 2px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer;
  background: #fafbfc; text-align: left; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ds-tile:hover { border-color: var(--primary-light); }
.ds-tile.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); background: #fff; }
.ds-tile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ds-tile-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.ds-tile-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #eef0f4; border-radius: 99px; padding: 2px 8px; }
.ds-preview-row { display: flex; align-items: center; gap: 6px; }
.ds-preview-row .ds-arrow { flex: 0 0 auto; font-size: 13px; color: var(--muted); opacity: .5; }
.ds-preview-card { flex: 1; min-width: 0; padding: 10px; }
.ds-preview-card.ds-style-card { background: #fff; border: 1px solid rgba(0, 0, 0, .08); border-radius: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.ds-preview-card.ds-style-dark { background: #1b1730; border-radius: 10px; }
.ds-preview-card .ds-stars { color: var(--primary); font-size: 10px; margin-bottom: 4px; letter-spacing: 1px; }
.ds-preview-card .ds-quote { font-size: 10.5px; line-height: 1.4; margin: 0 0 8px; color: #2b2b2b; }
.ds-preview-card.ds-style-dark .ds-quote { color: #d8d5e8; }
.ds-preview-card .ds-person { display: flex; align-items: center; gap: 6px; }
.ds-preview-card .ds-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-light); flex: 0 0 auto; display: block; }
.ds-preview-card .ds-name { font-size: 10.5px; font-weight: 700; color: #1a1a1a; }
.ds-preview-card.ds-style-dark .ds-name { color: #fff; }
.ds-preview-card .ds-meta { font-size: 9.5px; color: #888; }
.ds-preview-card.ds-style-dark .ds-meta { color: #9b96b8; }

.ds-size-row { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 6px 0 4px; }
.ds-size-btn {
  border: none; background: #fff; color: var(--ink); font-size: 13px; font-family: inherit; cursor: pointer;
  padding: 8px 16px; border-right: 1px solid var(--border);
}
.ds-size-btn:last-child { border-right: none; }
.ds-size-btn:hover { background: #f5f5f7; }
.ds-size-btn.selected { background: var(--primary); color: #fff; }

.slab { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 8px; }
.slab-tile {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; position: relative;
}
.slab-tile:hover:not(.disabled) { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.slab-tile.disabled { cursor: default; opacity: .68; }
.slab-tile .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); color: #fff;
}
.slab-tile h3 { font-family: var(--font-heading); margin: 0 0 6px; font-size: 16px; }
.slab-tile p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.slab-tile .badge { position: absolute; top: 20px; right: 20px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge-soon { background: #f2f3f7; color: var(--muted); }
.badge-live { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-off { background: #f2f3f7; color: var(--muted); }

.list-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.list-row + .list-row { margin-top: 10px; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .main .name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.list-row .main .meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.list-row .actions { display: flex; gap: 8px; flex: 0 0 auto; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { font-size: 34px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.table-wrap table { border: none; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { border: none; background: none; padding: 10px 4px; margin-right: 20px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

.qr-box { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.qr-box canvas { border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; padding: 10px; }
.qr-link-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.qr-link-row code { background: #f2f3f7; padding: 6px 10px; border-radius: 7px; font-size: 12px; flex: 1; overflow: auto; white-space: nowrap; }

.star-row { display: flex; gap: 6px; }
.star-row button { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #d7dae0; padding: 2px; }
.star-row button.filled { color: #f5b62d; }

.field-editor-row { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; background: #fbfbfd; }
.field-editor-row .row-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.field-editor-row .row-top select { max-width: 150px; }
.field-editor-row .row-top input[type=text] { flex: 1; }
.field-editor-row .row-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.field-editor-row .row-actions button { background: none; border: none; cursor: pointer; font-size: 15px; color: var(--muted); padding: 4px 6px; }
.field-editor-row .row-actions button:hover { color: var(--danger); }

.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-md); max-width: 320px; animation: toast-in .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.modal-overlay { position: fixed; inset: 0; background: rgba(15, 18, 26, .5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 26px; max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 10px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 20px 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.steps li strong { display: block; margin-bottom: 3px; }
.steps li span { font-size: 13px; color: var(--muted); }
.steps code { background: #f2f3f7; padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* Public /f/{id} feedback page */
.fb-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fb-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 34px; max-width: 440px; width: 100%; }
.fb-card h1 { font-family: var(--font-heading); font-size: 20px; margin: 0 0 6px; }
.fb-card p.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.fb-thanks { text-align: center; padding: 20px 0; }
.fb-thanks .icon { font-size: 40px; margin-bottom: 12px; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Public /a/{id} asset page */
.asset-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.asset-head h1 { font-family: var(--font-heading); margin: 0; font-size: 20px; }
.detail-list { border-top: 1px solid var(--border); }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-label { color: var(--muted); flex: 0 0 auto; }
.detail-value { font-weight: 600; text-align: right; word-break: break-word; }
.asset-notes { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 16px 0 0; }
.log-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.log-history { display: flex; flex-direction: column; gap: 10px; }
.log-entry { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; background: #fbfbfd; }
.log-entry-head { display: flex; align-items: center; gap: 8px; }
.log-entry-title { font-weight: 700; font-size: 13px; }
.log-entry-notes { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.log-entry-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Public /v/{id} vCard page */
.vc-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.vc-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-width: 380px; width: 100%; padding: 0 26px 28px; text-align: center; position: relative; overflow: hidden;
}
.vc-banner { position: absolute; top: 0; left: 0; right: 0; height: 96px; background: linear-gradient(135deg, var(--vc-accent, #4f46e5), color-mix(in srgb, var(--vc-accent, #4f46e5) 55%, #000)); }
.vc-photo {
  position: relative; width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  margin: 44px auto 14px; display: block; border: 4px solid #fff; background: #eef0f4;
}
.vc-photo-initials { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: var(--vc-accent, #4f46e5); }
.vc-name { font-family: var(--font-heading); font-size: 22px; margin: 0 0 4px; }
.vc-title { font-size: 14px; color: var(--ink); font-weight: 600; }
.vc-company { font-size: 14px; color: var(--muted); margin-top: 2px; }
.vc-tagline { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 12px 0 0; }
.vc-save { margin-top: 20px; background: var(--vc-accent, #4f46e5); }
.vc-save-hint { font-size: 11px; color: var(--muted); text-align: center; margin: 8px 0 0; line-height: 1.5; }
.vc-actions { margin-top: 22px; text-align: left; }
.vc-action { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.vc-action:hover .vc-action-value { color: var(--vc-accent, #4f46e5); }
.vc-action-icon { font-size: 17px; flex: 0 0 auto; width: 24px; text-align: center; }
.vc-action-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.vc-action-value { display: block; font-size: 14px; font-weight: 600; word-break: break-word; }
.vc-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.vc-link {
  font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); color: var(--vc-accent, #4f46e5);
}
.vc-link:hover { border-color: var(--vc-accent, #4f46e5); }
.vc-lead { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.vc-lead-cta { border-color: var(--vc-accent, #4f46e5); color: var(--vc-accent, #4f46e5); }
.vc-lead-form { text-align: left; }
.vc-lead-thanks { text-align: center; }
.vc-lead-thanks .sub { margin: 0; }
