:root {
  color-scheme: light;
  --ink-950: #07110d;
  --ink-900: #0c1812;
  --ink-850: #101e17;
  --ink-800: #17271f;
  --ink-700: #273a30;
  --ink-600: #52675c;
  --ink-500: #71847a;
  --ink-400: #9aa9a1;
  --surface: #f4f7f2;
  --surface-raised: #ffffff;
  --surface-soft: #eef3ee;
  --surface-tint: #e8f5e9;
  --line: #dce5dd;
  --line-strong: #c9d6cc;
  --brand: #00ef35;
  --brand-bright: #00ff01;
  --brand-deep: #008f2b;
  --brand-ink: #03220d;
  --info: #587ff2;
  --warning: #e9931a;
  --danger: #d84c4c;
  --violet: #795fe5;
  --shadow-sm: 0 8px 24px rgba(8, 25, 16, 0.07);
  --shadow-md: 0 18px 54px rgba(8, 25, 16, 0.11);
  --shadow-lg: 0 30px 90px rgba(3, 17, 10, 0.23);
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --sidebar-width: 252px;
  --topbar-height: 74px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --font-display: "Manrope", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--ink-950);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(0, 239, 53, 0.42);
  outline-offset: 2px;
}

::selection {
  background: rgba(0, 239, 53, 0.24);
  color: var(--ink-950);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(400px, 1.15fr) minmax(420px, 0.85fr);
  background: var(--ink-950);
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(42px, 7vw, 96px);
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}

.auth-brand::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom right, black, transparent 78%);
}

.auth-brand::after {
  position: absolute;
  z-index: -1;
  width: min(56vw, 760px);
  height: min(56vw, 760px);
  right: -22%;
  bottom: -35%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 1, 0.2), rgba(0, 239, 53, 0.04) 40%, transparent 70%);
  content: "";
  filter: blur(6px);
}

.auth-brand-inner {
  width: min(650px, 100%);
}

.auth-logo {
  width: clamp(120px, 11vw, 166px);
  height: auto;
  margin-bottom: clamp(56px, 8vh, 90px);
  filter: drop-shadow(0 12px 34px rgba(0, 255, 1, 0.12));
}

.auth-eyebrow {
  margin: 0 0 16px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-brand h1 {
  max-width: 680px;
  margin: 0;
  color: #f7faf7;
  font-family: var(--font-display);
  font-size: clamp(46px, 6vw, 88px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-lead {
  max-width: 600px;
  margin: 28px 0 0;
  color: #aabbb1;
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.55;
}

.auth-signal {
  display: flex;
  height: 44px;
  margin-top: 60px;
  gap: 9px;
  align-items: flex-end;
}

.auth-signal span {
  display: block;
  width: 3px;
  border-radius: 9px;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(0, 255, 1, 0.4);
  animation: signal 2.4s var(--ease) infinite;
}

.auth-signal span:nth-child(1) { height: 9px; animation-delay: -1.3s; }
.auth-signal span:nth-child(2) { height: 22px; animation-delay: -0.7s; }
.auth-signal span:nth-child(3) { height: 37px; animation-delay: -1.7s; }
.auth-signal span:nth-child(4) { height: 17px; animation-delay: -0.25s; }
.auth-signal span:nth-child(5) { height: 29px; animation-delay: -1s; }

@keyframes signal {
  0%, 100% { opacity: 0.3; transform: scaleY(0.45); transform-origin: bottom; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: bottom; }
}

.auth-meta {
  position: absolute;
  left: clamp(42px, 7vw, 96px);
  bottom: 34px;
  margin: 0;
  color: #708178;
  font-size: 12px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 10%, rgba(0, 239, 53, 0.08), transparent 32%),
    #eef3ee;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: clamp(30px, 5vw, 50px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow-lg);
}

.login-card header {
  margin-bottom: 32px;
}

.login-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 730;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.login-card header > p:last-child {
  margin: 12px 0 0;
  color: var(--ink-600);
  font-size: 15px;
}

.form-control {
  margin-bottom: 20px;
}

.form-control label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.form-control input,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-950);
  outline: 0;
  padding: 10px 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.form-field textarea {
  min-height: 104px;
  resize: vertical;
}

.form-control input:hover,
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: #aebdb2;
}

.form-control input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 4px rgba(0, 239, 53, 0.11);
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"],
.form-control input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(216, 76, 76, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-500);
  place-items: center;
}

.password-toggle:hover {
  background: var(--surface-soft);
  color: var(--ink-900);
}

