/* Filme — giao diện hiện đại, nhiều màu: gradient "light leak", card bo tròn, hình minh hoạ hộp phim */

:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #eeeef0;
  --surface-3: #e3e3e6;
  --ink: #1d1d1f;
  --ink-2: #48484a;
  --muted: #8e8e93;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .16);
  --accent: #1d1d1f;
  --on-accent: #ffffff;
  --focus: #8e8e93;
  --graphite: linear-gradient(135deg, #3a3a3c 0%, #1c1c1e 100%);
  --grad-soft: linear-gradient(rgba(0, 0, 0, .035), rgba(0, 0, 0, .035));
  --shadow-sm: 0 1px 2px rgba(30, 20, 60, .06), 0 2px 8px rgba(30, 20, 60, .05);
  --shadow: 0 2px 4px rgba(30, 20, 60, .04), 0 10px 30px rgba(30, 20, 60, .09);
  --shadow-lg: 0 24px 60px rgba(30, 20, 60, .22);
  --film: #121117;
  --film-text: #d1d1d6;
  --glass: rgba(255, 255, 255, .72);
  --overlay: rgba(14, 12, 22, .5);
  --blob-a: rgba(255, 255, 255, .9);
  --blob-b: rgba(0, 0, 0, .025);
  --blob-c: rgba(0, 0, 0, .02);
  --shelf-a: #dcdce0;
  --shelf-b: #b9b9bf;

  --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 20px;
  --r-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
    --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989d;
    --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
    --glass: rgba(28, 28, 30, .78); --overlay: rgba(0, 0, 0, .65);
    --blob-a: rgba(255, 255, 255, .03); --blob-b: rgba(255, 255, 255, .02); --blob-c: rgba(255, 255, 255, .015);
    --accent: #f5f5f7; --on-accent: #1d1d1f; --focus: #98989d;
    --grad-soft: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .05));
    --shelf-a: #3a3a3c; --shelf-b: #2c2c2e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113; --surface: #1c1c1e; --surface-2: #2c2c2e; --surface-3: #3a3a3c;
  --ink: #f5f5f7; --ink-2: #d1d1d6; --muted: #98989d;
  --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --glass: rgba(28, 28, 30, .78); --overlay: rgba(0, 0, 0, .65);
  --blob-a: rgba(255, 255, 255, .03); --blob-b: rgba(255, 255, 255, .02); --blob-c: rgba(255, 255, 255, .015);
  --accent: #f5f5f7; --on-accent: #1d1d1f; --focus: #98989d;
  --grad-soft: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .05));
  --shelf-a: #3a3a3c; --shelf-b: #2c2c2e;
  color-scheme: dark;
}

html.has-host-badge { --safe-b: calc(env(safe-area-inset-bottom, 0px) + 58px); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 380px at 0% -5%, var(--blob-a), transparent 70%),
    radial-gradient(520px 420px at 105% 5%, var(--blob-b), transparent 70%),
    radial-gradient(600px 500px at 50% 110%, var(--blob-c), transparent 70%);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }

.app {
  max-width: 780px; margin: 0 auto;
  padding: calc(14px + var(--safe-t)) 16px calc(110px + var(--safe-b));
}
body.hide-tabbar .app { padding-bottom: calc(40px + var(--safe-b)); }

/* ---------- Kiểu chữ ---------- */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.logo {
  font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.1;
  color: var(--ink);
}
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; line-height: 1.15; }
.page-sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 28px 0 12px;
}
.section-title .ic { color: var(--ink-2); }
.section-title .count, .count {
  font-size: 12px; font-weight: 700; color: var(--ink-2);
  background: var(--surface-2); border-radius: 999px; padding: 3px 10px;
}
.muted { color: var(--muted); }
.eyebrow .ic, .ic-inline { width: 13px; height: 13px; vertical-align: -2px; }
.section-title .ic { width: 20px; height: 20px; }
.section-title { justify-content: flex-start; }
.section-title .count { margin-left: auto; }
.mono { font-family: var(--mono); }
.grad-text { color: var(--ink); }

/* ---------- Đầu trang ---------- */
.home-head, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head { margin-bottom: 4px; }
.home-head .btn-row { flex-wrap: nowrap; }
.home-head .eyebrow { white-space: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); cursor: pointer; text-decoration: none;
}
.icon-btn:active { transform: scale(.95); }

/* ---------- Hero trang chủ ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 26px; padding: 22px 20px; min-height: 170px;
  background: var(--graphite); color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -110px; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .45), transparent 65%);
}
.hero .h-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.hero h2 { font-size: 24px; line-height: 1.2; font-weight: 800; margin: 6px 0 16px; max-width: 14ch; letter-spacing: -.02em; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats div {
  background: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 14px; padding: 7px 12px; min-width: 70px;
}
.hero-stats b { display: block; font-size: 20px; line-height: 1.1; font-weight: 800; }
.hero-stats span { font-size: 11px; opacity: .9; }
.hero h2 { max-width: calc(100% - 130px); }
.hero-cans { position: absolute; right: 10px; top: 14px; display: flex; align-items: flex-end; z-index: 0; }
.hero-cans .art-can { width: 54px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); margin-left: -18px; }
.hero-cans .art-can:nth-child(1) { transform: rotate(-12deg) translateY(10px); }
.hero-cans .art-can:nth-child(2) { transform: rotate(4deg) translateY(-4px); width: 62px; z-index: 1; }
.hero-cans .art-can:nth-child(3) { transform: rotate(16deg) translateY(12px); }

/* ---------- Nút & điều khiển ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.danger { color: #e11d48; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border-radius: 999px; }
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.seg button .ic { width: 16px; height: 16px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px;
  padding: 7px 13px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 4px; }

.iso-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 9px 4px 6px; border-radius: 999px; white-space: nowrap;
}
.iso-chip .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.type-chip, .fmt-chip, .pp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.type-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.t-c i, .chip i.t-c { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); }
.t-b i, .chip i.t-b { background: linear-gradient(90deg, #111 50%, #f5f5f5 50%); border: 1px solid #888; }
.t-s i, .chip i.t-s { background: linear-gradient(135deg, #0ea5e9, #f59e0b); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Form ---------- */
.card-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.card-box > h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.card-box > h3 .bubble { width: 32px; height: 32px; }
.bubble {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: var(--surface-2); color: var(--ink-2);
}
.bubble .ic { width: 18px; height: 18px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--surface-2); color: var(--ink);
  border: 1.5px solid transparent; border-radius: var(--r-sm);
  font-size: 16px; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, background .15s;
}
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--focus); background: var(--surface); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field .money { position: relative; }
.field .money::after { content: attr(data-cur); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--muted); }
.field .money .input { padding-right: 52px; }

