/* ============================================================
   Heaven Cloud dashboard clone — hand-written CSS (no build)
   Tokens + metrics taken from the live site (Tailwind v4 output)
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --color-primary: 153 60% 52.9%;
  --color-secondary: 153 59.8% 41%;
  --color-neutral: 0 0% 90.2%;
  --color-base: 0 0% 9%;
  --color-muted: 0 0% 45.9%;
  --color-inverted: 0 0% 100%;
  --color-success: 142 71.2% 44.9%;
  --color-error: 0 75.4% 60.2%;
  --color-warning: 25 95% 52.9%;
  --color-inactive: 0 0% 63%;
  --color-info: 210 100% 60%;
  --color-background: 0 0% 98%;
  --color-background-secondary: 0 0% 100%;

  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --radius-lg: .5rem;
  --radius-xl: .75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;

  --rail: 7.5rem;          /* 120px icon rail */
  --panel: 340px;          /* left column of the board */
  --maxw: 1400px;
  color-scheme: light;
}

.dark {
  --color-primary: 153 59.8% 58%;
  --color-secondary: 153 60% 46.1%;
  --color-neutral: 0 0% 16.1%;
  --color-base: 0 0% 94.9%;
  --color-muted: 0 0% 60%;
  --color-inverted: 0 0% 100%;
  --color-success: 142 71.2% 44.9%;
  --color-error: 0 75.4% 60.2%;
  --color-warning: 25 95% 52.9%;
  --color-info: 210 100% 60%;
  --color-background: 0 0% 7.1%;
  --color-background-secondary: 0 0% 10.2%;
  color-scheme: dark;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: hsl(var(--color-background));
  color: hsl(var(--color-base));
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; margin: 0; cursor: pointer; }
input { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid hsl(var(--color-primary)); outline-offset: 2px; }
[hidden] { display: none !important; }

@media (min-width: 64rem) {
  html, body { overflow: hidden; }
}

/* ---------- brand mark ---------- */
.mark {
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border-radius: 22%;
}
.mark > img {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-line { display: flex; align-items: center; gap: 10px; }
.brand-word { font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1; }
.brand-sub { margin-top: 4px; font-size: 10px; color: hsl(var(--color-muted)); }

/* ---------- shell ---------- */
.frame {
  display: flex;
  min-height: 100dvh;
  width: 100%;
  background: hsl(var(--color-background-secondary));
}
@media (min-width: 64rem) {
  .frame { height: 100dvh; overflow: hidden; }
}

.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  width: var(--rail);
  background: hsl(var(--color-background-secondary));
}
@media (min-width: 64rem) {
  .rail { display: flex; }
}

.rail-logo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 24px 12px 20px;
}
.rail-logo .mark { width: 56px; height: 56px; }

.rail-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}
.rail-nav::-webkit-scrollbar { display: none; }

.rail-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  text-align: center;
  color: hsl(var(--color-base) / .7);
}
.rail-item:hover { color: hsl(var(--color-base)); }
.rail-item .ico { width: 28px; height: 28px; }
.rail-item .lbl {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}
.rail-item.is-active {
  background: hsl(var(--color-base) / .06);
  color: hsl(var(--color-base));
}
.rail-item.is-active::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 0;
  width: 4px;
  border-start-end-radius: 999px;
  border-end-end-radius: 999px;
  background: hsl(var(--color-primary));
}
.rail-sep { margin: 8px 24px; border-top: 1px solid hsl(var(--color-neutral)); }

.rail-foot {
  position: relative;
  flex: none;
  border-top: 1px solid hsl(var(--color-neutral));
  padding: 12px;
}
.rail-me {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  padding: 6px 0;
}
.avatar {
  border-radius: 9999px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background));
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  font-weight: 600;
  color: hsl(var(--color-muted));
}
.rail-me .avatar { width: 40px; height: 40px; font-size: 14px; }
.rail-me .who {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
  color: hsl(var(--color-muted));
}

