/* Phong cách như các app video của anh Đạt (nền tối, thẻ kính mờ, thanh biểu tượng, tab dưới trên điện thoại)
   nhưng màu theo thương hiệu Linchau: xanh lục đậm + vàng đồng + hồng phấn cánh hoa + chữ ngà, tiêu đề chữ có chân. */
:root {
  --bg: #0a110e;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .075);
  --panel-solid: #121b16;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f3ece2;
  --muted: #a49d90;
  --gold: #d6b26b;
  --gold-2: #c49d52;
  --gold-ink: #1c1608;
  --emerald: #2f6b4f;
  --emerald-2: #3d8762;
  --rose: #eaa7ad;
  --ok: #72d6a3;
  --danger: #ff7c72;
  --warn: #f1c561;
  --blue: #93b9ff;
  --violet: #c7a6ff;
  --r: 16px;
  --r-sm: 10px;
  --font: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(900px 540px at 10% -10%, rgba(47, 107, 79, .42), transparent 62%),
    radial-gradient(720px 460px at 96% 2%, rgba(214, 128, 142, .17), transparent 60%),
    radial-gradient(820px 620px at 50% 112%, rgba(196, 157, 82, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: .01em; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.spacer, .grow { flex: 1; }
.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- khung app ---------- */
.shell { display: flex; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; width: 72px; flex: none; display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 14px 0; border-right: 1px solid var(--line); background: rgba(8, 14, 11, .6); backdrop-filter: blur(16px);
}
.mono { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 10px;
  background: linear-gradient(145deg, #1d3a2c, #10231a); border: 1px solid rgba(214, 178, 107, .55);
  color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: -.04em; }
.mono:hover { text-decoration: none; transform: rotate(-4deg) scale(1.04); }
.rail a.nav, .rail button.nav {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--muted);
  border: 1px solid transparent; background: none; cursor: pointer; position: relative;
}
.rail a.nav:hover, .rail button.nav:hover { background: var(--panel-2); color: var(--text); }
.rail a.nav.on { background: var(--gold); color: var(--gold-ink); }
.rail .tip { position: absolute; left: 54px; white-space: nowrap; background: var(--panel-solid); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5; }
.rail .nav:hover .tip { opacity: 1; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); padding: 7px 14px; border-radius: 12px; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb .brandname { font-family: var(--serif); font-size: 16px; color: var(--gold); font-weight: 700; letter-spacing: .14em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600; }
.pill:hover { background: var(--panel-2); border-color: rgba(214, 178, 107, .45); text-decoration: none; }
.content { padding: 8px 24px 48px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 6px 0 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.tabbar { display: none; }
.brand-m { display: none; }

/* ---------- thẻ ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(14px); }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { display: block; color: var(--text); }
.stat .k { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat .v.gold { color: var(--gold); } .stat .v.red { color: var(--danger); } .stat .v.rose { color: var(--rose); }
a.stat:hover { text-decoration: none; border-color: rgba(214, 178, 107, .45); transform: translateY(-2px); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.alert.warn { border-color: rgba(241, 197, 97, .45); background: rgba(241, 197, 97, .08); color: #fbecc4; }
.alert .icon { color: var(--warn); }

/* ---------- nút + ô nhập ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .11); text-decoration: none; }
.btn.pri { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.pri:hover { background: var(--gold-2); }
.btn.ok { background: rgba(61, 135, 98, .22); border-color: rgba(114, 214, 163, .45); color: var(--ok); }
.btn.ok:hover { background: rgba(61, 135, 98, .34); }
.btn.warn { color: var(--danger); border-color: rgba(255, 124, 114, .4); background: rgba(255, 124, 114, .06); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .28); color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(214, 178, 107, .6); box-shadow: 0 0 0 3px rgba(214, 178, 107, .14); }
input::placeholder, textarea::placeholder { color: #6f6a61; }
input[type=date], input[type=time] { color-scheme: dark; }
select option { background: var(--panel-solid); }
textarea { min-height: 70px; resize: vertical; }
input[type=file] { color: var(--muted); font-size: 13px; padding: 10px; border: 1px dashed var(--line-2); background: rgba(0, 0, 0, .2); }
input[type=file]::file-selector-button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; margin-right: 10px; font-weight: 600; cursor: pointer; }
label.f { display: block; }
label.f > span, .f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form .full { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; margin: 0 0 14px; background: var(--panel); backdrop-filter: blur(14px); }
legend { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--gold); padding: 0 8px; }
.seg { display: flex; gap: 6px; padding: 5px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 14px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg span:hover { background: rgba(255, 255, 255, .07); }
.seg input:checked + span { background: var(--gold); color: var(--gold-ink); }

/* ---------- huy hiệu ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-da_chot { color: var(--blue); border-color: rgba(147, 185, 255, .35); }
.st-dang_lam { color: var(--warn); border-color: rgba(241, 197, 97, .35); }
.st-xong { color: var(--rose); border-color: rgba(234, 167, 173, .4); }
.st-dang_giao { color: var(--violet); border-color: rgba(199, 166, 255, .35); }
.st-hoan_thanh { color: var(--ok); border-color: rgba(114, 214, 163, .35); }
.st-huy { color: var(--muted); text-decoration: line-through; }
.pay-chua { color: var(--danger); border-color: rgba(255, 124, 114, .35); }
.pay-coc { color: var(--warn); border-color: rgba(241, 197, 97, .35); }
.pay-du { color: var(--ok); border-color: rgba(114, 214, 163, .35); }
.code { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }

/* ---------- đơn hàng ---------- */
.list { display: grid; gap: 12px; }
.order { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: start; cursor: pointer; }
.order:hover { border-color: rgba(214, 178, 107, .4); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.order .time { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--gold); line-height: 1; }
.order .time small { display: block; font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 6px; }
.order .t { font-weight: 600; }
.order .money { text-align: right; font-weight: 700; font-size: 17px; }
.order .meta { margin-top: 3px; }
.order .tag { color: var(--rose); }
.total-big { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.order .time, .total-big, .ready .price, h1 { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* ---------- bảng ---------- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(14px); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.low td { background: rgba(255, 124, 114, .07); }
tr.low td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tr.click { cursor: pointer; } tr.click:hover td { background: rgba(255, 255, 255, .03); }
td input { padding: 6px 8px; border-radius: 8px; }

.subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs a { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; }
.subtabs a:hover { color: var(--text); text-decoration: none; }
.subtabs a.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.lines .line { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.ready { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ready .card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ready .media { aspect-ratio: 1; background: rgba(0, 0, 0, .35); display: grid; place-items: center; color: var(--muted); }
.ready img { width: 100%; height: 100%; object-fit: cover; }
.ready .meta { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ready .price { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--gold); }
.ready .card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .2); box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.events { font-size: 13px; color: var(--muted); }
.events div { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.events div:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 26px; }
.imgpick { display: flex; gap: 12px; align-items: center; }
.imgpick img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.bar { display: flex; height: 8px; background: rgba(255, 255, 255, .06); border-radius: 4px; overflow: hidden; min-width: 90px; }
.bar i { background: linear-gradient(90deg, var(--emerald-2), var(--gold)); }
code { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); padding: 4px 8px; border-radius: 8px; font-size: 12px; word-break: break-all; }

/* ---------- đăng nhập ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate .card { width: 100%; max-width: 400px; padding: 28px; }
.gate .logo-big { text-align: center; margin-bottom: 22px; }
.gate .logo-big .mono { width: 64px; height: 64px; font-size: 30px; margin: 0 auto 14px; border-radius: 18px; }
.gate .word { font-family: var(--serif); font-size: 32px; font-weight: 700; letter-spacing: .22em; color: var(--text); }
.gate .studio { font-size: 11px; letter-spacing: .5em; color: var(--gold); margin-top: 2px; }
.gate .tagline { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--rose); margin-top: 10px; }

/* ---------- thông báo ---------- */
.toast { position: fixed; right: 16px; bottom: 24px; z-index: 60; max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px;
  background: var(--panel-solid); border: 1px solid rgba(114, 214, 163, .45); color: var(--text); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.toast.err { border-color: rgba(255, 124, 114, .55); color: #ffd7d2; }

/* ---------- hiệu ứng (như app video) ---------- */
.btn, .pill, .chip, .rail .nav, .tabbar a, .seg span, .card, .order, .subtabs a, .mono { transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease; }
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .28); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.btn.pri:hover { box-shadow: 0 8px 24px rgba(214, 178, 107, .28); }
.btn:active, .pill:active, .seg span:active { transform: scale(.97); box-shadow: none; }
.btn:disabled:hover { transform: none; box-shadow: none; }
.btn:focus-visible, .pill:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rail .nav:hover .icon { transform: scale(1.12); }
.rail .icon, .tabbar .icon { transition: transform .18s ease; }
@media (hover: none) { .btn:hover, .order:hover, a.stat:hover, .ready .card:hover { transform: none; box-shadow: none; } }

/* ---------- điện thoại ---------- */
@media (max-width: 860px) {
  .rail { display: none; }
  .topbar { padding: 12px 16px; }
  .crumb { display: none; }
  .brand-m { display: grid; }
  .content { padding: 4px 16px 104px; }
  h1 { font-size: 26px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(10, 17, 14, .9); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 4px 8px; border-radius: 10px; }
  .tabbar a.on { color: var(--gold); }
  .tabbar a:active .icon { transform: scale(.9); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 19px; }
  .order { grid-template-columns: 58px 1fr; }
  .order .time { font-size: 22px; }
  .order .money { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; text-align: left; border-top: 1px dashed var(--line); padding-top: 10px; }
  .order .money > div { margin: 0 !important; }
  .lines .line { grid-template-columns: 1fr 1fr; }
  .toast { bottom: 88px; right: 16px; left: 16px; max-width: none; }
}
