/* Giao diện mới — bám theo bộ thiết kế 5 màn.
   Độc lập hoàn toàn với css trang cũ nên hai giao diện không giẫm cascade nhau.

   ─── MÀU ───────────────────────────────────────────────────────────────────
   Mọi màu đi qua biến. `:root` là bảng TỐI (mặc định của sản phẩm), còn
   `[data-theme="light"]` ghi đè sang bảng SÁNG.

   Chủ đề do một script inline trong <head> đặt TRƯỚC khi CSS vẽ — nếu để JS
   thường đặt sau khi tải xong thì người dùng thấy một nháy màu tối rồi mới đổi
   sang sáng, rất khó chịu ở lần mở trang đầu.

   Token gom theo VAI TRÒ chứ không theo giá trị: ở bảng tối `--surface` và
   `--surface-3` gần giống nhau, nhưng ở bảng sáng một cái trắng, một cái xám
   nhạt — tách ra mới chỉnh riêng được.                                        */

:root {
  --bg:            #0b0916;
  --surface:       #171232;
  --surface-2:     #141026;
  --surface-3:     #1c1633;
  --surface-side:  #120e22;

  --text:          #e9e7f2;
  --text-2:        #c9c4da;
  --text-dim:      #a9a3c0;
  --text-dimmer:   #8b86a0;
  --text-faint:    #8b86a3;   /* WCAG AA 5.16:1 trên --surface; #7b7691 chỉ 4.14 */

  --accent:        #7c3aed;
  --accent-2:      #a855f7;
  --accent-3:      #c026d3;
  --accent-soft:   #c9a6ff;
  --accent-wash:   rgba(124,58,237,.16);
  --accent-line:   rgba(168,85,247,.3);
  --accent-hover:  rgba(124,58,237,.2);
  --nav-active:    linear-gradient(90deg, rgba(124,58,237,.4), rgba(124,58,237,.12));
  --link:          #c48cff;

  --ok:            #4ade80;
  --ok-2:          #22c55e;
  --ok-wash:       rgba(74,222,128,.14);
  --warn:          #f0a14b;
  --gold:          #ffc94d;
  --gold-wash:     rgba(255,180,40,.06);
  --gold-line:     rgba(255,180,40,.2);
  --danger:        #f87171;
  --danger-2:      #ef4444;
  --info:          #9ab4d8;
  --info-2:        #cfe2ff;
  --info-3:        #60a5fa;
  --info-wash:     rgba(96,165,250,.08);
  --info-line:     rgba(96,165,250,.2);

  --line-soft:     rgba(255,255,255,.04);
  --line:          rgba(255,255,255,.07);
  --line-2:        rgba(255,255,255,.1);
  --line-3:        rgba(255,255,255,.14);
  --line-dash:     rgba(255,255,255,.18);
  --hover:         rgba(255,255,255,.05);
  --hover-2:       rgba(255,255,255,.09);
  --track:         rgba(255,255,255,.17);
  --input-bg:      rgba(0,0,0,.35);
  --shadow:        rgba(0,0,0,.5);
  --bot-glow:      rgba(124,58,237,.55);
}

/* Bảng SÁNG. Không chỉ đảo màu nền: chữ mờ phải ĐẬM hơn hẳn so với bản tối vì
   chữ xám nhạt trên nền trắng mất tương phản nhanh hơn nhiều so với chữ xám
   trên nền đen. Vàng và xanh lá cũng phải tối đi mới đọc được trên nền trắng. */