/* ---------- mobile drawer ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(0 0 0 / .5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer-nav {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 50;
  display: flex;
  width: 16rem;
  flex-direction: column;
  background: hsl(var(--color-background-secondary));
  transform: translateX(-100%);
  transition: transform .3s ease;
}
html[dir="rtl"] .drawer-nav { transform: translateX(100%); }
.drawer-nav.is-open { transform: translateX(0); }
@media (min-width: 64rem) {
  .drawer-nav, .scrim.scrim-nav { display: none; }
}
.drawer-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 24px;
}
.drawer-head .mark { width: 36px; height: 36px; }
.drawer-nav nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  padding: 0 10px 16px;
}
.nav-group-label {
  padding: 0 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: hsl(var(--color-base) / .6);
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
  color: hsl(var(--color-base) / .75);
}
.nav-link .ico { width: 20px; height: 20px; flex: none; }
.nav-link:hover { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }
.nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link.is-active { background: hsl(var(--color-primary)); font-weight: 500; color: hsl(var(--color-inverted)); }
.nav-link.is-active:hover { background: hsl(var(--color-primary)); color: hsl(var(--color-inverted)); }
.drawer-foot {
  flex: none;
  border-top: 1px solid hsl(var(--color-neutral));
  padding: 12px;
  position: relative;
}

/* ---------- content column ---------- */
.content-wrap {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
@media (min-width: 64rem) {
  .content-wrap { padding-inline-start: var(--rail); }
}

.panel-scroll {
  display: flex;
  min-height: 100dvh;
  flex: 1;
  flex-direction: column;
  overflow: hidden clip;
  background: hsl(var(--color-background));
}
@media (min-width: 64rem) {
  .panel-scroll {
    margin: 12px 12px 12px 0;
    height: calc(100dvh - 1.5rem);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid hsl(var(--color-neutral));
    border-radius: var(--radius-3xl);
  }
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: hsl(var(--color-background) / .85);
  backdrop-filter: blur(12px);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
  height: 4rem;
}
@media (min-width: 40rem) { .topbar-in { padding: 0 24px; } }
@media (min-width: 64rem) { .topbar-in { height: 5rem; padding: 0 40px; } }

.topbar-left { display: flex; min-width: 0; flex: 1; align-items: center; gap: 12px; }
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px;
  color: hsl(var(--color-muted));
}
.icon-btn:hover { color: hsl(var(--color-base)); background: hsl(var(--color-base) / .05); }
.topbar .burger { margin-inline-start: -4px; }
@media (min-width: 64rem) { .topbar .burger { display: none; } }
.topbar-brand { font-size: 18px; font-weight: 700; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 48rem) { .topbar-brand { display: none; } }
@media (max-width: 47.98rem) { .topbar-brand { display: block; } }

/* search */
.search { position: relative; display: none; width: 100%; max-width: 24rem; flex: 1; }
@media (min-width: 48rem) { .search { display: block; } }
.search .ico {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: hsl(var(--color-muted));
  pointer-events: none;
}
.search input {
  height: 3rem;
  width: 100%;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding-inline: 56px 44px;
  padding-inline-start: 44px;
  padding-inline-end: 56px;
  font-size: 15px;
  color: inherit;
  outline: none;
}
.search input::placeholder { color: hsl(var(--color-muted)); }
.search input:focus { border-color: hsl(var(--color-base) / .3); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  border-radius: 6px;
  border: 1px solid hsl(var(--color-neutral));
  padding: 2px 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: hsl(var(--color-muted));
  pointer-events: none;
}
@media (min-width: 64rem) { .search kbd { display: block; } }
.search-results {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 40;
  margin-top: 8px;
  max-height: 24rem;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 6px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .25), 0 8px 10px -6px rgb(0 0 0 / .25);
}
.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: hsl(var(--color-base) / .85);
}
.search-item .grp { flex: none; font-size: 12px; color: hsl(var(--color-muted)); }
.search-item .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item.is-active { background: hsl(var(--color-primary) / .1); color: hsl(var(--color-primary)); }
.search-empty { padding: 24px 12px; text-align: center; font-size: 14px; color: hsl(var(--color-muted)); }

/* right cluster */
.topbar-right { display: flex; flex: none; align-items: center; gap: 4px; }
@media (min-width: 40rem) { .topbar-right { gap: 8px; } }

