/* SuperAgent Social — bảng điều khiển
   Nền tối #18181B, một điểm nhấn cam, gradient hồng → tím cho chi tiết nhỏ. */

:root {
  --bg: #141311;
  --bg-deep: #100f0d;
  --rail: #181713;
  --panel: #1b1a17;
  --panel-2: #232119;
  --line: #302d24;
  --line-soft: #262319;
  --ink: #f4f4f5;
  --ink-2: #c7c7cf;
  --muted: #8b8b95;
  --muted-2: #6c6c76;
  --orange: #ff7a1a;
  --orange-2: #ffa04d;
  --pink: #c8f751;
  --purple: #2dd4bf;
  --teal: #2dd4bf;
  --green: #34d399;
  --yellow: #facc15;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- khung ---------- */

.app { position: fixed; inset: 0; display: grid; grid-template-columns: 244px 1fr; }

.rail {
  display: flex; flex-direction: column;
  padding: 12px 10px 10px;
  background: linear-gradient(180deg, #1c1c21 0%, #171719 60%, #151517 100%);
  border-right: 1px solid var(--line-soft);
  min-height: 0;
}

.ws-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px 0; }

.ws {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 4px; border-radius: 10px; min-width: 0; flex: 1;
}
.ws:hover { background: #24242a; }

.ws-logo {
  width: 28px; height: 28px; border-radius: 9px; overflow: hidden;
  background: #0f0f12; border: 1px solid #34343c;
  display: grid; place-items: center; flex: 0 0 auto;
}
.ws-logo img { width: 30px; height: 30px; object-fit: cover; transform: translateY(1px); }

.ws-name {
  font-size: 13px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-name i { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 3px; }
.ws .chev { width: 14px; height: 14px; color: var(--muted-2); }

.icon-btn {
  position: relative; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { background: #26262d; color: #fff; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 6px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px #1c1c21;
}

.avatar {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

.create-btn {
  margin: 12px 4px 6px;
  height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #f2f2f3; color: #17171a; font-weight: 650; font-size: 13.5px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .12s var(--ease), background .12s;
}
.create-btn .ic { width: 16px; height: 16px; stroke-width: 2; }
.create-btn:hover { background: #fff; transform: translateY(-1px); }

.brand-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 2px 0 4px; border-radius: 10px;
}
.brand-row:hover { background: #232329; }
.brand-ico {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: #d9d9df;
}
.brand-ico .ic { width: 17px; height: 17px; }
.brand-label { flex: 1; font-size: 13.5px; color: #dcdce2; }

.ring { position: relative; width: 26px; height: 26px; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: #34343c; }
.ring .arc { stroke: var(--orange); stroke-linecap: round; transition: stroke-dashoffset .5s var(--ease); }
.ring b {
  position: absolute; font-size: 9px; font-weight: 700; color: #e6e6ea;
}

.group { min-height: 0; }
.group h2 {
  margin: 0; padding: 14px 10px 5px;
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #6a6a74;
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 33px; padding: 0 10px; border-radius: 9px;
  color: #b6b6c0; font-size: 13.5px; transition: background .12s, color .12s;
}
.nav-item .ic { width: 17px; height: 17px; color: #9a9aa4; }
.nav-item:hover { background: #222228; color: #f1f1f4; }
.nav-item.active {
  background: #282830; color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px #35353e;
}
.nav-item.active .ic { color: #fff; }

/* thẻ bắt đầu */

.checklist {
  margin-top: auto; padding: 12px;
  border-radius: 13px; border: 1px solid #34343c;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 61, 154, .13), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(139, 92, 246, .16), transparent 55%),
    #1f1f25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.cl-head { display: flex; align-items: center; justify-content: space-between; }
.cl-dots { display: flex; gap: 5px; }
.cl-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #3d3d47;
}
.cl-dots span.on { background: var(--orange); }
.cl-count { font-size: 10.5px; color: var(--muted-2); }
.cl-title { margin: 9px 0 4px; font-size: 12.5px; font-weight: 650; }
.cl-body { margin: 0 0 11px; font-size: 11.5px; line-height: 1.45; color: #9d9da7; }
.cl-btn {
  width: 100%; height: 30px; border-radius: 8px;
  background: #f2f2f3; color: #17171a; font-size: 12px; font-weight: 650;
}
.cl-btn:hover { background: #fff; }

/* ---------- sân khấu ---------- */

.stage { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 0; }

.sky { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 0%, #1b1b21 0%, #141416 55%, #101012 100%); }
.nebula { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.n1 { width: 60vw; height: 42vw; left: -14vw; top: -12vw; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, .22), transparent 65%); }
.n2 { width: 52vw; height: 38vw; right: -12vw; top: 4vw; background: radial-gradient(circle at 50% 50%, rgba(255, 122, 26, .14), transparent 65%); }
.n3 { width: 70vw; height: 34vw; left: 10vw; bottom: -16vw; background: radial-gradient(circle at 50% 50%, rgba(255, 61, 154, .10), transparent 68%); }

.stars { position: absolute; inset: 0; }
.stars i {
  position: absolute; background: #fff; border-radius: 50%;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }

.topbar {
  position: absolute; top: 16px; right: 20px; z-index: 5;
  display: flex; align-items: center; gap: 8px;
}
.credits {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(28, 28, 34, .72); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); backdrop-filter: blur(8px);
}
.credits .ic { width: 13px; height: 13px; color: var(--orange); fill: currentColor; stroke: none; }
.credits b { color: #fff; font-weight: 650; }

.ghost-btn {
  height: 30px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(28, 28, 34, .72);
  font-size: 12px; font-weight: 600; color: #e9e9ee; backdrop-filter: blur(8px);
}
.ghost-btn:hover { border-color: #46464f; background: #24242b; }

/* trạng thái rỗng */

.screen { position: relative; z-index: 3; width: 100%; padding: 0 40px; }

.empty {
  max-width: 560px; margin: 0 auto; text-align: center;
  transform: translateY(-10vh);
  animation: rise .5s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(-10vh) scale(.985); } to { opacity: 1; transform: translateY(-10vh) scale(1); } }

.chip {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border-radius: 11px; display: grid; place-items: center;
  background: #1e1e24; border: 1px solid #34343c;
}
.chip .ic { width: 17px; height: 17px; }

.empty h1 {
  margin: 0 0 8px;
  font-size: 29px; line-height: 1.15; letter-spacing: -.025em; font-weight: 650;
  background: linear-gradient(180deg, #fff, #d3d3da);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.empty p {
  margin: 0 auto 20px; max-width: 430px;
  font-size: 13.5px; color: #9c9ca6; line-height: 1.55;
}

.pill-cta {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  background: #f2f2f3; color: #17171a; font-size: 13px; font-weight: 650;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .12s var(--ease), background .12s;
}
.pill-cta:hover { background: #fff; transform: translateY(-1px); }
.pill-cta .ic { width: 15px; height: 15px; stroke-width: 2; }

.sub-link { display: block; margin-top: 14px; font-size: 12px; color: #8f8f99; }
.sub-link:hover { color: #d6d6dd; }

/* linh vật */

.mascot-wrap {
  position: absolute; left: 50%; bottom: 0; z-index: 2;
  transform: translateX(-50%);
  pointer-events: none;
}
.mascot-wrap img {
  display: block; height: 33vh; min-height: 220px; max-height: 350px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-9px) rotate(.4deg); }
}
.glow {
  position: absolute; left: 50%; bottom: 6%; width: 60%; height: 42%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 122, 26, .22), rgba(139, 92, 246, .12) 45%, transparent 72%);
  filter: blur(24px);
}

/* ---------- modal ---------- */

.modal-root { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.modal-root[hidden], .menu-root[hidden] { display: none; }
.modal-root::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(8, 8, 10, .62); backdrop-filter: blur(6px);
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative; z-index: 1;
  background: #17171b; border: 1px solid #33333c; border-radius: 16px;
  box-shadow: var(--shadow);
  animation: pop .2s var(--ease) both;
  display: flex; flex-direction: column; overflow: hidden;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.modal-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

.x-btn {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #a5a5af;
}
.x-btn:hover { background: #26262d; color: #fff; }

/* cài đặt brand: hai cột */

.brand-modal { width: min(1000px, 94vw); height: min(680px, 88vh); }
.brand-body { display: grid; grid-template-columns: 196px 1fr; min-height: 0; flex: 1; }

.brand-nav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px; border-right: 1px solid var(--line-soft);
  background: #141417; overflow: auto;
}
.brand-nav button {
  display: flex; align-items: center; gap: 9px;
  height: 32px; padding: 0 9px; border-radius: 8px;
  font-size: 12.5px; color: #b3b3bd; text-align: left;
}
.brand-nav button .ic { width: 15px; height: 15px; color: #8e8e98; }
.brand-nav button:hover { background: #202027; color: #f0f0f3; }
.brand-nav button.active { background: #282830; color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px #35353e; }
.brand-nav button .state { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #3d3d47; }
.brand-nav button .state.on { background: var(--green); }

.score-card {
  margin: auto 4px 6px; padding: 11px; border-radius: 12px;
  border: 1px solid #33333c; background: #1b1b21;
}
.score-top { display: flex; align-items: center; gap: 9px; }
.score-top .ring { width: 30px; height: 30px; }
.score-top .ring b { font-size: 10px; }
.score-label { font-size: 11.5px; font-weight: 600; }
.score-state { font-size: 10.5px; color: var(--muted); }
.score-hint { margin: 8px 0 0; font-size: 10.5px; line-height: 1.4; color: #93939d; }
.danger-link {
  display: flex; align-items: center; gap: 7px; margin: 6px 4px 0;
  height: 30px; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; color: #f08585;
}
.danger-link:hover { background: rgba(248, 113, 113, .08); }

.brand-pane { padding: 18px 20px; overflow: auto; }

.pane-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 13px 14px; margin-bottom: 16px;
  border: 1px solid #2c2c34; border-radius: 12px; background: #1b1b21;
}
.pane-head h4 { margin: 0; font-size: 13px; font-weight: 650; }
.pane-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); max-width: 520px; }
.pane-head img { width: 62px; height: 62px; object-fit: contain; margin: -6px 2px -6px 0; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 11.5px; color: #c9c9d1; margin-bottom: 6px; }
.hint { font-size: 11px; color: var(--muted-2); margin: 0 0 8px; }

.input, .textarea, select.input {
  width: 100%; padding: 9px 11px; border-radius: 9px;
  background: #1f1f25; border: 1px solid #33333c; color: var(--ink);
  font: inherit; font-size: 12.5px; outline: none;
}
.input:focus, .textarea:focus { border-color: #4b4b57; box-shadow: 0 0 0 3px rgba(255, 122, 26, .10); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.btn-row { display: flex; gap: 8px; align-items: center; }
.btn {
  height: 32px; padding: 0 13px; border-radius: 9px;
  border: 1px solid #3a3a44; background: #23232a; color: #ededf1;
  font-size: 12px; font-weight: 600;
}
.btn:hover { background: #2a2a32; }
.btn.primary { background: #f2f2f3; border-color: #f2f2f3; color: #17171a; }
.btn.primary:hover { background: #fff; }
.btn.danger { background: #3a1d1f; border-color: #63302f; color: #ffb4b4; }
.btn.danger:hover { background: #482326; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* lưới kênh */
.grid-ch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.ch {
  display: flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 9px; border-radius: 9px;
  border: 1px solid #303038; background: #1c1c22;
  font-size: 11px; color: #cfcfd7; text-align: left;
}
.ch:hover { border-color: #43434e; }
.ch.on { border-color: rgba(255, 122, 26, .55); background: rgba(255, 122, 26, .07); color: #fff; }
.ch .dotc { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #101012; }
.ch.soon { opacity: .45; }
.ch span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* màu */
.swatches { display: flex; gap: 10px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.sw.add { background: #23232a; border: 1px dashed #454550; color: #b6b6c0; display: grid; place-items: center; }

/* chip chọn */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips button {
  height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid #35353f; background: #1e1e24; color: #c4c4cc; font-size: 11.5px;
}
.chips button:hover { border-color: #4a4a55; }
.chips button.on { background: rgba(255, 122, 26, .12); border-color: rgba(255, 122, 26, .5); color: #ffd2ae; }

.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 25px; padding: 0 9px; border-radius: 999px;
  background: #26262e; border: 1px solid #35353f; font-size: 11px; color: #dcdce3;
}
.tag button { display: grid; place-items: center; color: #8f8f99; }
.tag button:hover { color: #fff; }

.dropzone {
  height: 92px; border-radius: 10px; border: 1px dashed #3d3d47;
  display: grid; place-items: center; gap: 4px; color: #8d8d97; font-size: 11.5px;
  background: #1a1a20; text-align: center;
}
.dropzone:hover { border-color: #4d4d59; color: #c9c9d1; }

.danger-box { border: 1px solid #4a2528; border-radius: 11px; padding: 13px; background: rgba(58, 29, 31, .35); }
.danger-box + .danger-box { margin-top: 10px; }
.danger-box h5 { margin: 0 0 3px; font-size: 12px; font-weight: 600; color: #ffc9c9; }
.danger-box p { margin: 0; font-size: 11px; color: #b48b8b; }
.danger-box .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #a5a5af; }

/* ---------- menu tạo mới ---------- */

.menu-root { position: fixed; inset: 0; z-index: 60; }
.menu-root::before { content: ""; position: absolute; inset: 0; }
.menu {
  position: absolute; width: 232px; padding: 6px;
  background: #1c1c22; border: 1px solid #35353f; border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: pop .14s var(--ease) both;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; border-radius: 8px; font-size: 12.5px; color: #dcdce3; text-align: left;
}
.menu button:hover { background: #27272f; color: #fff; }
.menu button .ic { width: 15px; height: 15px; color: #9a9aa4; }
.menu button small { display: block; font-size: 10.5px; color: var(--muted-2); }
.menu hr { border: 0; border-top: 1px solid #2c2c34; margin: 5px 4px; }

/* ---------- bảng giá ---------- */

.pricing { width: min(960px, 94vw); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.plan {
  border: 1px solid #33333c; border-radius: 13px; padding: 15px; background: #1a1a20;
  display: flex; flex-direction: column;
}
.plan.hot { border-color: rgba(255, 122, 26, .55); box-shadow: 0 0 0 1px rgba(255, 122, 26, .18) inset; }
.plan h4 { margin: 0; font-size: 12.5px; font-weight: 650; }
.plan .tagline { margin: 3px 0 12px; font-size: 11px; color: var(--muted); }
.plan .price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.plan .price small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 5px; }
.plan ul { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 7px; }
.plan li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #c9c9d1; }
.plan li .ic { width: 13px; height: 13px; color: var(--green); stroke-width: 2.2; }
.plan .btn { margin-top: auto; width: 100%; }
.pricing-foot { padding: 0 16px 14px; font-size: 10.5px; color: var(--muted-2); }

/* ---------- login ---------- */

.auth { position: fixed; inset: 0; display: grid; place-items: center; }
.auth .sky { position: absolute; inset: 0; }
.auth-card {
  position: relative; z-index: 2; width: 330px; padding: 18px;
  border-radius: 14px; border: 1px solid #35353f;
  background: rgba(24, 24, 28, .96); box-shadow: var(--shadow);
  transform: translateY(-26vh);
}
.auth-card h1 { margin: 0; font-size: 15px; font-weight: 650; }
.auth-card p.sub { margin: 3px 0 14px; font-size: 11.5px; color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 3px; background: #1f1f25; border-radius: 9px; margin-bottom: 12px; }
.tabs button { flex: 1; height: 26px; border-radius: 7px; font-size: 11.5px; color: #a9a9b3; }
.tabs button.on { background: #2c2c34; color: #fff; font-weight: 600; }
.auth-card .btn { width: 100%; height: 34px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: #6c6c76; font-size: 10.5px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #2c2c34; }
.legal { margin: 11px 0 0; font-size: 10px; color: #6f6f79; line-height: 1.5; }
.legal a { color: #a9a9b3; text-decoration: underline; text-underline-offset: 2px; }

.helmet {
  position: absolute; left: 50%; bottom: -14vh; transform: translateX(-50%);
  width: min(34vw, 420px); z-index: 1; pointer-events: none;
  filter: drop-shadow(0 -10px 70px rgba(139, 92, 246, .22));
}

/* ---------- toast ---------- */

.toast-root { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast {
  padding: 9px 14px; border-radius: 10px; font-size: 12px;
  background: #26262e; border: 1px solid #3a3a44; color: #ededf1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  animation: pop .18s var(--ease) both;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .app { grid-template-columns: 210px 1fr; }
  .grid-ch { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .plans { grid-template-columns: 1fr; }
  .brand-body { grid-template-columns: 1fr; }
  .brand-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .brand-nav .score-card, .brand-nav .danger-link { display: none; }
  .empty h1 { font-size: 24px; }
  .mascot-wrap img { height: 28vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-delay: 0s !important;
    transition-duration: .001s !important;
  }
}

/* ================= PLANNER ================= */

.screen-wide { width: 100%; height: 100%; padding: 0; }

.planner {
  height: 100%; min-height: 0; display: flex; flex-direction: column;
  padding: 18px 22px 16px; gap: 12px; position: relative; z-index: 3;
}

.pl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pl-head h1 { margin: 0; font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.pl-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.pl-tools { display: flex; align-items: center; gap: 8px; }

.seg { display: flex; padding: 2px; background: #1f1f25; border: 1px solid var(--line-soft); border-radius: 9px; }
.seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12px; color: #a9a9b3; }
.seg button.on { background: #2c2c34; color: #fff; font-weight: 600; }

.cal-nav {
  display: flex; align-items: center; gap: 2px;
  height: 32px; padding: 2px; border-radius: 9px;
  background: #1f1f25; border: 1px solid var(--line-soft);
}
.cal-nav button { height: 26px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; color: #c2c2ca; }
.cal-nav button:hover { background: #2a2a32; color: #fff; }
.cal-nav button[data-nav="-1"] .ic { transform: rotate(90deg); }
.cal-nav button[data-nav="1"] .ic { transform: rotate(-90deg); }
.cal-nav .ic { width: 14px; height: 14px; }

.pl-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid #31313a; background: #1d1d23; color: #b8b8c1; font-size: 11.5px;
}
.fchip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.fchip:hover { border-color: #45454f; color: #eaeaf0; }
.fchip.on { background: rgba(255, 122, 26, .1); border-color: rgba(255, 122, 26, .45); color: #ffd2ae; }

/* tuần */

.cal {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: rgba(20, 20, 24, .55); overflow: hidden;
}
.cal-head { display: grid; grid-template-columns: 56px 1fr; background: #1a1a20; border-bottom: 1px solid var(--line-soft); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  display: flex; align-items: baseline; gap: 6px;
  padding: 9px 10px; font-size: 11px; color: #8b8b95;
  border-left: 1px solid #23232a;
}
.cal-day b { font-size: 13px; color: #e9e9ee; font-weight: 650; }
.cal-day.today { background: rgba(255, 122, 26, .07); }
.cal-day.today b { color: var(--orange-2); }

.cal-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-color: #2f2f38 transparent; scrollbar-width: thin; }
.cal-scroll::-webkit-scrollbar { width: 8px; }
.cal-scroll::-webkit-scrollbar-thumb { background: #2f2f38; border-radius: 8px; }

.cal-body { display: grid; grid-template-columns: 56px 1fr; }
.cal-hours { border-right: 1px solid #23232a; }
.hr {
  height: var(--row); padding: 3px 8px 0 0; text-align: right;
  font-size: 10px; color: #63636d; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid #1d1d23;
}
.cal-cols { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-col { position: relative; border-left: 1px solid #23232a; }
.slot { height: var(--row); border-bottom: 1px solid #1d1d23; cursor: pointer; }
.slot:hover { background: rgba(255, 255, 255, .022); }

.post {
  position: absolute; left: 5px; right: 5px; z-index: 2;
  padding: 5px 7px; border-radius: 8px; cursor: pointer;
  background: #202027; border: 1px solid #34343e;
  border-left: 2px solid var(--ch);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .32);
  overflow: hidden; transition: transform .1s var(--ease), border-color .1s;
}
.post:hover { transform: translateY(-1px); border-color: #4a4a56; border-left-color: var(--ch); }
.post-top { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: #9a9aa4; }
.post-top i { width: 5px; height: 5px; border-radius: 50%; background: var(--ch); flex: 0 0 auto; }
.post-top span { font-variant-numeric: tabular-nums; }
.post-top em { font-style: normal; margin-left: auto; color: #7d7d87; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58%; }
.post-text {
  margin-top: 2px; font-size: 10.5px; line-height: 1.32; color: #e6e6ec;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post.published { opacity: .72; }
.post.draft { border-style: dashed; border-left-style: solid; }
.post.draft::after {
  content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, .02) 6px 12px);
  pointer-events: none;
}

/* tháng */

.month {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: rgba(20, 20, 24, .55); overflow: hidden;
}
.mo-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #1a1a20; border-bottom: 1px solid var(--line-soft); }
.mo-head div { padding: 8px 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #6a6a74; }
.mo-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); }
.mo-cell {
  padding: 6px; min-height: 0; overflow: hidden;
  border-right: 1px solid #22222a; border-bottom: 1px solid #22222a;
  display: flex; flex-direction: column; gap: 3px;
}
.mo-cell.other { opacity: .38; }
.mo-cell.today { background: rgba(255, 122, 26, .05); }
.mo-num { font-size: 11px; color: #9a9aa4; margin-bottom: 2px; }
.mo-cell.today .mo-num { color: var(--orange-2); font-weight: 700; }

.mini {
  display: flex; align-items: center; gap: 4px; width: 100%;
  padding: 3px 5px; border-radius: 5px; text-align: left;
  background: #202027; border-left: 2px solid var(--ch);
  font-size: 9.5px; color: #cfcfd7; overflow: hidden;
}
.mini:hover { background: #27272f; }
.mini i { width: 4px; height: 4px; border-radius: 50%; background: var(--ch); flex: 0 0 auto; }
.mini b { font-weight: 600; color: #9a9aa4; font-variant-numeric: tabular-nums; }
.mini span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more { font-size: 9.5px; color: #8b8b95; text-align: left; padding: 2px 5px; }
.more:hover { color: #fff; }

/* composer */

.composer-modal { width: min(560px, 94vw); }
.composer { padding: 16px 18px 14px; }
.composer .field:last-of-type { margin-bottom: 0; }
.chips button i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}

@media (max-width: 1080px) {
  .planner { padding: 14px 14px 10px; }
  .pl-tools { flex-wrap: wrap; justify-content: flex-end; }
  .post-top em { display: none; }
}

/* ================= NỘI DUNG ================= */

.content {
  height: 100%; min-height: 0; padding: 18px 22px 16px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 3; overflow: auto;
}
.content > .pl-head { flex: 0 0 auto; }
.chdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: 1px; }

/* ---------- hộp thư ---------- */

.inbox {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: 168px 296px 1fr;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: rgba(20, 20, 24, .6); overflow: hidden;
}
.ib-ch { border-right: 1px solid var(--line-soft); padding: 8px; display: flex; flex-direction: column; gap: 3px; background: #17171b; }
.ib-chip {
  display: flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; color: #b6b6c0; text-align: left;
}
.ib-chip b { margin-left: auto; font-size: 10.5px; color: #7d7d87; font-weight: 600; }
.ib-chip:hover { background: #202027; color: #eee; }
.ib-chip.on { background: #2a2a32; color: #fff; font-weight: 600; }
.ib-chip .chdot { margin-right: 2px; }

.ib-list { border-right: 1px solid var(--line-soft); overflow: auto; }
.ib-row {
  display: flex; gap: 9px; width: 100%; padding: 10px 11px; text-align: left;
  border-bottom: 1px solid #202027;
}
.ib-row:hover { background: #1e1e25; }
.ib-row.on { background: #24242c; }
.ib-av {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #101012;
  background: color-mix(in oklab, var(--c) 78%, white);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.ib-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.ib-top { display: flex; align-items: baseline; gap: 8px; }
.ib-top b { font-size: 12px; font-weight: 600; color: #eaeaf0; }
.ib-top em { margin-left: auto; font-style: normal; font-size: 10px; color: #75757f; }
.ib-sub { font-size: 10.5px; color: #8f8f99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-unread {
  align-self: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--orange); color: #17171a; font-size: 9.5px; font-weight: 700;
  display: grid; place-items: center;
}

.ib-thread { display: flex; flex-direction: column; min-height: 0; }
.th-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
}
.th-head b { font-size: 13px; }
.th-ch { margin-left: 8px; font-size: 11px; color: #9a9aa4; }
.th-actions { display: flex; gap: 6px; }
.th-actions .btn { height: 28px; font-size: 11.5px; }

.th-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 78%; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg .bubble {
  padding: 8px 11px; border-radius: 12px; font-size: 12px; line-height: 1.45;
  background: #24242c; border: 1px solid #2f2f39; color: #e6e6ec;
}
.msg.out .bubble { background: rgba(255, 122, 26, .12); border-color: rgba(255, 122, 26, .35); color: #ffddc2; }
.msg time { font-size: 9.5px; color: #6f6f79; }

.th-reply { border-top: 1px solid var(--line-soft); padding: 10px 12px; display: grid; gap: 8px; }
.th-reply .textarea { min-height: 64px; }
.th-reply-foot { display: flex; align-items: center; justify-content: space-between; }

/* ---------- studio ---------- */

.designs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.design { text-align: left; display: grid; gap: 7px; }
.design-thumb {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  border: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  transition: transform .14s var(--ease);
}
.design:hover .design-thumb { transform: translateY(-2px); }
.design-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .28), transparent 55%);
}
.design-thumb em {
  position: relative; font-style: normal; font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(0, 0, 0, .55); font-weight: 700;
}
.design-thumb b {
  position: relative; font-size: 15px; line-height: 1.2; color: #16161a;
  font-weight: 750; letter-spacing: -.02em; margin-top: 3px;
}
.design-meta { display: grid; gap: 1px; padding: 0 2px; }
.design-meta b { font-size: 12px; font-weight: 600; color: #ecECf2; }
.design-meta em { font-style: normal; font-size: 10.5px; color: #8b8b95; }

.design-modal { width: min(520px, 94vw); }
.design-preview {
  margin: 16px; border-radius: 12px; aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  display: grid; place-items: center; font-size: 22px; font-weight: 750; color: #16161a;
  letter-spacing: -.02em;
}

/* ---------- thẻ chung (chiến dịch, bio) ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  border: 1px solid #2d2d36; border-radius: 12px; background: #1b1b21;
  padding: 13px; display: flex; flex-direction: column; gap: 9px;
}
.card-top { display: flex; align-items: center; gap: 8px; }
.card-top h3 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.status {
  margin-left: auto; font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em;
}
.status.running { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.status.done { background: #2a2a32; color: #a1a1aa; }
.card-sub { margin: 0; font-size: 11px; color: #8f8f99; }
.bar { height: 5px; border-radius: 99px; background: #2a2a32; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--pink)); }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: #9a9aa4; }
.card-foot .dots { display: flex; gap: 3px; }
.card-foot .dots .chdot { margin: 0; }

.bio-card { padding: 0; overflow: hidden; }
.bio-thumb {
  aspect-ratio: 16 / 9; background: linear-gradient(150deg, var(--c1), var(--c2));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; gap: 2px;
}
.bio-thumb span { font-size: 15px; font-weight: 750; color: #16161a; letter-spacing: -.02em; }
.bio-thumb em { font-style: normal; font-size: 10px; color: rgba(0, 0, 0, .55); }
.bio-card .card-foot { padding: 10px 12px; }

/* ---------- workflows ---------- */

.wf-list { display: flex; flex-direction: column; gap: 8px; }
.wf-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid #2d2d36; background: #1b1b21;
}
.wf-main { min-width: 0; display: grid; gap: 3px; flex: 1; }
.wf-main b { font-size: 12.5px; font-weight: 600; }
.wf-flow { font-size: 11px; color: #8f8f99; display: inline-flex; align-items: center; gap: 6px; }
.wf-flow .ic { width: 12px; height: 12px; }
.wf-runs { font-size: 10.5px; color: #75757f; }

.switch {
  width: 34px; height: 20px; border-radius: 999px; background: #33333d;
  position: relative; transition: background .15s var(--ease); flex: 0 0 auto;
}
.switch i {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #b9b9c2; transition: transform .15s var(--ease), background .15s;
}
.switch.on { background: rgba(255, 122, 26, .55); }
.switch.on i { transform: translateX(14px); background: #fff; }

@media (max-width: 1200px) {
  .inbox { grid-template-columns: 148px 250px 1fr; }
  .designs { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .inbox { grid-template-columns: 240px 1fr; }
  .ib-ch { display: none; }
  .designs { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .inbox { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .ib-list { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

/* ================= EMPTY STATE LỆCH TRÁI + BÀN LÀM VIỆC ================= */

.stage { display: flex; align-items: center; justify-content: flex-start; }

.screen { width: auto; padding-left: 7vw; padding-right: 0; }

.empty {
  text-align: left; margin: 0; max-width: 520px;
  transform: none;
  animation: rise-left .5s var(--ease) both;
}
@keyframes rise-left {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}
.empty .chip { margin: 0 0 16px; }
.empty p { margin: 0 0 20px; }
.empty .sub-link { display: inline-block; margin-top: 14px; }

/* cột phải: bàn làm việc + linh vật */
.mascot-wrap {
  left: auto; right: 5vw; bottom: 0; transform: none;
  display: flex; align-items: flex-end; gap: 0;
}
.mascot-wrap img {
  height: 28vh; min-height: 200px; max-height: 300px;
  position: relative; z-index: 2; margin-left: -26px;
}

/* The working mascot illustrations already include their desks. */
#desk { display: none !important; }
.mascot-wrap img { height: 42vh; max-height: 440px; margin-left: 0; animation: none; }

.desk {
  position: relative; width: 300px; height: 210px; z-index: 1;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #1e1d19, #191813);
  border: 1px solid #322f25; border-bottom: 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .45);
  padding: 14px;
  display: grid; grid-template-rows: auto 1fr;
  gap: 10px;
}
.desk-head { display: flex; align-items: center; gap: 8px; }
.desk-head b { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8b8b84; }
.desk-head i {
  margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #c8f751;
  box-shadow: 0 0 0 4px rgba(200, 247, 81, .12);
}
.desk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-content: start; }
.desk-grid span {
  height: 16px; border-radius: 4px; background: #26241d; border: 1px solid #302d24;
}
.desk-grid span.on { background: rgba(255, 122, 26, .35); border-color: rgba(255, 122, 26, .6); }
.desk-grid span.done { background: rgba(200, 247, 81, .28); border-color: rgba(200, 247, 81, .5); }

.desk-stamp {
  position: absolute; right: -14px; top: -14px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #141311;
  background: var(--orange); transform: rotate(-12deg);
  box-shadow: 0 10px 24px rgba(255, 122, 26, .35);
  animation: stamp 6s ease-in-out infinite;
}
@keyframes stamp {
  0%, 70%, 100% { transform: rotate(-12deg) scale(1); }
  78% { transform: rotate(-12deg) scale(1.12); }
  86% { transform: rotate(-12deg) scale(1); }
}

@media (max-width: 1180px) {
  .screen { padding-left: 5vw; }
  .desk { width: 240px; height: 170px; }
  .mascot-wrap img { height: 26vh; }
}
@media (max-width: 900px) {
  .stage { justify-content: center; }
  .screen { padding: 0 24px; }
  .empty { text-align: center; margin: 0 auto; }
  .desk { display: none; }
  .mascot-wrap { left: 50%; right: auto; transform: translateX(-50%); }
  .mascot-wrap img { margin-left: 0; }
}

/* ảnh nhân vật mới đã có bàn làm việc bên trong → bỏ bàn dựng bằng CSS */
.desk { display: none !important; }
.mascot-wrap { right: 4vw; }
.mascot-wrap img {
  height: 40vh; min-height: 260px; max-height: 420px;
  margin-left: 0; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .5));
}
@media (max-width: 900px) {
  .mascot-wrap img { height: 30vh; }
}
