@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700&family=JetBrains+Mono:wght@400;500&display=swap);
@charset "UTF-8";
/* ============================================
   2026 Design System — Entry
   ============================================ */
/* ============ RESET + BASE — 2026 ============ */
/* ============ DESIGN TOKENS — 2026 ============ */
:root[data-theme=light] {
  /* Surfaces */
  --bg-body: #F0F4F8;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-hover: #F8FAFC;
  --bg-muted: #F1F5F9;
  /* Text */
  --t-base: #1E293B;
  --t-muted: #64748B;
  --t-light: #94A3B8;
  --t-inverse: #FFFFFF;
  /* Borders */
  --border: #E4E8EF;
  --border-soft: #EEF1F5;
  /* Brand — blue */
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --primary-ring: rgba(37, 99, 235, 0.18);
  /* Semantic */
  --success: #10B981;
  --success-soft: #ECFDF5;
  --warning: #F59E0B;
  --warning-soft: #FFFBEB;
  --danger: #EF4444;
  --danger-soft: #FEF2F2;
  --info: #0EA5E9;
  --info-soft: #F0F9FF;
  --purple: #8B5CF6;
  --purple-soft: #F5F3FF;
  --pink: #EC4899;
  --pink-soft: #FDF2F8;
  --teal: #14B8A6;
  --teal-soft: #F0FDFA;
  --orange: #F97316;
  --orange-soft: #FFF7ED;
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow-card: 0 1px 3px 0 rgb(15 23 42 / 0.06), 0 1px 2px -1px rgb(15 23 42 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.05);
  --overlay: rgba(240, 244, 248, 0.72);
}

:root[data-theme=dark] {
  --bg-body: #0B1120;
  --bg-card: #141B2D;
  --bg-sidebar: #141B2D;
  --bg-hover: #1C2438;
  --bg-muted: #1A2237;
  --t-base: #F1F5F9;
  --t-muted: #94A3B8;
  --t-light: #64748B;
  --t-inverse: #0B1120;
  --border: #222C42;
  --border-soft: #1A2237;
  --primary: #60A5FA;
  --primary-light: #93C5FD;
  --primary-dark: #3B82F6;
  --primary-soft: #0F2847;
  --primary-ring: rgba(96, 165, 250, 0.24);
  --success: #34D399;
  --success-soft: #0F2A20;
  --warning: #FBBF24;
  --warning-soft: #2B1F08;
  --danger: #F87171;
  --danger-soft: #2B1414;
  --info: #38BDF8;
  --info-soft: #0D2232;
  --purple: #A78BFA;
  --purple-soft: #1E1A2C;
  --pink: #F472B6;
  --pink-soft: #2A1424;
  --teal: #2DD4BF;
  --teal-soft: #0E2826;
  --orange: #FB923C;
  --orange-soft: #2A1810;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --overlay: rgba(11, 17, 32, 0.72);
}

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

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

a {
  color: inherit;
  -webkit-text-decoration: none;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

input, textarea {
  font: inherit;
  color: inherit;
}

body {
  font-family: "Inter",system-ui,Segoe UI,Ubuntu,Cantarell,Noto Sans, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-weight: 400;
  background: var(--bg-body);
  color: var(--t-base);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 280ms ease, color 280ms ease;
}

::-moz-selection {
  background: var(--primary);
  color: #fff;
}

::selection {
  background: var(--primary);
  color: #fff;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
}

/* ============ ANIMATIONS — 2026 ============ */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bar-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
/* ============ SHELL ============ */
.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.d-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 22px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.d-sidebar::-webkit-scrollbar {
  width: 4px;
}

.d-sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px -2px color-mix(in oklab, var(--primary) 40%, transparent);
}

.brand-logo svg {
  width: 18px;
  height: 18px;
}

.brand-text {
  line-height: 1.1;
}

.brand-name {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--t-base);
  letter-spacing: -0.02em;
}

.brand-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--t-light);
  letter-spacing: 0.1em;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-light);
  padding: 0 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--t-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
  line-height: 1.2;
}

.nav-link > svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  flex-shrink: 0;
  display: block;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link > span:not(.nav-badge) {
  min-width: 0;
  flex: 1;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.nav-link.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-badge {
  flex: 0 0 auto;
  margin-left: auto;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  line-height: 1.4;
  border-radius: 999px;
}

.nav-badge.pro {
  background: var(--primary);
  color: #fff;
}

.nav-badge.hot {
  background: var(--danger-soft);
  color: var(--danger);
}

.nav-badge.new {
  background: var(--success-soft);
  color: var(--success);
}

/* Dropdown nav items */
.nav-item-group .nav-link .chev {
  width: 11px;
  height: 11px;
  margin-left: auto;
  transition: transform 200ms ease;
}

.nav-item-group.is-open .nav-link .chev {
  transform: rotate(90deg);
}

.nav-submenu {
  overflow: hidden;
  max-height: 0;
  margin-left: 20px;
  padding-left: 14px;
  position: relative;
  transition: max-height 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-submenu::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.nav-item-group.is-open .nav-submenu {
  max-height: 400px;
  padding-top: 4px;
  padding-bottom: 6px;
}

.nav-submenu a {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--t-muted);
  border-radius: 6px;
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}

.nav-submenu a:hover {
  color: var(--t-base);
  background: var(--bg-hover);
  padding-left: 13px;
}

.nav-submenu a.is-active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 180ms ease;
}

.workspace:hover {
  background: var(--bg-hover);
}

.workspace-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12.5px;
  flex-shrink: 0;
}

.workspace-text {
  line-height: 1.2;
  min-width: 0;
}

.workspace-name {
  font-size: 13px;
  color: var(--t-base);
  font-weight: 600;
}

.workspace-role {
  font-size: 11px;
  color: var(--t-light);
}

.workspace-chev {
  margin-left: auto;
  color: var(--t-light);
}

/* ============ MAIN ============ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ============ HAMBURGER (mobile only — see _responsive.scss) ============ */
.hamburger {
  display: none; /* Shown via media query under 720px */
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--t-base);
  margin-right: 4px;
  transition: background 160ms;
}

.hamburger:hover {
  background: var(--bg-hover);
}

.hamburger svg {
  width: 20px;
  height: 20px;
}

/* ============ MOBILE DRAWER BACKDROP ============ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms;
}

body.has-drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ============ TOPBAR ============ */
.d-topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: var(--overlay);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t-muted);
  font-size: 13px;
  font-weight: 500;
}

.crumbs .sep {
  color: var(--t-light);
}

.crumbs .current {
  color: var(--t-base);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--t-light);
  font-size: 13px;
  transition: all 200ms ease;
  min-width: 220px;
}

.cmd:hover {
  border-color: var(--primary);
  color: var(--t-muted);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.cmd svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cmd span {
  flex: 1;
  text-align: left;
}

.kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--t-muted);
  border: 1px solid var(--border);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--t-muted);
  transition: background 180ms, color 180ms;
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.icon-btn > svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.icon-btn .count {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-body);
  line-height: 1;
}

.icon-btn .count.danger {
  background: var(--danger);
  color: #fff;
}

.icon-btn .count.info {
  background: var(--info);
  color: #fff;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  margin-left: 6px;
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* ============ FOOTER ============ */
.d-footer {
  padding: 24px 32px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--t-muted);
  font-size: 12px;
}

.d-footer a {
  color: var(--primary);
  font-weight: 600;
}

.d-footer a:hover {
  color: var(--primary-dark);
}

.d-footer-meta {
  display: flex;
  gap: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  letter-spacing: 0.06em;
}

/* ============ DROPDOWNS ============ */
.dd-wrap {
  position: relative;
}

.dd-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  overflow: hidden;
  z-index: 100;
}

.dd-wrap.is-open .dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t-base);
  letter-spacing: 0.01em;
}

.dd-head svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  color: var(--t-muted);
}

.dd-list {
  max-height: 320px;
  overflow-y: auto;
}

.dd-list::-webkit-scrollbar {
  width: 4px;
}

.dd-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.dd-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 150ms ease;
}

.dd-item:last-child {
  border-bottom: 0;
}

.dd-item:hover {
  background: var(--bg-hover);
}

.dd-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.dd-avatar.a1 {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.dd-avatar.a2 {
  background: linear-gradient(135deg, var(--success), var(--teal));
}

.dd-avatar.a3 {
  background: linear-gradient(135deg, var(--danger), var(--warning));
}

.dd-body {
  min-width: 0;
}

.dd-text {
  font-size: 13px;
  color: var(--t-muted);
  line-height: 1.4;
  margin-bottom: 3px;
}

.dd-text strong {
  color: var(--t-base);
  font-weight: 600;
}

.dd-text em {
  color: var(--primary);
  font-style: normal;
}

.dd-preview {
  font-size: 12.5px;
  color: var(--t-muted);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
}

.dd-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dd-row-head strong {
  font-size: 13px;
  color: var(--t-base);
  font-weight: 600;
}

.dd-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.dd-footer {
  display: block;
  padding: 12px 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  border-top: 1px solid var(--border-soft);
  transition: color 180ms, background 180ms;
}

.dd-footer:hover {
  color: var(--primary-dark);
  background: var(--bg-hover);
}

/* Profile menu variant */
.dd-menu.dd-profile {
  min-width: 220px;
}

.dd-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--t-base);
  transition: background 150ms, color 150ms;
}