.search-box { position: relative; margin-bottom: 14px; }
.search-box .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box .input { padding-left: 44px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.search-box .input:focus { border-color: var(--focus); }

/* ---------- Kệ phim ---------- */
.group { margin-top: 8px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.group-head h2 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.group-head a { text-decoration: none; }
.group-head .sub { font-size: 12px; color: var(--muted); font-weight: 600; }

.shelf {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden;
}
.shelf::before {
  content: ""; position: absolute; left: 0; right: 0; top: 128px; height: 12px; z-index: 0;
  background: linear-gradient(180deg, var(--shelf-a), var(--shelf-b));
  box-shadow: 0 6px 12px rgba(0, 0, 0, .12);
}
.shelf-row {
  position: relative; z-index: 1; display: flex; gap: 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 14px 14px 14px;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-item { flex: none; width: 96px; text-decoration: none; text-align: center; scroll-snap-align: start; }
.shelf-item .art-can { width: 82px; height: 116px; margin: 0 auto; display: block; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.shelf-item:hover .art-can, .shelf-item:focus-visible .art-can { transform: translateY(-6px) rotate(-3deg); }
.shelf-item .si-t { margin-top: 18px; font-size: 13px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shelf-item .si-m { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drift { animation: drift var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate; }
@keyframes drift { from { transform: translateY(0) rotate(var(--r0, -1.5deg)); } to { transform: translateY(-4px) rotate(var(--r1, 1.5deg)); } }
@media (prefers-reduced-motion: reduce) { .drift { animation: none; } }

/* ---------- Lưới thẻ ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.card {
  position: relative; display: block; text-decoration: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .cover { position: relative; aspect-ratio: 4 / 3.3; background: var(--surface-3); overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .35)); }
.card .cover .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.card .cover .noimg .ic { width: 34px; height: 34px; }
.card .cover-iso { position: absolute; top: 8px; right: 8px; z-index: 1; }
.card .mini-can { position: absolute; left: 8px; bottom: -6px; z-index: 1; width: 40px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.card .meta { padding: 10px 12px 12px; }
.card .meta b { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .ln { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .ln2 { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.card .meta .ln2 .ic { width: 13px; height: 13px; }

/* ---------- Trống ---------- */
.empty { text-align: center; padding: 30px 12px 20px; }
.empty-art { position: relative; height: 170px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 18px; }
.empty-art .art-can { width: 88px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .18)); }
.empty-art .art-can:nth-child(1) { transform: rotate(-14deg) translate(14px, 6px); }
.empty-art .art-can:nth-child(2) { width: 104px; z-index: 1; }
.empty-art .art-can:nth-child(3) { transform: rotate(14deg) translate(-14px, 6px); }
.empty h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; }
.empty p { color: var(--muted); margin: 0 auto 22px; max-width: 34ch; }

/* ---------- Wizard ---------- */
.wiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wiz-steps { flex: 1; display: flex; gap: 6px; }
.ws {
  flex: 1; display: flex; align-items: center; gap: 6px; justify-content: center;
  padding: 7px 6px; border-radius: 999px; background: var(--surface-2);
  font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.ws i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 10px; }
.ws.on { background: var(--ink); color: var(--bg); }
.ws.on i { background: var(--bg); color: var(--ink); }
.ws.done { color: var(--ink-2); }
.ws.done i { background: var(--ink-2); color: var(--surface); }
@media (max-width: 380px) { .ws span { display: none; } }

.format-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.fmt {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.fmt .art-can { width: 34px; height: 48px; flex: none; }
.fmt b { display: block; font-size: 16px; font-weight: 800; }
.fmt small { font-size: 11px; color: var(--muted); line-height: 1.3; display: block; }
.fmt.on { border-color: var(--ink); background: var(--grad-soft), var(--surface); }

.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.brand-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; margin: 18px 2px 8px; }
.brand-head i { width: 12px; height: 12px; border-radius: 4px; }
.stock-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 10px 12px;
  cursor: pointer; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.stock-tile::before {
  content: ""; position: absolute; left: -20%; right: -20%; top: -40%; height: 75%; z-index: 0;
  background: radial-gradient(closest-side, var(--surface-2), transparent);
}
.stock-tile > * { position: relative; }
.stock-tile:hover { transform: translateY(-2px); }
.stock-tile.sel { border-color: var(--ink); }
.stock-tile .art-can { width: 62px; height: 86px; }
.stock-tile .st-br { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stock-tile .st-nm { font-size: 15px; font-weight: 800; line-height: 1.2; }
.stock-tile .chips-row { justify-content: center; }
.stock-tile .star { position: absolute; top: 8px; left: 8px; color: var(--ink-2); }
.stock-tile .star .ic { width: 16px; height: 16px; fill: currentColor; }

.cam-list { display: grid; gap: 8px; }
.cam-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px 8px 8px;
  box-shadow: var(--shadow-sm);
}
.cam-row.sel { border-color: var(--ink); }
.cam-tile {
  flex: none; display: grid; place-items: center; width: 70px; height: 54px; border-radius: 12px;
  background: var(--surface-2);
}
.cam-tile .art-cam { width: 58px; }
.cam-row .cr-main { flex: 1; min-width: 0; }
.cam-row .cr-br { font-size: 11px; font-weight: 700; color: var(--muted); }
.cam-row .cr-nm { font-size: 16px; font-weight: 800; }
.cam-row .cr-kind { font-size: 11px; font-weight: 700; color: var(--muted); }
.cam-row .ic { color: var(--muted); }

.pick-summary {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: var(--r); padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pick-summary::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); }
.pick-summary > * { position: relative; }
.pick-summary .art-can { width: 54px; flex: none; }
.pick-summary .art-cam { width: 74px; flex: none; }
.pick-summary b { font-size: 17px; font-weight: 800; display: block; line-height: 1.2; }
.pick-summary small { color: var(--ink-2); font-size: 12px; }

.dropzone {
  display: grid; place-items: center; text-align: center; gap: 6px; cursor: pointer;
  padding: 26px 16px; border-radius: var(--r);
  background: var(--surface);
  border: 2px dashed var(--line-strong);
}
.dropzone .dz-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.dropzone .dz-ic .ic { width: 26px; height: 26px; }
.dropzone b { font-size: 17px; }
.dropzone.over { background: var(--surface-2); border-color: var(--ink); }
.thumbs-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; margin-top: 10px; }
.thumbs-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--film); }

