:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-2: #0a0a0a;
  --panel: #121212;
  --panel-2: #191919;
  --panel-3: #242424;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f0ff;
  --muted: #9b99b5;
  --dim: #6d6b85;
  --pink: #F26028;
  --pink-2: #E02222;
  --violet: #E02222;
  --cyan: #FF9A66;
  --gold: #ffc857;
  --danger: #ff6b7a;
  --success: #57d9a3;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --sidebar: 248px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(224, 34, 34, 0.14), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(255, 154, 102, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}
a { color: var(--pink); text-decoration: none; }
a:hover { color: #FFB08A; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.3; letter-spacing: 0.01em; }
h2 { font-size: 19px; line-height: 1.35; }
h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
.dim { color: var(--dim); }
.tiny { font-size: 12px; }
.mono { font-family: "Cascadia Code", Consolas, monospace; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; }
.center { text-align: center; }
.right { text-align: right; }
.pink { color: var(--pink); }
.cyan { color: var(--cyan); }
.gold { color: var(--gold); }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Login ---------------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}
.login-hero {
  position: relative;
  overflow: hidden;
  padding: 56px clamp(32px, 7vw, 108px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(242, 96, 40, 0.12), transparent 45%),
    linear-gradient(315deg, rgba(224, 34, 34, 0.16), transparent 50%),
    #080808;
}
.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.login-hero::before {
  width: 410px; height: 410px;
  right: -120px; top: 12%;
  background: radial-gradient(circle, rgba(224, 34, 34, 0.32), transparent 65%);
  animation: float 9s ease-in-out infinite;
}
.login-hero::after {
  width: 340px; height: 340px;
  left: -100px; bottom: -60px;
  background: radial-gradient(circle, rgba(255, 154, 102, 0.2), transparent 65%);
  animation: float 12s ease-in-out infinite reverse;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
.brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--pink), var(--violet));
  box-shadow: 0 10px 28px rgba(224, 34, 34, 0.32);
  font-size: 20px;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.08em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.2em; }