.dd-menu-item:hover {
  background: var(--bg-hover);
}

.dd-menu-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  color: var(--t-muted);
}

.dd-menu-item.danger {
  color: var(--danger);
}

.dd-menu-item.danger svg {
  color: var(--danger);
}

.dd-menu-item.danger:hover {
  background: var(--danger-soft);
}

.dd-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 6px 0;
}

.dd-profile-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.dd-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t-base);
}

.dd-profile-email {
  font-size: 11.5px;
  color: var(--t-muted);
  margin-top: 2px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
}

/* ============ CONTENT + COMMON COMPONENTS ============ */
.content {
  padding: 32px 32px 24px;
  width: 100%;
}

/* Hero */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 28px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-text .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.hero-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.028em;
  color: var(--t-base);
  margin: 0 0 8px;
}

.hero-title .accent {
  color: var(--primary);
}

.hero-sub {
  font-size: 14px;
  color: var(--t-muted);
  max-width: 60ch;
  line-height: 1.6;
}

.hero-sub strong {
  color: var(--success);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 180ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.btn--ghost {
  color: var(--t-base);
  border-color: var(--border);
  background: var(--bg-card);
}

.btn--ghost:hover {
  border-color: var(--t-light);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px var(--primary-ring);
}

.btn--primary:hover {
  background: var(--primary-dark);
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 0 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}

.card-head > :last-child {
  flex-shrink: 0;
  padding-bottom: 2px;
}

.card-title-wrap {
  min-width: 0;
}

.card-title-wrap .eyebrow {
  display: block;
  margin-bottom: 4px;
}

.card-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--t-base);
  margin: 0;
}

.card-action {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 180ms;
}

.card-action:hover {
  color: var(--primary-dark);
}

.card-action svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Generic 12-column grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: 260ms;
}

.grid > * {
  min-width: 0;
}

.col-6 {
  grid-column: span 6;
}

.col-12 {
  grid-column: span 12;
}

/* Horizontal-scroll wrapper for tables that overflow on narrow viewports */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
  height: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Generic table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  padding: 10px 0 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.table tbody td {
  padding: 11px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background-color 160ms ease;
}

.table tbody tr:hover td {
  background: var(--bg-hover);
}

.table .cell-name {
  color: var(--t-base);
  font-weight: 600;
}

.table .cell-date {
  color: var(--t-muted);
  font-size: 12px;
}

.table .cell-price {
  font-weight: 600;
  color: var(--t-base);
  text-align: right;
}

.table .cell-price.pos {
  color: var(--success);
}

.table .cell-price.neg {
  color: var(--danger);
}

/* Generic tag */
.tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.tag.t-new {
  background: var(--purple-soft);
  color: var(--purple);
}

.tag.t-used {
  background: var(--orange-soft);
  color: var(--orange);
}

.tag.t-old {
  background: var(--warning-soft);
  color: var(--warning);
}

.tag.t-unavail {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag.t-active {
  background: var(--success-soft);
  color: var(--success);
}

.tag.t-info {
  background: var(--info-soft);
  color: var(--info);
}

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 1;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--t-base);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label .req {
  color: var(--danger);
}

.field-help {
  font-size: 11.5px;
  color: var(--t-muted);
  line-height: 1.45;
}

.field-error {
  font-size: 11.5px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--t-base);
  font-size: 13px;
  font-family: inherit;
  outline: 0;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}

.input::-moz-placeholder, .textarea::-moz-placeholder {
  color: var(--t-light);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--t-light);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--bg-muted);
  color: var(--t-light);
  cursor: not-allowed;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
  border-color: var(--danger);
}

.input.is-invalid:focus,
.select.is-invalid:focus,
.textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background-image: url();
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.input-icon {
  position: relative;
}

.input-icon .ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--t-light);
  pointer-events: none;
}

.input-icon .ico svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.input-icon .input {
  padding-left: 34px;
}

/* Inline addon (e.g. https://) */
.input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 180ms, box-shadow 180ms;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-group .addon {
  padding: 0 12px;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  color: var(--t-muted);
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  border-right: 1px solid var(--border);
}

.input-group .input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.input-group .input:focus {
  box-shadow: none;
}

/* Checkbox / radio */
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--t-base);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check .box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--t-light);
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 160ms;
  background: var(--bg-card);
}

.check input:checked + .box {
  background: var(--primary);
  border-color: var(--primary);
}

.check input:checked + .box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.check.radio .box {
  border-radius: 50%;
}

.check.radio input:checked + .box::after {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  transform: none;
}

.check:hover .box {
  border-color: var(--primary);
}

.check input:disabled + .box {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toggle switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--t-base);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch .track {
  width: 34px;
  height: 20px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 200ms;
  flex-shrink: 0;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.switch input:checked + .track {
  background: var(--primary);
  border-color: var(--primary);
}

.switch input:checked + .track::after {
  transform: translateX(14px);
}

/* Form actions row */
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.form-actions .spacer {
  flex: 1;
}

/* ============ UI ELEMENTS ============ */
/* ---- Button variants (extends .btn from _components) ---- */
.btn--secondary {
  background: var(--bg-muted);
  color: var(--t-base);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--bg-hover);
  border-color: var(--t-light);
}

.btn--success {
  background: var(--success);
  color: #fff;
}

.btn--success:hover {
  background: color-mix(in oklab, var(--success) 90%, black);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.btn--danger:hover {
  background: color-mix(in oklab, var(--danger) 90%, black);
}

.btn--warning {
  background: var(--warning);
  color: #fff;
}

.btn--warning:hover {
  background: color-mix(in oklab, var(--warning) 90%, black);
}

.btn--info {
  background: var(--info);
  color: #fff;
}

.btn--info:hover {
  background: color-mix(in oklab, var(--info) 90%, black);
}

.btn--soft-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn--soft-primary:hover {
  background: color-mix(in oklab, var(--primary-soft) 80%, var(--primary) 8%);
}

.btn--soft-success {
  background: var(--success-soft);
  color: var(--success);
}

.btn--soft-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--soft-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.btn--soft-info {
  background: var(--info-soft);
  color: var(--info);
}

.btn--outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline-primary:hover {
  background: var(--primary-soft);
}

.btn--outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn--outline-danger:hover {
  background: var(--danger-soft);
}

.btn--outline-success {
  background: transparent;
  color: var(--success);
  border-color: var(--success);
}

.btn--outline-success:hover {
  background: var(--success-soft);
}

.btn--lg {
  padding: 12px 18px;
  font-size: 14px;
}

.btn--sm {
  padding: 6px 10px;
  font-size: 11.5px;
}

.btn--icon {
  padding: 9px;
}

.btn--icon svg {
  margin: 0;
}

.btn-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.btn-group .btn {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  border-right: 1px solid var(--border);
}

.btn-group .btn:last-child {
  border-right: 0;
}

.btn-group .btn.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---- Alert ---- */
.alert {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--bg-muted);
  color: var(--t-base);
  border-left: 3px solid var(--t-muted);
}

.alert + .alert {
  margin-top: 10px;
}

.alert .ico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--t-muted);
  flex-shrink: 0;
}

.alert .ico svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.alert .body {
  min-width: 0;
}

.alert .title {
  font-weight: 600;
  color: var(--t-base);
  margin-bottom: 2px;
}

.alert .close {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--t-light);
  transition: background 160ms, color 160ms;
}

.alert .close:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.alert .close svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.alert.success {
  background: var(--success-soft);
  border-left-color: var(--success);
}

.alert.success .ico {
  background: color-mix(in oklab, var(--success) 14%, transparent);
  color: var(--success);
}

.alert.danger {
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.alert.danger .ico {
  background: color-mix(in oklab, var(--danger) 14%, transparent);
  color: var(--danger);
}

.alert.warning {
  background: var(--warning-soft);
  border-left-color: var(--warning);
}

.alert.warning .ico {
  background: color-mix(in oklab, var(--warning) 14%, transparent);
  color: var(--warning);
}

.alert.info {
  background: var(--info-soft);
  border-left-color: var(--info);
}

.alert.info .ico {
  background: color-mix(in oklab, var(--info) 14%, transparent);
  color: var(--info);
}

.alert.primary {
  background: var(--primary-soft);
  border-left-color: var(--primary);
}

.alert.primary .ico {
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--primary);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  background: var(--bg-muted);
  color: var(--t-muted);
}

.badge.primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.info {
  background: var(--info-soft);
  color: var(--info);
}

.badge.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge.solid {
  background: var(--primary);
  color: #fff;
}

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

/* ---- Progress ---- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress.thin {
  height: 4px;
}

.progress.tall {
  height: 14px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transform-origin: left;
  animation: bar-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.progress-fill.success {
  background: var(--success);
}

.progress-fill.danger {
  background: var(--danger);
}

.progress-fill.warning {
  background: var(--warning);
}

.progress-fill.info {
  background: var(--info);
}

.progress-fill.gradient {
  background: linear-gradient(90deg, var(--primary), var(--purple));
}

.progress-fill.striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, transparent 75%, transparent);
  background-size: 12px 12px;
}

/* ---- Spinner ---- */
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-muted);
  border-top-color: var(--primary);
  animation: spin 700ms linear infinite;
  display: inline-block;
}