[data-theme="light"] {
  --bg:            #f4f3fa;
  --surface:       #ffffff;
  --surface-2:     #ffffff;
  --surface-3:     #faf9fe;
  --surface-side:  #ffffff;

  --text:          #1b1830;
  --text-2:        #3a3552;
  --text-dim:      #55506e;
  --text-dimmer:   #6b6686;
  --text-faint:    #757089;   /* WCAG AA 4.73:1 trên nền trắng; #8a85a3 chỉ 3.52 */

  --accent:        #7c3aed;
  --accent-2:      #9333ea;
  --accent-3:      #c026d3;
  --accent-soft:   #7c3aed;
  --accent-wash:   rgba(124,58,237,.1);
  --accent-line:   rgba(124,58,237,.25);
  --accent-hover:  rgba(124,58,237,.12);
  --nav-active:    linear-gradient(90deg, rgba(124,58,237,.16), rgba(124,58,237,.05));
  --link:          #7c3aed;

  --ok:            #15803d;
  --ok-2:          #16a34a;
  --ok-wash:       rgba(22,163,74,.12);
  --warn:          #c2410c;
  --gold:          #a16207;
  --gold-wash:     rgba(161,98,7,.07);
  --gold-line:     rgba(161,98,7,.2);
  --danger:        #dc2626;
  --danger-2:      #dc2626;
  --info:          #1d4ed8;
  --info-2:        #1e3a8a;
  --info-3:        #2563eb;
  --info-wash:     rgba(37,99,235,.07);
  --info-line:     rgba(37,99,235,.18);

  --line-soft:     rgba(0,0,0,.05);
  --line:          rgba(0,0,0,.09);
  --line-2:        rgba(0,0,0,.12);
  --line-3:        rgba(0,0,0,.16);
  --line-dash:     rgba(0,0,0,.2);
  --hover:         rgba(0,0,0,.04);
  --hover-2:       rgba(124,58,237,.08);
  --track:         rgba(0,0,0,.18);
  --input-bg:      #ffffff;
  --shadow:        rgba(0,0,0,.14);
  --bot-glow:      rgba(124,58,237,.25);
}

/* Nút chuyển chủ đề */
.theme-btn {
  background: var(--hover); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 15px; line-height: 1;
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.theme-btn:hover { background: var(--accent-hover); border-color: var(--accent-line); }


* { box-sizing: border-box; }

/* BẮT BUỘC: `.shell { display:flex }` và `.landing` có display riêng sẽ ĐÈ LÊN
   thuộc tính `hidden` (hidden chỉ là `display:none` của UA stylesheet, độ ưu
   tiên thấp hơn rule của mình). Không có dòng này thì lúc chưa đăng nhập cả
   trang công khai LẪN khung ứng dụng rỗng cùng hiện ra. */
[hidden] { display: none !important; }

.app-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: #fff; text-decoration: none;
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 9px; cursor: pointer;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.13); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost {
  background: var(--line); border: 1px solid var(--line-3); font-weight: 500;
  /* PHẢI đặt lại màu chữ: `.btn` có `color:#fff` cho nền gradient tím, nhưng
     ghost là nền gần như trong suốt — giữ trắng thì ở bảng SÁNG thành chữ
     trắng trên nền trắng và nút biến mất hẳn. */
  color: var(--text);
}
.btn.ghost:hover { background: var(--accent-hover); }
.btn.lg { font-size: 14px; padding: 12px 22px; border-radius: 11px; }
.btn.sm { font-size: 12px; padding: 6px 12px; }
.empty { text-align: center; padding: 28px; color: var(--text-faint); font-size: 13px; }

/* ==================== TRANG CÔNG KHAI ==================== */
.landing { max-width: 1180px; margin: 0 auto; padding: 18px 22px 40px; }

.lnav {
  display: flex; align-items: center; gap: 26px;
  padding: 12px 18px; margin-bottom: 26px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
}
.lnav-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.lnav-logo {
  width: 30px; height: 30px; display: grid; place-items: center; font-size: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 9px;
}
.lnav-links { display: flex; gap: 20px; flex: 1; }
.lnav-links a { color: var(--text-dim); text-decoration: none; font-size: 13.5px; padding-bottom: 3px; }
.lnav-links a:hover { color: var(--text); }
.lnav-links a.active { color: var(--text); border-bottom: 2px solid var(--accent-2); }
.lnav-acts { display: flex; gap: 9px; }

.hero { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }
.hero-left { flex: 1 1 420px; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
  color: var(--accent-soft); background: rgba(124,58,237,.16);
  border: 1px solid rgba(168,85,247,.3); border-radius: 20px; padding: 5px 13px;
  margin-bottom: 15px;
}
.hero-h { margin: 0 0 14px; font-size: 40px; line-height: 1.18; font-weight: 800; }
.hero-h .accent { color: var(--accent-2); }
.hero-p { color: var(--text-dim); font-size: 14px; line-height: 1.65; max-width: 470px; margin: 0 0 20px; }
.hero-cta { display: flex; gap: 11px; flex-wrap: wrap; }

