:root,
:root[data-theme="default"] {
  --sp-bg: #f5f7fb;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f8fafc;
  --sp-surface-muted: #eef3f9;
  --sp-border: #e3e8f2;
  --sp-border-strong: #d6deea;
  --sp-text: #172033;
  --sp-text-muted: #64748b;
  --sp-title: #0f172a;
  --sp-accent: #4f46e5;
  --sp-accent-strong: #4338ca;
  --sp-accent-soft: #eef2ff;
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
  --sp-shadow-soft: 0 12px 26px rgba(15, 23, 42, 0.05);
  --sp-radius: 18px;
  --sp-glow-a: rgba(79, 70, 229, 0.12);
  --sp-glow-b: rgba(139, 92, 246, 0.1);
  --sp-login-glow-a: rgba(79, 70, 229, 0.1);
  --sp-login-bg-top: #f5f6ff;
  --sp-login-bg-bottom: #eef2ff;
  --sp-button-primary-end: #4338ca;
  --sp-focus-ring: rgba(79, 70, 229, 0.16);
  --sp-accent-border: rgba(79, 70, 229, 0.24);
}

:root[data-theme="emerald"] {
  --sp-bg: #f5f7fb;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f8fafc;
  --sp-surface-muted: #eef3f9;
  --sp-border: #e3e8f2;
  --sp-border-strong: #d6deea;
  --sp-text: #172033;
  --sp-text-muted: #64748b;
  --sp-title: #0f172a;
  --sp-accent: #2f6f4e;
  --sp-accent-strong: #1e4a36;
  --sp-accent-soft: #dff3ea;
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
  --sp-shadow-soft: 0 12px 26px rgba(15, 23, 42, 0.05);
  --sp-radius: 18px;
  --sp-glow-a: rgba(47, 111, 78, 0.12);
  --sp-glow-b: rgba(186, 170, 127, 0.1);
  --sp-login-glow-a: rgba(47, 111, 78, 0.1);
  --sp-login-bg-top: #f4f1e8;
  --sp-login-bg-bottom: #ece7db;
  --sp-button-primary-end: #1e4a36;
  --sp-focus-ring: rgba(47, 111, 78, 0.16);
  --sp-accent-border: rgba(47, 111, 78, 0.24);
}

:root[data-theme="minimalist"] {
  --sp-bg: #f6f7fb;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f8faff;
  --sp-surface-muted: #eef3fb;
  --sp-border: #dce5f4;
  --sp-border-strong: #ced9ef;
  --sp-text: #131b2f;
  --sp-text-muted: #6b7280;
  --sp-title: #111827;
  --sp-accent: #1f5eff;
  --sp-accent-strong: #133fb7;
  --sp-accent-soft: rgba(31, 94, 255, 0.08);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
  --sp-shadow-soft: 0 12px 26px rgba(15, 23, 42, 0.05);
  --sp-glow-a: rgba(31, 94, 255, 0.11);
  --sp-glow-b: rgba(99, 102, 241, 0.08);
  --sp-login-glow-a: rgba(31, 94, 255, 0.11);
  --sp-login-bg-top: #f6f7fb;
  --sp-login-bg-bottom: #edf1f9;
  --sp-button-primary-end: #133fb7;
  --sp-focus-ring: rgba(31, 94, 255, 0.16);
  --sp-accent-border: rgba(31, 94, 255, 0.22);
}

:root[data-theme="oceanic"] {
  --sp-bg: #edf6fb;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f4fbff;
  --sp-surface-muted: #e8f1f7;
  --sp-border: #d6e5ef;
  --sp-border-strong: #c7d9e4;
  --sp-text: #103448;
  --sp-text-muted: #5c7585;
  --sp-title: #103448;
  --sp-accent: #0f88c9;
  --sp-accent-strong: #0b5f8d;
  --sp-accent-soft: rgba(15, 136, 201, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(16, 52, 72, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(16, 52, 72, 0.05);
  --sp-glow-a: rgba(15, 136, 201, 0.13);
  --sp-glow-b: rgba(125, 183, 219, 0.1);
  --sp-login-glow-a: rgba(15, 136, 201, 0.11);
  --sp-login-bg-top: #edf6fb;
  --sp-login-bg-bottom: #e3eef5;
  --sp-button-primary-end: #0b5f8d;
  --sp-focus-ring: rgba(15, 136, 201, 0.16);
  --sp-accent-border: rgba(15, 136, 201, 0.24);
}

:root[data-theme="terracotta"] {
  --sp-bg: #fbf1ec;
  --sp-surface: #ffffff;
  --sp-surface-soft: #fff8f3;
  --sp-surface-muted: #f6ece7;
  --sp-border: #ead8d0;
  --sp-border-strong: #dec8bf;
  --sp-text: #4a2c25;
  --sp-text-muted: #7f655d;
  --sp-title: #4a2c25;
  --sp-accent: #c76643;
  --sp-accent-strong: #9b472b;
  --sp-accent-soft: rgba(199, 102, 67, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(74, 44, 37, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(74, 44, 37, 0.05);
  --sp-glow-a: rgba(199, 102, 67, 0.13);
  --sp-glow-b: rgba(230, 180, 160, 0.1);
  --sp-login-glow-a: rgba(199, 102, 67, 0.11);
  --sp-login-bg-top: #fbf1ec;
  --sp-login-bg-bottom: #f2e6df;
  --sp-button-primary-end: #9b472b;
  --sp-focus-ring: rgba(199, 102, 67, 0.16);
  --sp-accent-border: rgba(199, 102, 67, 0.24);
}

:root[data-theme="olive"] {
  --sp-bg: #f4f5ec;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f9fbf4;
  --sp-surface-muted: #eef1e4;
  --sp-border: #dfe5cf;
  --sp-border-strong: #d1d9bd;
  --sp-text: #36402b;
  --sp-text-muted: #6d775f;
  --sp-title: #36402b;
  --sp-accent: #7a8f3d;
  --sp-accent-strong: #586b28;
  --sp-accent-soft: rgba(122, 143, 61, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(54, 64, 43, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(54, 64, 43, 0.05);
  --sp-glow-a: rgba(122, 143, 61, 0.13);
  --sp-glow-b: rgba(198, 205, 160, 0.1);
  --sp-login-glow-a: rgba(122, 143, 61, 0.11);
  --sp-login-bg-top: #f4f5ec;
  --sp-login-bg-bottom: #eaecd9;
  --sp-button-primary-end: #586b28;
  --sp-focus-ring: rgba(122, 143, 61, 0.16);
  --sp-accent-border: rgba(122, 143, 61, 0.24);
}

:root[data-theme="mist"] {
  --sp-bg: #f2f5f8;
  --sp-surface: #ffffff;
  --sp-surface-soft: #f7fbfe;
  --sp-surface-muted: #ebf0f4;
  --sp-border: #d7e0e8;
  --sp-border-strong: #c8d4df;
  --sp-text: #233745;
  --sp-text-muted: #6c7f8d;
  --sp-title: #233745;
  --sp-accent: #5b88a5;
  --sp-accent-strong: #3f647c;
  --sp-accent-soft: rgba(91, 136, 165, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(35, 55, 69, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(35, 55, 69, 0.05);
  --sp-glow-a: rgba(91, 136, 165, 0.13);
  --sp-glow-b: rgba(181, 198, 211, 0.1);
  --sp-login-glow-a: rgba(91, 136, 165, 0.11);
  --sp-login-bg-top: #f2f5f8;
  --sp-login-bg-bottom: #e6ecf1;
  --sp-button-primary-end: #3f647c;
  --sp-focus-ring: rgba(91, 136, 165, 0.16);
  --sp-accent-border: rgba(91, 136, 165, 0.24);
}

:root[data-theme="plum"] {
  --sp-bg: #f8f2f8;
  --sp-surface: #ffffff;
  --sp-surface-soft: #fdf8fd;
  --sp-surface-muted: #f2ebf3;
  --sp-border: #e4d7e7;
  --sp-border-strong: #d8c8dc;
  --sp-text: #402642;
  --sp-text-muted: #7e6780;
  --sp-title: #402642;
  --sp-accent: #8f5aa8;
  --sp-accent-strong: #6c3f82;
  --sp-accent-soft: rgba(143, 90, 168, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(64, 38, 66, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(64, 38, 66, 0.05);
  --sp-glow-a: rgba(143, 90, 168, 0.13);
  --sp-glow-b: rgba(214, 186, 224, 0.1);
  --sp-login-glow-a: rgba(143, 90, 168, 0.11);
  --sp-login-bg-top: #f8f2f8;
  --sp-login-bg-bottom: #efe5ef;
  --sp-button-primary-end: #6c3f82;
  --sp-focus-ring: rgba(143, 90, 168, 0.16);
  --sp-accent-border: rgba(143, 90, 168, 0.24);
}

:root[data-theme="tangy"] {
  --sp-bg: #fcf0ee;
  --sp-surface: #ffffff;
  --sp-surface-soft: #fff8f6;
  --sp-surface-muted: #f7ece8;
  --sp-border: #ead4cf;
  --sp-border-strong: #ddc1ba;
  --sp-text: #4d2422;
  --sp-text-muted: #876361;
  --sp-title: #4d2422;
  --sp-accent: #dd5a47;
  --sp-accent-strong: #b63f2e;
  --sp-accent-soft: rgba(221, 90, 71, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(77, 36, 34, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(77, 36, 34, 0.05);
  --sp-glow-a: rgba(221, 90, 71, 0.13);
  --sp-glow-b: rgba(239, 194, 186, 0.1);
  --sp-login-glow-a: rgba(221, 90, 71, 0.11);
  --sp-login-bg-top: #fcf0ee;
  --sp-login-bg-bottom: #f3e3df;
  --sp-button-primary-end: #b63f2e;
  --sp-focus-ring: rgba(221, 90, 71, 0.16);
  --sp-accent-border: rgba(221, 90, 71, 0.24);
}

:root[data-theme="citrus"] {
  --sp-bg: #fff3ea;
  --sp-surface: #ffffff;
  --sp-surface-soft: #fff9f4;
  --sp-surface-muted: #f8ede3;
  --sp-border: #eed9c9;
  --sp-border-strong: #e2c7b1;
  --sp-text: #4a2e17;
  --sp-text-muted: #84674f;
  --sp-title: #4a2e17;
  --sp-accent: #f47c20;
  --sp-accent-strong: #c95d0d;
  --sp-accent-soft: rgba(244, 124, 32, 0.12);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(74, 46, 23, 0.09);
  --sp-shadow-soft: 0 12px 26px rgba(74, 46, 23, 0.05);
  --sp-glow-a: rgba(244, 124, 32, 0.14);
  --sp-glow-b: rgba(250, 205, 162, 0.1);
  --sp-login-glow-a: rgba(244, 124, 32, 0.12);
  --sp-login-bg-top: #fff3ea;
  --sp-login-bg-bottom: #f7e7d8;
  --sp-button-primary-end: #c95d0d;
  --sp-focus-ring: rgba(244, 124, 32, 0.16);
  --sp-accent-border: rgba(244, 124, 32, 0.24);
}

:root[data-theme="sunlight"] {
  --sp-bg: #fff9e8;
  --sp-surface: #fffefb;
  --sp-surface-soft: #fffdf4;
  --sp-surface-muted: #f7f1de;
  --sp-border: #ebdfb5;
  --sp-border-strong: #e0d094;
  --sp-text: #5b4618;
  --sp-text-muted: #857245;
  --sp-title: #5b4618;
  --sp-accent: #e2b91f;
  --sp-accent-strong: #af8d12;
  --sp-accent-soft: rgba(226, 185, 31, 0.16);
  --sp-success-soft: #ecfdf5;
  --sp-shadow: 0 20px 46px rgba(91, 70, 24, 0.08);
  --sp-shadow-soft: 0 12px 26px rgba(91, 70, 24, 0.05);
  --sp-glow-a: rgba(226, 185, 31, 0.14);
  --sp-glow-b: rgba(241, 227, 163, 0.1);
  --sp-login-glow-a: rgba(226, 185, 31, 0.12);
  --sp-login-bg-top: #fff9e8;
  --sp-login-bg-bottom: #f6eed0;
  --sp-button-primary-end: #af8d12;
  --sp-focus-ring: rgba(226, 185, 31, 0.16);
  --sp-accent-border: rgba(226, 185, 31, 0.24);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--sp-glow-a), transparent 26%),
    radial-gradient(circle at bottom right, var(--sp-glow-b), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--sp-bg) 82%, white 18%) 0%, var(--sp-bg) 38%, var(--sp-bg) 100%);
  color: var(--sp-text);
  font-family: "Inter", sans-serif;
}
a { color: inherit; text-decoration: none; }

body.sp-login-body {
  background:
    radial-gradient(circle at top left, var(--sp-login-glow-a), transparent 28%),
    linear-gradient(180deg, var(--sp-login-bg-top) 0%, var(--sp-login-bg-bottom) 100%);
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

html:not([data-theme]) body,
html[data-theme="default"] body {
  background: #ffffff;
}

html:not([data-theme]) body.sp-login-body,
html[data-theme="default"] body.sp-login-body {
  background: #ffffff;
}

html:not([data-theme]) .sp-sidebar,
html[data-theme="default"] .sp-sidebar {
  background: #ffffff;
  backdrop-filter: none;
}

html:not([data-theme]) .v2-card,
html:not([data-theme]) .sp-theme-select-shell,
html:not([data-theme]) .sp-topbar-user,
html:not([data-theme]) .sp-topbar-logout,
html:not([data-theme]) .sp-history-button,
html:not([data-theme]) .sp-notification-button,
html[data-theme="default"] .v2-card,
html[data-theme="default"] .sp-theme-select-shell,
html[data-theme="default"] .sp-topbar-user,
html[data-theme="default"] .sp-topbar-logout,
html[data-theme="default"] .sp-history-button,
html[data-theme="default"] .sp-notification-button {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

html:not([data-theme]) .sp-sidebar-group,
html:not([data-theme]) .sp-sidebar-footer,
html:not([data-theme]) .sp-sidebar-group-secondary,
html:not([data-theme]) .v2-card,
html:not([data-theme]) .sp-theme-select-shell,
html:not([data-theme]) .sp-topbar-user,
html:not([data-theme]) .sp-topbar-logout,
html:not([data-theme]) .sp-history-button,
html:not([data-theme]) .sp-notification-button,
html[data-theme="default"] .sp-sidebar-group,
html[data-theme="default"] .sp-sidebar-footer,
html[data-theme="default"] .sp-sidebar-group-secondary,
html[data-theme="default"] .v2-card,
html[data-theme="default"] .sp-theme-select-shell,
html[data-theme="default"] .sp-topbar-user,
html[data-theme="default"] .sp-topbar-logout,
html[data-theme="default"] .sp-history-button,
html[data-theme="default"] .sp-notification-button {
  background: #ffffff;
}

.sp-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sp-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--sp-border);
  backdrop-filter: blur(16px);
}

.sp-sidebar::-webkit-scrollbar {
  width: 10px;
}

.sp-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sp-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
}

.sp-sidebar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.sp-history-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 58;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.sp-history-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--sp-title);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, color 160ms ease;
}

.sp-history-button:hover {
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--sp-accent) 24%, transparent 76%);
  transform: translateX(-2px);
}

.sp-history-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sp-history-button:disabled:hover {
  border-color: var(--sp-border);
  color: var(--sp-title);
  transform: none;
}

.sp-history-button__icon {
  width: 17px;
  height: 17px;
  display: block;
}

.sp-floating-back {
  display: none !important;
}

.sp-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 4px 6px 8px;
}

.sp-brand-logo {
  display: block;
  width: min(142px, 100%);
  height: auto;
}

.sp-brand-copy { display: none; }

.sp-sidebar-group,
.sp-sidebar-footer {
  padding: 8px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
}

.sp-sidebar-group-secondary {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-sidebar-group-secondary--grouped {
  gap: 10px;
}

.sp-sidebar-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sp-text-muted);
}

.sp-primary-nav,
.sp-secondary-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-nav-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-primary-link,
.sp-secondary-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: 160ms ease;
}

