/* ===== Trang chủ công khai + Đăng nhập — Bàn AI · Trần Huy Camera =====
   Chủ yêu cầu 22/11/2026: "làm lại trang chủ giao diện và login giống như bên messtranhuy".
   Lấy theo messtranhuy (D:\order_web: templates/public.html + static/css/style.css): trắng chủ đạo, kiểu Apple / macOS.
   Bàn AI chặn CSP style-src 'self' → mọi kiểu nằm ở tệp này, không style nội tuyến. ===== */
:root {
  --bg: #f5f5f7; --card: #fff; --line: #e6e6eb; --line2: #d9d9df;
  --ink: #1d1d1f; --ink2: #54545a; --ink3: #8a8a90;
  --brand: #0071e3;
  --grad: linear-gradient(135deg, #3aa0ff 0%, #0071e3 55%, #0a5fd0 100%);
  --ok: #1a7f37; --danger-ink: #b42318; --warn: #9a6700;
  --radius: 20px; --radius-sm: 13px; --tap: 48px;
  --shadow: 0 1px 2px rgba(20, 20, 43, .05), 0 12px 34px -14px rgba(20, 20, 43, .18);
  --shadow-sm: 0 1px 2px rgba(20, 20, 43, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -0.011em;
}
a { color: var(--brand); text-decoration: none; }
img { display: block; }

/* ===== Trang chủ (chưa đăng nhập) ===== */
body.trang-chu { background: #fff; color: #000; overflow-x: hidden; }
.topnav {
  display: flex; align-items: center; gap: 24px; padding: 14px 40px; border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 50; background: #fff;
}
.topnav .logo { height: 44px; width: auto; }
.topnav .login {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 999px; background: #000; color: #fff; font-weight: 600; font-size: .9rem; transition: opacity .15s ease;
}
.topnav .login svg { width: 17px; height: 17px; }
.topnav .login:hover { opacity: .85; }
.topnav .login:active { opacity: .7; }

.hero {
  position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
  min-height: calc(100vh - 74px); min-height: calc(100dvh - 74px); padding: 0 2rem;
}
.studio-typography { text-align: center; }
.studio-title {
  margin: 0; color: #000; font-size: clamp(3.4rem, 20vw, 11rem); font-weight: 900; line-height: .9;
  letter-spacing: -.02em; text-transform: uppercase;
  text-shadow: 2px 0 rgba(0, 229, 255, .55), -2px 0 rgba(255, 0, 140, .55);
}
.hero-cta { margin-top: 2.4rem; text-align: center; }
.cta-button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 15px 34px; border-radius: 999px;
  background: #000; color: #fff; font-weight: 600; font-size: .98rem; transition: opacity .15s ease;
}
.cta-button svg { width: 18px; height: 18px; }
.cta-button:hover { opacity: .85; }

.studio-card {
  position: absolute; top: 64%; right: 6%; z-index: 10; width: 320px; overflow: hidden; transform: translateY(-50%);
  border-radius: 16px; background: #fff; box-shadow: 0 20px 45px rgba(0, 0, 0, .15);
}
.card-top {
  position: relative; display: flex; align-items: center; justify-content: center; height: 180px;
  background: linear-gradient(135deg, #f093fb 0%, #c3f0ff 55%, #a0e9ff 100%);
}
.card-top .cam { height: 130px; width: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .2)); }
.card-label {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 20px; background: rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #100e0e; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
.card-label img { width: 12px; height: 12px; }
.card-info { padding: 18px 20px; }
.card-info .nm { margin-bottom: 3px; font-size: 1.05rem; font-weight: 700; }
.card-info .sub { color: #6c757d; font-size: .9rem; font-weight: 500; }

.hero-foot {
  position: absolute; right: 2rem; bottom: 1.6rem; left: 2rem; display: flex; align-items: flex-end; justify-content: space-between;
}
.hero-foot a { color: #000; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hero-foot a:hover { opacity: .6; }
@media (max-width: 1100px) {
  .studio-card { position: static; margin: 34px auto 0; transform: none; }
  .hero { min-height: auto; padding: 40px 1.5rem; }
}
@media (max-width: 900px) {
  .topnav { padding: 12px 18px; }
  .topnav .logo { height: 38px; }
  .hero-foot { position: static; margin-top: 24px; padding: 0 .5rem; }
}

/* ===== Đăng nhập ===== */
body.trang-dn { background: var(--bg); font-size: 16px; line-height: 1.5; }
.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 22px;
  background: radial-gradient(1200px 600px at 50% -10%, #eaf3ff 0%, var(--bg) 55%);
}
.login-card { width: 100%; max-width: 420px; }
.login-card .logo { margin-bottom: 22px; text-align: center; }
.login-card .logo img { height: 72px; width: auto; margin: 0 auto; }
.login-card .logo .t { display: flex; justify-content: center; margin: 12px 0 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.login-card .logo .s { margin: 6px 0 0; color: var(--ink3); font-size: .88rem; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grad); box-shadow: 0 2px 8px rgba(0, 113, 227, .5); }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.section-title { margin: 0 0 14px; color: var(--ink3); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
label.fld { display: block; margin-bottom: 14px; }
label.fld > span:first-child { display: block; margin-bottom: 7px; color: var(--ink2); font-size: .82rem; font-weight: 600; }
.fld input {
  width: 100%; min-height: var(--tap); padding: 13px 15px; border: 1px solid var(--line2); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; outline: none;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.fld input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 113, 227, .14); }
.o-mk { position: relative; display: block; }
.o-mk input { padding-right: 78px; }
.hien-mk {
  position: absolute; top: 50%; right: 6px; min-height: 36px; padding: 0 12px; transform: translateY(-50%);
  border: 0; border-radius: 10px; background: transparent; color: var(--brand); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.hien-mk:hover { background: #eef6ff; }
.caps { margin: -6px 0 12px; color: var(--warn); font-size: .82rem; font-weight: 600; }
.nho {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 2px 0 4px;
  color: var(--ink2); font-size: .92rem; cursor: pointer; user-select: none;
}
.nho input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nho .track { position: relative; flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; background: #e3e3e8; transition: background .22s; }
.nho .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: transform .22s;
}
.nho input:checked + .track { background: #34c759; }
.nho input:checked + .track::after { transform: translateX(18px); }
.nho small { display: block; color: var(--ink3); font-size: .78rem; }
.err-msg { min-height: 1.2em; margin: 8px 0 12px; color: var(--danger-ink); font-size: .88rem; font-weight: 600; }
.err-msg.ok { color: var(--ok); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--tap);
  padding: 13px 20px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .06s ease, box-shadow .18s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn.primary { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(0, 113, 227, .6); }
.btn.primary:hover { box-shadow: 0 10px 26px -8px rgba(0, 113, 227, .7); }
.spin {
  display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.da-vao { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #cfe3fb; border-radius: var(--radius-sm); background: #eef6ff; font-size: .9rem; }
.chan { margin: 16px 0 0; color: var(--ink3); font-size: .8rem; text-align: center; }
.chan a { color: var(--ink2); font-weight: 600; }
.hien-mk:focus-visible, .btn:focus-visible, .nho input:focus-visible + .track,
.topnav a:focus-visible, .cta-button:focus-visible, .hero-foot a:focus-visible, .chan a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
}