.hero-right { flex: 1 1 320px; position: relative; display: flex; justify-content: center; min-height: 240px; }
.hero-bot {
  font-size: 140px; line-height: 1;
  filter: drop-shadow(0 0 60px rgba(124,58,237,.55));
}
.bubble {
  position: absolute; left: 0; top: 10px; z-index: 2;
  background: var(--surface); border: 1px solid rgba(168,85,247,.3);
  border-radius: 12px; padding: 11px 14px; font-size: 12px; line-height: 1.6; max-width: 160px;
}
.bubble span { color: var(--text-dim); }
.script {
  position: absolute; right: 0; bottom: 30px;
  font-family: "Segoe Script", cursive; font-size: 15px; color: var(--accent-soft);
  line-height: 1.5; text-align: center;
}
.script span { display: block; font-size: 18px; }

.lstats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0; margin-bottom: 22px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
}
.lstat { padding: 16px 20px; border-right: 1px solid var(--line); }
.lstat:last-child { border-right: none; }
.lstat-n { font-size: 27px; font-weight: 800; line-height: 1.1; }
.lstat-n.ok { color: var(--ok); }
.lstat-l { font-size: 11.5px; color: var(--text-dimmer); margin-top: 3px; }

.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.lcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px; }
.lcard-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; margin-bottom: 12px; }

.lsafe { margin: 0; padding-left: 17px; }
.lsafe li { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 9px; }
.lsafe b { color: var(--text); }

.lfoot { text-align: center; color: var(--text-faint); font-size: 12px; margin-top: 30px; }

/* ==================== ỨNG DỤNG ==================== */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 232px; flex: none;
  background: var(--surface-side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 15px 11px;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.side-logo {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 11px;
}
.side-name { font-size: 15px; font-weight: 700; }
.side-tag { font-size: 10px; color: var(--text-dimmer); margin-top: 1px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; background: none; border: none; border-radius: 9px;
  color: var(--text-dim); font-size: 13.5px; font-family: inherit; text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--nav-active); color: var(--text); }
.nav-ico { width: 18px; text-align: center; font-size: 14px; }

.side-foot {
  margin-top: auto;
  background: rgba(255,180,40,.06); border: 1px solid rgba(255,180,40,.2);
  border-radius: 11px; padding: 11px 12px;
}
.sf-n { font-size: 17px; font-weight: 700; color: var(--gold); }
.sf-s { font-size: 11px; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
.sf-note { font-size: 10.5px; color: var(--text-dimmer); margin-top: 7px; line-height: 1.5; }
.sf-note b { color: var(--text); }

.main { flex: 1; min-width: 0; padding: 14px 24px 40px; }

.top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.search { position: relative; flex: 1; max-width: 620px; }
.search-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .55; }
.search input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: 13.5px;
  padding: 10px 62px 10px 34px; outline: none;
}
.search input:focus { border-color: rgba(168,85,247,.5); }
.search-k {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--text-faint); background: var(--line);
  border-radius: 5px; padding: 2px 6px;
}
.top-right { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.top-link { font-size: 12px; color: var(--text-dimmer); text-decoration: none; }
.top-link:hover { color: var(--link); }
.icon-btn {
  position: relative; background: none; border: none; color: var(--text-2);
  font-size: 16px; cursor: pointer; padding: 4px;
}
.icon-btn i { position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; background: var(--danger-2); border-radius: 50%; }

.acct { display: flex; align-items: center; gap: 9px; }
.acct-avatar {
  width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3)); font-weight: 700; font-size: 13px; color: #fff;
}
.acct-n { font-size: 13px; }
.acct-e { font-size: 11px; color: var(--text-dimmer); }
.acct a { color: var(--link); text-decoration: none; font-size: 11.5px; }
.acct a:hover { text-decoration: underline; }