.sp-primary-link__icon,
.sp-secondary-link__icon,
.sp-nav-group-summary-icon,
.sp-nav-group-summary-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.sp-primary-link__label,
.sp-secondary-link__label,
.sp-nav-group-summary-label {
  min-width: 0;
  white-space: nowrap;
}

.sp-nav-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.sp-nav-icon-chevron {
  width: 14px;
  height: 14px;
}

.sp-primary-link:hover,
.sp-secondary-link:hover {
  background: #ffffff;
  border-color: var(--sp-border);
  color: var(--sp-title);
}

.sp-primary-link.active {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-color: transparent;
  box-shadow: var(--sp-shadow-soft);
  color: #ffffff;
}

.sp-secondary-link.active {
  background: var(--sp-accent-soft);
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
}

.sp-nav-group {
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
  overflow: hidden;
}

.sp-nav-group[open] {
  background: #ffffff;
}

.sp-nav-group-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.sp-nav-group-summary::-webkit-details-marker {
  display: none;
}

.sp-nav-group-summary-chevron {
  margin-left: auto;
  color: var(--sp-text-muted);
  transition: transform 160ms ease;
}

.sp-nav-group[open] .sp-nav-group-summary-chevron {
  transform: rotate(180deg);
}

.sp-nav-group-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
}

.sp-package-card {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sp-accent-soft), #f8fbff);
  border: 1px solid rgba(199, 210, 254, 0.9);
}

.sp-package-card strong,
.sp-package-card span { display: block; }
.sp-package-card strong {
  color: var(--sp-accent-strong);
  font-size: 15px;
}
.sp-package-card span {
  margin-top: 6px;
  font-size: 11px;
  color: var(--sp-text-muted);
  line-height: 1.5;
}

.v2-numbering-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-numbering-item {
  width: 100%;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.v2-numbering-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.14);
}

.v2-numbering-item.is-active {
  border-color: rgba(99, 102, 241, 0.55);
  background: #f8fbff;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.12);
}

.v2-numbering-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v2-numbering-item p {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.v2-numbering-item-meta {
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v2-numbering-current {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v2-numbering-current h3 {
  margin: 0;
  color: var(--sp-title);
  font-size: 22px;
}

.v2-numbering-current p {
  margin: 0;
  color: var(--sp-text-muted);
}

.v2-numbering-updated {
  color: var(--sp-text-muted);
  font-size: 12px;
}

.v2-numbering-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sp-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.v2-numbering-check input {
  margin: 0;
}

.v2-numbering-preview {
  padding: 16px 18px;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--sp-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.route-trace-layout {
  align-items: start;
  --route-accent: var(--sp-accent);
  --route-accent-strong: var(--sp-accent-strong);
  --route-accent-soft: rgba(79, 70, 229, 0.12);
  --route-accent-softer: rgba(79, 70, 229, 0.08);
  --route-surface: #f8fbff;
  --route-ink: var(--sp-title);
}

.route-map-panel {
  min-width: 0;
  position: sticky;
  top: 22px;
  align-self: start;
}

.route-stops-panel {
  min-width: 0;
}

.route-trace-map {
  width: 100%;
  min-height: 460px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fbff;
  position: relative;
}

.route-trace-map .leaflet-container {
  width: 100%;
  min-height: 460px;
}

.route-trace-map-empty {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--sp-text-muted);
  padding: 24px;
  font-size: 14px;
  line-height: 1.6;
  background: rgba(248, 251, 255, 0.92);
}

.route-trace-map-empty[hidden] {
  display: none;
}

.route-trace-map-empty-error {
  color: #b91c1c;
}

.route-trace-map-note {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sp-text-muted);
  border: 1px solid rgba(79, 70, 229, 0.12);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  font-size: 12px;
}

.route-trace-svg {
  width: 100%;
  height: 460px;
  display: block;
}

.route-trace-svg-stop {
  fill: var(--route-accent);
  stroke: #ffffff;
  stroke-width: 3;
  transition: transform 160ms ease, fill 160ms ease, filter 160ms ease;
  transform-origin: center;
}

.route-trace-svg-stop.is-checkin {
  fill: var(--route-accent-strong);
}

.route-trace-svg-node.is-active .route-trace-svg-stop {
  fill: var(--route-accent-strong);
  filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.32));
  transform: scale(1.12);
}

.route-trace-svg-label {
  fill: var(--sp-title);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.route-trace-metrics {
  margin-bottom: 14px;
}

.route-day-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.route-day-chip {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.route-day-chip strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sp-accent-strong);
  margin-bottom: 6px;
}

.route-day-chip span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--sp-title);
}