.spinner.sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.spinner.lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t-muted);
  border-bottom: 2px solid transparent;
  transition: color 160ms, border-color 160ms;
  position: relative;
  top: 1px;
  cursor: pointer;
}

.tab:hover {
  color: var(--t-base);
}

.tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab .badge {
  margin-left: 6px;
}

.tabs.pills {
  border-bottom: 0;
  background: var(--bg-muted);
  border-radius: 9px;
  padding: 3px;
  display: inline-flex;
}

.tabs.pills .tab {
  border-radius: 7px;
  border-bottom: 0;
  top: 0;
  padding: 7px 12px;
  font-size: 12.5px;
}

.tabs.pills .tab.is-active {
  background: var(--bg-card);
  color: var(--t-base);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: rise-in 320ms ease both;
}

/* ---- Accordion ---- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-base);
  text-align: left;
  transition: background 160ms;
}

.accordion-trigger:hover {
  background: var(--bg-hover);
}

.accordion-trigger .chev {
  width: 13px;
  height: 13px;
  transition: transform 240ms ease;
  color: var(--t-muted);
}

.accordion-trigger .chev svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.accordion-item.is-open .accordion-trigger .chev {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 13px;
  color: var(--t-muted);
  line-height: 1.6;
}

.accordion-body-inner {
  padding: 0 16px 14px;
}

.accordion-item.is-open .accordion-body {
  max-height: 400px;
}

/* ---- Modal (static demo) ---- */
.modal-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 480px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--t-base);
  letter-spacing: -0.012em;
}

.modal-body {
  padding: 18px 20px;
  font-size: 13.5px;
  color: var(--t-muted);
  line-height: 1.6;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
}

/* ---- Tooltip / Popover (static demo positioning) ---- */
.popover-demo {
  position: relative;
  display: inline-block;
}

.popover-demo .pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--t-base);
  color: var(--bg-card);
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.popover-demo .pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--t-base);
}

/* ---- Avatar group ---- */
.avatar-group {
  display: inline-flex;
  align-items: center;
}

.avatar-group .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  border: 2px solid var(--bg-card);
  margin-left: -8px;
  flex-shrink: 0;
}

.avatar-group .av:first-child {
  margin-left: 0;
}

.avatar-group .av.more {
  background: var(--bg-muted);
  color: var(--t-muted);
  font-size: 10.5px;
}

/* ---- Section heading helper ---- */
.section-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--t-base);
  letter-spacing: -0.012em;
  margin: 0 0 14px;
}

.section-h .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--t-light);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ============ AUTH PAGES ============ */
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--bg-body);
}

/* Responsive override for .auth-aside lives in _responsive.scss to win over
   the default rules below — see chat note for why. */
.auth-aside {
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -20%;
  width: 80%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.auth-brand .logo {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.auth-brand .logo svg {
  width: 20px;
  height: 20px;
}

.auth-brand .name {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.018em;
}

.auth-aside-body {
  margin-top: auto;
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.auth-aside-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
  display: block;
}

.auth-aside h1 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.auth-aside p {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0 0 24px;
}

.auth-quote {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.auth-quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.auth-quote-author .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}

.auth-aside-footer {
  margin-top: auto;
  padding-top: 24px;
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
}

.auth-main {
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  min-height: 100vh;
}

.auth-main-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-main-top .switch-link {
  font-size: 12.5px;
  color: var(--t-muted);
}

.auth-main-top .switch-link a {
  color: var(--primary);
  font-weight: 600;
  margin-left: 4px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 8px 0;
}

.auth-card h2 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.022em;
  color: var(--t-base);
  margin: 0 0 6px;
}

.auth-card .sub {
  font-size: 13.5px;
  color: var(--t-muted);
  margin: 0 0 24px;
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form .field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-form .field-row a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.auth-submit {
  margin-top: 4px;
}

.auth-submit.btn {
  padding: 11px 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--t-base);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 160ms, box-shadow 160ms, background 160ms;
}

.social-btn:hover {
  border-color: var(--t-light);
  box-shadow: var(--shadow-sm);
}

.social-btn svg {
  width: 14px;
  height: 14px;
}

.auth-main-bottom {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--t-light);
  text-align: center;
}

.auth-main-bottom a {
  color: var(--t-muted);
}

/* ============ ERROR PAGES (404 / 500) ============ */
.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--bg-body);
  position: relative;
  overflow: hidden;
}

.error-shell::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vmax;
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 10%, transparent), transparent 70%);
  pointer-events: none;
}

.error-shell::after {
  content: "";
  position: absolute;
  inset: auto auto -20% -10%;
  width: 60vmax;
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in oklab, var(--purple) 8%, transparent), transparent 70%);
  pointer-events: none;
}

.error-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 48px 56px;
  max-width: 540px;
  width: 100%;
  text-align: center;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (max-width: 600px) {
  .error-card {
    padding: 32px 24px;
  }
}
.error-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-light);
  margin-bottom: 14px;
  display: block;
}

.error-code {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: clamp(96px, 16vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.error-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.022em;
  color: var(--t-base);
  margin: 0 0 10px;
}

.error-sub {
  font-size: 14px;
  color: var(--t-muted);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  letter-spacing: 0.06em;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-meta strong {
  color: var(--t-muted);
  font-weight: 600;
}

/* ============ CHAT PAGE ============ */
.chat-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: calc(100vh - 220px);
  min-height: 560px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Responsive overrides for chat live in _responsive.scss so they win over
   the default rules below (Sass preserves source order, so a @media block
   placed before the default rules would be defeated by the same-specificity
   later rule). */
/* ---- Conversations rail ---- */
.chat-rail {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-card);
  min-width: 0;
}

.chat-rail-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-rail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-rail-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--t-base);
  letter-spacing: -0.012em;
}

.chat-rail-title .meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  font-weight: 500;
  margin-left: 8px;
  letter-spacing: 0.04em;
}

.chat-search {
  position: relative;
}

.chat-search input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
  font-size: 12.5px;
  color: var(--t-base);
  outline: 0;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}

.chat-search input::-moz-placeholder {
  color: var(--t-light);
}

.chat-search input::placeholder {
  color: var(--t-light);
}

.chat-search input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chat-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  stroke: var(--t-light);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.chat-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.chat-list-scroll::-webkit-scrollbar {
  width: 4px;
}

.chat-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.chat-conv {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 160ms ease;
  position: relative;
}

.chat-conv:hover {
  background: var(--bg-hover);
}

.chat-conv.is-active {
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.chat-conv-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  position: relative;
}

.chat-conv-avatar .presence {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-card);
}

.chat-conv-avatar .presence.away {
  background: var(--warning);
}

.chat-conv-avatar .presence.off {
  background: var(--t-light);
}

.chat-conv-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-conv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.chat-conv-name {
  font-size: 13px;
  color: var(--t-base);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.chat-conv-preview {
  font-size: 12px;
  color: var(--t-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv.is-unread .chat-conv-preview {
  color: var(--t-base);
  font-weight: 500;
}

.chat-conv.is-unread .chat-conv-time {
  color: var(--primary);
}

.chat-conv-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---- Conversation pane ---- */
.chat-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-width: 0;
  overflow: hidden;
}

.chat-pane-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
}

.chat-pane-head .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  position: relative;
}

.chat-pane-head .av .presence {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg-card);
}

.chat-pane-head .meta {
  line-height: 1.3;
  min-width: 0;
  flex: 1;
}

.chat-pane-head .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-base);
}

.chat-pane-head .status {
  font-size: 11.5px;
  color: var(--t-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-pane-head .status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.chat-pane-head-tools {
  display: flex;
  gap: 2px;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px;
  background: var(--bg-muted);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-thread::-webkit-scrollbar {
  width: 5px;
}

.chat-thread::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.chat-day-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  color: var(--t-light);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-day-sep::before,
.chat-day-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: min(75%, 600px);
}

.chat-msg.me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-msg-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 11.5px;
  flex-shrink: 0;
  align-self: flex-end;
}

.chat-msg-av.me {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.chat-msg-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chat-msg.me .chat-msg-stack {
  align-items: flex-end;
}

.chat-bub {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-top-left-radius: 4px;
  font-size: 13.5px;
  color: var(--t-base);
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
}

.chat-msg.me .chat-bub {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
}

.chat-msg-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  padding: 0 4px;
}

.chat-msg-meta .read {
  color: var(--primary);
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t-muted);
  margin-top: 4px;
}

.chat-typing-dots {
  display: inline-flex;
  gap: 3px;
}

.chat-typing-dots span {
  width: 4px;
  height: 4px;
  background: var(--t-light);
  border-radius: 50%;
  animation: typing 1.2s infinite ease-in-out;
}

.chat-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.chat-composer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.chat-composer-input {
  display: flex;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-muted);
  padding: 8px 10px;
  transition: border-color 180ms, box-shadow 180ms;
}

.chat-composer-input:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chat-composer-input textarea {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  font-size: 13.5px;
  color: var(--t-base);
  padding: 4px 4px;
  font-family: inherit;
  line-height: 1.5;
}

.chat-composer-input textarea::-moz-placeholder {
  color: var(--t-light);
}

