:root {
  --bg: #EAF1F1;
  --surface: #FFFFFF;
  --surface-2: #F4F8F8;
  --ink: #0D2027;
  --muted: #5B7177;
  --line: #DCE6E7;
  --accent: #0E8A83;
  --accent-soft: #D8F1EE;
  --coral: #E45F4A;
  --coral-soft: #FCE4DF;
  --gold: #B9801A;
  --gold-soft: #F8ECD2;
  --side: #092028;
  --side-ink: #B7CDD1;
  --shadow: 0 1px 2px rgba(9, 32, 40, .05), 0 8px 24px -12px rgba(9, 32, 40, .12);
}

[data-theme="dark"] {
  --bg: #061318;
  --surface: #0C2027;
  --surface-2: #10282F;
  --ink: #E7F2F2;
  --muted: #8CA5AA;
  --line: #1A353D;
  --accent: #3DD9C4;
  --accent-soft: #12403F;
  --coral: #FF8A76;
  --coral-soft: #3E211E;
  --gold: #E8B54F;
  --gold-soft: #3A2E14;
  --side: #051016;
  --side-ink: #94AEB3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  transition: background .25s, color .25s;
}

.font-display {
  letter-spacing: -.02em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: background .25s, border-color .25s;
}

.muted {
  color: var(--muted);
}

.hairline {
  border-color: var(--line);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

#sidebar,
#sidebar *,
aside,
aside * {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  text-align: left;
  padding: .6rem .75rem;
  border-radius: 12px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--side-ink);
  transition: background .15s, color .15s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
}

.nav-link[aria-current="page"] {
  background: rgba(45, 212, 191, .14);
  color: #2DD4BF;
  border: none;
  box-shadow: none !important;
  font-weight: 600;
}

.nav-link[aria-current="page"]:hover {
  background: rgba(45, 212, 191, .20);
  color: #5EEAD4;
}

.nav-link[aria-current="page"] svg {
  stroke: #2DD4BF;
  opacity: 1;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: .9;
}

.side-heading {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
  padding: .85rem .75rem .25rem;
  user-select: none;
}

.nav-sub-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .75rem .45rem 2.25rem;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
  transition: all .15s;
  text-decoration: none;
}

.nav-sub-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .05);
}

.nav-sub-link[aria-current="page"] {
  color: #2DD4BF;
  font-weight: 600;
  background: rgba(45, 212, 191, .08);
}

.nav-badge {
  margin-left: auto;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .8);
}

.nav-badge.badge-accent {
  background: rgba(45, 212, 191, .2);
  color: #2DD4BF;
}

.nav-badge.badge-coral {
  background: rgba(228, 95, 74, .25);
  color: #FB7185;
}

.side-user-card {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .65rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: background .15s, border-color .15s;
  box-shadow: none !important;
}

.side-user-card:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(45, 212, 191, .25);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 .6rem;
  border-radius: 10px;
  font-size: .8125rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: all .15s;
  cursor: pointer;
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(14, 138, 131, .4);
}

.page-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .75rem;
  font-weight: 600;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.st-Confirmed,
.st-Published,
.st-Active,
.st-Paid,
.st-Completed,
.st-Success,
.st-Online {
  background: var(--accent-soft);
  color: var(--accent);
}

.st-Pending,
.st-Suspended,
.st-Refunded,
.st-Draft,
.st-Provisional,
.st-Scheduled {
  background: var(--gold-soft);
  color: var(--gold);
}

.st-Cancelled,
.st-Rejected,
.st-Blocked,
.st-Failed,
.st-Offline {
  background: var(--coral-soft);
  color: var(--coral);
}

.st-Review,
.st-Processing {
  background: #DCE9FD;
  color: #2463C0;
}

[data-theme="dark"] .st-Review,
[data-theme="dark"] .st-Processing {
  background: #122C4A;
  color: #7FB4FF;
}

.icon-btn {
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color .15s, border-color .15s;
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.seg,
.tabs {
  display: inline-flex;
  gap: 1px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.seg button,
.tabs button {
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
  cursor: pointer;
}

.seg button[aria-pressed="true"],
.tabs button[aria-pressed="true"],
.tabs button.active {
  background: var(--accent);
  color: #fff;
}

.seg button:not([aria-pressed="true"]):hover,
.tabs button:hover {
  color: var(--ink);
}

.hero .seg button {
  color: #9DB8BD;
}

.hero .seg button:not([aria-pressed="true"]):hover {
  color: #fff;
}

.hero .seg button[aria-pressed="true"] {
  background: #2DD4BF;
  color: #06242A;
}

tbody tr {
  transition: background .12s;
}

tbody tr:hover {
  background: var(--surface-2);
}

.draw {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 1.4s cubic-bezier(.3, .7, .2, 1) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .draw {
    animation: none;
    stroke-dashoffset: 0;
  }
  html {
    scroll-behavior: auto;
  }
}

.hero {
  background: radial-gradient(900px 300px at 85% -10%, rgba(45, 212, 191, .22), transparent 60%), linear-gradient(160deg, #0B2A33, #071A21);
  color: #E7F2F2;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 24px 48px -24px rgba(6, 26, 33, .6);
}

.scrim {
  background: rgba(3, 12, 16, .55);
  backdrop-filter: blur(2px);
}

.f {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: .6rem .9rem;
  font-size: .875rem;
  width: 100%;
  outline: none;
  transition: border-color .15s, background .15s;
}

.f:focus {
  border-color: var(--accent);
}

.f::placeholder {
  color: var(--muted);
}

label.lb {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}

.code {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .8rem;
}

.tabbar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.tabbar button {
  padding: .6rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.tabbar button.active {
  color: var(--accent);
  border-color: var(--accent);
}

.tabbar button:hover {
  color: var(--ink);
}

.tb-cell {
  padding: .65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: .8rem;
  color: var(--muted);
  outline: none;
}

.tb-cell:focus {
  border-color: var(--accent);
}

.modal-bg {
  background: rgba(6, 19, 24, .55);
  backdrop-filter: blur(3px);
}

.toast {
  animation: rise .25s ease;
  box-shadow: var(--shadow);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kv-row .kv-x {
  visibility: hidden;
}

.kv-row:hover .kv-x {
  visibility: visible;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  padding: .35rem .7rem;
  border-radius: 10px;
  transition: background .15s, color .15s;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--surface-2);
}

.ring-avatar {
  box-shadow: 0 0 0 3px var(--surface);
}