.route-day-chip small {
  display: block;
  margin-top: 5px;
  color: var(--sp-text-muted);
}

.route-trace-stops {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 6px 18px 0;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

.route-timeline {
  --route-time-width: 88px;
  --route-track-width: 34px;
  --route-gap: 18px;
  --route-node-size: 28px;
  --route-rail-x: calc(var(--route-time-width) + var(--route-gap) + (var(--route-track-width) / 2));
  position: relative;
  display: grid;
  gap: 14px;
}

.route-timeline::before {
  content: "";
  position: absolute;
  left: var(--route-rail-x);
  top: 10px;
  bottom: 10px;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(79, 70, 229, 0.08), rgba(79, 70, 229, 0.34), rgba(79, 70, 229, 0.08));
  pointer-events: none;
}

.route-stop-card {
  display: grid;
  grid-template-columns: var(--route-time-width) var(--route-track-width) minmax(0, 1fr);
  gap: var(--route-gap);
  align-items: start;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  transition: transform 140ms ease;
  scroll-snap-align: start;
  scroll-margin-top: 12px;
  cursor: pointer;
}

.route-stop-card:hover,
.route-stop-card.active {
  transform: translateY(-2px);
}

.route-stop-time {
  font-size: 12px;
  color: var(--sp-text-muted);
  font-weight: 800;
  line-height: 1;
  text-align: right;
  background: var(--sp-accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 999px;
  padding: 8px 10px;
  margin-top: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.route-stop-track {
  display: grid;
  justify-items: center;
  padding-top: 7px;
}

.route-stop-dot {
  width: var(--route-node-size);
  height: var(--route-node-size);
  border-radius: 999px;
  background: linear-gradient(180deg, #5b52ee, #3b35b2);
  border: 3px solid #ffffff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14), 0 10px 24px rgba(59, 53, 178, 0.18);
}

.route-stop-dot.is-checkin {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.12), 0 10px 24px rgba(15, 23, 42, 0.18);
}

.route-stop-card.active .route-stop-time {
  background: linear-gradient(180deg, #4f46e5, #3b35b2);
  color: #ffffff;
  border-color: rgba(79, 70, 229, 0.24);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
}

.route-stop-card.active .route-stop-dot {
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.18), 0 16px 30px rgba(59, 53, 178, 0.22);
}

.route-stop-card.active .route-stop-dot.is-checkin {
  box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.16), 0 16px 30px rgba(15, 23, 42, 0.24);
}

.route-map-stop-active {
  filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.32));
}

.route-stop-titleline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.route-stop-titleline strong {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
}

.route-stop-status {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--sp-accent-strong);
  border: 1px solid rgba(79, 70, 229, 0.14);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.route-stop-status.is-checkin {
  background: rgba(15, 23, 42, 0.06);
  color: var(--sp-title);
  border-color: rgba(15, 23, 42, 0.1);
}

.route-stop-body {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 16px 18px 15px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  min-width: 0;
}

.route-stop-card:hover .route-stop-body,
.route-stop-card.active .route-stop-body {
  border-color: rgba(79, 70, 229, 0.18);
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.1);
  background: linear-gradient(180deg, rgba(244, 244, 255, 0.98), rgba(239, 241, 255, 0.98));
}

.route-stop-body::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 16px;
  width: 20px;
  height: 20px;
  background: inherit;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transform: rotate(45deg);
}

.route-stop-body p,
.route-stop-body small {
  display: block;
  margin: 6px 0 0;
  color: var(--sp-text-muted);
}

.route-stop-distance {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-accent-strong);
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sp-accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.sp-main {
  min-width: 0;
  padding: 22px 24px 28px;
}

.sp-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sp-eyebrow {
  margin: 0 0 10px;
  color: var(--sp-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-topbar h1 {
  margin: 0;
  color: var(--sp-title);
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.sp-topbar p {
  margin: 8px 0 0;
  max-width: 860px;
  color: var(--sp-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.sp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.sp-theme-select-wrap {
  position: relative;
  min-width: 196px;
  max-width: 196px;
  flex: 0 0 196px;
  flex-shrink: 0;
}

.sp-theme-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.sp-theme-select-shell {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 12px;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--sp-shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.sp-theme-select-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sp-theme-select-copy strong,
.sp-theme-select-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-theme-select-copy strong {
  color: var(--sp-title);
  font-size: 12px;
}

.sp-theme-select-copy span {
  color: var(--sp-text-muted);
  font-size: 11px;
}

.sp-theme-select-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--sp-text-muted);
  flex: 0 0 auto;
}

.sp-theme-select-wrap:hover .sp-theme-select-shell {
  border-color: #c7d2fe;
}

.sp-theme-select:focus + .sp-theme-select-shell {
  border-color: var(--sp-accent-border);
  box-shadow: 0 0 0 4px var(--sp-focus-ring);
}

.sp-topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--sp-accent-soft);
  border: 1px solid #c7d2fe;
  color: var(--sp-accent-strong);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.sp-topbar-badge-muted {
  background: #ffffff;
  border-color: var(--sp-border);
  color: var(--sp-text-muted);
}

.sp-topbar-user {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  min-width: 0;
  max-width: 320px;
  flex: 0 1 320px;
}

.sp-topbar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sp-accent-soft);
  color: var(--sp-accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.sp-topbar-user-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sp-topbar-user-copy strong,
.sp-topbar-user-copy span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-topbar-user-copy strong {
  color: var(--sp-title);
  font-size: 12px;
}

.sp-topbar-user-copy span {
  color: var(--sp-text-muted);
  font-size: 11px;
}

.sp-topbar-logout {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--sp-title);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  flex-shrink: 0;
}

.sp-topbar-logout:hover {
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.sp-topbar-logout:disabled {
  cursor: wait;
  opacity: 0.66;
}

.sp-topbar-logout-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.sp-notification-wrap {
  position: relative;
  flex-shrink: 0;
}

.sp-notification-button {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--sp-title);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.sp-notification-button:hover,
.sp-notification-button[aria-expanded="true"] {
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.14);
}

.sp-notification-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.sp-notification-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

.sp-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  overflow: auto;
  border: 1px solid var(--sp-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
  padding: 16px;
  z-index: 72;
}

.sp-notification-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.sp-notification-panel-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sp-notification-panel-copy strong {
  color: var(--sp-title);
  font-size: 14px;
}

.sp-notification-panel-copy span {
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.sp-notification-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sp-notification-header-action,
.sp-notification-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--sp-title);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sp-notification-header-action:hover,
.sp-notification-action:hover {
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.12);
}

.sp-notification-header-action:disabled,
.sp-notification-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.sp-notification-action-secondary {
  color: var(--sp-text-muted);
}

.sp-notification-list {
  display: grid;
  gap: 10px;
}

.sp-notification-item {
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
  display: grid;
  gap: 10px;
}

.sp-notification-item.is-read {
  background: var(--sp-surface-soft);
}

.sp-notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sp-notification-item-head strong {
  color: var(--sp-title);
  font-size: 13px;
  line-height: 1.35;
}

.sp-notification-item-message {
  margin: 0;
  color: var(--sp-text);
  font-size: 13px;
  line-height: 1.55;
}

.sp-notification-item-meta {
  color: var(--sp-text-muted);
  font-size: 11px;
}

.sp-notification-item-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sp-notification-pill {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: capitalize;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.sp-notification-pill--success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.sp-notification-pill--warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.sp-notification-pill--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.sp-notification-pill--info,
.sp-notification-pill--update {
  background: var(--sp-accent-soft);
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
}

.sp-notification-empty {
  border: 1px dashed var(--sp-border-strong);
  border-radius: 16px;
  padding: 16px;
  color: var(--sp-text-muted);
  font-size: 13px;
  line-height: 1.55;
  background: var(--sp-surface-soft);
}

.sp-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sp-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.sp-button-primary {
  background: linear-gradient(135deg, var(--sp-accent), var(--sp-button-primary-end));
  color: #ffffff;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--sp-accent) 22%, transparent 78%);
}

.sp-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--sp-accent) 28%, transparent 72%);
}

.sp-button-secondary {
  background: #ffffff;
  border-color: var(--sp-border);
  color: var(--sp-title);
}

.sp-button-secondary:hover {
  border-color: var(--sp-accent-border);
  color: var(--sp-accent-strong);
}

.sp-button-block {
  width: 100%;
}

.sp-text-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--sp-title);
  font: inherit;
  font-size: 15px;
}

.sp-text-input:focus {
  outline: none;
  border-color: var(--sp-accent-border);
  box-shadow: 0 0 0 4px var(--sp-focus-ring);
}

.sp-login-shell {
  width: min(100%, 1100px);
}

.sp-login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 22px;
  align-items: stretch;
}

.sp-login-brand-panel,
.sp-login-panel {
  border: 1px solid var(--sp-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--sp-shadow);
}

.sp-login-brand-panel {
  padding: 28px 34px;
  display: grid;
  align-content: center;
  gap: 24px;
}

.sp-login-brand-panel-logo {
  width: min(520px, 100%);
  height: auto;
}