.ghost-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 2.5rem;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 15px;
  color: hsl(var(--color-base) / .85);
  white-space: nowrap;
}
.ghost-btn:hover { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }
.ghost-btn .lbl { display: none; }
@media (min-width: 80rem) { .ghost-btn .lbl { display: inline; } }
.dot-new {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: hsl(var(--color-error));
  box-shadow: 0 0 0 2px hsl(var(--color-background));
}
.notif { position: relative; }

.pill-sep { color: hsl(var(--color-base) / .3); }
.locale-lbl { display: none; }
@media (min-width: 64rem) { .locale-lbl { display: inline; } }
@media (max-width: 39.98rem) { .locale-switch { display: none; } }

.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  color: hsl(var(--color-background));
  background: hsl(var(--color-base) / .55);
  box-shadow: 0 1px 2px rgb(0 0 0 / .25);
}
.flag.round { width: 18px; height: 18px; border-radius: 9999px; }
.flag.rect { width: 30px; height: 20px; border-radius: 3px; }

.me-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 6px 8px;
}
.me-btn:hover { background: hsl(var(--color-base) / .05); }
.me-btn .avatar { width: 36px; height: 36px; font-size: 13px; }
.me-btn .who { display: none; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
@media (min-width: 80rem) { .me-btn .who { display: block; } }
@media (max-width: 47.98rem) { .me-desktop { display: none; } }
.chev { width: 16px; height: 16px; transition: transform .2s ease; }
.is-open > .chev, .chev.is-flip { transform: rotate(180deg); }

/* theme pill */
.theme-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 9999px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 4px;
}
.theme-pill .thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: hsl(var(--color-primary));
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.theme-pill.is-dark .thumb { transform: translateX(36px); }
.theme-pill button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  transition: color .3s ease, opacity .3s ease;
  opacity: .7;
}
.theme-pill button.on { color: hsl(var(--color-inverted)); opacity: 1; }
.theme-pill .ico { width: 18px; height: 18px; }
.cart-btn {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: hsl(var(--color-base) / .85);
}
.cart-btn:hover { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }

/* ---------- popovers / listboxes ---------- */
.pop {
  position: absolute;
  z-index: 40;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 6px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .25), 0 8px 10px -6px rgb(0 0 0 / .25);
  opacity: 0;
  transform: scale(.96);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.pop-end { inset-inline-end: 0; top: 100%; }
.pop-start { inset-inline-start: 0; top: 100%; }
.pop-up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 8px; }
.me-pop { width: 15rem; }
.me-pop-head {
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 6px 12px 10px;
}
.me-pop-head .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.me-pop-head .e { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: hsl(var(--color-muted)); }
.pop-list { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.pop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: start;
  color: hsl(var(--color-base) / .8);
  width: 100%;
}
.pop-item:hover { background: hsl(var(--color-base) / .05); }
.pop-item.is-active { color: hsl(var(--color-primary)); }
.pop-item.is-danger { color: hsl(var(--color-error) / .8); }
.pop-item.is-danger:hover { color: hsl(var(--color-error)); }

.menu { width: 15rem; max-height: 70vh; overflow-y: auto; border-radius: 16px; padding: 8px; }
.menu-opt {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: start;
  font-size: 15px;
  color: hsl(var(--color-base) / .85);
}
.menu-opt:hover { background: hsl(var(--color-base) / .05); }
.menu-opt[aria-selected="true"] { background: hsl(var(--color-base) / .06); font-weight: 600; color: hsl(var(--color-base)); }
.menu-opt .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-opt .ico { width: 20px; height: 20px; flex: none; margin-inline-start: auto; color: hsl(var(--color-primary)); }
.menu-cur { margin-top: 8px; border-top: 1px solid hsl(var(--color-neutral)); padding-top: 8px; }
.menu-cur .h { padding: 4px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--color-muted)); }
.menu-cur .menu-opt { gap: 12px; }
.menu-cur .code { width: 2.5rem; flex: none; font-size: 14px; font-weight: 600; color: hsl(var(--color-muted)); }