.field-error,
.form-status {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.app-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 110;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 50% -5%, rgba(0, 255, 1, 0.11), transparent 28%),
    var(--ink-950);
  color: #dbe6df;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  height: var(--topbar-height);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  min-width: 0;
  color: inherit;
  gap: 11px;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand strong {
  color: #f4fbf6;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand small {
  overflow: hidden;
  color: #82978b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  overflow: auto;
  padding: 20px 12px 30px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.nav-label {
  margin: 18px 11px 7px;
  color: #64796e;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 43px;
  margin: 3px 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #9fb0a7;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.nav-item span {
  font-size: 13px;
  font-weight: 690;
}

.nav-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.045);
  color: #f0f6f2;
}

.nav-item.active {
  border-color: rgba(0, 255, 1, 0.18);
  background: linear-gradient(90deg, rgba(0, 255, 1, 0.15), rgba(0, 255, 1, 0.035));
  color: #f5fff6;
}

.nav-item.active::before {
  position: absolute;
  width: 3px;
  top: 9px;
  bottom: 9px;
  left: -1px;
  border-radius: 4px;
  background: var(--brand);
  box-shadow: 0 0 16px rgba(0, 255, 1, 0.7);
  content: "";
}

.nav-item.active svg {
  color: var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  padding: 15px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.connection-state {
  display: flex;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  gap: 10px;
  align-items: center;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(0, 255, 1, 0.08), 0 0 14px rgba(0, 255, 1, 0.55);
  flex: 0 0 auto;
}

.connection-state.offline .connection-dot {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(216, 76, 76, 0.08), 0 0 14px rgba(216, 76, 76, 0.38);
}

.connection-state span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.connection-state strong {
  color: #dce7e0;
  font-size: 11px;
}

.connection-state small {
  color: #708279;
  font-size: 9px;
}

.sidebar-footer > p {
  margin: 12px 2px 0;
  color: #53655c;
  font-size: 9px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 90;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgba(202, 215, 204, 0.75);
  background: rgba(244, 247, 242, 0.88);
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
}

.topbar-start,
.topbar-actions {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
}

.route-context {
  min-width: 0;
}

.route-context p {
  margin: 0 0 1px;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-context h1 {
  overflow: hidden;
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 730;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search {
  display: flex;
  width: min(31vw, 390px);
  height: 40px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-500);
  gap: 9px;
  align-items: center;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.global-search:focus-within {
  border-color: rgba(0, 143, 43, 0.6);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 239, 53, 0.09);
}

.global-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.global-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
}

.global-search input::placeholder {
  color: #87988f;
}

.global-search kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-500);
  font-family: var(--font);
  font-size: 9px;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-600);
  place-items: center;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-950);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.menu-button,
.sidebar-close {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-primary {
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 8px 22px rgba(0, 239, 53, 0.17);
}

.button-primary:hover:not(:disabled) {
  background: var(--brand-bright);
  box-shadow: 0 12px 28px rgba(0, 239, 53, 0.24);
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink-700);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--ink-950);
  box-shadow: var(--shadow-sm);
}

.button-dark {
  background: var(--ink-950);
  color: #fff;
}

.button-dark:hover:not(:disabled) {
  background: var(--ink-800);
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #eaf3ed;
}

.button-ghost:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
}

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

.button-danger:hover:not(:disabled) {
  background: #c23e3e;
  box-shadow: 0 10px 24px rgba(216, 76, 76, 0.2);
}

.button-small {
  min-height: 33px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 11px;
}

.button-large {
  min-height: 48px;
  padding: 0 20px;
  font-size: 13px;
}

.button-block {
  width: 100%;
}

.button-loader {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.is-loading .button-label {
  opacity: 0.8;
}

.is-loading .button-loader {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-button {
  display: flex;
  height: 42px;
  min-width: 0;
  padding: 4px 7px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-700);
  gap: 8px;
  align-items: center;
}

.profile-button:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink-950);
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  place-items: center;
}

.profile-copy {
  display: flex;
  max-width: 145px;
  min-width: 0;
  text-align: left;
  flex-direction: column;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 11px;
}

.profile-copy small {
  color: var(--ink-500);
  font-size: 9px;
}

.profile-button > svg {
  width: 14px;
  height: 14px;
}

.profile-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% - 6px);
  right: clamp(18px, 3vw, 42px);
  width: 238px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.profile-menu-head {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  flex-direction: column;
}

.profile-menu-head strong {
  font-size: 12px;
}

.profile-menu-head small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu button {
  display: flex;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  background: #fff;
  color: var(--ink-700);
  gap: 9px;
  align-items: center;
  text-align: left;
}

.profile-menu button:hover {
  background: var(--surface-soft);
  color: var(--ink-950);
}