.chat-composer-input textarea::placeholder {
  color: var(--t-light);
}

.chat-composer-tools {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.chat-composer-tools .tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--t-muted);
  transition: background 160ms, color 160ms;
}

.chat-composer-tools .tool:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.chat-composer-tools .tool svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.chat-composer-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 180ms;
  flex-shrink: 0;
}

.chat-composer-send:hover {
  background: var(--primary-dark);
}

.chat-composer-send svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============ DATA TABLE / RICH TABLE ============ */
.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.data-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}

.data-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-toolbar .input-icon {
  flex: 1;
  max-width: 320px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  text-align: left;
  padding: 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table thead th .sort {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  color: var(--t-light);
}

.data-table thead th.sorted-asc .sort,
.data-table thead th.sorted-desc .sort {
  color: var(--primary);
}

.data-table thead th.sorted-asc .sort svg {
  transform: rotate(180deg);
}

.data-table thead th .sort svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 160ms;
}

.data-table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--t-base);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 140ms;
}

.data-table tbody tr:hover td {
  background: var(--bg-hover);
}

.data-table tbody tr.is-selected td {
  background: var(--primary-soft);
}

.data-cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.data-cell-user .av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}

.data-cell-user-meta {
  line-height: 1.3;
  min-width: 0;
}

.data-cell-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t-base);
}

.data-cell-user-email {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--t-muted);
  letter-spacing: 0.02em;
}

.data-cell-mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--t-muted);
  letter-spacing: 0.02em;
}

.data-cell-actions {
  display: flex;
  gap: 2px;
}

.data-cell-actions .btn--icon {
  padding: 6px;
  background: transparent;
  border: 0;
  color: var(--t-muted);
  border-radius: 6px;
  transition: background 140ms, color 140ms;
}

.data-cell-actions .btn--icon:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.data-cell-actions .btn--icon svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.data-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--t-muted);
}

.data-foot-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.data-foot-info .select {
  width: auto;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
}

.pager {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pager-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-muted);
  transition: background 160ms, color 160ms;
}

.pager-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--t-base);
}

.pager-btn.is-active {
  background: var(--primary);
  color: #fff;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============ CHARTS PAGE ============ */
.chart-pad {
  position: relative;
  padding: 8px 0 4px;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 240px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--t-muted);
}

.chart-legend-item .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-meta-row {
  display: flex;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
  margin-top: 14px;
  flex-wrap: wrap;
}

.chart-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
}

.chart-meta-label {
  font-size: 10.5px;
  color: var(--t-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "JetBrains Mono", monospace;
}

.chart-meta-value {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--t-base);
}

.chart-meta-value.up {
  color: var(--success);
}

.chart-meta-value.down {
  color: var(--danger);
}

/* ============ DASHBOARD-SPECIFIC ============ */
/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-card);
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at top right, currentColor, transparent 65%);
  opacity: 0.08;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-card:hover::before {
  opacity: 0.14;
}

.kpi-card.c-success {
  color: var(--success);
}

.kpi-card.c-danger {
  color: var(--danger);
}

.kpi-card.c-purple {
  color: var(--purple);
}

.kpi-card.c-primary {
  color: var(--primary);
}

.kpi-card:nth-child(1) {
  animation-delay: 60ms;
}

.kpi-card:nth-child(2) {
  animation-delay: 120ms;
}

.kpi-card:nth-child(3) {
  animation-delay: 180ms;
}

.kpi-card:nth-child(4) {
  animation-delay: 240ms;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.kpi-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.kpi-icon.primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.kpi-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.kpi-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.kpi-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.kpi-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.kpi-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.kpi-label {
  font-size: 13px;
  color: var(--t-muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--t-base);
  position: relative;
}

.kpi-value sup {
  font-size: 17px;
  color: var(--t-muted);
  vertical-align: top;
  font-weight: 500;
  margin-left: 3px;
  line-height: 2.1;
}

.kpi-compare {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--t-light);
  font-weight: 500;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
  margin-top: auto;
}

.kpi-compare strong {
  color: var(--t-base);
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

.kpi-compare svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  flex-shrink: 0;
}

.kpi-compare .up {
  color: var(--success);
}

.kpi-compare .down {
  color: var(--danger);
}

.kpi-compare .flat {
  color: var(--purple);
}

.kpi-compare .info {
  color: var(--info);
}

.kpi-compare .sep {
  color: var(--t-light);
  opacity: 0.45;
  font-weight: 400;
}

.kpi-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.kpi-pill.up {
  background: var(--success-soft);
  color: var(--success);
}

.kpi-pill.down {
  background: var(--danger-soft);
  color: var(--danger);
}

.kpi-pill.flat {
  background: var(--purple-soft);
  color: var(--purple);
}

.kpi-pill.info {
  background: var(--info-soft);
  color: var(--info);
}

.kpi-pill svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Site Visits regional + radials */
.sv-regions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}

.sv-region {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.sv-region-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--t-muted);
  font-weight: 500;
}

.sv-region-head .marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sv-region-value {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--t-base);
  letter-spacing: -0.03em;
  line-height: 1.05;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sv-region-value .pct {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--t-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sv-region-bar {
  height: 3px;
  background: var(--bg-muted);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.sv-region-bar-fill {
  height: 100%;
  border-radius: 99px;
  transform-origin: left;
  animation: bar-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms both;
}

.sv-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 28px 0;
}

.sv-radials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.sv-radial {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
}

.sv-radial-chart {
  width: 72px;
  height: 72px;
  position: relative;
  flex-shrink: 0;
}

.sv-radial-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-track {
  stroke: var(--bg-muted);
  stroke-width: 5;
  fill: none;
}

.radial-fill {
  stroke-width: 5;
  fill: none;
  stroke-linecap: round;
}

.radial-fill.danger {
  stroke: var(--danger);
}

.radial-fill.info {
  stroke: var(--info);
}

.radial-fill.warning {
  stroke: var(--warning);
}

.sv-radial-chart .pct {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--t-base);
  letter-spacing: -0.022em;
}

.sv-radial-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sv-radial-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--t-base);
  letter-spacing: -0.005em;
}

.sv-radial-caption {
  font-size: 11.5px;
  color: var(--t-muted);
}

/* Monthly chart */
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-svg .grid-line {
  stroke: var(--border-soft);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-svg .axis-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  fill: var(--t-light);
  letter-spacing: 0.04em;
}

.chart-svg .area {
  fill: url("#chartGrad");
}

.chart-svg .line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 1400ms cubic-bezier(0.55, 0.15, 0.2, 1) 400ms forwards;
}

.chart-svg .dot-peak {
  fill: var(--primary);
  stroke: var(--bg-card);
  stroke-width: 3;
  opacity: 0;
  animation: fade-in 600ms ease 1400ms forwards;
}

.monthly-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  margin-top: 18px;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-cell-label {
  font-size: 11px;
  color: var(--t-muted);
  font-weight: 500;
}

.stat-cell-value {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.022em;
  color: var(--t-base);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-cell-value .trend-ic {
  width: 11px;
  height: 11px;
  color: var(--success);
  flex-shrink: 0;
}

/* Todo list */
.todo-list {
  display: flex;
  flex-direction: column;
}

.todo-item {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.todo-item:last-child {
  border-bottom: 0;
}

.todo-check {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--t-light);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 160ms ease;
  background: transparent;
}

.todo-check:hover {
  border-color: var(--primary);
}

.todo-check:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.todo-check:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.todo-item.is-done .todo-text {
  color: var(--t-light);
  -webkit-text-decoration: line-through;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.todo-text {
  font-size: 13.5px;
  color: var(--t-base);
  cursor: pointer;
}

.todo-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.todo-badge.low {
  background: var(--bg-muted);
  color: var(--t-muted);
}

.todo-badge.upcoming {
  background: var(--info-soft);
  color: var(--info);
}

.todo-badge.urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.todo-badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}

.todo-badge.done {
  background: var(--success-soft);
  color: var(--success);
}

/* Sales report */
.sales-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 0 20px;
  margin-bottom: 4px;
}

.sales-summary-label .eyebrow {
  display: block;
  margin-bottom: 4px;
}

.sales-summary h4 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--t-base);
  margin: 0;
}

.sales-summary-total {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--t-base);
  line-height: 1;
}

.sales-summary-total sup {
  font-size: 15px;
  color: var(--t-muted);
  vertical-align: top;
  font-weight: 500;
  margin-right: 1px;
  line-height: 2;
}

.sales-all {
  padding: 18px 0 0;
  text-align: center;
  margin-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.sales-all a {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 180ms;
}

.sales-all a:hover {
  color: var(--primary-dark);
}

.sales-all svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Weather */
.wx-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 0;
}

.wx-temp-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wx-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--info-soft), var(--primary-soft));
  color: var(--info);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wx-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 1.3;
  fill: none;
}

.wx-temp {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--t-base);
}

.wx-temp sup {
  font-size: 18px;
  color: var(--t-muted);
  vertical-align: top;
  font-weight: 500;
  line-height: 1.6;
}

.wx-condition {
  margin-top: 4px;
  color: var(--t-muted);
  font-size: 13px;
}

.wx-condition strong {
  color: var(--t-base);
  font-weight: 600;
}