.hero-copy { position: relative; z-index: 1; max-width: 620px; padding: 70px 0; }
.eyebrow { color: var(--cyan); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 18px; }
.hero-copy h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1.08; letter-spacing: -0.03em; }
.hero-copy h1 span {
  background: linear-gradient(120deg, #FFB08A, var(--pink), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p { color: var(--muted); max-width: 520px; margin-top: 22px; font-size: 15px; }
.hero-meta { position: relative; z-index: 1; display: flex; gap: 28px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.hero-meta b { display: block; color: var(--text); font-size: 20px; line-height: 1.4; }
.login-panel { display: grid; place-items: center; padding: 32px; background: rgba(9, 9, 17, 0.6); }
.login-card {
  width: min(400px, 100%);
  background: linear-gradient(180deg, rgba(28, 28, 46, 0.96), rgba(18, 18, 30, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 24px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); margin-bottom: 26px; }
.login-card .field { margin-bottom: 16px; }
.login-tip { margin-top: 20px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 154, 102, 0.07); border: 1px solid rgba(255, 154, 102, 0.16); color: var(--muted); font-size: 12px; }
.login-tip b { color: var(--cyan); }

/* ---------------- Shell ---------------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  background: rgba(13, 13, 23, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.sidebar .brand { padding: 0 8px 20px; }
.sidebar .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 17px; }
.sidebar .brand-name { font-size: 15px; }
.nav-group-label { font-size: 10px; color: var(--dim); letter-spacing: 0.2em; padding: 14px 12px 6px; }
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 11px;
  color: var(--muted); font-size: 13.5px;
  border: 1px solid transparent;
}
.nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav a.active {
  background: linear-gradient(90deg, rgba(242, 96, 40, 0.16), rgba(224, 34, 34, 0.08));
  border-color: rgba(242, 96, 40, 0.2);
  color: #fff;
}
.nav a .ico { width: 18px; text-align: center; opacity: 0.9; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(242, 96, 40, 0.28), rgba(224, 34, 34, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-weight: 700;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.side-user .who { min-width: 0; }
.side-user .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { color: var(--dim); font-size: 11px; }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 0 30px;
  background: rgba(9, 9, 17, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.mobile-menu { display: none; }
.content { padding: 28px 30px 60px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .desc { color: var(--muted); margin-top: 4px; font-size: 13px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------- Cards / grids ---------------- */
.card {
  background: linear-gradient(180deg, rgba(25, 25, 40, 0.92), rgba(18, 18, 30, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-body { padding: 18px 20px 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.9fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat {
  position: relative; overflow: hidden;
  padding: 18px 20px; min-height: 112px;
  background: linear-gradient(160deg, rgba(30, 30, 48, 0.95), rgba(17, 17, 28, 0.95));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.stat::after {
  content: ""; position: absolute; width: 100px; height: 100px; right: -32px; top: -34px;
  border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(242, 96, 40, 0.22)), transparent 70%);
}
.stat .label { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.stat .value { font-size: 29px; font-weight: 700; line-height: 1.25; margin-top: 7px; letter-spacing: -0.02em; }
.stat .foot { color: var(--dim); font-size: 11px; margin-top: 5px; }
.stat.pink { --glow: rgba(242, 96, 40, 0.28); }
.stat.cyan { --glow: rgba(255, 154, 102, 0.24); }
.stat.violet { --glow: rgba(224, 34, 34, 0.26); }
.stat.gold { --glow: rgba(255, 200, 87, 0.24); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 7px 14px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--panel-2); color: var(--text);
  font-size: 13px; line-height: 1.2; white-space: nowrap;
  transition: 0.16s ease;
}
.btn:hover { background: var(--panel-3); border-color: rgba(255, 255, 255, 0.26); transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(120deg, var(--pink-2), var(--violet));
  border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 8px 22px rgba(224, 34, 34, 0.22);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 122, 0.3); background: rgba(255, 107, 122, 0.06); }
.btn.success { color: var(--success); border-color: rgba(87, 217, 163, 0.3); background: rgba(87, 217, 163, 0.07); }
.btn.sm { min-height: 30px; padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn-group { display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { color: var(--muted); font-size: 12px; }
.field .hint { color: var(--dim); font-size: 11px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="url"], input[type="search"],
select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  background: rgba(9, 9, 17, 0.7);
  border: 1px solid var(--line-strong); border-radius: 10px;
  outline: none; transition: 0.16s;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: rgba(242, 96, 40, 0.55); box-shadow: 0 0 0 3px rgba(242, 96, 40, 0.1); }
input::placeholder, textarea::placeholder { color: #5e5c74; }
select option { background: #171725; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checkline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.checkline input { width: 16px; height: 16px; accent-color: var(--pink); }
.filterbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar .field { min-width: 150px; }
.search-input { position: relative; }
.search-input input { padding-left: 32px; }
.search-input::before { content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 11px 13px; color: var(--dim);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
td .sub { color: var(--dim); font-size: 11px; }
.cell-title { font-weight: 600; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 12px; }

/* ---------------- Badges / chips ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; line-height: 1.7; white-space: nowrap;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  color: var(--muted);
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.pink { color: var(--pink); background: rgba(242, 96, 40, 0.09); border-color: rgba(242, 96, 40, 0.2); }
.badge.cyan { color: var(--cyan); background: rgba(255, 154, 102, 0.08); border-color: rgba(255, 154, 102, 0.2); }
.badge.gold { color: var(--gold); background: rgba(255, 200, 87, 0.08); border-color: rgba(255, 200, 87, 0.2); }
.badge.green { color: var(--success); background: rgba(87, 217, 163, 0.08); border-color: rgba(87, 217, 163, 0.2); }
.badge.red { color: var(--danger); background: rgba(255, 107, 122, 0.08); border-color: rgba(255, 107, 122, 0.2); }
.badge.violet { color: #b3a9ff; background: rgba(224, 34, 34, 0.1); border-color: rgba(224, 34, 34, 0.24); }
.badge.plain::before { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12px;
}
.chip.active { color: #fff; border-color: rgba(242, 96, 40, 0.4); background: rgba(242, 96, 40, 0.12); }
.points-pill { color: var(--gold); font-weight: 700; }
.points-pill::before { content: "◈ "; opacity: 0.8; }

/* ---------------- Lists ---------------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.list-item:last-child { border-bottom: none; }
.list-item .main-text { flex: 1; min-width: 0; }
.list-item .main-text b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .main-text span { color: var(--dim); font-size: 11.5px; }
.empty { padding: 44px 20px; text-align: center; color: var(--dim); }
.empty .glyph { font-size: 26px; margin-bottom: 8px; opacity: 0.6; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--violet)); }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 13px; border-radius: 9px; font-size: 12.5px; white-space: nowrap; }
.tabs button.active { color: #fff; background: var(--panel-3); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }

/* ---------------- Kanban ---------------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 150px; }
.kanban-col h4 { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; padding: 2px 4px 9px; }
.kanban-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.kanban-card b { font-size: 12.5px; display: block; }
.kanban-card span { color: var(--dim); font-size: 11px; }

/* ---------------- Calendar ---------------- */
.calendar { width: 100%; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.calendar-dow { padding: 8px; text-align: center; font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, 0.03); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-day { min-height: 96px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(12, 12, 21, 0.42); }
.calendar-day.outside { opacity: 0.3; }
.calendar-day.today { background: rgba(242, 96, 40, 0.06); }
.calendar-day .d { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.calendar-day.today .d { color: var(--pink); font-weight: 700; }
.cal-event { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; margin-bottom: 3px; padding: 2px 5px; font-size: 10.5px; line-height: 1.5; background: rgba(224, 34, 34, 0.14); color: #dcd8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.review { background: rgba(255, 154, 102, 0.11); color: #b8f6ef; }
.cal-event.anniversary { background: rgba(255, 200, 87, 0.12); color: #ffe3a0; }

/* ---------------- Auction / shop ---------------- */
.auction-card { display: flex; flex-direction: column; overflow: hidden; }
.auction-visual {
  height: 116px; display: grid; place-items: center; font-size: 38px;
  background:
    radial-gradient(300px 120px at 20% 0%, rgba(242, 96, 40, 0.28), transparent 70%),
    radial-gradient(300px 160px at 100% 100%, rgba(224, 34, 34, 0.26), transparent 70%),
    #12121f;
  border-bottom: 1px solid var(--line);
}
.auction-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.price { color: var(--gold); font-size: 20px; font-weight: 700; }
.auction-meta { display: flex; justify-content: space-between; color: var(--dim); font-size: 11.5px; }
.product-cover { height: 108px; display: grid; place-items: center; font-size: 34px; background: linear-gradient(145deg, rgba(242, 96, 40, 0.1), rgba(224, 34, 34, 0.1)); border-bottom: 1px solid var(--line); }
.product-card .body { padding: 14px 16px 16px; }
.product-card h3 { font-size: 14px; }
.product-card p { color: var(--muted); font-size: 12px; margin-top: 5px; min-height: 38px; }

/* ---------------- Hot topic ---------------- */
.hot-card { padding: 18px; position: relative; }
.hot-card.pinned { border-color: rgba(255, 200, 87, 0.26); }
.hot-card h3 { font-size: 15px; line-height: 1.5; padding-right: 46px; }
.hot-card .summary { color: var(--muted); font-size: 12.5px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hot-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; color: var(--dim); font-size: 11px; }
.pin-flag { position: absolute; right: 14px; top: 14px; color: var(--gold); font-size: 11px; }

/* ---------------- Timeline / nodes ---------------- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 0 0 16px 4px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(224, 34, 34, 0.12); }
.timeline-item.done::before { background: var(--success); box-shadow: 0 0 0 3px rgba(87, 217, 163, 0.12); }
.timeline-item .t { font-size: 12.5px; font-weight: 600; }
.timeline-item .m { color: var(--dim); font-size: 11.5px; }
.steps { display: flex; align-items: center; gap: 4px; }
.step { flex: 1; text-align: center; font-size: 10.5px; color: var(--dim); position: relative; }
.step::before { content: ""; display: block; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); margin-bottom: 5px; }
.step.on { color: var(--pink); }
.step.on::before { background: linear-gradient(90deg, var(--pink), var(--violet)); }

/* ---------------- Modal / toast ---------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(2, 2, 8, 0.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #1a1a2b, #121220);
  border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow);
  animation: pop 0.18s ease;
}
.modal.wide { width: min(820px, 100%); }
.modal.narrow { width: min(420px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; }
.modal-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 0 22px 20px; }
.modal-foot .left { margin-right: auto; }
.toast-root { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 11px; background: #232338; border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13px; animation: slideIn 0.2s ease; max-width: 360px; }
.toast.success { border-color: rgba(87, 217, 163, 0.35); color: #bdf5dd; }
.toast.error { border-color: rgba(255, 107, 122, 0.4); color: #ffc0c7; }
.toast.info { border-color: rgba(255, 154, 102, 0.3); color: #c2f6f0; }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: var(--pink); animation: spin 0.8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Utilities ---------------- */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.detail-item .k { color: var(--dim); font-size: 11px; }
.detail-item .v { font-size: 13px; margin-top: 2px; word-break: break-word; }
.note-box { padding: 11px 13px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; white-space: pre-wrap; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 12.5px; }
.kv-row:last-child { border: 0; }
.kv-row span { color: var(--muted); }
.kv-row b { font-weight: 600; text-align: right; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.section-title h2 { font-size: 15px; }
.hero-banner {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 26px 28px; margin-bottom: 22px;
  border: 1px solid rgba(242, 96, 40, 0.18);
  background:
    radial-gradient(700px 200px at 90% -20%, rgba(242, 96, 40, 0.25), transparent 70%),
    linear-gradient(120deg, rgba(224, 34, 34, 0.18), rgba(20, 20, 34, 0.95) 60%);
}
.hero-banner h1 { font-size: 27px; }
.hero-banner p { color: var(--muted); margin-top: 5px; }
.hero-banner .balance { font-size: 34px; font-weight: 800; color: var(--gold); letter-spacing: -0.02em; }
.hero-banner .balance small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: 12.5px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--muted); }
.alert.warn { border-color: rgba(255, 200, 87, 0.26); background: rgba(255, 200, 87, 0.06); color: #ffe4a8; }
.alert.danger { border-color: rgba(255, 107, 122, 0.28); background: rgba(255, 107, 122, 0.06); color: #ffc1c8; }
.code { padding: 10px 12px; border-radius: 9px; background: #080808; border: 1px solid var(--line); font-family: "Cascadia Code", Consolas, monospace; font-size: 11.5px; white-space: pre-wrap; word-break: break-all; color: #c8c5e2; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(4, minmax(210px, 1fr)); }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -270px; width: var(--sidebar); transition: left 0.22s ease; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 18px; }
  .content { padding: 20px 18px 50px; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .hero-banner { padding: 20px; }
  .hero-banner h1 { font-size: 22px; }
  .calendar-day { min-height: 72px; padding: 4px; }
  .cal-event { font-size: 9px; padding: 1px 3px; }
  .modal { max-height: 92vh; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}

/* ---------- utility spacing ---------- */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* ---------- code / logs ---------- */
.code-block {
  margin: 6px 0 0;
  padding: 12px 14px;
  max-height: 280px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: #cfd2e6;
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- generic dot / button row ---------- */
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--pink);
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(242, 96, 40, 0.08);
}
.as-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.as-button:hover { color: var(--text); }
.month-title { display: inline-block; min-width: 108px; text-align: center; font-size: 14px; }
.clamp-2, .clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

/* ---------- trend chart ---------- */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 8px 4px 0;
}
.trend-col {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.trend-pair {
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-height: 0;
}
.trend-pair i {
  display: block;
  width: 42%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}
.trend-pair i.earn { background: linear-gradient(180deg, var(--pink), rgba(242, 96, 40, 0.35)); }
.trend-pair i.spend { background: linear-gradient(180deg, var(--violet), rgba(224, 34, 34, 0.32)); }
.trend-col > span { color: var(--dim); font-size: 10px; text-align: center; white-space: nowrap; }

/* ---------- streamer points hero ---------- */
.points-hero {
  overflow: hidden;
  background:
    radial-gradient(520px 190px at 0% 0%, rgba(242, 96, 40, 0.16), transparent 65%),
    radial-gradient(420px 200px at 100% 20%, rgba(224, 34, 34, 0.16), transparent 60%),
    var(--panel);
}
.points-big {
  margin: 6px 0 2px;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 760;
  background: linear-gradient(100deg, #fff, var(--pink) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.points-sub { color: var(--muted); font-size: 12.5px; }

/* ---------- task cards ---------- */
.task-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.022);
  padding: 13px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.task-card:hover { border-color: rgba(242, 96, 40, 0.3); background: rgba(255, 255, 255, 0.04); }
.task-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-card-top b { font-size: 13.5px; }
.task-card .task-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--dim); font-size: 11px; }
.task-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- hot grid / detail ---------- */
.hot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hot-card { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.hot-card:hover { transform: translateY(-2px); border-color: rgba(242, 96, 40, 0.32); }
.hot-top { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.hot-card h3 { padding-right: 0; }
.hot-card p { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-top: 8px; }
.hot-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; color: var(--dim); font-size: 11px; }
.hot-detail { white-space: pre-wrap; color: #d7d9e8; font-size: 13.5px; line-height: 1.9; }

/* ---------- cyan button / custom badge ---------- */
.btn.cyan { color: #1a0805; background: var(--cyan); border-color: transparent; }
.btn.cyan:hover { filter: brightness(1.06); }
.badge[style] { color: var(--badge-color, var(--muted)); }
.badge[style]::before { background: var(--badge-color, currentColor); }

@media (max-width: 1180px) {
  .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .hot-grid { grid-template-columns: 1fr; }
  .points-big { font-size: 34px; }
  .trend-bars { gap: 4px; }
}