.profile-menu button svg {
  width: 17px;
  height: 17px;
}

.content {
  min-height: calc(100vh - var(--topbar-height));
  padding: clamp(24px, 3.5vw, 50px);
}

.content-state {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.page-intro {
  display: flex;
  margin-bottom: 24px;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
}

.page-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 730;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.page-intro p:not(.eyebrow) {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--ink-600);
}

.page-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-hero {
  position: relative;
  display: grid;
  min-height: 320px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 12%, rgba(0, 255, 1, 0.18), transparent 30%),
    linear-gradient(125deg, var(--ink-950), #0b1d13 60%, #0a2a16);
  color: #f5faf6;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  gap: clamp(28px, 5vw, 76px);
  isolation: isolate;
  box-shadow: 0 28px 75px rgba(3, 17, 10, 0.19);
}

.dashboard-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 35px 35px;
  content: "";
  mask-image: linear-gradient(to right, black, transparent 82%);
}

.hero-copy {
  align-self: center;
}

.hero-date {
  display: flex;
  margin-bottom: 20px;
  color: var(--brand);
  gap: 9px;
  align-items: center;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-date::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(0, 255, 1, 0.08), 0 0 16px rgba(0, 255, 1, 0.45);
  content: "";
}

.hero-copy h2 {
  max-width: 820px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 690;
  letter-spacing: -0.06em;
  line-height: 0.99;
}

.hero-copy > p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #a8bbb0;
  font-size: clamp(15px, 1.6vw, 19px);
}

.hero-actions {
  display: flex;
  margin-top: 30px;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-focus {
  position: relative;
  display: flex;
  min-height: 220px;
  padding: 25px;
  border: 1px solid rgba(0, 255, 1, 0.32);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(0, 255, 1, 0.95), rgba(0, 221, 62, 0.88));
  color: var(--brand-ink);
  flex-direction: column;
  justify-content: space-between;
  align-self: center;
  box-shadow: 0 24px 50px rgba(0, 239, 53, 0.14);
}

.hero-focus::after {
  position: absolute;
  width: 80px;
  height: 80px;
  right: 16px;
  bottom: 12px;
  border: 1px solid rgba(3, 34, 13, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 18px rgba(3, 34, 13, 0.035), 0 0 0 36px rgba(3, 34, 13, 0.02);
}

.hero-focus-label {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-focus h3 {
  position: relative;
  z-index: 1;
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.hero-focus p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(3, 34, 13, 0.75);
}

.hero-focus .button {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  align-self: flex-start;
}

.metric-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 140px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.metric-card-head {
  display: flex;
  color: var(--ink-500);
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.metric-card-head span {
  font-size: 11px;
  font-weight: 720;
}

.metric-card-head svg {
  width: 17px;
  height: 17px;
}

.metric-tone-0 .metric-card-head svg { color: var(--brand-deep); }
.metric-tone-1 .metric-card-head svg { color: var(--info); }
.metric-tone-2 .metric-card-head svg { color: var(--warning); }
.metric-tone-3 .metric-card-head svg { color: var(--violet); }

.metric-card strong {
  display: block;
  overflow: hidden;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.6vw, 38px);
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--ink-500);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: 18px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  min-height: 74px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 740;
  letter-spacing: -0.025em;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: 10px;
}

.panel-body {
  padding: 20px;
}

.workflow-list {
  display: grid;
  padding: 7px 0;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}

.workflow-step {
  position: relative;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step::before {
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 15px;
  border-radius: 4px;
  background: var(--brand);
  content: "";
}

.workflow-step strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step span {
  display: block;
  margin-top: 4px;
  color: var(--ink-500);
  font-size: 10px;
}

.focus-list,
.activity-list,
.integration-list {
  display: grid;
  gap: 10px;
}

.focus-item {
  display: flex;
  width: 100%;
  min-height: 77px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  gap: 12px;
  align-items: center;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

button.focus-item:hover {
  transform: translateY(-1px);
  border-color: #b9c9bc;
  box-shadow: var(--shadow-sm);
}

.focus-index {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink-950);
  color: var(--brand);
  font-size: 9px;
  font-weight: 850;
  flex: 0 0 auto;
  place-items: center;
}

.focus-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.focus-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-item > svg {
  width: 17px;
  height: 17px;
  color: var(--ink-400);
  flex: 0 0 auto;
}

.activity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
}

.activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border: 2px solid var(--surface-raised);
  border-radius: 50%;
  background: var(--brand-deep);
  box-shadow: 0 0 0 2px rgba(0, 143, 43, 0.15);
}