.wx-date {
  text-align: right;
}

.wx-date h5 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--t-base);
  margin: 0 0 2px;
  letter-spacing: -0.02em;
}

.wx-date p {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  letter-spacing: 0.06em;
  margin: 0;
}

.wx-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0 16px;
}

.wx-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wx-stat-label {
  font-size: 11px;
  color: var(--t-muted);
  font-weight: 500;
}

.wx-stat-value {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--t-base);
  letter-spacing: -0.018em;
}

.wx-stat-value .unit {
  font-size: 11px;
  color: var(--t-light);
  margin-left: 3px;
  font-weight: 500;
  letter-spacing: 0;
}

.wx-forecast {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.wx-day {
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 160ms ease;
}

.wx-day:hover {
  background: var(--bg-hover);
}

.wx-day.is-today {
  background: var(--primary);
  color: #fff;
}

.wx-day-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t-muted);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.wx-day.is-today .wx-day-name {
  color: rgba(255, 255, 255, 0.85);
}

.wx-day-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto 6px;
  color: var(--t-muted);
}

.wx-day-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.wx-day.is-today .wx-day-icon {
  color: #fff;
}

.wx-day-temp {
  font-size: 12.5px;
  color: var(--t-base);
  font-weight: 600;
}

.wx-day.is-today .wx-day-temp {
  color: #fff;
}

/* Quick chat */
.chat-frame {
  margin: -6px -6px 0;
  border-radius: 12px;
  background: var(--bg-muted);
  overflow: hidden;
}

.chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.chat-row {
  display: flex;
  gap: 10px;
  max-width: min(85%, 560px);
}

.chat-row.me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--t-base);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 11.5px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.chat-avatar.me {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  border: 0;
}

.chat-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.chat-row.me .chat-stack {
  align-items: flex-end;
}

.chat-bubble {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-top-left-radius: 4px;
  font-size: 13px;
  color: var(--t-base);
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}

.chat-row.me .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
}

.chat-ts {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  padding: 0 4px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13.5px;
  color: var(--t-base);
  padding: 4px 0;
}

.chat-input::-moz-placeholder {
  color: var(--t-light);
}

.chat-input::placeholder {
  color: var(--t-light);
}

.chat-send {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  transition: background 180ms;
  flex-shrink: 0;
  box-shadow: 0 2px 6px -1px color-mix(in oklab, var(--primary) 40%, transparent);
}

.chat-send:hover {
  background: var(--primary-dark);
}

.chat-send svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============ EMAIL — 3-pane layout ============ */
.mail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 20px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.mail-hero .hero-title {
  font-size: clamp(24px, 2.4vw, 28px);
  margin-bottom: 6px;
}

.mail-hero .hero-sub {
  font-size: 13.5px;
}

.mail-shell {
  display: grid;
  grid-template-columns: 220px minmax(320px, 1fr) minmax(0, 1.4fr);
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  height: calc(100vh - 240px);
  min-height: 560px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: 80ms;
}

/* ---- Folder rail ---- */
.mail-rail {
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-card);
  overflow-y: auto;
  gap: 18px;
}

.mail-rail::-webkit-scrollbar {
  width: 4px;
}

.mail-rail::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.mail-compose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px -1px var(--primary-ring);
  transition: background 180ms;
}

.mail-compose:hover {
  background: var(--primary-dark);
}

.mail-compose svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mail-rail-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mail-rail-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-light);
  padding: 0 10px 8px;
}

.mail-folder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--t-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
  cursor: pointer;
}

.mail-folder svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  flex-shrink: 0;
}

.mail-folder:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.mail-folder.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.mail-folder-name {
  flex: 1;
  min-width: 0;
}

.mail-folder-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  font-weight: 500;
}

.mail-folder.is-active .mail-folder-count {
  color: var(--primary);
}

.mail-folder-count.is-strong {
  background: var(--primary);
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
}

.mail-folder.is-active .mail-folder-count.is-strong {
  background: var(--primary);
  color: #fff;
}

.mail-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mail-rail-storage {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--border-soft);
}

.mail-storage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--t-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.mail-storage-head .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  letter-spacing: 0.04em;
}

.mail-storage-bar {
  height: 4px;
  background: var(--bg-muted);
  border-radius: 99px;
  overflow: hidden;
}

.mail-storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 99px;
  animation: bar-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms both;
  transform-origin: left;
}

.mail-storage-foot {
  font-size: 11px;
  color: var(--t-light);
  margin-top: 6px;
}

.mail-storage-foot a {
  color: var(--primary);
  font-weight: 600;
}

/* ---- Message list ---- */
.mail-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-card);
  min-width: 0;
  overflow: hidden;
}

.mail-list-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mail-list-toptools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mail-list-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--t-base);
  letter-spacing: -0.018em;
}

.mail-list-title .meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  font-weight: 500;
  margin-left: 8px;
  letter-spacing: 0.04em;
}

.mail-list-tools {
  display: flex;
  gap: 2px;
}

.mail-tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--t-muted);
  transition: background 160ms, color 160ms;
}

.mail-tool:hover {
  background: var(--bg-hover);
  color: var(--t-base);
}

.mail-tool svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.mail-search {
  position: relative;
}

.mail-search input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
  font-size: 12.5px;
  color: var(--t-base);
  outline: 0;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}

.mail-search input::-moz-placeholder {
  color: var(--t-light);
}

.mail-search input::placeholder {
  color: var(--t-light);
}

.mail-search input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.mail-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  stroke: var(--t-light);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.mail-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.mail-tab {
  padding: 10px 4px;
  margin-right: 14px;
  font-size: 12px;
  color: var(--t-muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 160ms, border-color 160ms;
  position: relative;
  top: 1px;
}

.mail-tab:hover {
  color: var(--t-base);
}

.mail-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.mail-tab .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  margin-left: 4px;
  letter-spacing: 0.04em;
}

.mail-tab.is-active .num {
  color: var(--primary);
}

.mail-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.mail-list-scroll::-webkit-scrollbar {
  width: 4px;
}

.mail-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.mail-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 160ms ease;
  position: relative;
}

.mail-row:hover {
  background: var(--bg-hover);
}