.sp-login-brand-panel-copy {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

.sp-login-brand-panel-copy h1 {
  margin: 0;
  color: var(--sp-title);
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.sp-login-brand-panel-copy p:last-child {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 15px;
  line-height: 1.62;
}

.sp-login-panel {
  padding: 20px;
}

.sp-login-panel-head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.sp-login-panel-head h2 {
  margin: 0;
  color: var(--sp-title);
  font-size: 30px;
  line-height: 1.04;
}

.sp-login-panel-head p:last-child {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.sp-login-form {
  display: grid;
  gap: 11px;
}

.sp-field {
  display: grid;
  gap: 8px;
}

.sp-field-label {
  color: var(--sp-title);
  font-size: 13px;
  font-weight: 700;
}

.sp-field-hint {
  color: var(--sp-text-muted);
  font-size: 12px;
}

.sp-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
}

.sp-login-message {
  min-height: 20px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.sp-login-message:empty {
  display: none;
}

.sp-login-message[data-tone="info"] {
  border-color: #dbe2f0;
  background: #f8fbff;
}

.sp-login-message[data-tone="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.sp-login-message[data-tone="error"] {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.sp-login-actions {
  padding-top: 0;
}

.sp-login-actions .sp-button {
  min-width: 96px;
}

.sp-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-grid {
  display: grid;
  gap: 20px;
}

.v2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-grid-4 { grid-template-columns: 1.1fr 1.4fr; }
.v2-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.v2-grid-dashboard { grid-template-columns: 1.5fr 1fr; }

.v2-card {
  padding: 18px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--sp-shadow);
}

.v2-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.v2-card-head h2 {
  margin: 0;
  color: var(--sp-title);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.v2-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-section-label {
  margin: 0 0 6px;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-section-text,
.v2-card p {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.v2-pill,
.v2-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sp-surface-soft);
  border: 1px solid var(--sp-border);
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 700;
}

.v2-pill-live {
  background: var(--sp-success-soft);
  border-color: #bbf7d0;
  color: #0f766e;
}

.v2-link-card {
  transition: 160ms ease;
}

.v2-link-card:hover {
  border-color: #c7d2fe;
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(79, 70, 229, 0.12);
}

.v2-embedded-state {
  margin-top: 16px;
}

.v2-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.v2-stat {
  padding: 16px;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.v2-stat-label {
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.v2-stat-value {
  margin-top: 10px;
  color: var(--sp-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.v2-coverage-grid {
  display: grid;
  gap: 12px;
}

.v2-coverage-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sp-surface-soft);
  border: 1px solid var(--sp-border);
}

.v2-coverage-item strong,
.v2-coverage-item span { display: block; }
.v2-coverage-item strong {
  color: var(--sp-title);
  font-size: 14px;
}
.v2-coverage-item span {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.v2-rank-list,
.v2-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-rank-row,
.v2-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface-soft);
}

.v2-rank-main,
.v2-mini-row > div { min-width: 0; }

.v2-rank-label,
.v2-mini-row strong {
  display: block;
  color: var(--sp-title);
  font-size: 14px;
  font-weight: 700;
}

.v2-rank-meta,
.v2-mini-meta {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.v2-rank-value { text-align: right; }
.v2-rank-value strong {
  display: block;
  color: var(--sp-title);
  font-size: 16px;
  font-weight: 800;
}
.v2-rank-value span {
  display: block;
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
}

.v2-card > .v2-form-grid + .v2-note,
.v2-card > .v2-form-grid + .v2-empty-state {
  margin-top: 10px;
}

.v2-note,
.v2-empty-state {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--sp-border-strong);
  background: var(--sp-surface-soft);
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v2-selected-party-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--sp-border);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.04) 0%, #ffffff 100%);
}

.v2-selected-party-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.v2-selected-party-card__head strong,
.v2-selected-party-card__head span {
  display: block;
}

.v2-selected-party-card__head strong {
  color: var(--sp-title);
  font-size: 15px;
}

.v2-selected-party-card__head span {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 12px;
}

.v2-selected-party-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-selected-party-card__grid span,
.v2-selected-party-card__grid strong {
  display: block;
}

.v2-selected-party-card__grid span {
  color: var(--sp-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.v2-selected-party-card__grid strong {
  margin-top: 6px;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-selected-party-card p {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.v2-note-accent {
  border-style: solid;
  border-color: rgba(79, 70, 229, 0.18);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.08) 0%, #ffffff 100%);
}

.v2-note-error {
  border-style: solid;
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96) 0%, #ffffff 100%);
  color: #991b1b;
}

.v2-note-success {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.24);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98) 0%, #ffffff 100%);
  color: #166534;
}

.v2-note-inline {
  margin-top: 2px;
}

.v2-chip-set {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.v2-chip-active {
  background: var(--sp-accent-soft);
  border-color: #c7d2fe;
  color: var(--sp-accent-strong);
}

.v2-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-work-top-strip {
  align-items: stretch;
}

.v2-card-compact {
  min-height: 0;
}

.v2-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.v2-flow-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: 160ms ease;
}

.v2-flow-card:hover {
  border-color: #c7d2fe;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.v2-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v2-flow-head strong {
  color: var(--sp-title);
  font-size: 15px;
}

.v2-flow-card p {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.v2-quick-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface-soft);
  transition: 160ms ease;
}

.v2-quick-card strong {
  color: var(--sp-title);
  font-size: 13px;
}

.v2-quick-card span {
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.v2-quick-card:hover {
  border-color: #c7d2fe;
  transform: translateY(-1px);
}


.v2-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.v2-form-grid > .v2-field-actions {
  align-self: end;
}

.v2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v2-field span {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.v2-field-hint {
  color: var(--sp-text-muted);
  font-size: 10px;
  line-height: 1.45;
}

.v2-signature-upload-card {
  display: grid;
  gap: 10px;
}

.v2-signature-upload-preview {
  min-height: 132px;
  padding: 14px;
  border: 1px dashed var(--sp-border-strong);
  border-radius: 16px;
  background: var(--sp-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-signature-upload-preview img {
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.v2-signature-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-field input,
.v2-field select,
.v2-field textarea {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--sp-title);
  font: inherit;
}

.v2-field input:focus,
.v2-field select:focus,
.v2-field textarea:focus {
  outline: none;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.v2-lookup-anchor {
  position: relative;
  min-width: 0;
}

.v2-lookup-anchor > input {
  width: 100%;
}

.v2-lookup-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  gap: 6px;
  max-height: min(320px, 44vh);
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.v2-lookup-menu[hidden],
.v2-lookup-menu:empty {
  display: none !important;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.v2-lookup-option {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--sp-surface-soft);
  color: var(--sp-title);
  font: inherit;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.v2-lookup-option:hover,
.v2-lookup-option:focus-visible,
.v2-lookup-option.is-active {
  outline: none;
  border-color: #c7d2fe;
  background: rgba(79, 70, 229, 0.08);
}

.v2-field textarea {
  padding: 10px 12px;
  min-height: 96px;
  resize: vertical;
}

.v2-field-inline-action {
  gap: 8px;
}

.v2-inline-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.v2-inline-field-row > .v2-lookup-anchor {
  min-width: 0;
}

.v2-field-actions {
  justify-content: flex-end;
}

.v2-field-span-3 {
  grid-column: span 3;
}

.v2-field-span-2 {
  grid-column: span 2;
}

.v2-field-actions-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-form-grid > .v2-field.v2-filter-actions {
  grid-column: 3;
  justify-self: end;
  width: auto;
}

.v2-section-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.v2-button {
  position: relative;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--sp-title);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  vertical-align: middle;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.v2-button-primary {
  background: linear-gradient(135deg, var(--sp-accent), var(--sp-accent-strong));
  border-color: transparent;
  color: #ffffff;
}

.v2-button:hover {
  border-color: #c7d2fe;
  color: var(--sp-title);
}

.v2-button:disabled {
  cursor: not-allowed;
}

.v2-button.is-busy {
  pointer-events: none;
  cursor: progress;
  opacity: 0.92;
}

.v2-button.is-busy:not(.v2-button-icon)::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: sp-button-spin 0.72s linear infinite;
  opacity: 0.88;
}

.v2-button.v2-button-icon.is-busy {
  color: transparent;
}

.v2-button.v2-button-icon.is-busy::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--sp-accent);
  border-right-color: transparent;
  animation: sp-button-spin 0.72s linear infinite;
}

.v2-button.is-success {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}

.v2-button.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

@keyframes sp-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.v2-attendance-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.v2-attendance-action-row .v2-button {
  flex: 1 1 180px;
}

.v2-inline-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v2-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 152px;
}

.v2-button-compact {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.v2-button-icon {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v2-button-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.v2-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sp-accent-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.v2-inline-link:hover {
  text-decoration: underline;
}

.v2-invoice-preview {
  display: grid;
  gap: 18px;
}

.v2-card-subtitle {
  margin: 6px 0 0;
  color: var(--sp-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.v2-invoice-detail-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 6px;
}

.v2-invoice-workspace-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
}

.v2-invoice-sheet {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--sp-border);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--sp-shadow-soft);
}

.v2-invoice-sheet--compact {
  width: min(100%, 920px);
}

.v2-invoice-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.v2-invoice-preview-header h3 {
  margin: 0;
  color: var(--sp-title);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.v2-invoice-preview-strip {
  align-items: stretch;
}

.v2-invoice-preview-grid-top {
  margin-bottom: 6px;
}

.v2-invoice-preview-stat {
  min-height: 0;
}

.v2-invoice-preview-stat__value {
  margin-top: 10px;
}

.v2-invoice-preview-grid {
  align-items: start;
}

.v2-invoice-preview-totals {
  padding: 18px;
}

.v2-invoice-preview-totals__list {
  display: grid;
  gap: 10px;
}

.v2-invoice-preview-totals__list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-invoice-preview-totals__list span {
  color: var(--sp-text-muted);
}

.v2-invoice-preview-totals__list .is-grand {
  padding-top: 10px;
  border-top: 1px solid var(--sp-border);
  font-weight: 700;
}

.v2-invoice-preview-totals__list .is-grand span,
.v2-invoice-preview-totals__list .is-grand strong {
  color: var(--sp-title);
}

.v2-invoice-preview-items {
  display: grid;
  gap: 12px;
}

.v2-invoice-sheet--paper {
  width: min(100%, 980px);
  padding: 12px 14px 14px;
  border-radius: 12px;
  border: 1px solid #d6dde7;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.v2-invoice-preview--compact .v2-invoice-sheet--paper {
  width: min(100%, 920px);
  padding: 10px 12px 12px;
}

.v2-invoice-paper__print-meta {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  color: #66707a;
  font-size: 10px;
  margin-bottom: 4px;
}

.v2-invoice-paper__header {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(180px, 0.7fr) minmax(240px, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}

.v2-invoice-paper__brand-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.v2-invoice-paper__logo {
  width: 185px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.v2-invoice-paper__template-kicker,
.v2-invoice-paper__title-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.v2-invoice-paper__title {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding-top: 2px;
}

.v2-invoice-paper__title h2 {
  margin: 0;
  color: #15232b;
  font-size: 54px;
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-align: center;
}

.v2-invoice-sheet--modern .v2-invoice-paper__title h2 {
  color: #4338ca;
}

.v2-invoice-sheet--compact .v2-invoice-paper__title h2 {
  font-size: 44px;
}

.v2-invoice-paper__header-meta,
.v2-invoice-paper__company-block {
  display: grid;
  gap: 2px;
  justify-items: end;
  max-width: 320px;
  text-align: right;
  margin-left: auto;
}

.v2-invoice-paper__header-meta .v2-invoice-paper__meta-block {
  justify-self: end;
}

.v2-invoice-paper__company-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4f46e5;
  margin-bottom: 2px;
}

.v2-invoice-paper__company-alias {
  font-size: 11px;
  line-height: 1.24;
  font-weight: 700;
  color: #20252b;
}

.v2-invoice-paper__company-legal {
  font-size: 10px;
  line-height: 1.3;
  color: #334155;
  font-weight: 600;
}

.v2-invoice-paper__company-line {
  font-size: 10px;
  line-height: 1.3;
  color: #55606b;
}

.v2-invoice-paper__company-gst {
  font-size: 10px;
  font-weight: 700;
  color: #20252b;
}

.v2-invoice-paper__detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
  padding: 12px 0 14px;
}

.v2-invoice-paper__detail-divider {
  display: none;
}

.v2-invoice-paper__section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1b1b1b;
  margin-bottom: 4px;
}

.v2-invoice-paper__section-title--small {
  font-size: 13px;
}

.v2-invoice-paper__bill-name {
  font-size: 14px;
  font-weight: 700;
  color: #1b1b1b;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v2-invoice-paper__bill-block {
  display: grid;
  gap: 2px;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  height: 100%;
  text-align: left;
}

.v2-invoice-paper__bill-copy {
  display: table;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
  text-align: left;
}

.v2-invoice-paper__company-detail {
  display: grid;
  gap: 2px;
  height: 100%;
}

.v2-invoice-paper__line,
.v2-invoice-paper__gst {
  font-size: 11px;
  line-height: 1.28;
  color: #2f3745;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v2-invoice-paper__gst {
  margin-top: 6px;
  font-weight: 600;
}

.v2-invoice-paper__meta-block {
  display: table;
  justify-self: end;
  width: max-content;
  min-width: 0;
  max-width: none;
  margin-left: auto;
  padding-left: 0;
  border-left: 0;
  text-align: left;
}

.v2-invoice-paper__notice {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
  padding: 14px 18px;
  border: 1px solid #f0b6b6;
  background: linear-gradient(135deg, #fff4f4 0%, #ffe5e5 100%);
  color: #9f1d1d;
  border-radius: 12px;
}

.v2-invoice-paper__notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v2-invoice-paper__notice strong {
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.v2-invoice-paper__notice-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #df8f8f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-invoice-paper__notice-copy {
  font-size: 12px;
  line-height: 1.5;
}

.v2-invoice-paper__meta-warning {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0 12px;
  margin-bottom: 4px;
  border-left: 4px solid #b91c1c;
  border-radius: 10px;
  background: #fff2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.v2-invoice-paper__meta-row {
  display: table-row;
}

.v2-invoice-paper__meta-label,
.v2-invoice-paper__meta-sep,
.v2-invoice-paper__meta-row strong {
  display: table-cell;
  white-space: nowrap;
  font-size: 11px;
  color: #20252b;
  vertical-align: baseline;
  padding-bottom: 6px;
}

.v2-invoice-paper__meta-sep {
  width: 10px;
  text-align: center;
}

.v2-invoice-paper__meta-label {
  width: 112px;
  text-align: right;
}

.v2-invoice-paper__meta-row strong {
  text-align: left;
  padding-left: 6px;
}

.v2-invoice-paper__items {
  overflow-x: auto;
}

.v2-invoice-paper__table {
  width: 100%;
  border-collapse: collapse;
}

.v2-invoice-paper__table th {
  background: #1b1b1b;
  color: #fff;
  padding: 8px 7px;
  font-size: 10px;
  text-transform: uppercase;
  text-align: left;
  letter-spacing: 0.03em;
}

.v2-invoice-paper__table td {
  border: 1px solid #d4dae0;
  padding: 7px 7px;
  vertical-align: top;
  font-size: 11px;
  color: #20252b;
}

.v2-invoice-paper__description-sub {
  margin-top: 2px;
  color: #5f6871;
  font-size: 10px;
}

.v2-invoice-paper__qty-pack {
  white-space: nowrap;
}

.v2-invoice-paper__bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.98fr);
  gap: 16px;
  padding-top: 12px;
  align-items: start;
}

.v2-invoice-paper__support {
  display: grid;
  gap: 10px;
}

.v2-invoice-paper__note-card {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #d7dfe8;
}

.v2-invoice-paper__note-line {
  font-size: 11px;
  line-height: 1.45;
  color: #2f3745;
}

.v2-invoice-paper__meta-strip {
  display: grid;
  gap: 3px;
  color: #5f6871;
  font-size: 10px;
}

.v2-invoice-paper__amount-words {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  font-size: 10px;
}

.v2-invoice-paper__amount-words strong {
  color: #20252b;
}

.v2-invoice-paper__amount-words span {
  font-style: italic;
  color: #2f3745;
}

.v2-invoice-paper__payments-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.v2-invoice-paper__bank-card,
.v2-invoice-paper__qr-card {
  min-height: 100%;
  padding: 14px 16px 12px;
  align-content: start;
}

.v2-invoice-paper__bank-card,
.v2-invoice-paper__qr-card,
.v2-invoice-paper__totals-card {
  border-radius: 12px;
}

.v2-invoice-paper__bank-card .v2-invoice-paper__section-title--small,
.v2-invoice-paper__qr-card .v2-invoice-paper__section-title--small {
  margin-bottom: 8px;
}

.v2-invoice-paper__bank-grid {
  display: grid;
  gap: 4px;
  border-top: 1px solid #1b1b1b;
  padding-top: 8px;
  margin-top: 2px;
}

.v2-invoice-paper__bank-row {
  display: grid;
  gap: 2px;
}

.v2-invoice-paper__bank-row span,
.v2-invoice-paper__qr-caption {
  color: #5f6871;
  font-size: 10px;
}

.v2-invoice-paper__bank-row strong {
  color: #1b1b1b;
  font-size: 11px;
}

.v2-invoice-paper__qr-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.v2-invoice-paper__qr-card .v2-invoice-paper__section-title--small {
  width: 100%;
  text-align: center;
}

.v2-invoice-paper__qr-canvas {
  min-height: 118px;
  width: 100%;
  max-width: 230px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #fff;
}

.v2-invoice-paper__qr-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.v2-invoice-paper__qr-canvas svg {
  width: 100px;
  height: 100px;
  display: block;
}

.v2-invoice-paper__qr-amount {
  color: #1b1b1b;
  font-size: 11px;
  text-align: center;
}

.v2-invoice-paper__totals-list {
  width: 100%;
  display: grid;
}

.v2-invoice-paper__totals-card {
  display: grid;
  border: 1px solid #cfd5db;
  background: #fff;
  height: 100%;
}

.v2-invoice-paper__totals-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #cfd5db;
}

.v2-invoice-paper__totals-label,
.v2-invoice-paper__totals-value {
  padding: 8px 9px;
  font-size: 11px;
  color: #1b1b1b;
}

.v2-invoice-paper__totals-value {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.v2-invoice-paper__grand-total {
  background: #f7f2db;
}

.v2-invoice-paper__grand-total .v2-invoice-paper__totals-label,
.v2-invoice-paper__grand-total .v2-invoice-paper__totals-value {
  font-size: 14px;
  font-weight: 700;
}

.v2-invoice-paper__totals-words {
  display: grid;
  gap: 4px;
  padding: 10px 12px 12px;
  border-top: 1px solid #cfd5db;
  background: #fff;
}

.v2-invoice-paper__totals-words strong {
  color: #1b1b1b;
  font-size: 11px;
}

.v2-invoice-paper__totals-words span {
  color: #334155;
  font-size: 10px;
  font-style: italic;
  line-height: 1.4;
}

.v2-invoice-paper__footer {
  display: grid;
  grid-template-columns: 1fr 220px;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #1b1b1b;
  margin-top: 10px;
}

.v2-invoice-paper__contacts {
  display: grid;
  gap: 4px;
  font-size: 10px;
  color: #20252b;
}

.v2-invoice-paper__signature {
  display: grid;
  justify-items: center;
  gap: 5px;
  font-size: 10px;
  color: #20252b;
}

.v2-invoice-paper__signature strong {
  font-size: 11px;
}

.v2-invoice-paper__signature small {
  color: #475569;
  font-size: 10px;
}

.v2-invoice-paper__signature-canvas {
  min-height: 42px;
  display: flex;
  align-items: end;
  justify-content: center;
}

.v2-invoice-paper__signature-image {
  max-width: 132px;
  max-height: 40px;
  object-fit: contain;
}

.v2-invoice-paper__signature-line {
  display: block;
  width: 140px;
  border-top: 1px solid #1b1b1b;
  margin-top: 6px;
}

.v2-invoice-sheet--classic {
  border-color: #d7cec1;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 170px);
}

.v2-invoice-sheet--classic .v2-invoice-paper__header {
  gap: 22px;
  padding-bottom: 12px;
  border-bottom-color: #161616;
}

.v2-invoice-sheet--classic .v2-invoice-paper__title h2 {
  font-size: 58px;
  letter-spacing: 0.12em;
  color: #101828;
}

.v2-invoice-sheet--classic .v2-invoice-paper__section-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111827;
}

.v2-invoice-sheet--classic .v2-invoice-paper__detail-grid {
  gap: 30px;
  padding: 14px 0 16px;
}

.v2-invoice-sheet--classic .v2-invoice-paper__bank-card,
.v2-invoice-sheet--classic .v2-invoice-paper__qr-card,
.v2-invoice-sheet--classic .v2-invoice-paper__totals-card {
  border: 1px solid #d7cec1;
  border-radius: 8px;
  background: #fffdfa;
}

.v2-invoice-sheet--classic .v2-invoice-paper__bank-grid,
.v2-invoice-sheet--classic .v2-invoice-paper__footer {
  border-top-color: #161616;
}

.v2-invoice-sheet--classic .v2-invoice-paper__grand-total {
  background: #f5ecd1;
}

.v2-invoice-sheet--modern {
  border-color: #d8dcff;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.12);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.82), #ffffff 190px);
}

.v2-invoice-sheet--modern .v2-invoice-paper__template-kicker,
.v2-invoice-sheet--modern .v2-invoice-paper__title-kicker,
.v2-invoice-sheet--modern .v2-invoice-paper__company-kicker,
.v2-invoice-sheet--modern .v2-invoice-paper__company-line,
.v2-invoice-sheet--modern .v2-invoice-paper__company-legal {
  color: #4f46e5;
}

.v2-invoice-sheet--modern .v2-invoice-paper__header {
  gap: 26px;
  padding-bottom: 14px;
}

.v2-invoice-sheet--modern .v2-invoice-paper__title h2 {
  font-size: 64px;
  letter-spacing: 0.07em;
}

.v2-invoice-sheet--modern .v2-invoice-paper__detail-grid {
  gap: 32px;
  padding: 16px 0 18px;
}

.v2-invoice-sheet--modern .v2-invoice-paper__company-detail,
.v2-invoice-sheet--modern .v2-invoice-paper__bill-block {
  padding: 14px 16px;
  border: 1px solid #d8dcff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.v2-invoice-sheet--modern .v2-invoice-paper__section-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4338ca;
}

.v2-invoice-sheet--modern .v2-invoice-paper__bottom-grid {
  gap: 20px;
}

.v2-invoice-sheet--modern .v2-invoice-paper__header {
  border-bottom-color: #c7d2fe;
}

.v2-invoice-sheet--modern .v2-invoice-paper__table th {
  background: linear-gradient(135deg, #4338ca, #6366f1);
}

.v2-invoice-sheet--modern .v2-invoice-paper__detail-divider {
  background: #c7d2fe;
}

.v2-invoice-sheet--modern .v2-invoice-paper__section-title,
.v2-invoice-sheet--modern .v2-invoice-paper__company-gst,
.v2-invoice-sheet--modern .v2-invoice-paper__signature strong {
  color: #312e81;
}

.v2-invoice-sheet--modern .v2-invoice-paper__grand-total {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(109, 40, 217, 0.12));
}

.v2-invoice-sheet--modern .v2-invoice-paper__bank-card,
.v2-invoice-sheet--modern .v2-invoice-paper__qr-card,
.v2-invoice-sheet--modern .v2-invoice-paper__totals-card {
  border: 1px solid #d8dcff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.09);
}

.v2-invoice-sheet--modern .v2-invoice-paper__totals-words {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.6), #ffffff);
}