.pick { position: relative; }
.pick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 2.5rem;
  width: 100%;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-base) / .15);
  background: hsl(var(--color-base) / .03);
  padding: 0 12px 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--color-base));
}
.pick.is-open .pick-btn { border-color: hsl(var(--color-base) / .4); }
.pick-btn .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list { min-width: 100%; width: max-content; padding: 6px; }
.pick-opt {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: start;
  font-size: 14px;
  color: hsl(var(--color-base) / .8);
}
.pick-opt:hover { background: hsl(var(--color-base) / .05); }
.pick-opt[aria-selected="true"] { background: hsl(var(--color-primary) / .1); font-weight: 500; color: hsl(var(--color-primary)); }
.pick-opt .ico { width: 16px; height: 16px; }

/* ---------- board ---------- */
.board-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 16px 32px;
}
@media (min-width: 40rem) { .board-wrap { padding: 12px 24px 40px; } }
@media (min-width: 64rem) { .board-wrap { padding: 12px 40px 40px; } }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 40rem) { .page-head { margin-bottom: 32px; } }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
@media (min-width: 40rem) { .page-title { font-size: 36px; } }
.crumb { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; color: hsl(var(--color-muted)); }
.crumb .ico { width: 16px; height: 16px; }
.crumb .here { color: hsl(var(--color-base)); }

.btn-outline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--color-base) / .8);
}
.btn-outline:hover { color: hsl(var(--color-base)); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 2.5rem;
  border-radius: 12px;
  background: hsl(var(--color-primary));
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--color-inverted));
}
.btn-primary:hover { background: hsl(var(--color-secondary)); }

.board { display: flex; flex-direction: column; gap: 24px; }
.zone { display: contents; }
@media (min-width: 80rem) {
  .board {
    display: grid;
    grid-template-columns: var(--panel) minmax(0, 1fr);
    align-items: start;
  }
  .board[data-side="empty"] { grid-template-columns: minmax(0, 1fr); }
  .zone { display: flex; min-width: 0; flex-direction: column; gap: 24px; }
  .zone[data-empty] { display: none; }
  .zone-top { grid-column: 1 / -1; }
  .widget { order: 0; }
  .widget.is-hidden-xl { display: none; }
}
@media (max-width: 79.98rem) {
  .widget.is-hidden-below-xl { display: none; }
  .widget { order: var(--mo, 0); }
}
.widget { min-width: 0; border-radius: var(--radius-2xl); outline: 2px solid transparent; outline-offset: 4px; }
.widget.hl { outline-color: hsl(var(--color-primary)); }

.card {
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 20px;
}
@media (min-width: 40rem) { .card { padding: 24px; } }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: hsl(var(--color-muted));
}
.link-quiet:hover { color: hsl(var(--color-base)); }
.link-quiet .ico { width: 16px; height: 16px; }

/* account card */
.acct {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  padding: 20px;
  color: #fff;
  background: linear-gradient(to bottom right, #1fae6c, #0f7a4a 55%, #06402a);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
}
@media (min-width: 40rem) { .acct { padding: 24px; } }
.acct::before {
  content: "";
  position: absolute;
  right: -64px;
  top: -64px;
  width: 224px;
  height: 224px;
  border-radius: 9999px;
  background: rgb(142 236 199 / .25);
  filter: blur(64px);
  pointer-events: none;
}
.acct-in { position: relative; }
.acct-kicker { font-size: 14px; font-weight: 600; color: rgb(255 255 255 / .8); }
.acct-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.acct-row .avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
  color: #fff;
  background: rgb(255 255 255 / .18);
  border: 0;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .3);
}
.acct-name { min-width: 0; }
.acct-name .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; }
.acct-name .r { font-size: 14px; color: rgb(255 255 255 / .7); }
.acct-dl { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; font-size: 14px; }
.acct-dl > div { display: flex; align-items: flex-start; gap: 12px; }
.acct-dl .ico { margin-top: 2px; width: 20px; height: 20px; flex: none; color: rgb(255 255 255 / .7); }
.acct-dl dt { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: rgb(255 255 255 / .6); }
.acct-dl dd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dl dd a { color: hsl(var(--color-primary)); text-decoration: none; }
.acct-dl dd a:hover { text-decoration: underline; }
.acct-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.acct-actions a,
.acct-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  width: 100%;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.acct-actions a { background: #fff; color: #06402a; }
.acct-actions a:hover { background: rgb(255 255 255 / .9); }
.acct-actions button { background: rgb(0 0 0 / .25); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
.acct-actions button:hover { background: rgb(0 0 0 / .35); }

/* status + shortcuts */
.status-body { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.chip-ok {
  display: flex;
  width: 40px;
  height: 40px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: hsl(var(--color-success) / .15);
  color: hsl(var(--color-success));
}
.chip-ok .ico { width: 20px; height: 20px; }
.status-body p { font-weight: 600; }

.sc-list { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.sc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--color-primary));
}
.sc-item:hover { background: hsl(var(--color-primary) / .08); }
.sc-item .ico { width: 20px; height: 20px; flex: none; }

/* stat tiles */
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 64rem) { .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 20px 12px;
  text-align: center;
}
@media (min-width: 40rem) { .stat { padding: 28px 16px; } }
.stat > .ico {
  position: absolute;
  inset-inline-end: 12px;
  inset-block-start: 12px;
  width: 16px;
  height: 16px;
  color: hsl(var(--color-muted));
}
@media (min-width: 40rem) {
  .stat > .ico { inset-inline-end: 16px; inset-block-start: 16px; width: 20px; height: 20px; }
}
.stat .v {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 24px;
  font-weight: 600;
  color: hsl(var(--color-primary));
}
@media (min-width: 40rem) { .stat .v { font-size: 36px; } }
.stat .l { margin-top: 6px; font-size: 12px; color: hsl(var(--color-muted)); }
@media (min-width: 40rem) { .stat .l { margin-top: 8px; font-size: 14px; } }