.mail-row.is-active {
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.mail-row.is-unread::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.mail-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.ma-1 {
  background: linear-gradient(135deg, var(--primary), var(--purple));
}

.ma-2 {
  background: linear-gradient(135deg, var(--success), var(--teal));
}

.ma-3 {
  background: linear-gradient(135deg, var(--danger), var(--warning));
}

.ma-4 {
  background: linear-gradient(135deg, var(--info), var(--primary-light));
}

.ma-5 {
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

.ma-6 {
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.mail-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mail-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mail-row-from {
  font-size: 13px;
  color: var(--t-base);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mail-row.is-unread .mail-row-from {
  font-weight: 700;
}

.mail-row-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.mail-row.is-unread .mail-row-time {
  color: var(--primary);
}

.mail-row-subject {
  font-size: 12.5px;
  color: var(--t-base);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-row.is-unread .mail-row-subject {
  font-weight: 600;
}

.mail-row-preview {
  font-size: 12px;
  color: var(--t-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-row-tags {
  display: flex;
  gap: 5px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.mail-tag {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.mail-tag.work {
  background: var(--primary-soft);
  color: var(--primary);
}

.mail-tag.team {
  background: var(--success-soft);
  color: var(--success);
}

.mail-tag.finance {
  background: var(--purple-soft);
  color: var(--purple);
}

.mail-tag.invoice {
  background: var(--warning-soft);
  color: var(--warning);
}

.mail-tag.travel {
  background: var(--info-soft);
  color: var(--info);
}

.mail-tag.attach {
  background: var(--bg-muted);
  color: var(--t-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mail-tag.attach svg {
  width: 9px;
  height: 9px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

.mail-star {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: var(--t-light);
  cursor: pointer;
  transition: color 160ms;
}

.mail-star svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.mail-star:hover {
  color: var(--warning);
}

.mail-star.is-on {
  color: var(--warning);
}

.mail-star.is-on svg {
  fill: var(--warning);
}

/* ---- Reader pane ---- */
.mail-reader {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-width: 0;
  overflow: hidden;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border-soft);
  gap: 10px;
}

.reader-tools-group {
  display: flex;
  gap: 2px;
  align-items: center;
}

.reader-tools-group .sep {
  width: 1px;
  height: 18px;
  background: var(--border-soft);
  margin: 0 6px;
}

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 28px;
}

.reader-scroll::-webkit-scrollbar {
  width: 5px;
}

.reader-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.reader-head {
  margin-bottom: 18px;
}

.reader-subject {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.022em;
  color: var(--t-base);
  margin: 0 0 10px;
}

.reader-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.reader-meta-row .mail-tag {
  font-size: 10px;
  padding: 3px 8px;
}

.reader-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}

.reader-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}

.reader-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.reader-from-block {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.reader-from-name {
  font-size: 13.5px;
  color: var(--t-base);
  font-weight: 600;
}

.reader-from-email {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--t-muted);
  letter-spacing: 0.02em;
}

.reader-from-meta {
  font-size: 11.5px;
  color: var(--t-light);
  margin-top: 4px;
}

.reader-time-block {
  text-align: right;
  font-size: 11.5px;
  color: var(--t-muted);
  flex-shrink: 0;
}

.reader-time-block .mono {
  font-family: "JetBrains Mono", monospace;
  color: var(--t-light);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 2px;
}

.reader-actions {
  display: flex;
  gap: 4px;
  margin-left: 4px;
}

.reader-body {
  padding: 18px 16px;
  font-size: 13.5px;
  color: var(--t-base);
  line-height: 1.65;
  background: var(--bg-card);
}

.reader-body p {
  margin: 0 0 12px;
}

.reader-body p:last-child {
  margin-bottom: 0;
}

.reader-body strong {
  color: var(--t-base);
  font-weight: 600;
}

.reader-body a {
  color: var(--primary);
  font-weight: 500;
}

.reader-body ul {
  margin: 0 0 12px;
  padding-left: 18px;
  list-style: disc;
}

.reader-body li {
  margin: 4px 0;
}

.reader-quote {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-left: 2px solid var(--border);
  background: var(--bg-muted);
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--t-muted);
}

.reader-attach {
  padding: 14px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.reader-attach-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--t-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.reader-attach-head svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.reader-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.reader-attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--bg-card);
  transition: border-color 160ms, box-shadow 160ms, transform 160ms;
  cursor: pointer;
}

.reader-attach-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.attach-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.attach-ico.pdf {
  background: var(--danger);
}

.attach-ico.doc {
  background: var(--primary);
}

.attach-ico.xls {
  background: var(--success);
}

.attach-ico.img {
  background: var(--purple);
}

.attach-ico.zip {
  background: var(--orange);
}

.attach-meta {
  line-height: 1.3;
  min-width: 0;
}

.attach-name {
  font-size: 12.5px;
  color: var(--t-base);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attach-size {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
}

.reader-collapsed {
  padding: 12px 16px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 160ms;
}

.reader-collapsed:hover {
  background: var(--bg-hover);
}

.reader-collapsed .reader-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.reader-collapsed-from {
  font-size: 12.5px;
  color: var(--t-base);
  font-weight: 600;
}

.reader-collapsed-preview {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--t-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-collapsed-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
}

.reader-replybar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  margin-top: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-muted);
}

.reader-replybar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
  color: var(--t-base);
  padding: 4px 6px;
}

.reader-replybar input::-moz-placeholder {
  color: var(--t-light);
}

.reader-replybar input::placeholder {
  color: var(--t-light);
}

.reader-replybar .reply-send {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  transition: background 180ms;
  flex-shrink: 0;
}

.reader-replybar .reply-send:hover {
  background: var(--primary-dark);
}

.reader-replybar .reply-send svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============ CALENDAR ============ */
.cal-hero {
  margin-bottom: 20px;
}

.cal-hero .hero-title {
  font-size: clamp(24px, 2.4vw, 28px);
  margin-bottom: 6px;
}

.cal-hero .hero-sub {
  font-size: 13.5px;
}

.cal-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  animation: rise-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: 80ms;
}

/* ---- Left rail ---- */
.cal-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.cal-quickadd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px -1px var(--primary-ring);
  transition: background 180ms;
}

.cal-quickadd:hover {
  background: var(--primary-dark);
}

.cal-quickadd svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cal-rail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cal-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cal-rail-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--t-base);
  letter-spacing: -0.01em;
}

.cal-rail-tools {
  display: flex;
  gap: 2px;
}

/* Mini calendar */
.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.mini-cal-wd {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--t-light);
  text-align: center;
  padding: 4px 0 6px;
  letter-spacing: 0.06em;
}

.mini-cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: var(--t-base);
  border-radius: 7px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  position: relative;
}

.mini-cal-day:hover {
  background: var(--bg-hover);
}

.mini-cal-day.is-other {
  color: var(--t-light);
}

.mini-cal-day.is-today {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.mini-cal-day.has-event::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.mini-cal-day.is-today.has-event::after {
  background: #fff;
}

/* My calendars */
.cal-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 140ms ease;
}

.cal-list-item:hover {
  background: var(--bg-hover);
}

.cal-list-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  border: 1.5px solid currentColor;
  background: currentColor;
}

.cal-list-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.cal-list-check.is-off {
  background: transparent;
}

.cal-list-check.is-off::after {
  display: none;
}

.cal-list-name {
  font-size: 12.5px;
  color: var(--t-base);
  flex: 1;
  min-width: 0;
}

.cal-list-item.is-off .cal-list-name {
  color: var(--t-light);
}

.cal-list-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
}

/* Upcoming list */
.upc-list {
  display: flex;
  flex-direction: column;
}

.upc-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border-soft);
  align-items: center;
}

.upc-item:first-child {
  border-top: 0;
  padding-top: 4px;
}

.upc-date {
  text-align: center;
  line-height: 1.05;
  padding: 6px 0;
  border-radius: 8px;
  background: var(--bg-muted);
}

.upc-date .day {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--t-base);
  letter-spacing: -0.022em;
}

.upc-date .mo {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--t-light);
  letter-spacing: 0.08em;
  margin-top: 2px;
  display: block;
  text-transform: uppercase;
}

.upc-date.is-today {
  background: var(--primary-soft);
}

.upc-date.is-today .day {
  color: var(--primary);
}

.upc-date.is-today .mo {
  color: var(--primary);
}

.upc-meta {
  min-width: 0;
  line-height: 1.35;
}

.upc-title {
  font-size: 13px;
  color: var(--t-base);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upc-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--t-muted);
  margin-top: 3px;
}

.upc-time .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.upc-time .mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--t-light);
}

/* ---- Main calendar ---- */
.cal-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cal-month {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--t-base);
  letter-spacing: -0.022em;
  line-height: 1;
  white-space: nowrap;
}

.cal-month .yr {
  color: var(--t-light);
  font-weight: 500;
  margin-left: 4px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-nav-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--t-muted);
  transition: background 160ms, color 160ms;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.cal-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--t-base);
  border-color: var(--t-light);
}

.cal-nav-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.cal-today-btn {
  padding: 0 12px;
  height: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-base);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  transition: border-color 160ms, background 160ms;
}

.cal-today-btn:hover {
  background: var(--bg-hover);
  border-color: var(--t-light);
}

.cal-views {
  display: flex;
  background: var(--bg-muted);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.cal-view-tab {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-muted);
  border-radius: 6px;
  transition: background 160ms, color 160ms, box-shadow 160ms;
}

.cal-view-tab:hover {
  color: var(--t-base);
}

.cal-view-tab.is-active {
  background: var(--bg-card);
  color: var(--t-base);
  box-shadow: var(--shadow-sm);
}

.cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Weekday header row */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.cal-weekdays > div {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
  padding: 10px 12px;
  text-align: left;
}

/* Month grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(110px, 1fr);
  flex: 1;
}

.cal-cell {
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 8px 6px;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 160ms ease;
}

.cal-cell:hover {
  background: var(--bg-hover);
}

.cal-cell:nth-child(7n) {
  border-right: 0;
}

.cal-grid > .cal-cell:nth-last-child(-n+7) {
  border-bottom: 0;
}

.cal-cell.is-other {
  background: var(--bg-muted);
}

.cal-cell.is-other:hover {
  background: var(--bg-hover);
}

.cal-day-num {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--t-base);
  line-height: 1;
  align-self: flex-start;
  padding: 2px 4px;
  border-radius: 6px;
  margin-bottom: 2px;
}

.cal-cell.is-other .cal-day-num {
  color: var(--t-light);
  font-weight: 500;
}

.cal-cell.is-today .cal-day-num {
  background: var(--primary);
  color: #fff;
  min-width: 22px;
  text-align: center;
  padding: 4px 6px;
}

.cal-cell.is-weekend:not(.is-today):not(.is-other) .cal-day-num {
  color: var(--t-muted);
}

.cal-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cal-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: filter 160ms ease, transform 140ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  border-left: 2px solid transparent;
}

.cal-chip:hover {
  transform: translateX(1px);
}

.cal-chip-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.cal-chip-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip.work {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}

.cal-chip.team {
  background: var(--success-soft);
  color: var(--success);
  border-left-color: var(--success);
}

.cal-chip.personal {
  background: var(--purple-soft);
  color: var(--purple);
  border-left-color: var(--purple);
}

.cal-chip.travel {
  background: var(--info-soft);
  color: var(--info);
  border-left-color: var(--info);
}

.cal-chip.finance {
  background: var(--warning-soft);
  color: var(--warning);
  border-left-color: var(--warning);
}

.cal-chip.birthday {
  background: var(--pink-soft);
  color: var(--pink);
  border-left-color: var(--pink);
}

.cal-chip.holiday {
  background: var(--orange-soft);
  color: var(--orange);
  border-left-color: var(--orange);
}

.cal-chip.solid {
  color: #fff;
}

.cal-chip.solid.work {
  background: var(--primary);
  border-left-color: var(--primary-dark);
}

.cal-chip.solid.team {
  background: var(--success);
  border-left-color: var(--success);
}

.cal-chip.solid.personal {
  background: var(--purple);
  border-left-color: var(--purple);
}

.cal-chip-more {
  padding: 3px 7px;
  font-size: 10.5px;
  color: var(--t-muted);
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms;
}

.cal-chip-more:hover {
  color: var(--primary);
}

/* ============ FULLCALENDAR — 2026 OVERRIDES ============ */
/* Map FC's CSS variables to our tokens so all chrome inherits the theme. */
[data-fc] {
  --fc-border-color: var(--border-soft);
  --fc-page-bg-color: var(--bg-card);
  --fc-neutral-bg-color: var(--bg-muted);
  --fc-neutral-text-color: var(--t-muted);
  --fc-today-bg-color: color-mix(in oklab, var(--primary) 10%, transparent);
  --fc-now-indicator-color: var(--danger);
  --fc-event-bg-color: var(--primary);
  --fc-event-border-color: var(--primary);
  --fc-event-text-color: #fff;
  --fc-event-selected-overlay-color: rgb(15 23 42 / 0.06);
  --fc-list-event-hover-bg-color: var(--bg-hover);
  --fc-highlight-color: color-mix(in oklab, var(--primary) 16%, transparent);
  font-family: "Inter",system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans, sans-serif;
  height: 100%;
}