.crumb { font-size: 12.5px; color: var(--text-dimmer); margin-bottom: 9px; }
.crumb a { color: var(--link); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-t { margin: 0; font-size: 23px; font-weight: 700; }
.page-d { font-size: 12.5px; color: var(--text-dimmer); margin-top: 3px; }

.view { display: none; }
.view.active { display: block; }

/* ---- bố cục 2 cột (nội dung + cột phải) ---- */
.cols { display: grid; grid-template-columns: 1fr 290px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* ---- ô thống kê có icon màu ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px;
}
.stat-i { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 19px; }
.stat-n { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stat-l { font-size: 11.5px; color: var(--text-dimmer); }
.stat-s { font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.stat-n.ok { color: var(--ok); }
.stat-n.warn { color: var(--warn); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; margin-bottom: 15px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-t { font-size: 15px; font-weight: 700; }
.panel-d { font-size: 11.5px; color: var(--text-dimmer); margin: 4px 0 13px; line-height: 1.55; }
.panel-d b { color: var(--text); }

.rail-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 10px 12px; margin-bottom: 7px;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text-2); font-size: 12.5px; font-family: inherit; text-align: left; cursor: pointer;
  text-decoration: none;
}
.rail-item:hover { border-color: rgba(168,85,247,.4); }
.rail-item .arr { margin-left: auto; color: var(--text-faint); }

/* ---- robot ---- */
.robots { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.robot { background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 13px; }
.robot-h { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.robot-av { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 17px; background: rgba(124,58,237,.25); }
.robot-n { font-size: 13.5px; font-weight: 600; }
.robot-k { font-size: 9.5px; color: var(--text-faint); margin-top: 1px; word-break: break-all; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; padding: 2px 9px; border-radius: 20px; }
.pill.on { background: rgba(74,222,128,.14); color: var(--ok); }
.pill.off { background: var(--line); color: var(--text-dimmer); }
.pill::before { content: "●"; font-size: 8px; }

.robot-rows { display: flex; flex-direction: column; gap: 5px; margin: 10px 0 11px; }
.robot-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.robot-row b { margin-left: auto; color: var(--text); }
.robot-row b.warn { color: var(--warn); }
.robot-acts { display: flex; gap: 7px; }

.robot.add {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--line-dash); background: transparent; cursor: pointer; min-height: 170px;
}
.robot.add:hover { border-color: rgba(168,85,247,.5); }
.add-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 20px; margin: 0 auto 9px; }
.add-t { font-size: 13px; font-weight: 600; }
.add-s { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* ---- chọn robot + ví ---- */
.picker { display: grid; grid-template-columns: 1fr 300px; gap: 12px; margin-bottom: 14px; }
@media (max-width: 800px) { .picker { grid-template-columns: 1fr; } }
.picker-box { background: var(--surface); border: 1px solid var(--hover-2); border-radius: 12px; padding: 9px 13px; display: flex; align-items: center; gap: 11px; }
.picker-l { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dimmer); }
.picker-s { background: transparent; border: none; color: var(--text); font-size: 14.5px; font-weight: 600; font-family: inherit; outline: none; cursor: pointer; width: 100%; }
.picker-s option { background: var(--surface-3); }
.wallet { background: var(--surface); border: 1px solid rgba(255,180,40,.25); border-radius: 12px; padding: 9px 14px; display: flex; align-items: center; gap: 11px; }
.wallet-i { width: 34px; height: 34px; flex: none; border-radius: 50%; background: rgba(255,180,40,.16); display: grid; place-items: center; font-size: 16px; }
.wallet-n { font-size: 16px; font-weight: 700; color: var(--gold); }
.wallet-s { font-size: 10.5px; color: var(--text-dimmer); }

/* ---- bộ lọc nhóm ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 13px; }
.chip {
  background: var(--hover); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 12.5px; font-family: inherit; padding: 6px 14px;
  border-radius: 20px; cursor: pointer; transition: background .15s;
}
.chip:hover { background: var(--line-2); }
.chip.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; font-weight: 600; }
.chips-r { margin-left: auto; font-size: 12.5px; color: var(--text-dim); }
.chips-r b { color: var(--ok); }

/* ---- thẻ công cụ ---- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border: 1px solid var(--line-2); border-radius: 13px; padding: 14px; transition: opacity .15s, border-color .15s; }
.tcard.off { opacity: .5; }
.tcard:hover { border-color: rgba(168,85,247,.32); }
.tcard-h { display: flex; align-items: flex-start; gap: 11px; }
.tcard-i { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 20px; }
.tcard-n { font-size: 14px; font-weight: 700; }
.tcard-g { display: inline-block; font-size: 10px; color: var(--accent-soft); background: rgba(124,58,237,.18); border-radius: 5px; padding: 2px 8px; margin-top: 5px; }
.tcard-d { font-size: 11.5px; color: var(--text-dimmer); margin-top: 10px; line-height: 1.55; }
.tcard-lock { font-size: 10px; color: var(--warn); margin-top: 8px; line-height: 1.5; background: rgba(255,180,40,.07); border-radius: 6px; padding: 6px 8px; }

/* Toggle XANH khi bật (theo bản thiết kế), khác tím của nút chính. */
.sw { position: relative; width: 40px; height: 22px; flex: none; margin-left: auto; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw-s { position: absolute; inset: 0; background: var(--track); border-radius: 22px; cursor: pointer; transition: background .18s; }
.sw-s::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; }
.sw input:checked + .sw-s { background: var(--ok-2); }
.sw input:checked + .sw-s::before { transform: translateX(18px); }
.sw.locked .sw-s { cursor: not-allowed; opacity: .45; }

.note { font-size: 11.5px; color: var(--info); line-height: 1.55; background: rgba(96,165,250,.08); border: 1px solid rgba(96,165,250,.2); border-radius: 10px; padding: 9px 13px; margin-bottom: 13px; }
.note b { color: var(--info-2); }

/* ---- bảng ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-dimmer); font-size: 11px; padding: 8px 9px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 9px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); }
.tbl tr:last-child td { border-bottom: none; }
.plus { color: var(--ok); font-weight: 600; }
.minus { color: var(--danger); font-weight: 600; }
.rank { width: 22px; height: 22px; border-radius: 6px; background: var(--line); display: inline-grid; place-items: center; font-size: 11px; }

/* ---- gói token ---- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 13px; }
.pack { position: relative; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.pack:hover, .pack.hot { border-color: rgba(168,85,247,.65); background: rgba(124,58,237,.1); }
.pack-n { font-size: 15px; font-weight: 700; }
.pack-p { font-size: 12px; color: var(--text-dimmer); margin-top: 3px; }
.pack-tag { position: absolute; top: -9px; right: 10px; font-size: 9.5px; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; border-radius: 20px; padding: 3px 9px; }

/* ---- media dropzone ---- */
.drop { border: 1.5px dashed rgba(168,85,247,.4); border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 14px; }
.drop-i { font-size: 30px; }
.drop-t { font-size: 13.5px; margin: 8px 0 4px; }
.drop-s { font-size: 11px; color: var(--text-faint); }

/* ---- form ---- */
.field { margin-bottom: 13px; max-width: 460px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.field input { width: 100%; background: var(--input-bg); border: 1px solid var(--line-3); border-radius: 8px; color: var(--text); font-size: 14px; font-family: inherit; padding: 9px 11px; outline: none; }
.field input:focus { border-color: rgba(168,85,247,.55); }
.field .hint { font-size: 11px; color: var(--text-faint); margin-top: 5px; line-height: 1.45; }

/* ---- biểu đồ hoạt động ---- */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.bar { flex: 1; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 3px 3px 0 0; min-height: 2px; }
.chart-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-faint); margin-top: 6px; }

/* ---- toast ---- */
.toast-box { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast {
  background: rgba(24,20,40,.97); border: 1px solid var(--line-3); border-left-width: 3px;
  color: var(--text); font-size: 13px; padding: 10px 15px; border-radius: 8px;
  box-shadow: 0 6px 22px var(--shadow); opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s; max-width: 330px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--info-3); }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { width: auto; }
  .main { padding: 14px; }
  .hero-h { font-size: 30px; }
}