.v2-invoice-sheet--modern .v2-invoice-paper__footer {
  border-top-color: #c7d2fe;
}

.v2-invoice-sheet--modern .v2-invoice-paper__signature-line {
  border-top-color: #6366f1;
}

.v2-invoice-sheet--compact {
  border-color: #dce3ec;
  background: #fcfdff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.v2-invoice-sheet--compact .v2-invoice-paper__header {
  grid-template-columns: minmax(150px, 0.82fr) minmax(120px, 0.58fr) minmax(190px, 0.9fr);
  gap: 12px;
  padding-bottom: 8px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__logo {
  width: 154px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__template-kicker,
.v2-invoice-sheet--compact .v2-invoice-paper__title-kicker,
.v2-invoice-sheet--compact .v2-invoice-paper__company-kicker {
  font-size: 9px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__company-block {
  gap: 2px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__company-line,
.v2-invoice-sheet--compact .v2-invoice-paper__company-legal,
.v2-invoice-sheet--compact .v2-invoice-paper__meta-label,
.v2-invoice-sheet--compact .v2-invoice-paper__meta-sep,
.v2-invoice-sheet--compact .v2-invoice-paper__meta-row strong,
.v2-invoice-sheet--compact .v2-invoice-paper__line,
.v2-invoice-sheet--compact .v2-invoice-paper__gst,
.v2-invoice-sheet--compact .v2-invoice-paper__bank-row strong,
.v2-invoice-sheet--compact .v2-invoice-paper__bank-row span {
  font-size: 10px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__detail-grid,
.v2-invoice-sheet--compact .v2-invoice-paper__bottom-grid {
  gap: 12px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__title {
  padding-top: 0;
}

.v2-invoice-sheet--compact .v2-invoice-paper__section-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.v2-invoice-sheet--compact .v2-invoice-paper__note-line,
.v2-invoice-sheet--compact .v2-invoice-paper__totals-label,
.v2-invoice-sheet--compact .v2-invoice-paper__totals-value,
.v2-invoice-sheet--compact .v2-invoice-paper__totals-words span {
  font-size: 10px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__table th,
.v2-invoice-sheet--compact .v2-invoice-paper__table td {
  padding: 6px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__table th {
  background: #111827;
}

.v2-invoice-sheet--compact .v2-invoice-paper__grand-total {
  background: #eef2ff;
}

.v2-invoice-sheet--compact .v2-invoice-paper__payments-grid {
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 10px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__bank-card,
.v2-invoice-sheet--compact .v2-invoice-paper__qr-card,
.v2-invoice-sheet--compact .v2-invoice-paper__totals-card {
  border-radius: 8px;
  border-color: #d6deea;
}

.v2-invoice-sheet--compact .v2-invoice-paper__footer {
  grid-template-columns: 1fr 188px;
  gap: 8px;
  padding-top: 8px;
  margin-top: 8px;
}

.v2-invoice-sheet--compact .v2-invoice-paper__signature-image {
  max-width: 112px;
  max-height: 34px;
}

.v2-invoice-brand-card {
  padding: 18px;
}

.v2-invoice-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.v2-invoice-brand__logo {
  width: 148px;
  max-width: 42%;
  height: auto;
  object-fit: contain;
}

.v2-invoice-brand__logo--hero {
  width: 132px;
}

.v2-invoice-brand__meta {
  display: grid;
  gap: 6px;
}

.v2-invoice-brand__meta strong {
  color: var(--sp-title);
  font-size: 18px;
}

.v2-invoice-brand__meta span {
  color: var(--sp-text-muted);
  font-size: 13px;
}

.v2-invoice-address-card,
.v2-invoice-meta-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.v2-invoice-address-card__meta,
.v2-invoice-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.v2-invoice-address-card__meta span,
.v2-invoice-meta-list span {
  display: block;
  color: var(--sp-text-muted);
  font-size: 12px;
}

.v2-invoice-address-card__meta strong,
.v2-invoice-meta-list strong {
  display: block;
  margin-top: 4px;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-table-shell {
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.v2-mini-table {
  width: 100%;
  border-collapse: collapse;
}

.v2-mini-table th,
.v2-mini-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--sp-border);
  vertical-align: top;
  text-align: left;
  font-size: 12px;
}

.v2-mini-table th {
  background: #f8fafc;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.v2-mini-table tbody tr:last-child td {
  border-bottom: 0;
}

.v2-register-grid {
  align-items: start;
}

.v2-order-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-order-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  background: var(--sp-surface-soft);
}

.v2-order-item-product {
  grid-column: 1 / -1;
}

.v2-order-item-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.v2-order-item-metrics > .v2-field {
  min-width: 0;
}

.v2-order-item-sidecar {
  justify-content: flex-start;
}

.v2-order-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v2-order-item-stock-note {
  flex: 1 1 auto;
  min-width: 0;
}

.v2-order-item-total {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  color: var(--sp-title);
  font-size: 13px;
  font-weight: 700;
}

.v2-order-item-remove {
  margin-top: 0;
  margin-left: auto;
  align-self: center;
}

.v2-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.v2-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-surface-soft);
}

.v2-summary-metric span {
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-summary-metric strong {
  color: var(--sp-title);
  font-size: 16px;
  font-weight: 800;
}

.v2-summary-metric-strong {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.08) 0%, #ffffff 100%);
  border-color: #c7d2fe;
}

.v2-empty-inline {
  padding: 16px;
  border: 1px dashed var(--sp-border-strong);
  border-radius: 14px;
  background: var(--sp-surface-soft);
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.v2-inline-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sp-accent-strong);
  vertical-align: middle;
  cursor: pointer;
}

.v2-inline-icon-button svg {
  width: 14px;
  height: 14px;
  display: block;
}

.v2-photo-preview {
  margin-top: 10px;
  width: min(220px, 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface-soft);
}

.v2-photo-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.v2-photo-thumb-button {
  margin-top: 10px;
  width: 100px;
  height: 100px;
  padding: 0;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--sp-surface-soft);
  cursor: pointer;
}

.v2-photo-thumb-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v2-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.v2-photo-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.v2-photo-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.54);
}

.v2-photo-panel {
  position: relative;
  width: min(860px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid var(--sp-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
  display: flex;
  flex-direction: column;
}

.v2-text-panel {
  width: min(560px, calc(100vw - 40px));
}

.v2-photo-body {
  padding: 18px 20px 22px;
  overflow: auto;
}

.v2-photo-modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface-soft);
}

.v2-placeholder-title {
  display: block;
  margin-bottom: 6px;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-placeholder-copy {
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.v2-register-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.v2-register-cell-right {
  align-items: flex-end;
  text-align: right;
}

.v2-register-title {
  color: var(--sp-title);
  font-size: 12px;
  font-weight: 700;
}

.v2-register-meta {
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.v2-register-meta-clamp {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-inline-details {
  margin-top: 4px;
}

.v2-inline-summary {
  cursor: pointer;
  color: var(--sp-accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.v2-register-detail-block {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  background: var(--sp-surface-soft);
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

.v2-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: var(--sp-accent-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-status-badge-soft {
  background: var(--sp-surface-soft);
  border-color: var(--sp-border);
  color: var(--sp-text-muted);
}

.v2-data-shell .dt-container {
  margin-top: 6px;
}

.v2-data-shell {
  overflow: hidden;
}

.v2-data-shell .dt-layout-row,
.v2-data-shell .dt-layout-table {
  overflow-x: auto;
}

.v2-data-shell table.dataTable {
  min-width: 980px;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

.v2-data-shell table.dataTable thead th {
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--sp-border) !important;
}

.v2-data-shell table.dataTable tbody td {
  background: #ffffff;
  border-top: 1px solid var(--sp-border);
  border-bottom: 1px solid var(--sp-border);
  vertical-align: top;
  font-size: 12px;
  padding: 10px 12px !important;
}

.v2-data-shell table.dataTable tbody tr td:first-child {
  border-left: 1px solid var(--sp-border);
  border-radius: 12px 0 0 12px;
}

.v2-data-shell table.dataTable tbody tr td:last-child {
  border-right: 1px solid var(--sp-border);
  border-radius: 0 12px 12px 0;
}

body.sp-drawer-open {
  overflow: hidden;
}

.v2-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.v2-drawer.is-open {
  pointer-events: auto;
}

.v2-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  transition: opacity 180ms ease;
}

.v2-drawer-panel {
  position: relative;
  height: 100%;
  width: min(760px, 100vw);
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid var(--sp-border);
  box-shadow: -28px 0 48px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  transition: transform 220ms ease;
  display: flex;
  flex-direction: column;
}

.v2-drawer.is-open .v2-drawer-backdrop {
  opacity: 1;
}

.v2-drawer.is-open .v2-drawer-panel {
  transform: translateX(0);
}

.v2-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sp-border);
  background: #ffffff;
}

.v2-drawer-head h2 {
  margin: 0;
  color: var(--sp-title);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.v2-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.v2-camera-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.v2-camera-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.54);
  opacity: 0;
  transition: opacity 180ms ease;
}

.v2-camera-panel {
  position: relative;
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid var(--sp-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
  transform: translateY(18px) scale(0.98);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
}

.v2-camera-modal.is-open .v2-camera-backdrop {
  opacity: 1;
}

.v2-camera-modal.is-open .v2-camera-panel {
  transform: translateY(0) scale(1);
}

.v2-camera-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.v2-camera-frame {
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  height: min(46vh, 440px);
  min-height: 220px;
}

.v2-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1280px) {
  .v2-grid-dashboard,
  .v2-grid-3,
  .v2-grid-4,
  .v2-grid-5,
  .v2-invoice-preview-grid,
  .v2-form-grid,
  .v2-invoice-detail-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .v2-form-grid > .v2-field.v2-filter-actions {
    grid-column: 2;
  }

  .v2-order-item-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v2-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 1080px) {
  .sp-shell { grid-template-columns: 1fr; }
  .sp-sidebar {
    position: relative;
    height: auto;
    max-height: none;
    overflow-y: visible;
    scrollbar-gutter: auto;
    padding: 12px 10px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--sp-border);
  }

}

@media (max-width: 900px) {
  .sp-main { padding: 18px 14px 24px; }
  .sp-history-rail {
    right: 14px;
    top: auto;
    bottom: 16px;
    flex-direction: row;
    transform: none;
  }
  .sp-history-button:hover {
    transform: translateY(-2px);
  }
  .sp-topbar { flex-direction: column; }
  .v2-grid-2,
  .v2-grid-3,
  .v2-grid-4,
  .v2-grid-5,
  .v2-grid-dashboard,
  .v2-invoice-preview-grid,
  .v2-form-grid,
  .v2-stat-grid,
  .v2-quick-grid,
  .v2-flow-grid,
  .v2-board-grid,
  .v2-chart-row,
  .v2-invoice-detail-controls { grid-template-columns: 1fr; }
  .v2-card-actions {
    justify-content: flex-start;
  }

  .v2-invoice-workspace-actions {
    width: 100%;
  }
  .v2-field-span-2,
  .v2-field-span-3 {
    grid-column: span 1;
  }

  .v2-form-grid > .v2-field.v2-filter-actions {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }
  .v2-order-item-row,
  .v2-summary-grid {
    grid-template-columns: 1fr;
  }
  .v2-order-item-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .v2-order-item-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .v2-drawer-panel {
    width: 100vw;
  }
  .v2-drawer-head,
  .v2-drawer-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .v2-camera-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }
  .v2-photo-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }
  .v2-camera-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .v2-photo-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .v2-camera-frame {
    height: min(40vh, 360px);
    min-height: 180px;
  }
  .v2-inline-field-row {
    grid-template-columns: 1fr;
  }
  .v2-selected-party-card__head {
    flex-direction: column;
  }
  .v2-selected-party-card__grid {
    grid-template-columns: 1fr;
  }

  .route-map-panel {
    position: sticky;
    top: 14px;
    z-index: 4;
  }

  .route-trace-stops {
    max-height: clamp(220px, calc(100vh - 390px), 420px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }
}


.v2-hidden {
  display: none !important;
}

.v2-chart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-chart-row {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-surface-soft);
}

.v2-chart-copy strong {
  display: block;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-chart-copy span {
  display: block;
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.v2-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2-chart-bar-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9eef7;
}

.v2-chart-bar {
  height: 100%;
  border-radius: 999px;
}

.v2-chart-bar-accent {
  background: linear-gradient(135deg, var(--sp-accent), #818cf8);
}

.v2-chart-bar-ink {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.v2-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-board-card {
  padding: 14px 16px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-surface-soft);
}

.v2-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.v2-board-head strong {
  color: var(--sp-title);
  font-size: 13px;
}

.v2-board-head span {
  color: var(--sp-accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.v2-board-card p {
  margin-top: 8px;
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.v2-opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-opportunity-card {
  padding: 14px 16px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-surface-soft);
}

.v2-opportunity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.v2-opportunity-head strong {
  color: var(--sp-title);
  font-size: 13px;
}

.v2-opportunity-head span {
  color: var(--sp-accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.v2-opportunity-card p {
  margin-top: 8px;
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.v2-opportunity-meta {
  margin-top: 8px;
  color: var(--sp-text-muted);
  font-size: 11px;
}


.v2-dashboard-hero-grid,
.v2-dashboard-ops-grid {
  align-items: stretch;
}

.v2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-kpi-card {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.v2-kpi-card span {
  display: block;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-kpi-card strong {
  display: block;
  margin-top: 8px;
  color: var(--sp-title);
  font-size: 18px;
  line-height: 1.15;
}

.v2-kv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v2-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-surface-soft);
}

.v2-kv-row span {
  color: var(--sp-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.v2-kv-row strong {
  color: var(--sp-title);
  font-size: 14px;
  text-align: right;
}


.v2-dashboard-top-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
  align-items: start;
}

.v2-dashboard-side-stack {
  display: grid;
  gap: 20px;
}

.v2-dashboard-balance-grid {
  align-items: stretch;
}

.v2-card-snapshot .v2-section-text {
  max-width: 900px;
}

.v2-stat-grid--wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v2-stat--color {
  border-color: color-mix(in srgb, var(--stat-tone) 22%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--stat-soft) 80%, white) 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.v2-stat--color .v2-stat-value {
  color: var(--stat-tone);
}

.v2-workspace-strip {
  display: grid;
  gap: 14px;
}

.v2-workspace-strip__main {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--sp-border);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(14, 165, 233, 0.08));
}

.v2-workspace-strip__main strong,
.v2-workspace-strip__main span {
  display: block;
}

.v2-workspace-strip__main strong {
  color: var(--sp-title);
  font-size: 16px;
}

.v2-workspace-strip__main span {
  margin-top: 6px;
  color: var(--sp-text-muted);
  font-size: 12px;
}

.v2-workspace-strip__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.v2-workspace-pill {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sp-surface-soft);
  border: 1px solid var(--sp-border);
}

.v2-workspace-pill span,
.v2-workspace-pill strong {
  display: block;
}

.v2-workspace-pill span {
  color: var(--sp-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.v2-workspace-pill strong {
  margin-top: 6px;
  color: var(--sp-title);
  font-size: 13px;
}

.v2-mini-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-mini-kv-card {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--mini-tone) 18%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--mini-soft) 88%, white) 0%, #ffffff 100%);
}

.v2-mini-kv-card span,
.v2-mini-kv-card strong {
  display: block;
}

.v2-mini-kv-card span {
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.v2-mini-kv-card strong {
  margin-top: 8px;
  color: var(--mini-tone);
  font-size: 15px;
}

.v2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-kpi-card {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--kpi-tone) 16%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--kpi-soft) 88%, white) 0%, #ffffff 100%);
}

.v2-kpi-card span {
  display: block;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v2-kpi-card strong {
  display: block;
  margin-top: 8px;
  color: var(--kpi-tone);
  font-size: 18px;
  line-height: 1.15;
}

.v2-quick-card {
  border-color: color-mix(in srgb, var(--quick-tone) 16%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--quick-soft) 88%, white) 0%, #ffffff 100%);
}

.v2-quick-card strong {
  color: var(--quick-tone);
}

.v2-chart-bars--triple {
  display: grid;
  gap: 8px;
}

.v2-chart-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #edf2f9;
  overflow: hidden;
}

.v2-chart-bar {
  height: 100%;
  border-radius: inherit;
}

.v2-chart-bar--visits {
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
}

.v2-chart-bar--sales {
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
}

.v2-chart-bar--collections {
  background: linear-gradient(90deg, #10b981, #14b8a6);
}

.v2-board-card {
  border-color: color-mix(in srgb, var(--board-tone) 18%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--board-soft) 88%, white) 0%, #ffffff 100%);
}

.v2-board-head strong {
  color: var(--board-tone);
}

.v2-chart-bar--board {
  background: linear-gradient(90deg, var(--board-tone), color-mix(in srgb, var(--board-tone) 72%, white));
}

.v2-rank-row--color {
  border-color: color-mix(in srgb, var(--rank-tone) 16%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rank-soft) 90%, white) 0%, #ffffff 100%);
}

.v2-rank-row--color .v2-rank-label,
.v2-rank-row--color .v2-rank-value strong {
  color: var(--rank-tone);
}

.v2-opportunity-card {
  border: 1px solid color-mix(in srgb, var(--op-tone) 14%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--op-soft) 90%, white) 0%, #ffffff 100%);
}

.v2-opportunity-head strong {
  color: var(--op-tone);
}

#dashboardSummaryState .v2-stat--color,
#dashboardWorkPulseState .v2-kpi-card,
#dashboardStatusMixState .v2-board-card,
#dashboardCategoryMixState .v2-board-card,
#dashboardProductivityState .v2-rank-row--color,
#dashboardCityMixState .v2-board-card,
#dashboardTopOpportunitiesState .v2-opportunity-card,
#dashboardRecentGpsState .v2-opportunity-card {
  border-color: var(--sp-border);
  background: var(--sp-surface-soft);
  box-shadow: none;
}

#dashboardSummaryState .v2-stat--color .v2-stat-value,
#dashboardWorkPulseState .v2-kpi-card strong,
#dashboardStatusMixState .v2-board-head strong,
#dashboardStatusMixState .v2-board-head span,
#dashboardCategoryMixState .v2-board-head strong,
#dashboardCategoryMixState .v2-board-head span,
#dashboardProductivityState .v2-rank-row--color .v2-rank-label,
#dashboardProductivityState .v2-rank-row--color .v2-rank-value strong,
#dashboardCityMixState .v2-board-head strong,
#dashboardCityMixState .v2-board-head span,
#dashboardTopOpportunitiesState .v2-opportunity-head strong,
#dashboardRecentGpsState .v2-opportunity-head strong {
  color: var(--sp-title);
}