.sticky-foot {
  position: sticky; bottom: calc(12px + var(--safe-b)); margin-top: 18px; z-index: 5;
  display: flex; gap: 8px; padding: 8px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sticky-foot .btn { flex: 1; box-shadow: none; }
.sticky-foot .btn.primary { flex: 2; }

/* ---------- Trang cuộn & lab ---------- */
.showcase {
  position: relative; overflow: hidden; border-radius: 26px; padding: 18px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(320px 220px at 20% 25%, var(--surface-2), transparent 70%),
    radial-gradient(320px 220px at 85% 20%, var(--surface-2), transparent 70%);
  opacity: .9;
}
.showcase > * { position: relative; }
.showcase .eyebrow { margin-bottom: 2px; }
.showcase h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; word-break: break-word; }
.gear-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.gear-row.scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.gear-row.scroll::-webkit-scrollbar { display: none; }
.gear-row.scroll .gear { flex: 0 0 140px; }
.gear { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; }
.gear .g-art { height: 104px; display: flex; align-items: flex-end; justify-content: center; }
.gear .art-box { width: 138px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .18)); }
.gear .art-cam { width: 132px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .2)); }
.gear b { font-size: 14px; font-weight: 700; line-height: 1.25; }
.gear small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.lab-line {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.5; color: var(--ink-2);
}
.lab-line b { color: var(--ink); font-weight: 700; }
.lab-line a { text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 3px; }
.total-line { margin: 8px 0 0; font-size: 17px; font-weight: 800; }
.total-line .amt { color: var(--ink); }
.showcase .chips-row { margin-top: 12px; }