/* Day-grid header row (S M T W T F S) */
.fc .fc-col-header-cell-cushion {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-light);
  font-weight: 500;
  padding: 10px 0;
}

.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--border-soft);
}

/* Day numbers in month grid */
.fc .fc-daygrid-day-number {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--t-base);
  padding: 6px 8px;
}

.fc .fc-day-other .fc-daygrid-day-number {
  color: var(--t-light);
  font-weight: 500;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  margin: 4px;
  padding: 3px 7px;
  min-width: 22px;
  text-align: center;
}

.fc .fc-day-today {
  background: transparent;
}

.fc .fc-daygrid-day-frame {
  padding: 2px 4px;
}

/* Events — base chip */
.fc .fc-daygrid-event,
.fc .fc-timegrid-event {
  border-radius: 5px;
  border: 0;
  border-left: 2px solid transparent;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  margin: 1px 4px;
  line-height: 1.3;
  cursor: pointer;
  transition: transform 140ms ease, filter 160ms ease;
}

.fc .fc-daygrid-event:hover {
  transform: translateX(1px);
}

.fc .fc-daygrid-event-dot {
  display: none;
}

.fc .fc-event-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 600;
  margin-right: 4px;
  opacity: 0.85;
}

/* Category colors via classNames — match dashboard cal-chip variants */
.fc .fc-event.fc-cat-work {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}

.fc .fc-event.fc-cat-team {
  background: var(--success-soft);
  color: var(--success);
  border-left-color: var(--success);
}

.fc .fc-event.fc-cat-personal {
  background: var(--purple-soft);
  color: var(--purple);
  border-left-color: var(--purple);
}

.fc .fc-event.fc-cat-travel {
  background: var(--info-soft);
  color: var(--info);
  border-left-color: var(--info);
}

.fc .fc-event.fc-cat-finance {
  background: var(--warning-soft);
  color: var(--warning);
  border-left-color: var(--warning);
}

.fc .fc-event.fc-cat-birthday {
  background: var(--pink-soft);
  color: var(--pink);
  border-left-color: var(--pink);
}

.fc .fc-event.fc-cat-travel .fc-event-time,
.fc .fc-event.fc-cat-team .fc-event-time,
.fc .fc-event.fc-cat-work .fc-event-time {
  color: inherit;
}

/* "more" link */
.fc .fc-daygrid-more-link {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--t-muted);
  padding: 2px 6px;
}

.fc .fc-daygrid-more-link:hover {
  color: var(--primary);
}

/* Time-grid axis */
.fc .fc-timegrid-axis-cushion,
.fc .fc-timegrid-slot-label-cushion {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
}

.fc .fc-timegrid-now-indicator-line {
  border-color: var(--danger);
  border-width: 1.5px;
}

.fc .fc-timegrid-now-indicator-arrow {
  border-color: var(--danger);
}

/* List view */
.fc .fc-list-day-cushion {
  background: var(--bg-muted);
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  color: var(--t-base);
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 13px;
}

.fc .fc-list-event-time,
.fc .fc-list-event-title {
  font-size: 13px;
  color: var(--t-base);
}

.fc .fc-list-event-dot {
  border-color: var(--primary);
}

.fc .fc-list-empty {
  background: var(--bg-card);
  color: var(--t-muted);
}

/* ============ COMMAND PALETTE (⌘K) ============ */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  animation: palette-fade 160ms ease both;
}

body.has-palette-open .palette-backdrop {
  display: flex;
}

@keyframes palette-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.palette-modal {
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: palette-rise 200ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes palette-rise {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.palette-icon {
  width: 18px;
  height: 18px;
  color: var(--t-muted);
  flex-shrink: 0;
}

.palette-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
  color: var(--t-base);
  font-family: inherit;
  padding: 4px 0;
  min-width: 0;
}

.palette-input::-moz-placeholder {
  color: var(--t-light);
}

.palette-input::placeholder {
  color: var(--t-light);
}

.palette-esc {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--bg-muted);
  color: var(--t-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.palette-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.palette-results::-webkit-scrollbar {
  width: 4px;
}

.palette-results::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.palette-result {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
}

.palette-result:hover {
  background: var(--bg-hover);
}

.palette-result.is-selected {
  background: var(--primary-soft);
  color: var(--primary);
}

.palette-result-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--bg-muted);
  color: var(--t-muted);
  flex-shrink: 0;
}

.palette-result.is-selected .palette-result-icon {
  background: color-mix(in oklab, var(--primary) 14%, transparent);
  color: var(--primary);
}

.palette-result-icon svg {
  width: 14px;
  height: 14px;
}

.palette-result-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--t-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.palette-result.is-selected .palette-result-label {
  color: var(--primary);
  font-weight: 600;
}

.palette-result-section {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--t-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.palette-result.is-selected .palette-result-section {
  color: var(--primary);
  opacity: 0.8;
}

.palette-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--t-muted);
  font-size: 13px;
}

.palette-foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
  font-size: 11px;
  color: var(--t-muted);
}