.activity-copy strong,
.activity-copy small {
  display: block;
}

.activity-copy strong {
  font-size: 11px;
}

.activity-copy small,
.activity-item time {
  color: var(--ink-500);
  font-size: 9px;
}

.activity-item time {
  white-space: nowrap;
}

.integration-item {
  display: grid;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.integration-mark {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-700);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.04em;
  place-items: center;
}

.integration-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.integration-copy strong {
  font-size: 11px;
}

.integration-copy small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-400);
}

.state-dot.ok,
.state-dot.ready,
.state-dot.active,
.state-dot.connected {
  background: var(--brand-deep);
  box-shadow: 0 0 0 4px rgba(0, 143, 43, 0.09);
}

.state-dot.warning,
.state-dot.pending {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(233, 147, 26, 0.09);
}

.state-dot.error,
.state-dot.failed,
.state-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(216, 76, 76, 0.09);
}

.list-toolbar {
  display: flex;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(255, 255, 255, 0.76);
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.list-search {
  display: flex;
  min-width: min(430px, 55%);
  height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-500);
  gap: 8px;
  align-items: center;
}

.list-search:focus-within {
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(0, 239, 53, 0.08);
}

.list-search svg {
  width: 16px;
  height: 16px;
}

.list-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
}

.list-meta {
  color: var(--ink-500);
  font-size: 10px;
  white-space: nowrap;
}

.data-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.table-scroll {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #f8faf8;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.data-table tbody tr:hover {
  background: #f8fbf8;
}

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

.pagination {
  display: flex;
  min-height: 62px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fafcfa;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.pagination span {
  color: var(--ink-500);
  font-size: 10px;
}

.data-table td[data-align="right"],
.data-table th[data-align="right"] {
  text-align: right;
}

.cell-primary {
  display: block;
  color: var(--ink-900);
  font-weight: 740;
}

.cell-secondary {
  display: block;
  max-width: 380px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.row-action {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-500);
  place-items: center;
}

.row-action:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink-950);
}

.row-action svg {
  width: 15px;
  height: 15px;
}

.status-badge {
  display: inline-flex;
  max-width: 180px;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #d6ded8;
  border-radius: 999px;
  background: #f1f4f2;
  color: var(--ink-600);
  align-items: center;
  font-size: 9px;
  font-weight: 820;
  white-space: nowrap;
}

.status-badge[data-status="ready"],
.status-badge[data-status="accepted"],
.status-badge[data-status="completed"],
.status-badge[data-status="customer_confirmed"],
.status-badge[data-status="paid"],
.status-badge[data-status="active"] {
  border-color: rgba(0, 143, 43, 0.2);
  background: rgba(0, 239, 53, 0.1);
  color: #08742c;
}

.status-badge[data-status="sent"],
.status-badge[data-status="in_execution"],
.status-badge[data-status="in_progress"],
.status-badge[data-status="open"],
.status-badge[data-status="lexware_draft"] {
  border-color: rgba(88, 127, 242, 0.2);
  background: rgba(88, 127, 242, 0.1);
  color: #3557bd;
}

.status-badge[data-status="waiting"],
.status-badge[data-status="pending"],
.status-badge[data-status="offered"] {
  border-color: rgba(233, 147, 26, 0.22);
  background: rgba(233, 147, 26, 0.1);
  color: #9a5b03;
}

.status-badge[data-status="failed"],
.status-badge[data-status="cancelled"],
.status-badge[data-status="overdue"] {
  border-color: rgba(216, 76, 76, 0.2);
  background: rgba(216, 76, 76, 0.1);
  color: #ae3434;
}

.progress-cell {
  display: flex;
  min-width: 110px;
  gap: 8px;
  align-items: center;
}

.progress-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  flex: 1;
}

.progress-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--brand-deep);
}

.progress-element {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand-deep);
  appearance: none;
}

.progress-element::-webkit-progress-bar {
  border-radius: 8px;
  background: var(--surface-soft);
}

.progress-element::-webkit-progress-value {
  border-radius: 8px;
  background: var(--brand-deep);
}

.progress-element::-moz-progress-bar {
  border-radius: 8px;
  background: var(--brand-deep);
}

.progress-cell span {
  min-width: 30px;
  color: var(--ink-500);
  font-size: 9px;
  text-align: right;
}

.empty-state,
.error-state,
.loading-state {
  display: grid;
  min-height: 360px;
  padding: 42px 24px;
  text-align: center;
  place-items: center;
}

.empty-state-inner,
.error-state-inner {
  width: min(430px, 100%);
}

.state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
  color: var(--ink-500);
  place-items: center;
}