/* services table */
.table {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
}
.table-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 16px;
}
@media (min-width: 40rem) {
  .table-bar { flex-direction: row; align-items: center; justify-content: space-between; padding: 20px; }
}
.table-tools { display: flex; gap: 8px; }
@media (max-width: 39.98rem) { .table-tools { flex-direction: column; } }
.mini-search { position: relative; min-width: 0; flex: 1; }
@media (min-width: 40rem) { .mini-search { flex: none; width: 15rem; } }
.mini-search > .ico {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: hsl(var(--color-muted));
  pointer-events: none;
}
.mini-search input {
  height: 2.5rem;
  width: 100%;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-base) / .15);
  background: hsl(var(--color-base) / .03);
  padding-inline-start: 36px;
  padding-inline-end: 12px;
  font-size: 14px;
  color: inherit;
  outline: none;
}
.mini-search input::placeholder { color: hsl(var(--color-base) / .4); }
.mini-search input:focus { border-color: hsl(var(--color-base) / .5); }
.mini-search input::-webkit-search-cancel-button { display: none; }

.thead {
  display: none;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 24px;
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--color-muted));
}
@media (min-width: 48rem) { .thead { display: grid; } }
.thead .act { width: 6rem; text-align: end; }

.trow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 12px;
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 16px;
}
.trow:last-child { border-bottom: 0; }
@media (min-width: 40rem) { .trow { padding: 16px 20px; } }
@media (min-width: 48rem) {
  .trow { grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 24px; }
}
.svc-id { display: flex; min-width: 0; align-items: center; gap: 16px; }
.badge {
  width: 5.75rem;
  flex: none;
  border-radius: 8px;
  padding: 4px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.badge.is-active { background: hsl(var(--color-success) / .15); color: hsl(var(--color-success)); }
.badge.is-pending { background: hsl(var(--color-warning) / .15); color: hsl(var(--color-warning)); }
.badge.is-suspended { background: hsl(var(--color-error) / .15); color: hsl(var(--color-error)); }
.svc-txt { min-width: 0; }
.svc-cat {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: hsl(var(--color-muted));
}
.svc-name { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.svc-name .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.svc-name .h { flex: none; font-size: 12px; color: hsl(var(--color-muted)); }
.svc-act {
  display: flex;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  background: hsl(var(--color-primary));
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--color-inverted));
}
.svc-act:hover { background: hsl(var(--color-secondary)); }
.svc-act .ico { width: 16px; height: 16px; }
.svc-due { grid-column: 1 / -1; }
@media (min-width: 48rem) {
  .svc-act { order: 4; width: 6rem; height: 2.5rem; padding: 0; }
  .svc-due { grid-column: auto; }
}
.bar { height: 8px; overflow: hidden; border-radius: 9999px; background: hsl(var(--color-base) / .1); }
.bar > span { display: block; height: 100%; border-radius: 9999px; background: hsl(var(--color-primary)); }
.bar > span.warn { background: hsl(var(--color-warning)); }
.bar > span.err { background: hsl(var(--color-error)); }
.bar-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: hsl(var(--color-muted)); }
.due-plain { font-size: 14px; color: hsl(var(--color-muted)); }
.svc-price { display: none; font-size: 14px; font-weight: 500; }
@media (min-width: 48rem) { .svc-price { display: block; } }