.palette-foot kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--t-muted);
  border: 1px solid var(--border);
  margin-right: 4px;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .palette-backdrop {
    padding-top: 6vh;
  }
  .palette-foot {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 10px;
  }
}
/* ============ RESPONSIVE ============ */
/* Auth pages: collapse the marketing aside when the split-screen no longer fits.
   (Lives here, not in _auth.scss, so it wins over the later default rules there.) */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
}
@media (max-width: 1200px) {
  /* Dashboard */
  .sv-regions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
  .sv-radials {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Email */
  .mail-shell {
    grid-template-columns: 200px 1fr;
    height: auto;
    min-height: 0;
  }
  .mail-reader {
    display: none;
  }
  /* Calendar */
  .cal-shell {
    grid-template-columns: 240px 1fr;
  }
  .cal-grid {
    grid-auto-rows: minmax(96px, 1fr);
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 72px 1fr;
  }
  .d-sidebar {
    padding: 20px 10px;
    overflow-y: auto; /* allow scroll on short viewports (e.g. 750×590) */
    overflow-x: hidden;
    z-index: 20;
  }
  .brand-text, .brand-tag, .nav-label, .nav-link > span:not(.nav-badge), .nav-link .nav-badge,
  .workspace-text, .workspace-chev, .nav-link .chev {
    display: none;
  }
  .brand {
    justify-content: center;
    padding: 0 0 18px;
  }
  .nav-link {
    justify-content: center;
    padding: 10px;
  }
  .nav-link.is-active::before {
    left: -10px;
  }
  .workspace {
    justify-content: center;
    padding: 6px;
  }
  .col-6 {
    grid-column: span 12;
  }
  /* Rail-mode flyout submenu: positioned via JS as position:fixed so the
     sidebar can scroll (overflow-y: auto above) without clipping the flyout,
     and so it can be shifted up to fit when opened near the viewport bottom. */
  .nav-submenu {
    position: fixed;
    left: 82px; /* fallback; JS overwrites with trigger's getBoundingClientRect */
    top: 0;
    width: 200px;
    max-height: 0;
    margin-left: 0;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    z-index: 50;
    transition: opacity 180ms ease, visibility 180ms;
  }
  .nav-submenu::before {
    display: none;
  }
  .nav-item-group.is-open .nav-submenu {
    max-height: 400px;
    padding: 6px 0;
    opacity: 1;
    visibility: visible;
  }
  .nav-submenu a {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
    margin: 0 6px;
  }
  .nav-submenu a:hover {
    padding-left: 14px;
  }
  /* Chat */
  .chat-shell {
    grid-template-columns: 240px 1fr;
  }
}
@media (max-width: 720px) {
  /* ---- Shell / sidebar drawer ----
     Sidebar becomes position:fixed (off-grid), so collapse the grid to a
     single column — otherwise .main is auto-placed into the empty column-1
     (0px) and disappears. */
  .shell {
    display: block;
  }
  .d-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 100; /* above backdrop (90) */
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.4);
    /* Restore full-width nav (override the 1100px collapse) */
    padding: 22px 16px 18px;
    overflow-y: auto; /* override 1100px rail-mode 'visible' so long menus scroll */
    overscroll-behavior: contain;
  }
  .brand-text, .brand-tag, .nav-label, .nav-link > span:not(.nav-badge), .nav-link .nav-badge,
  .workspace-text, .workspace-chev, .nav-submenu, .nav-link .chev {
    display: revert;
  }
  .brand {
    justify-content: flex-start;
    padding: 4px 10px 20px;
  }
  .nav-link {
    justify-content: flex-start;
    padding: 9px 12px;
  }
  .workspace {
    justify-content: flex-start;
    padding: 6px 10px;
  }
  /* Revert rail-mode flyout submenu back to inline-accordion (desktop) behavior.
     Without this, the absolute-positioned flyout from the 1100px block leaks
     into mobile and the submenu pops out as a floating card next to the drawer. */
  .nav-item-group {
    position: static;
  }
  .nav-submenu {
    position: static;
    left: auto;
    top: auto;
    width: auto;
    margin-left: 20px;
    padding: 0 0 0 14px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    transition: max-height 280ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-submenu::before {
    display: block;
  }
  .nav-item-group.is-open .nav-submenu {
    max-height: 400px;
    padding: 4px 0 6px 14px;
    opacity: 1;
    visibility: visible;
  }
  .nav-submenu a {
    margin: 0;
    padding: 7px 10px;
    font-size: 12.5px;
    border-radius: 6px;
  }
  .nav-submenu a:hover {
    padding-left: 13px;
  }
  body.has-drawer-open .d-sidebar {
    transform: translateX(0);
  }
  body.has-drawer-open {
    overflow: hidden;
  } /* lock scroll behind backdrop */
  .hamburger {
    display: inline-flex;
  }
  /* ---- Topbar: aggressive de-clutter ---- */
  .d-topbar {
    padding: 0 12px;
  }
  .topbar-actions {
    gap: 2px;
  }
  /* Crumbs eat horizontal space — hide everything except the active page */
  .crumbs {
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  .crumbs > span:not(.current), .crumbs .sep {
    display: none;
  }
  .crumbs .current {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Search becomes its own icon-button (text + kbd hidden, padding tightened) */
  .cmd {
    min-width: 0;
    padding: 0;
    width: 36px;
    height: 36px;
    justify-content: center;
  }
  .cmd span, .cmd .kbd {
    display: none;
  }
  .cmd svg {
    width: 16px;
    height: 16px;
  }
  /* Trim avatar margin */
  .avatar {
    margin-left: 2px;
  }
  /* ---- Dropdowns: prevent off-screen overflow ---- */
  .dd-menu {
    min-width: 0;
    width: calc(100vw - 16px);
    max-width: 360px;
    right: -8px; /* pin to viewport edge minus topbar padding (12px) */
  }
  .dd-menu.dd-profile {
    width: calc(100vw - 16px);
    max-width: 280px;
  }
  /* ---- Content / hero / footer ---- */
  .content {
    padding: 20px 16px 16px;
  }
  .d-footer {
    padding: 20px 16px;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
  /* ---- Generic grid ---- */
  .grid {
    gap: 16px;
  }
  /* ---- Dashboard ---- */
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .sv-regions {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .monthly-footer {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .wx-forecast {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .wx-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .wx-date {
    text-align: left;
  }
  .sales-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  /* Card breathing room */
  .card {
    padding: 18px;
  }
  .card-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  /* ---- Charts page ---- */
  .chart-canvas-wrap {
    min-height: 200px;
  }
  /* ---- Tables: ensure horizontal scroll fallback ---- */
  .data-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .data-toolbar-left, .data-toolbar-right {
    min-width: 0;
    flex-wrap: wrap;
  }
  .data-foot {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  /* ---- Email ---- */
  .mail-shell {
    grid-template-columns: 1fr;
  }
  .mail-rail {
    display: none;
  }
  .mail-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  /* ---- Chat ---- */
  .chat-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-rail {
    display: none;
  }
  /* ---- Calendar ---- */
  .cal-shell {
    grid-template-columns: 1fr;
  }
  .cal-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }
  .cal-toolbar-left {
    width: 100%;
    justify-content: space-between;
  }
  .cal-views {
    order: 3;
  }
  .cal-grid {
    grid-auto-rows: minmax(78px, 1fr);
  }
  .cal-weekdays > div {
    padding: 8px 6px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .cal-cell {
    padding: 5px;
  }
  .cal-chip-time {
    display: none;
  }
  /* ---- Compose page (inline-styled form rows) ---- */
  .compose-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .compose-row-actions {
    justify-content: flex-start !important;
  }
  /* ---- Auth pages ---- */
  .auth-main {
    padding: 24px 20px;
  }
}
@media (max-width: 480px) {
  .monthly-footer {
    grid-template-columns: 1fr;
  }
  .wx-forecast {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .form-actions .spacer {
    display: none;
  }
  .social-row {
    grid-template-columns: 1fr;
  }
}
:root {
  --jvm-border-color: #E5E6E7;
  --jvm-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --jvm-tooltip-font-size: 0.9rem;
  --jvm-tooltip-bg-color: #337FFA;
  --jvm-tooltip-color: #FFF;
  --jvm-tooltip-padding: 3px 5px;
  --jvm-tooltip-shadow: var(--jvm-box-shadow);
  --jvm-tooltip-radius: 3px;
  --jvm-zoom-btn-bg-color: #292929;
  --jvm-zoom-btn-color: #FFF;
  --jvm-zoom-btn-size: 15px;
  --jvm-zoom-btn-radius: 3px;
  --jvm-series-container-right: 15px;
  --jvm-legend-bg-color: #FFF;
  --jvm-legend-radius: 0.15rem;
  --jvm-legend-margin-left: 0.75rem;
  --jvm-legend-padding: 0.6rem;
  --jvm-legend-title-padding-bottom: 0.5rem;
  --jvm-legend-title-margin-bottom: 0.575rem;
  --jvm-legend-tick-margin-top: 0.575rem;
  --jvm-legend-tick-sample-radius: 0;
  --jvm-legend-tick-sample-height: 12px;
  --jvm-legend-tick-sample-width: 30px;
  --jvm-legend-tick-text-font-size: 12px;
  --jvm-legend-tick-text-margin-top: 3px;
}

image, text, .jvm-zoom-btn {
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.jvm-container {
  position: relative;
  height: 100%;
  width: 100%;
}

.jvm-tooltip {
  border-radius: var(--jvm-tooltip-radius);
  background-color: var(--jvm-tooltip-bg-color);
  color: var(--jvm-tooltip-color);
  font-size: var(--jvm-tooltip-font-size);
  box-shadow: var(--jvm-tooltip-shadow);
  padding: var(--jvm-tooltip-padding);
  white-space: nowrap;
  position: absolute;
  display: none;
}
.jvm-tooltip.active {
  display: block;
}

.jvm-zoom-btn {
  background-color: var(--jvm-zoom-btn-bg-color);
  color: var(--jvm-zoom-btn-color);
  border-radius: var(--jvm-zoom-btn-radius);
  height: var(--jvm-zoom-btn-size);
  width: var(--jvm-zoom-btn-size);
  box-sizing: border-box;
  position: absolute;
  left: 10px;
  line-height: var(--jvm-zoom-btn-size);
  text-align: center;
  cursor: pointer;
}
.jvm-zoom-btn.jvm-zoomin {
  top: var(--jvm-zoom-btn-size);
}
.jvm-zoom-btn.jvm-zoomout {
  top: calc(var(--jvm-zoom-btn-size) * 2 + var(--jvm-zoom-btn-size) / 3);
}

.jvm-series-container {
  position: absolute;
  right: var(--jvm-series-container-right);
}
.jvm-series-container.jvm-series-h {
  bottom: 15px;
}
.jvm-series-container.jvm-series-v {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
      flex-direction: column;
  gap: 0.75rem;
  top: 15px;
}

.jvm-legend {
  background-color: var(--jvm-legend-bg-color);
  border: 1px solid var(--jvm-border-color);
  margin-left: var(--jvm-legend-margin-left);
  border-radius: var(--jvm-legend-radius);
  padding: var(--jvm-legend-padding);
  box-shadow: var(--jvm-box-shadow);
}

.jvm-legend-title {
  line-height: 1;
  border-bottom: 1px solid var(--jvm-border-color);
  padding-bottom: var(--jvm-legend-title-padding-bottom);
  margin-bottom: var(--jvm-legend-title-margin-bottom);
  text-align: left;
}

.jvm-legend-tick {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
      align-items: center;
  min-width: 40px;
}
.jvm-legend-tick:not(:first-child) {
  margin-top: var(--jvm-legend-tick-margin-top);
}

.jvm-legend-tick-sample {
  border-radius: var(--jvm-legend-tick-sample-radius);
  margin-right: 0.45rem;
  height: var(--jvm-legend-tick-sample-height);
  width: var(--jvm-legend-tick-sample-width);
}

.jvm-legend-tick-text {
  font-size: var(--jvm-legend-tick-text-font-size);
  text-align: center;
  line-height: 1;
}

.jvm-line[animation=true] {
  -webkit-animation: jvm-line-animation 10s linear forwards infinite;
  animation: jvm-line-animation 10s linear forwards infinite;
}
@-webkit-keyframes jvm-line-animation {
  from {
    stroke-dashoffset: 250;
  }
}
@keyframes jvm-line-animation {
  from {
    stroke-dashoffset: 250;
  }
}