#dashboardStatusMixState .v2-chart-bar--board,
#dashboardCategoryMixState .v2-chart-bar--board,
#dashboardCityMixState .v2-chart-bar--board {
  background: #64748b;
}

.v2-runway-card {
  display: grid;
  gap: 16px;
}

.v2-runway-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.v2-runway-head strong,
.v2-runway-head span,
.v2-runway-head__metric strong,
.v2-runway-head__metric span {
  display: block;
}

.v2-runway-head strong {
  color: var(--sp-title);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.v2-runway-head span,
.v2-runway-head__metric span {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
}

.v2-runway-head__metric {
  text-align: right;
}

.v2-runway-head__metric strong {
  color: #0f766e;
  font-size: 20px;
}

.v2-runway-track {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  height: 14px;
  background: #edf2f9;
}

.v2-runway-segment {
  height: 100%;
}

.v2-runway-segment--collected {
  background: linear-gradient(90deg, #10b981, #14b8a6);
}

.v2-runway-segment--credits {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.v2-runway-segment--outstanding {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.v2-runway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v2-runway-tile {
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface-soft);
}

.v2-runway-tile span,
.v2-runway-tile strong,
.v2-runway-tile small {
  display: block;
}

.v2-runway-tile span {
  color: var(--sp-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.v2-runway-tile strong {
  margin-top: 8px;
  font-size: 16px;
}

.v2-runway-tile small {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
}

.v2-runway-tile--collected strong { color: #0f766e; }
.v2-runway-tile--credits strong { color: #b45309; }
.v2-runway-tile--outstanding strong { color: #b91c1c; }
.v2-runway-tile--today strong { color: #0f172a; }

.v2-order-coverage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.v2-order-coverage-summary-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.06) 0%, #ffffff 100%);
}

.v2-order-coverage-summary-card span,
.v2-order-coverage-summary-card strong,
.v2-order-coverage-summary-card small {
  display: block;
}

.v2-order-coverage-summary-card span {
  color: var(--sp-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.v2-order-coverage-summary-card strong {
  margin-top: 8px;
  color: var(--sp-title);
  font-size: 18px;
}

.v2-order-coverage-summary-card small {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
}

.v2-order-coverage-table-wrap {
  overflow-x: auto;
}

.v2-order-coverage-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.v2-order-coverage-table thead th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sp-border);
  color: var(--sp-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
}

.v2-order-coverage-table tbody td,
.v2-order-coverage-table tbody th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sp-border);
  vertical-align: top;
}

.v2-order-coverage-table__stub strong,
.v2-order-coverage-table__stub span {
  display: block;
}

.v2-order-coverage-table__stub strong {
  color: var(--sp-title);
  font-size: 13px;
}

.v2-order-coverage-table__stub span {
  margin-top: 4px;
  color: var(--sp-text-muted);
  font-size: 11px;
}

.v2-order-coverage-cell {
  background: color-mix(in srgb, #4f46e5 calc(var(--heat) * 42%), white);
  border-radius: 14px;
}

.v2-order-coverage-cell span,
.v2-order-coverage-cell strong,
.v2-order-coverage-cell small {
  display: block;
}

.v2-order-coverage-cell span {
  color: var(--sp-text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v2-order-coverage-cell strong {
  margin-top: 6px;
  color: var(--sp-title);
  font-size: 16px;
}

.v2-order-coverage-cell small {
  margin-top: 4px;
  color: #475569;
  font-size: 11px;
}

@media (max-width: 1240px) {
  .v2-dashboard-top-grid,
  .v2-dashboard-balance-grid {
    grid-template-columns: 1fr;
  }

  .v2-stat-grid--wide,
  .v2-workspace-strip__meta,
  .v2-order-coverage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .v2-stat-grid--wide,
  .v2-mini-kv-grid,
  .v2-kpi-grid,
  .v2-runway-grid,
  .v2-order-coverage-summary,
  .v2-workspace-strip__meta {
    grid-template-columns: 1fr;
  }
}


.v2-work-top-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  align-items: start;
}

.v2-work-side-stack {
  display: grid;
  gap: 20px;
}

.v2-work-balance-grid {
  align-items: stretch;
}

.v2-stat-grid--work {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.v2-quick-card--static {
  cursor: default;
}

.v2-quick-card--static:hover {
  transform: none;
}

.v2-kpi-card small {
  display: block;
  margin-top: 6px;
  color: var(--sp-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.v2-chart-bars--double {
  display: grid;
  gap: 8px;
}

@media (max-width: 1240px) {
  .v2-work-top-grid,
  .v2-work-balance-grid {
    grid-template-columns: 1fr;
  }

  .v2-stat-grid--work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .v2-stat-grid--work {
    grid-template-columns: 1fr;
  }
}

.v2-segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #dbe2f0;
  border-radius: 999px;
  background: #f8fafc;
}

.v2-segmented-control__item {
  border: 0;
  background: transparent;
  color: #475569;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.v2-segmented-control__item.is-active {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  color: #fff;
}

.v2-segmented-control-wrap {
  display: flex;
  flex-wrap: wrap;
}

.v2-dropdown-option-list {
  display: grid;
  gap: 14px;
}

.v2-dropdown-option-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #dbe2f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.v2-dropdown-option-main {
  min-width: 0;
}

.v2-dropdown-option-main .v2-field {
  margin: 0;
}

.v2-dropdown-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.v2-dropdown-option-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #0f172a;
}

.v2-dropdown-option-toggle input {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  .v2-dropdown-option-card {
    grid-template-columns: 1fr;
  }
}

.v2-drawer__sheet-wide {
  width: min(760px, 100%);
}

.v2-field-span-2 {
  grid-column: span 2;
}

.v2-field-span-3 {
  grid-column: 1 / -1;
}

.v2-invoice-preview-grid-aux {
  align-items: stretch;
}

.v2-invoice-preview-bank,
.v2-invoice-preview-signatory,
.v2-invoice-preview-qr {
  display: grid;
  gap: 10px;
}

.v2-invoice-preview-bank__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v2-invoice-preview-bank__grid span,
.v2-invoice-preview-signatory__canvas .v2-register-meta,
.v2-invoice-preview-qr .v2-register-meta {
  color: #64748b;
  font-size: 12px;
}

.v2-invoice-preview-bank__grid strong {
  display: block;
  margin-top: 4px;
}

.v2-invoice-preview-signatory__canvas,
.v2-invoice-preview-qr__canvas {
  min-height: 96px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #fff;
}

.v2-invoice-preview-signature-image,
.v2-invoice-preview-qr-image {
  max-width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.v2-invoice-preview--modern .v2-invoice-preview-modern-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(109, 40, 217, 0.12));
  border: 1px solid #dbe2f0;
}

.v2-invoice-modern-hero__brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.v2-selected-party-card--compact p {
  margin-top: 10px;
}

@media (max-width: 1280px) {
  .v2-field-span-2,
  .v2-field-span-3 {
    grid-column: 1 / -1;
  }

  .v2-invoice-address-card__meta,
  .v2-invoice-meta-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sp-login-shell {
    width: 100%;
  }

  body.sp-login-body {
    padding: 14px;
    align-items: flex-start;
  }

  .sp-login-stage {
    grid-template-columns: 1fr;
  }

  .sp-login-brand-panel {
    padding: 22px;
    gap: 18px;
  }

  .sp-login-brand-panel-logo {
    width: min(280px, 100%);
  }

  .sp-login-brand-panel-copy h1 {
    font-size: 26px;
  }

  .sp-login-panel {
    padding: 20px;
    border-radius: 18px;
  }

  .sp-inline-field {
    grid-template-columns: 1fr;
  }

  .sp-topbar-actions {
    width: 100%;
  }

  .sp-theme-select-wrap {
    min-width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }

  .sp-topbar-user {
    flex: 1 1 100%;
  }

  .sp-notification-panel {
    right: 0;
    width: min(390px, calc(100vw - 28px));
  }

  .sp-topbar-logout {
    width: 100%;
    justify-content: center;
  }

  .v2-invoice-sheet {
    padding: 18px;
    border-radius: 20px;
  }

  .v2-invoice-sheet--paper {
    padding: 12px;
    border-radius: 12px;
  }

  .v2-invoice-brand,
  .v2-invoice-modern-hero__brand {
    flex-direction: column;
    gap: 12px;
  }

  .v2-invoice-brand__logo,
  .v2-invoice-brand__logo--hero {
    width: 124px;
    max-width: 100%;
  }

  .v2-invoice-paper__header,
  .v2-invoice-paper__detail-grid,
  .v2-invoice-paper__bottom-grid,
  .v2-invoice-paper__payments-grid,
  .v2-invoice-paper__footer {
    grid-template-columns: 1fr;
  }

  .v2-invoice-paper__detail-divider {
    display: none;
  }

  .v2-invoice-paper__title {
    justify-items: start;
    padding-top: 0;
  }

  .v2-invoice-paper__title h2,
  .v2-invoice-paper__company-block,
  .v2-invoice-paper__header-meta {
    text-align: left;
    justify-items: start;
  }

  .v2-invoice-paper__meta-row {
    grid-template-columns: 92px 10px minmax(0, 1fr);
  }

  .route-trace-map,
  .route-trace-map .leaflet-container {
    min-height: 320px;
  }

  .route-trace-svg {
    height: 320px;
  }

  .route-trace-stops {
    max-height: clamp(220px, calc(100vh - 360px), 420px);
    padding-bottom: 12px;
  }

  .route-trace-map-note {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 1.45;
  }

  .route-timeline {
    --route-time-width: 72px;
    --route-track-width: 24px;
    --route-gap: 10px;
    --route-node-size: 24px;
    gap: 12px;
  }

  .route-stop-time {
    margin-top: 8px;
    padding: 7px 8px;
    font-size: 11px;
    text-align: center;
  }

  .route-stop-titleline {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .route-stop-titleline strong {
    font-size: 16px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .route-stop-status {
    white-space: normal;
    max-width: 100%;
  }

  .route-stop-body {
    padding: 14px 14px 13px;
    border-radius: 16px;
  }

  .route-stop-body::before {
    left: -8px;
    top: 14px;
    width: 16px;
    height: 16px;
  }

  .route-stop-body p,
  .route-stop-body small,
  .route-stop-distance {
    overflow-wrap: anywhere;
  }

  .route-stop-distance {
    display: block;
    line-height: 1.45;
  }
}