.state-icon svg {
  width: 25px;
  height: 25px;
}

.empty-state h3,
.error-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.025em;
}

.empty-state p,
.error-state p {
  margin: 9px auto 19px;
  color: var(--ink-500);
}

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

.error-state .state-icon {
  border-color: rgba(216, 76, 76, 0.15);
  background: rgba(216, 76, 76, 0.08);
  color: var(--danger);
}

.loading-state {
  align-content: center;
  gap: 12px;
}

.loading-orbit {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.loading-orbit::before {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -4px;
  left: 19px;
  border-radius: 50%;
  background: var(--brand-deep);
  content: "";
  animation: orbit 850ms linear infinite;
  transform-origin: 4px 27px;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.loading-state p {
  margin: 0;
  color: var(--ink-500);
  font-size: 11px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.dashboard-loading-hero {
  min-height: 320px;
}

.dashboard-loading-grid {
  margin-top: 18px;
}

.skeleton {
  min-height: 130px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #e9eeea 20%, #f5f7f5 40%, #e9eeea 60%);
  background-size: 300% 100%;
  animation: shimmer 1.35s infinite linear;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.detail-drawer {
  position: fixed;
  z-index: 310;
  top: 0;
  right: 0;
  display: flex;
  width: min(520px, 100vw);
  height: 100vh;
  transform: translateX(105%);
  border-left: 1px solid var(--line);
  background: #fff;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 260ms var(--ease);
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-scrim,
.nav-scrim {
  position: fixed;
  z-index: 300;
  inset: 0;
  visibility: hidden;
  background: rgba(3, 17, 10, 0.5);
  opacity: 0;
  transition: opacity 220ms ease, visibility 220ms ease;
  backdrop-filter: blur(3px);
}

.drawer-scrim.open {
  visibility: visible;
  opacity: 1;
}

.drawer-header {
  display: flex;
  min-height: 86px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.035em;
}

.drawer-body {
  overflow: auto;
  padding: 24px;
  flex: 1;
}

.drawer-actions {
  display: flex;
  min-height: 72px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.detail-identity {
  padding: 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(0, 255, 1, 0.13), transparent 38%),
    var(--ink-950);
  color: #f2f8f4;
}

.detail-identity p {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-identity h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -0.035em;
}

.detail-identity small {
  display: block;
  margin-top: 8px;
  color: #95aa9e;
}

.detail-list {
  display: grid;
  margin: 24px 0 0;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.detail-list > div {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:nth-child(odd) {
  padding-right: 16px;
}

.detail-list > div:nth-child(even) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.detail-list dt {
  margin: 0 0 4px;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-list dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

.detail-items {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.detail-items > header {
  display: flex;
  min-height: 52px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
  align-items: center;
  justify-content: space-between;
}

.detail-items h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
}

.detail-items > header span {
  display: grid;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--ink-950);
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.detail-item {
  display: grid;
  min-height: 58px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

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

.detail-item > span {
  color: var(--ink-400);
  font-size: 9px;
  font-weight: 800;
}

.detail-item div {
  min-width: 0;
}

.detail-item strong,
.detail-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-item strong {
  font-size: 11px;
}

.detail-item small {
  margin-top: 2px;
  color: var(--ink-500);
  font-size: 9px;
}

.detail-item b {
  font-size: 10px;
  white-space: nowrap;
}

dialog {
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--ink-950);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(3, 17, 10, 0.56);
  backdrop-filter: blur(4px);
}

.entity-dialog {
  width: min(760px, calc(100vw - 28px));
}

.entity-dialog.quote-editor-dialog {
  width: min(1180px, calc(100vw - 28px));
}

.entity-dialog form {
  display: flex;
  max-height: calc(100vh - 28px);
  flex-direction: column;
}

.quote-preview-dialog {
  width: min(1200px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  overflow: hidden;
}

.quote-preview-toolbar {
  display: flex;
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.quote-preview-toolbar h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.quote-preview-toolbar .eyebrow {
  margin: 0;
}

.quote-preview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quote-preview-dialog iframe {
  display: block;
  width: 100%;
  height: calc(100% - 76px);
  border: 0;
  background: #e9eeeb;
}

.relation-picker {
  display: grid;
  gap: 8px;
}

.relation-picker select[size]:not([size="1"]) {
  min-height: 150px;
}

.relation-count {
  color: var(--ink-500);
  font-size: 12px;
}

.dialog-header {
  display: flex;
  min-height: 82px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.dialog-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.dialog-body {
  overflow: auto;
  padding: 24px;
}

.modal-loading {
  min-height: 190px;
  grid-column: 1 / -1;
}

.dialog-footer {
  display: flex;
  min-height: 72px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fafcfa;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-field {
  min-width: 0;
}

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

.form-field small {
  display: block;
  margin-top: 6px;
  color: var(--ink-500);
  font-size: 9px;
}

.form-field .field-error {
  min-height: 0;
}

.line-item-editor {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfb;
  grid-column: 1 / -1;
}

.line-item-editor > header {
  display: flex;
  min-height: 68px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #f5f8f5;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.line-item-editor h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.line-item-editor header p {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: 9px;
}

.line-item-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.line-item-row {
  position: relative;
  display: grid;
  padding: 15px 50px 15px 15px;
  background: #fff;
  grid-template-columns: minmax(105px, 0.8fr) minmax(170px, 2fr) repeat(5, minmax(78px, 0.62fr));
  gap: 10px;
}

.quote-editor-dialog .line-item-row {
  grid-template-columns:
    minmax(105px, 0.8fr)
    minmax(210px, 2fr)
    minmax(78px, 0.55fr)
    minmax(78px, 0.55fr)
    minmax(98px, 0.7fr)
    minmax(78px, 0.55fr)
    minmax(78px, 0.55fr);
}

.line-item-row label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-500);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.line-item-row input,
.line-item-row select,
.line-item-row textarea {
  width: 100%;
  min-height: 37px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: 0;
  font-size: 10px;
}

.line-item-row input:focus,
.line-item-row select:focus,
.line-item-row textarea:focus {
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(0, 239, 53, 0.08);
}

.line-item-row [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(216, 76, 76, 0.08);
}

.line-item-description {
  grid-column: 2 / -1;
}

.line-item-description textarea {
  min-height: 54px;
  resize: vertical;
}

.line-item-remove {
  position: absolute;
  top: 31px;
  right: 12px;
  display: grid;
  width: 31px;
  height: 31px;
  padding: 7px;
  border: 1px solid rgba(216, 76, 76, 0.14);
  border-radius: 8px;
  background: rgba(216, 76, 76, 0.06);
  color: var(--danger);
  place-items: center;
}

.line-item-remove:hover {
  background: rgba(216, 76, 76, 0.12);
}

.line-item-remove svg {
  width: 15px;
  height: 15px;
}

.line-item-empty {
  margin: 0;
  padding: 24px 16px;
  color: var(--ink-500);
  font-size: 10px;
  text-align: center;
}

.checkbox-field {
  display: flex;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  gap: 10px;
  align-items: center;
}

.checkbox-field input {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand-deep);
}

.checkbox-field label {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
}

.form-error-summary {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(216, 76, 76, 0.2);
  border-radius: 10px;
  background: rgba(216, 76, 76, 0.07);
  color: #a93333;
  font-size: 11px;
}

.dashboard-empty-panel {
  margin-top: 18px;
}

.compact-empty {
  margin: 0;
  color: var(--ink-500);
  font-size: 11px;
}

.create-choice-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.create-choice {
  display: grid;
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-900);
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 5px 12px;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.create-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 143, 43, 0.35);
  box-shadow: var(--shadow-sm);
}

.create-choice > span {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink-950);
  color: var(--brand);
  grid-row: span 2;
  place-items: center;
}

.create-choice > span svg {
  width: 18px;
  height: 18px;
}

.create-choice strong {
  align-self: end;
  font-family: var(--font-display);
  font-size: 15px;
}

.create-choice small {
  overflow: hidden;
  color: var(--ink-500);
  font-size: 9px;
  line-height: 1.45;
}

.confirm-dialog {
  width: min(430px, calc(100vw - 28px));
}

.confirm-dialog form {
  padding: 28px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 17px;
  border-radius: 16px;
  background: rgba(216, 76, 76, 0.09);
  color: var(--danger);
  place-items: center;
}

.confirm-icon svg {
  width: 25px;
  height: 25px;
}

.confirm-dialog h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.confirm-dialog p {
  margin: 10px 0 22px;
  color: var(--ink-600);
}

.confirm-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
}

.toast-region {
  position: fixed;
  z-index: 500;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(390px, calc(100vw - 36px));
  gap: 9px;
}

.toast {
  display: grid;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--ink-950);
  color: #ecf5ef;
  grid-template-columns: 30px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  animation: toast-in 260ms var(--ease) both;
}

.toast.removing {
  animation: toast-out 200ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(9px) scale(0.98); }
}

.toast-icon {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(0, 255, 1, 0.12);
  color: var(--brand);
  place-items: center;
}

.toast.error .toast-icon {
  background: rgba(216, 76, 76, 0.14);
  color: #ff8d8d;
}

.toast-icon svg {
  width: 16px;
  height: 16px;
}

.toast-copy strong,
.toast-copy span {
  display: block;
}

.toast-copy strong {
  font-size: 11px;
}

.toast-copy span {
  margin-top: 2px;
  color: #94a99d;
  font-size: 9px;
}

.toast-close {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #83978c;
  place-items: center;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

.noscript-notice {
  position: fixed;
  z-index: 3000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #7a1b1b;
  color: #fff;
  text-align: center;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 216px;
  }

  .profile-copy {
    display: none;
  }

  .profile-button {
    padding-right: 5px;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.7fr);
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .line-item-row {
    grid-template-columns: minmax(110px, 0.8fr) minmax(180px, 1.8fr) repeat(3, minmax(88px, 0.65fr));
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 252px;
  }

  .sidebar {
    z-index: 410;
    transform: translateX(-105%);
    box-shadow: var(--shadow-lg);
    transition: transform 240ms var(--ease);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .nav-scrim {
    z-index: 400;
    visibility: visible;
    opacity: 1;
  }

  .workspace {
    margin-left: 0;
  }

  .menu-button,
  .sidebar-close {
    display: grid;
  }

  .sidebar-close {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #a9bbb0;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .hero-focus {
    min-height: 190px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 64px;
  }

  .auth-view {
    display: block;
    min-height: 100svh;
    background: #eef3ee;
  }

  .auth-brand {
    min-height: 260px;
    padding: 32px 24px 44px;
    justify-content: flex-start;
  }

  .auth-logo {
    width: 92px;
    margin-bottom: 31px;
  }

  .auth-brand h1 {
    font-size: clamp(39px, 13vw, 58px);
  }

  .auth-lead {
    display: none;
  }

  .auth-signal,
  .auth-meta {
    display: none;
  }

  .auth-panel {
    min-height: 0;
    margin-top: -26px;
    padding: 0 16px 28px;
    background: transparent;
  }

  .login-card {
    padding: 27px 22px;
    border-radius: 20px;
  }

  .topbar {
    padding: 0 14px;
    gap: 8px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .global-search {
    display: none;
  }

  .quick-create {
    width: 39px;
    padding: 0;
  }

  .quick-create span {
    display: none;
  }

  .profile-button > svg {
    display: none;
  }

  .content {
    padding: 16px 10px 28px;
  }

  .page-intro {
    display: block;
    margin-bottom: 16px;
  }

  .page-intro h2 {
    font-size: 28px;
  }

  .page-intro p:not(.eyebrow) {
    margin-top: 6px;
    font-size: 13px;
  }

  .page-actions {
    margin-top: 16px;
    justify-content: flex-start;
  }

  .dashboard-hero {
    min-height: 0;
    padding: 28px 22px;
    border-radius: 20px;
    gap: 26px;
  }

  .hero-copy h2 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-copy > p {
    font-size: 14px;
  }

  .hero-focus {
    min-height: 180px;
    padding: 20px;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 126px;
    padding: 16px;
  }

  .metric-card strong {
    font-size: 25px;
  }

  .dashboard-grid {
    gap: 12px;
  }

  .workflow-list {
    grid-template-columns: 1fr 1fr;
  }

  .workflow-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .list-toolbar {
    display: block;
  }

  .list-search {
    min-width: 0;
    width: 100%;
  }

  .list-meta {
    display: block;
    margin-top: 8px;
    text-align: right;
  }

  .data-table th,
  .data-table td {
    padding: 12px;
  }

  .data-card {
    border-radius: 0 0 16px 16px;
  }

  .table-scroll {
    overflow: visible;
  }

  .data-table,
  .data-table tbody {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    padding: 8px;
  }

  .data-table tbody tr {
    display: grid;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .data-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table tbody tr td {
    display: flex;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }

  .data-table tbody tr td::before {
    color: var(--ink-500);
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .data-table tbody tr td:first-child {
    display: block;
    padding: 0 44px 9px 0;
    font-size: 14px;
    grid-column: 1 / -1;
  }

  .data-table tbody tr td:first-child::before,
  .data-table tbody tr td:last-child::before {
    display: none;
  }

  .data-table tbody tr td:last-child {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 0;
  }

  .data-table tbody tr {
    position: relative;
  }

  .pagination {
    padding: 10px;
    justify-content: space-between;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .create-choice-grid {
    grid-template-columns: 1fr;
  }

  .line-item-row {
    padding-right: 48px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-editor-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 18px;
  }

  .quote-editor-dialog form {
    max-height: calc(100svh - 16px);
  }

  .quote-editor-dialog .line-item-list {
    padding: 8px;
    background: #eef3ef;
    gap: 8px;
  }

  .quote-editor-dialog .line-item-row {
    padding: 14px 46px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

  .line-item-title,
  .line-item-description {
    grid-column: 1 / -1;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list > div:nth-child(odd),
  .detail-list > div:nth-child(even) {
    padding-right: 0;
    padding-left: 0;
    border-left: 0;
  }

  .drawer-actions {
    justify-content: stretch;
    padding: 10px;
  }

  .drawer-actions .button {
    min-height: 44px;
    flex: 1 1 100%;
  }

  .drawer-header {
    min-height: 66px;
    padding: 14px 16px;
  }

  .drawer-body {
    padding: 14px;
  }

  .dialog-body {
    padding: 20px 17px;
  }

  .dialog-header,
  .dialog-footer {
    padding-right: 17px;
    padding-left: 17px;
  }

  .profile-menu {
    right: 14px;
  }
}

.required-fields-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 143, 43, 0.28);
  border-radius: var(--radius-md);
  background: var(--surface-tint);
}

.required-fields-note strong {
  color: var(--brand-deep);
  font-size: 15px;
}

.required-fields-note span {
  font-size: 14px;
}

.required-fields-note small {
  color: var(--ink-600);
  font-size: 12px;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 143, 43, 0.11);
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  vertical-align: middle;
}

@media (max-width: 470px) {
  .topbar {
    padding: 0 8px;
  }

  .content {
    padding-right: 7px;
    padding-left: 7px;
  }

  .route-context p {
    display: none;
  }

  .route-context h1 {
    max-width: 120px;
    font-size: 17px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .page-actions .button {
    flex: 1;
  }

  .profile-button {
    border-color: transparent;
    background: transparent;
  }

  .quote-editor-dialog {
    width: calc(100vw - 8px);
    max-width: calc(100vw - 8px);
    max-height: calc(100svh - 8px);
    border-radius: 14px;
  }

  .quote-preview-dialog {
    width: calc(100vw - 8px);
    max-width: calc(100vw - 8px);
    height: calc(100svh - 8px);
    max-height: calc(100svh - 8px);
    border-radius: 14px;
  }

  .quote-preview-toolbar {
    min-height: 112px;
    padding: 10px 12px;
    align-items: flex-start;
  }

  .quote-preview-toolbar h2 {
    max-width: 130px;
    font-size: 18px;
  }

  .quote-preview-actions {
    align-items: stretch;
  }

  .quote-preview-actions .button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }

  .quote-preview-dialog iframe {
    height: calc(100% - 112px);
  }

  .quote-editor-dialog form {
    max-height: calc(100svh - 8px);
  }

  .quote-editor-dialog .dialog-header {
    min-height: 64px;
    padding: 12px 14px;
  }

  .quote-editor-dialog .dialog-header h2 {
    font-size: 20px;
  }

  .quote-editor-dialog .dialog-body {
    padding: 12px;
  }

  .quote-editor-dialog .line-item-editor > header {
    display: grid;
    align-items: stretch;
  }

  .quote-editor-dialog .line-item-editor > header .button {
    width: 100%;
  }

  .quote-editor-dialog .line-item-row {
    grid-template-columns: 1fr;
  }

  .quote-editor-dialog .line-item-title,
  .quote-editor-dialog .line-item-description {
    grid-column: 1;
  }

  .quote-editor-dialog .dialog-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 12px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Lesbarkeit: großzügigere Grundschrift auf Desktop und Mobilgeräten. */
body {
  font-size: 16px;
}

.nav-link,
.button,
.profile-copy strong,
.profile-menu a,
.profile-menu button {
  font-size: 14px;
}

.sidebar-section-title,
.connection-state strong,
.topbar-eyebrow,
.eyebrow,
.list-meta,
.pagination span,
.status-pill,
.data-table th,
.detail-list dt,
.field-hint,
.field-error,
.cell-secondary {
  font-size: 12px;
}

.connection-state small,
.profile-copy small,
.detail-item > span,
.activity-item time {
  font-size: 11px;
}

.page-intro p,
.data-table,
.detail-list dd,
.panel-body,
.drawer-body,
.dialog-body,
.empty-state p,
.error-state p {
  font-size: 15px;
}

input,
select,
textarea,
.field input,
.field select,
.field textarea {
  font-size: 16px;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .data-table {
    font-size: 15px;
  }

  .data-table td::before,
  .list-meta,
  .status-pill,
  .field-hint,
  .field-error {
    font-size: 12px;
  }
}