.empty { padding: 48px 20px; text-align: center; }
.empty p.t { font-weight: 600; }
.empty p.s { margin-top: 4px; font-size: 14px; color: hsl(var(--color-muted)); }
.empty .btn-primary { margin-top: 16px; }

.tfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid hsl(var(--color-neutral));
  padding: 12px 16px;
}
@media (min-width: 40rem) { .tfoot { padding: 16px 20px; } }
.pager { display: flex; align-items: center; gap: 6px; }
.pager-nav {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: hsl(var(--color-muted));
}
.pager-nav:hover:not(:disabled) { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }
.pager-nav:disabled { opacity: .4; cursor: default; }
.pager-nav .ico { width: 20px; height: 20px; }
.pager-count { padding: 0 8px; font-size: 14px; font-weight: 500; color: hsl(var(--color-muted)); }
@media (min-width: 40rem) { .pager-count { display: none; } }
.pager-num {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--color-muted));
}
@media (min-width: 40rem) { .pager-num { display: flex; } }
.pager-num:hover { background: hsl(var(--color-base) / .05); }
.pager-num.is-active { background: hsl(var(--color-primary)); color: hsl(var(--color-inverted)); }

/* invoices / tickets / discord cards */
.cards-grid { display: grid; gap: 24px; }
@media (min-width: 48rem) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
}
.mini-card.wide { grid-column: 1 / -1; }
.mini-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 12px 20px;
}
.mini-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.mini-head h3 .ico { width: 20px; height: 20px; color: hsl(var(--color-primary)); }
.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 2.25rem;
  flex: none;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background));
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}
.btn-quiet:hover { border-color: hsl(var(--color-base) / .3); }
.btn-quiet .ico { width: 16px; height: 16px; }
.mini-body { flex: 1; padding: 20px; font-size: 15px; line-height: 1.65; }
.mini-fill { flex: 1; padding: 20px; }
.mini-empty { font-size: 15px; color: hsl(var(--color-muted)); }
.mini-note { display: flex; align-items: flex-start; gap: 8px; color: hsl(var(--color-muted)); }
.mini-note .ico { margin-top: 2px; width: 20px; height: 20px; flex: none; color: hsl(var(--color-success)); }
.mini-rows { display: flex; flex-direction: column; gap: 12px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.mini-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mini-row .m { flex: none; color: hsl(var(--color-muted)); }

.dc-body { display: flex; flex-direction: column; gap: 20px; padding: 20px; font-size: 15px; line-height: 1.65; }
@media (min-width: 40rem) { .dc-body { flex-direction: row; align-items: center; justify-content: space-between; } }
.dc-body p { color: hsl(var(--color-base) / .8); }
.btn-discord {
  display: inline-flex;
  height: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: #5865F2;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.btn-discord:hover { background: #4752c4; }
.btn-discord .ico { width: 20px; height: 20px; }

/* ---------- footer ---------- */
.site-foot {
  display: flex;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid hsl(var(--color-neutral));
  padding: 20px 16px;
  font-size: 14px;
  color: hsl(var(--color-muted));
}
@media (min-width: 40rem) {
  .site-foot { flex-direction: row; align-items: center; justify-content: space-between; padding: 20px 24px; }
}
@media (min-width: 64rem) { .site-foot { padding: 20px 40px; } }
.foot-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.socials { display: flex; align-items: center; gap: 4px; margin-inline-start: -8px; }
.socials a {
  display: flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: hsl(var(--color-muted));
}
.socials a:hover { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }
.socials .ico { width: 18px; height: 18px; }
.policies { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.policies a:hover { color: hsl(var(--color-base)); }

/* ---------- customize drawer ---------- */
.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgb(0 0 0 / .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
@media (min-width: 64rem) { .sheet-scrim { background: transparent; } }
.sheet-scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  max-height: 80vh;
  flex-direction: column;
  border: 1px solid hsl(var(--color-neutral));
  border-radius: 16px 16px 0 0;
  background: hsl(var(--color-background-secondary));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
  transform: translateY(100%);
  transition: transform .2s ease-out;
}
.sheet.is-open { transform: none; }
@media (min-width: 64rem) {
  .sheet {
    inset-block: 0;
    inset-inline: auto auto;
    right: 0;
    width: 400px;
    max-height: none;
    border-radius: 0;
    border-block: 0;
    border-inline-end: 0;
    transform: translateX(100%);
  }
  html[dir="rtl"] .sheet { transform: translateX(-100%); }
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid hsl(var(--color-neutral));
  padding: 16px 20px;
}
.sheet-head .t { font-size: 18px; font-weight: 600; }
.sheet-head .s { margin-top: 2px; font-size: 14px; color: hsl(var(--color-muted)); }
.sheet-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border-radius: 12px;
  background: hsl(var(--color-base) / .05);
  padding: 4px;
  font-size: 14px;
  font-weight: 600;
}
.sheet-tab {
  display: flex;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  color: hsl(var(--color-muted));
}
.sheet-tab .ico { width: 16px; height: 16px; }
.sheet-tab.is-active { background: hsl(var(--color-background-secondary)); color: hsl(var(--color-base)); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.sheet-body > div + div { margin-top: 16px; }
.zone-label { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--color-muted)); }
.sort-list {
  display: flex;
  min-height: 3rem;
  flex-direction: column;
  gap: 8px;
  border-radius: 12px;
  border: 1px dashed hsl(var(--color-neutral));
  padding: 8px;
}
.sort-list.drop { border-color: hsl(var(--color-primary)); background: hsl(var(--color-primary) / .06); }
.sort-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background));
  padding: 8px;
  font-size: 14px;
}
.sort-item.dragging { opacity: .5; }
.grip {
  display: flex;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: hsl(var(--color-muted));
  cursor: grab;
  touch-action: none;
}
.grip:active { cursor: grabbing; }
.grip .ico { width: 20px; height: 20px; }
.sort-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sort-name.off { color: hsl(var(--color-muted)); text-decoration: line-through; }
.mini-btn {
  display: flex;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: hsl(var(--color-muted));
}
.mini-btn:hover { background: hsl(var(--color-base) / .05); color: hsl(var(--color-base)); }
.mini-btn .ico { width: 20px; height: 20px; }
.mini-btn.eye { color: hsl(var(--color-primary)); }
.mini-btn.eye.off { color: hsl(var(--color-muted)); }
.sheet-note { margin-top: 12px; font-size: 12px; color: hsl(var(--color-muted)); }
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid hsl(var(--color-neutral));
  padding: 16px 20px;
}
.btn-ghost {
  height: 2.5rem;
  border-radius: 12px;
  padding: 0 12px;
  margin-inline-end: auto;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--color-muted));
}
.btn-ghost:hover { color: hsl(var(--color-base)); }
.btn-ghost:disabled { opacity: .5; cursor: default; }
.save-state { font-size: 12px; color: hsl(var(--color-muted)); }
.save-state.ok { display: inline-flex; align-items: center; gap: 4px; color: hsl(var(--color-success)); }
.save-state.bad { color: hsl(var(--color-error)); }
.save-state .ico { width: 14px; height: 14px; }

/* ---------- toast ---------- */
.toasts {
  position: fixed;
  z-index: 60;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (max-width: 39.98rem) { .toasts { left: 16px; right: 16px; bottom: 16px; } }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid hsl(var(--color-neutral));
  background: hsl(var(--color-background-secondary));
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .25);
  animation: toast-in .2s ease-out;
}
.toast .ico { width: 18px; height: 18px; flex: none; }
.toast.ok .ico { color: hsl(var(--color-success)); }
.toast.bad .ico { color: hsl(var(--color-error)); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- misc ---------- */
.ico { display: inline-block; width: 1em; height: 1em; flex: none; fill: currentColor; }
.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 999; }