.roll-actions { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.roll-actions::-webkit-scrollbar { display: none; }
.roll-actions .btn { flex: none; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; box-shadow: var(--shadow-sm); display: flex; gap: 10px; align-items: center; min-width: 0; }
.tile .t-l { font-size: 11px; color: var(--muted); font-weight: 700; }
.tile .t-v { font-size: 14px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.tile > div { min-width: 0; }

.view-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.view-toggle h2 { margin: 0; font-size: 19px; font-weight: 800; }

/* Lưới ảnh kiểu thư viện */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(4, 1fr); margin: 0; border-radius: var(--r); overflow: hidden; } }
.photo-grid button { position: relative; border: 0; padding: 0; background: var(--surface-3); aspect-ratio: 1; cursor: pointer; overflow: hidden; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-grid button:hover img { transform: scale(1.04); }
.photo-grid .fav { position: absolute; top: 5px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.photo-grid .fav .ic { width: 14px; height: 14px; fill: currentColor; }

/* Contact sheet */
.sheet { background: var(--film); border-radius: var(--r); padding: 10px 0; box-shadow: var(--shadow); overflow: hidden; }
.strip { position: relative; padding: 28px 10px; }
.strip + .strip { border-top: 5px solid var(--bg); }
.sheet.f135 .strip::before, .sheet.f135 .strip::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px;
  background-image: linear-gradient(90deg, transparent 5px, #efe6d8 5px, #efe6d8 11px, transparent 11px);
  background-size: 16px 7px; opacity: .85;
}
.sheet.f135 .strip::before { top: 4px; }
.sheet.f135 .strip::after { bottom: 4px; }
.sheet.f120 .strip { padding: 24px 10px; }
.edge { position: absolute; left: 12px; right: 12px; top: 8px; font: 700 8px/1 var(--mono); letter-spacing: .16em; color: var(--film-text); opacity: .8; white-space: nowrap; overflow: hidden; text-transform: uppercase; }
.sheet.f135 .edge { display: none; }
.frames { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; }
.frame { position: relative; border: 0; padding: 0; margin: 0; background: #1d1c22; aspect-ratio: 3 / 2; cursor: pointer; border-radius: 2px; }
.sheet.f120 .frame { aspect-ratio: 1; }
.frame img { width: 100%; height: 100%; object-fit: contain; background: #0b0a0f; border-radius: 2px; }
.frame .fn { position: absolute; left: 0; right: 0; bottom: -13px; text-align: center; font: 700 8px/1 var(--mono); color: var(--film-text); letter-spacing: .1em; pointer-events: none; }
.sheet.f120 .frame .fn { bottom: -15px; }
.frame .fav { position: absolute; top: 3px; right: 4px; color: #fff; }
.frame .fav .ic { width: 11px; height: 11px; fill: currentColor; }
.frame .chk { position: absolute; inset: 0; display: none; place-items: center; background: rgba(0, 0, 0, .35); border-radius: 2px; }
.selecting .frame .chk { display: grid; }
.frame .chk i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; font-style: normal; color: #fff; }
.frame .chk i .ic { width: 13px; height: 13px; stroke-width: 3; }
.frame.picked .chk { background: rgba(0, 0, 0, .05); }
.frame.picked .chk i { background: #fff; border-color: #fff; color: #1d1d1f; }
.frame.picked { outline: 2px solid #fff; outline-offset: 1px; }
.frame.empty-slot { background: #17161c; cursor: default; }
.sheet-empty { color: #cfc9d9; text-align: center; padding: 34px 16px; font-size: 14px; }
.sheet-empty .btn { margin-top: 12px; }

.select-bar {
  position: sticky; top: calc(10px + var(--safe-t)); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 6px 6px 6px 18px;
  margin: 14px 0 10px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg);
}
.select-bar .btn { box-shadow: none; }
.select-bar .btn:not(.primary) { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }

.details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.drow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.drow .bubble { width: 34px; height: 34px; }
.drow .d-l { font-size: 12px; color: var(--muted); font-weight: 700; }
.drow .d-v { font-size: 15px; font-weight: 600; word-break: break-word; }
.drow .d-v.notes { white-space: pre-wrap; font-weight: 400; line-height: 1.6; }
.drow > div { flex: 1; min-width: 0; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 2px; }
.cost-table td { padding: 2px 0; }
.cost-table td:last-child { text-align: right; font-weight: 600; }
.cost-table tr.total td { border-top: 1px dashed var(--line-strong); padding-top: 6px; font-weight: 800; }

.roll-list { display: grid; gap: 8px; }
.roll-li {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px 8px 8px; box-shadow: var(--shadow-sm);
}
.roll-li .art-can { width: 36px; height: 50px; flex: none; }
.roll-li .rl-main { flex: 1; min-width: 0; }
.roll-li b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roll-li small { color: var(--muted); font-size: 12px; }
.roll-li .rl-cost { font-size: 13px; font-weight: 800; white-space: nowrap; }

/* ---------- Trình xem ảnh ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #050408; color: #eee; display: grid; grid-template-rows: auto 1fr auto; touch-action: pan-y; }
.viewer .v-top, .viewer .v-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + var(--safe-t)) 14px 10px; font-size: 13px; font-weight: 700; }
.viewer .v-bot { padding: 10px 10px calc(14px + var(--safe-b)); justify-content: center; flex-wrap: wrap; }
.viewer .v-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.viewer .v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.vbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.vbtn .ic { width: 17px; height: 17px; }
.vbtn.on { background: #fff; color: #1d1d1f; border-color: #fff; }
.vbtn.on .ic { fill: currentColor; }
.viewer .v-count { background: rgba(255, 255, 255, .1); padding: 6px 12px; border-radius: 999px; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.viewer .nav.prev { left: 10px; }
.viewer .nav.next { right: 10px; }
@media (hover: none) { .viewer .nav { display: none; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: grid; place-items: end center; padding: calc(12px + var(--safe-t)) 12px 12px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (min-width: 640px) { .modal { place-items: center; } }
.modal .sheet-card {
  /* chừa thanh trạng thái / tai thỏ iPhone khi mở app từ màn hình chính */
  width: 100%; max-width: 520px; max-height: calc(100vh - 24px - var(--safe-t)); max-height: calc(100dvh - 24px - var(--safe-t)); overflow: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--ink); border-radius: 28px;
  padding: 10px 18px calc(18px + var(--safe-b)); box-shadow: var(--shadow-lg);
  animation: up .25s cubic-bezier(.2, .9, .3, 1.1);
}
.modal .sheet-card::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 14px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-x { position: sticky; top: 0; float: right; z-index: 2; width: 36px; height: 36px; margin: -2px -6px -36px 8px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.sheet-x .ic { width: 18px; height: 18px; }
.modal h3 { padding-right: 40px; }
.modal h3 { font-size: 21px; font-weight: 800; margin: 0 0 14px; }
.share-preview { display: block; max-width: 100%; max-height: 46vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow); }
/* ảnh xem trước dính trên cùng khi kéo thanh chỉnh bên dưới */
.share-stage { position: sticky; top: -10px; z-index: 1; background: var(--bg); padding: 8px 0 10px; margin: 0 -2px; cursor: pointer; }
.tpl-chips { margin-bottom: 6px; }
.ed-hint { font-size: 12px; margin: 2px 0 10px; text-align: center; }
.share-editor { display: grid; gap: 12px; margin-bottom: 14px; }
.ed-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.ed-th { position: relative; flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.ed-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-th i { position: absolute; left: 4px; bottom: 3px; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.ed-th.on { border-color: var(--ink); }
.ed-move { display: flex; gap: 8px; }
.ed-move .btn { flex: 1; }
.ed-group { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.ed-group > b { font-size: 13px; color: var(--ink-2); }
.ed-sl { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ed-sl input { width: 100%; accent-color: var(--ink); }
.ed-looks .chip { flex: none; }

/* ---------- Thống kê ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; overflow: hidden; border-radius: var(--r); padding: 14px; color: #fff; box-shadow: var(--shadow); }
.kpi:nth-child(1) { background: linear-gradient(135deg, #1c1c1e, #3a3a3c); }
.kpi:nth-child(2) { background: linear-gradient(135deg, #2c2c2e, #48484a); }
.kpi:nth-child(3) { background: linear-gradient(135deg, #3a3a3c, #636366); }
.kpi:nth-child(4) { background: linear-gradient(135deg, #48484a, #7c7c80); }
.kpi .ic { position: absolute; right: -8px; bottom: -8px; width: 64px; height: 64px; opacity: .22; stroke-width: 1.4; }
.kpi .k-l { font-size: 12px; font-weight: 700; opacity: .9; }
.kpi .k-v { font-size: 26px; font-weight: 800; line-height: 1.15; margin-top: 4px; letter-spacing: -.02em; word-break: break-word; }
.kpi .k-v.sm { font-size: 18px; }
.rank { display: grid; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px 8px 8px; box-shadow: var(--shadow-sm); text-decoration: none; }
.rank-row .art-can { width: 34px; height: 48px; flex: none; }
.rank-row .cam-tile { width: 54px; height: 44px; }
.rank-row .cam-tile .art-cam { width: 44px; }
.rank-row .r-main { flex: 1; min-width: 0; }
.rank-row .r-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.rank-row .r-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .r-top span:last-child { color: var(--muted); font-size: 12px; flex: none; }
.rank-row .r-bar { height: 7px; background: var(--surface-2); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.rank-row .r-bar i { display: block; height: 100%; border-radius: 4px; background: var(--bar, var(--ink)); }
.donut-wrap { display: flex; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-sm); }
.donut-wrap svg { width: 120px; height: 120px; flex: none; }
.legend { display: grid; gap: 8px; font-size: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.legend b { margin-left: auto; padding-left: 10px; }
.year-cols { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.year-cols .yc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.year-cols .yc i { width: 100%; max-width: 44px; background: var(--ink); border-radius: 8px 8px 4px 4px; min-height: 4px; }
.year-cols .yc span { font-size: 11px; color: var(--muted); font-weight: 600; }
.year-cols .yc b { font-size: 12px; }

/* ---------- Tìm kiếm ---------- */
.result { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.result .r-thumb { position: relative; flex: none; width: 66px; height: 66px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.result .r-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result .r-main { min-width: 0; flex: 1; }
.result b { font-size: 16px; font-weight: 800; display: block; }
.result .r-meta { font-size: 12px; color: var(--muted); }
.result .r-snip { font-size: 13px; color: var(--ink-2); margin-top: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
mark { background: #d1d1d6; color: #1d1d1f; padding: 0 3px; border-radius: 4px; }

/* ---------- Đồng bộ đám mây ---------- */
.cloud-btn { position: relative; }
.cloud-btn .cloud-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); display: none; }
.cloud-btn.cs-idle { color: var(--ink-2); }
.cloud-btn.cs-syncing .ic { animation: spin 1s linear infinite; color: var(--ink); }
.cloud-btn.cs-needs-auth .cloud-dot { display: block; background: #f59e0b; }
.cloud-btn.cs-error .cloud-dot { display: block; background: #ef4444; }
.cloud-card { margin-top: 4px; }
.cloud-meta { display: grid; gap: 4px; font-size: 14px; }

/* ---------- Tài khoản ---------- */
.avatar { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--graphite); color: #fff; flex: none; }
.avatar b { font-size: 15px; font-weight: 800; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; }
.avatar.lg b { font-size: 22px; }
.account-btn { position: relative; padding: 3px; border: 0; border-radius: 50%; cursor: pointer; background: var(--surface); box-shadow: var(--shadow-sm); display: grid; }
.account-btn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: var(--line-strong); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.account-btn.cs-syncing::before { background: conic-gradient(var(--ink), transparent 70%); animation: spin 1s linear infinite; }
.account-btn .cloud-dot { position: absolute; top: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); display: none; }
.account-btn.cs-needs-auth .cloud-dot { display: block; background: #f59e0b; }
.account-btn.cs-error .cloud-dot { display: block; background: #ef4444; }
.signin-pill { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px 0 10px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-sm); }
.signin-pill .ic { width: 18px; height: 18px; color: var(--ink); }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.account-head b { display: block; font-size: 17px; font-weight: 800; }
.account-head small { color: var(--muted); font-size: 13px; }
.sync-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sync-line .ic { width: 18px; height: 18px; color: var(--ink-2); }
.sync-line.cs-syncing .ic { color: var(--ink); animation: spin 1s linear infinite; }
.sync-line.cs-needs-auth .ic { color: #f59e0b; }
.sync-line.cs-error .ic { color: #ef4444; }
.auth { max-width: 420px; margin: 0 auto; }
.auth .page-head { margin-bottom: 8px; }
.auth .logo { font-size: 40px; margin: 6px 0 2px; }
.auth-seg { display: flex; margin-bottom: 14px; }
.auth-seg button { flex: 1; justify-content: center; padding: 10px 12px; }
.form-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #ef4444 12%, transparent); color: #dc2626; font-size: 14px; font-weight: 600; }
.link-btn { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Màn hình chào ---------- */
.welcome { max-width: 420px; margin: 0 auto; padding: 24px 4px 20px; text-align: center; }
.welcome .logo { font-size: 46px; margin: 4px 0 6px; }
.welcome .w-lead { color: var(--ink-2); margin: 0 0 22px; font-size: 16px; }
.w-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; text-align: left; }
.w-points li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow-sm); }
.w-points .ic { color: var(--ink); width: 22px; height: 22px; }
.w-skip { margin-top: 10px; }
.w-note { font-size: 12px; margin: 14px 0 0; }

/* ---------- Cài đặt ---------- */
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.choice button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  padding: 14px 8px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700;
  background: var(--surface); color: var(--ink-2); border: 2px solid var(--line); box-shadow: var(--shadow-sm);
}
.choice button .ic { width: 24px; height: 24px; }
.choice button.on { border-color: var(--ink); color: var(--ink); background: var(--grad-soft), var(--surface); }
.choice button.on .ic { color: var(--ink); }
.set-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .sr-l { flex: 1; min-width: 0; }
.set-row .sr-l b { font-weight: 700; display: block; font-size: 15px; }
.set-row .sr-l small { color: var(--muted); font-size: 12px; }
.set-row select.input { flex: none; width: 42%; max-width: 220px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.custom-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.custom-item:last-child { border-bottom: 0; }
.about { margin-top: 26px; padding: 18px; border-radius: var(--r); background: var(--graphite); color: #fff; box-shadow: var(--shadow); }
.about b { font-size: 20px; font-weight: 800; display: block; margin-bottom: 4px; }

/* ---------- Thanh tab nổi ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--safe-b)); width: min(440px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: 66px; padding: 0 6px; border-radius: 26px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 10px; font-weight: 700; padding: 6px 0; }
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.active { color: var(--ink); }
.tabbar a.active .ic { color: var(--ink); }
.tabbar .tab-new span {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
  transform: translateY(-14px) rotate(-6deg); transition: transform .2s;
}
.tabbar .tab-new:hover span { transform: translateY(-16px) rotate(0); }
.tabbar .tab-new .ic { width: 26px; height: 26px; stroke-width: 2.4; }
body.hide-tabbar .tabbar { display: none; }

/* ---------- Khám phá ---------- */
.search-pill {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--muted); text-decoration: none; font-size: 15px;
}
.explore-card { display: block; margin-bottom: 14px; text-decoration: none; overflow: hidden; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ec-art { position: relative; height: 150px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; background: var(--graphite); }
.ec-art .art-can { width: 74px; margin: 0 -10px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .4)); }
.ec-art .art-can:nth-child(1) { transform: rotate(-10deg) translateY(6px); }
.ec-art .art-can:nth-child(2) { width: 86px; z-index: 1; }
.ec-art .art-can:nth-child(3) { transform: rotate(10deg) translateY(6px); }
.ec-map { align-items: center; padding: 0; background:
  repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 28px),
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 28px), var(--graphite); }
.ec-pin { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #f5f5f7; color: #1d1d1f; box-shadow: 0 0 0 14px rgba(255, 255, 255, .08), 0 0 0 30px rgba(255, 255, 255, .04); }
.ec-pin .ic { width: 30px; height: 30px; }
.ec-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ec-body > div { flex: 1; min-width: 0; }
.ec-body b { display: block; font-size: 18px; font-weight: 800; }
.ec-body span { font-size: 13px; color: var(--muted); }
.ec-body > .ic { color: var(--muted); }
.light-chips { margin-top: 8px; margin-bottom: 4px; }
.chip .ic { width: 15px; height: 15px; }
a.stock-tile { text-decoration: none; color: inherit; }
.light-row { display: flex; gap: 6px; color: var(--muted); }
.light-row .ic { width: 15px; height: 15px; }
.disc-badge { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.film-hero .fh-art { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 4px 0 14px; }
.film-hero .art-box { width: 170px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .18)); }
.film-hero .art-can { width: 72px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .2)); }
.film-desc { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.light-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.light-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; opacity: .45; }
.light-tile .ic { width: 26px; height: 26px; }
.light-tile.on { opacity: 1; color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.meters { display: grid; gap: 14px; }
.meter .m-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.meter .m-top .muted { font-size: 12px; font-weight: 600; }
.m-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.m-bar i { height: 8px; border-radius: 4px; background: var(--surface-2); }
.m-bar i.on { background: var(--ink); }
.tag-chip { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; }
.fmt-chip .ic { width: 12px; height: 12px; }
.gear { color: inherit; }
a.gear small { text-decoration: underline; text-underline-offset: 2px; }

/* Lab gần bạn */
.loc-on { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.loc-on .ic { width: 18px; height: 18px; }
.loc-on span { flex: 1; }
.loc-on .link-btn { margin: 0; }
.loc-note { font-size: 12px; text-align: center; margin: 8px 0 0; }
.lab-list { display: grid; gap: 10px; }
.lab-card { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; gap: 10px; }
.lc-top { display: flex; align-items: flex-start; gap: 10px; }
.lc-name { flex: 1; min-width: 0; }
.lc-name b { display: block; font-size: 17px; font-weight: 800; }
.lc-name small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.km { flex: none; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.lc-note { margin: 0; font-size: 13px; color: var(--ink-2); }
.lc-used { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; }
.lc-used .ic { width: 15px; height: 15px; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; background: var(--surface); }
.check-chip input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: 14px; font-weight: 600; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ink); }

/* ---------- Hôm nay chụp gì? ---------- */
.today-card { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 16px; background: var(--graphite); color: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
.today-card::after { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); pointer-events: none; }
.today-card > * { position: relative; z-index: 1; }
.td-greet { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.td-lead { margin: 8px 0 14px; font-size: 14px; opacity: .8; line-height: 1.5; }
.td-wx { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; font-weight: 600; opacity: .9; }
.td-pick { display: flex; align-items: center; gap: 14px; margin: 16px 0 12px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: inherit; text-decoration: none; }
.td-pick .art-can { width: 52px; flex: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }
.td-pick small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.td-pick b { display: block; font-size: 18px; font-weight: 800; margin: 2px 0 6px; }
.td-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.td-tags span { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.td-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.td-facts > div { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.td-facts .ic { width: 18px; height: 18px; opacity: .8; flex: none; }
.td-facts small { display: block; font-size: 11px; opacity: .65; }
.td-facts b { font-size: 14px; font-weight: 800; }
.today-card .td-btn { background: #f5f5f7; color: #1d1d1f; border-color: transparent; box-shadow: none; }
.today-card .td-btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.td-skeleton { height: 90px; margin-top: 14px; border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hours { display: flex; gap: 6px; overflow-x: auto; margin: 14px -4px 0; padding: 0 4px 2px; scrollbar-width: none; }
.hours::-webkit-scrollbar { display: none; }
.hours .hr { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 52px; padding: 8px 4px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.hours small { font-size: 11px; opacity: .7; }
.hours span { font-size: 20px; }
.hours b { font-size: 13px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat-row > div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat-row b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-row span { font-size: 11px; color: var(--muted); font-weight: 600; }
.drow.hl { background: var(--grad-soft); }
.drow.hl .d-v { font-weight: 800; }
.roll-li.main-pick { border-color: var(--ink); }
.roll-li .iso-chip { flex: none; }
.tip-box { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.tip-box .ic { flex: none; margin-top: 2px; }
.tip-box p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.city-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.set-row input.input { flex: none; width: 42%; max-width: 220px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }

/* ---------- Cập nhật app ---------- */
.update-bar { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-t)); z-index: 70; padding: 0 10px; animation: down .3s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes down { from { transform: translateY(-30px); opacity: 0; } }
.ub-card { display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; padding: 10px 8px 10px 14px; border-radius: 18px; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-lg); }
.ub-card > .ic { width: 22px; height: 22px; flex: none; }
.ub-txt { flex: 1; min-width: 0; }
.ub-txt b { display: block; font-size: 14px; font-weight: 800; }
.ub-txt span { font-size: 12px; opacity: .75; }
.ub-card .btn.primary { background: var(--on-accent); color: var(--accent); box-shadow: none; }
.ub-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; display: grid; place-items: center; cursor: pointer; }
.ub-close .ic { width: 16px; height: 16px; }
.wn-ver { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 6px; }
.wn-ver b { font-size: 15px; font-weight: 800; }
.wn-ver span { font-size: 12px; color: var(--muted); }
.wn-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.version-link { margin-top: 22px; }
.modal h3 .ic-inline { width: 20px; height: 20px; vertical-align: -3px; }

/* ---------- Gợi ý cài app ---------- */
.install { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 0 10px calc(10px + var(--safe-b)); animation: up .3s cubic-bezier(.2, .9, .3, 1.1); }
.install-card { position: relative; max-width: 520px; margin: 0 auto; padding: 16px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.ins-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.ins-close .ic { width: 16px; height: 16px; }
.ins-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.ins-head img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); flex: none; }
.ins-head b { font-size: 19px; font-weight: 800; }
.ins-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.ins-steps { margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--surface-2); display: grid; gap: 10px; font-size: 15px; }
.ins-steps .btn { margin: 0; }
.ins-step { display: flex; gap: 10px; align-items: center; line-height: 1.4; }
.ins-step > i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; vertical-align: -7px; color: #0a84ff; }
.ios-share svg { width: 22px; height: 22px; }
.ios-key { display: inline-grid; place-items: center; width: 30px; height: 26px; vertical-align: -7px; border-radius: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.ios-key svg { width: 18px; height: 18px; }
.install .link-btn { margin-top: 10px; }

/* ---------- Busy / toast ---------- */
.busy { position: fixed; inset: 0; z-index: 80; background: var(--overlay); display: grid; place-items: center; backdrop-filter: blur(4px); }
.busy-box { background: var(--surface); color: var(--ink); padding: 24px 28px; border-radius: 22px; text-align: center; min-width: 220px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); }
.busy-box p { margin: 14px 0 0; }
.spinner { width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--ink)); -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: 999px; padding: 11px 18px;
  font-size: 13px; font-weight: 600; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Máy ảnh dùng 1 lần ---------- */
.format-pick { grid-template-columns: repeat(3, 1fr); }
.fmt .art-disp.art-cam { width: 50px; height: auto; flex: none; }
@media (max-width: 420px) {
  .format-pick .fmt { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; }
}
.disp-tile .art-box { width: 128px; height: 90px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .16)); }
.disp-tile .light-row { justify-content: center; }
.pick-summary .art-disp.art-box { width: 110px; flex: none; }
.ec-disp { gap: 0; align-items: center; padding-bottom: 0; }
.ec-disp .art-cam { width: 110px; margin: 0 -14px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.ec-disp .art-cam:nth-child(1) { transform: rotate(-9deg) translateY(10px); }
.ec-disp .art-cam:nth-child(2) { width: 128px; z-index: 1; transform: translateY(-6px); }
.ec-disp .art-cam:nth-child(3) { transform: rotate(9deg) translateY(10px); }
.film-hero .disp-hero .art-box { width: 230px; }
.roll-li .cam-tile { width: 54px; height: 44px; flex: none; }
.roll-li .cam-tile .art-cam { width: 46px; }
.tip-list { margin: 0; padding: 14px 16px 14px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); display: grid; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ---------- Dung lượng đám mây ---------- */
.quota { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.q-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.q-top b { color: var(--ink); font-variant-numeric: tabular-nums; }
.q-bar { height: 8px; border-radius: 4px; background: var(--surface-3); margin: 8px 0 6px; overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink); transition: width .4s; }
.quota small { font-size: 12px; color: var(--muted); line-height: 1.4; display: block; }
.quota.warn .q-bar i { background: #d97706; }
.quota.full .q-bar i { background: #dc2626; }
.quota.full small { color: #dc2626; font-weight: 600; }

/* ---------- Góp ý & đánh giá ---------- */
.stars { display: flex; gap: 2px; align-items: center; }
.star-btn { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--line-strong); border-radius: 8px; }
.star-btn .ic, .star-i .ic { width: 26px; height: 26px; }
.star-btn.on, .star-i.on { color: #f5a524; }
.star-btn.on .ic, .star-i.on .ic { fill: currentColor; }
.star-btn:active { transform: scale(.9); }
.stars.big .star-btn .ic { width: 36px; height: 36px; }
.stars.sm .star-i .ic { width: 14px; height: 14px; }
.star-i { color: var(--line-strong); display: inline-flex; }
.rate-card { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin: 14px 0 4px; padding: 12px 40px 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.rate-card .rc-txt b { display: block; font-size: 15px; font-weight: 800; }
.rate-card .rc-txt small { font-size: 12px; color: var(--muted); }
.rate-card .star-btn .ic { width: 28px; height: 28px; }
.rc-close { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); padding: 4px; cursor: pointer; }
.rc-close .ic { width: 18px; height: 18px; }
.fb-note { font-size: 13px; margin: -6px 0 12px; }
.fb-label { font-size: 13px; font-weight: 800; margin: 14px 0 8px; color: var(--ink-2); }
.fb-label small { font-weight: 500; color: var(--muted); }
#fb-form .stars.big { justify-content: center; }
#fb-form .chips { flex-wrap: wrap; overflow: visible; }
#fb-form .chip .ic { width: 15px; height: 15px; }
#fb-form textarea.input { min-height: 96px; }
#fb-form .field { margin-top: 14px; }
.kpi .k-sub { font-size: 12px; font-weight: 600; opacity: .8; }
.fb-list { display: grid; gap: 10px; }
.fb-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow-sm); display: grid; gap: 8px; }
.fb-item.done { opacity: .6; }
.fi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fi-date { font-size: 12px; margin-left: auto; }
.fi-msg { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.fi-meta { font-size: 12px; word-break: break-word; }
.fi-meta a { color: var(--ink-2); }
.guide-box { margin: 12px 0 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.guide-box summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 15px; }
.guide-box summary::-webkit-details-marker { display: none; }
.guide-box summary .ic { width: 18px; height: 18px; flex: none; }
.guide-box summary b { flex: 1; }
.guide-box .gb-chev { color: var(--muted); transition: transform .2s; }
.guide-box[open] .gb-chev { transform: rotate(90deg); }
.guide-box ul { list-style: none; margin: 0; padding: 0 14px 14px; display: grid; gap: 10px; }
.guide-box li { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.guide-box li .ic { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--muted); }

/* ---------- Ảnh đã có bản sao trên mây chưa ---------- */
.pending-line:empty { display: none; }
.pending-line { margin-top: 10px; display: grid; gap: 6px; justify-items: start; font-size: 13px; font-weight: 700; }
.pending-line span { display: inline-flex; align-items: center; gap: 6px; }
.pending-line .ic { width: 16px; height: 16px; flex: none; }
.pending-line .ok { color: #16a34a; }
.pending-line .warn { color: #d97706; }
.pending-line small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* khung ảnh chưa có trên máy này */
.no-local { position: relative; background: var(--surface-2); }
.no-local img { visibility: hidden; }
.no-local::after { content: ""; position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; opacity: .35;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.6-8.96A6 6 0 0 1 18 8.5a4 4 0 0 1 0 9.5H7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.6-8.96A6 6 0 0 1 18 8.5a4 4 0 0 1 0 9.5H7z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- Chuyển sang máy khác ---------- */
.xfer-code { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 6px 0 14px; font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: .12em; color: var(--ink); }
.xfer-code span { width: 14px; }
.xfer-step { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; font-size: 14px; color: var(--ink-2); }
.xfer-step .ic { width: 18px; height: 18px; }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.xfer-note { font-size: 12px; text-align: center; margin: 10px 0 0; }
.xfer-input { text-align: center; font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.xfer-ask { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.xfer-ask .ic { width: 26px; height: 26px; flex: none; }
.xfer-ask b { display: block; font-size: 15px; }
.xfer-ask span { font-size: 14px; color: var(--ink-2); }
.xfer-done { display: grid; justify-items: center; gap: 6px; text-align: center; margin: 6px 0 16px; }
.xfer-done .ic { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: #16a34a; color: #fff; }
.xfer-done b { font-size: 18px; }
.xfer-done span { font-size: 14px; color: var(--ink-2); }

/* Nhắc sao lưu */
.nag-card { position: relative; display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; padding: 14px 40px 14px 16px; border-radius: var(--r); background: color-mix(in srgb, #d97706 10%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 35%, transparent); }
.nag-card > .ic { width: 22px; height: 22px; flex: none; color: #d97706; margin-top: 2px; }
.nag-card b { display: block; font-size: 15px; }
.nag-card small { display: block; font-size: 13px; color: var(--ink-2); margin: 2px 0 10px; }
.nag-card.acct { background: var(--surface); border-color: var(--line-strong); }
.nag-card.acct > .ic { color: var(--ink-2); }
.xfer-log { margin: 0 0 14px; font-size: 13px; }
.xfer-log summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.xfer-log pre { margin: 8px 0 0; padding: 10px; border-radius: 10px; background: var(--surface-2); font: 500 11px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow: auto; }

/* Bắt buộc cập nhật: phủ kín màn hình, không đóng được */
.update-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ug-card { width: 100%; max-width: 380px; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 26px 22px 22px; border-radius: 28px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-lg); animation: up .25s cubic-bezier(.2, .9, .3, 1.1); }
.ug-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.ug-ic .ic { width: 28px; height: 28px; }
.ug-card b { font-size: 20px; font-weight: 800; }
.ug-card p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* Chuyển nhà */
.move-card { max-width: 420px; text-align: left; justify-items: stretch; max-height: calc(100dvh - 48px); overflow: auto; }
.move-card > .ug-ic, .move-card > b { justify-self: center; }
.move-card > p { text-align: center; }
.move-steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.move-steps li b { display: block; color: var(--ink); font-size: 15px; }
.move-steps .btn { margin-top: 8px; }
.move-note { font-size: 12px; margin: 0; text-align: center; }
.move-card .link-btn { justify-self: center; }
.welcome .move-steps { margin: 6px 0 18px; text-align: left; }
