:root {
  --background: 220 20% 97%;
  --foreground: 220 20% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 20% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 20% 10%;
  --primary: 213 66% 43%;
  --primary-foreground: 0 0% 100%;
  --secondary: 36 96% 57%;
  --secondary-foreground: 0 0% 10%;
  --muted-token: 220 14% 94%;
  --muted-foreground: 220 10% 46%;
  --accent: 217 91% 95%;
  --accent-foreground: 38 94% 56%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border-token: 220 14% 89%;
  --input: 220 14% 89%;
  --ring: 38 94% 56%;
  --success-token: 152 60% 45%;
  --warning: 38 92% 50%;
  --sidebar-background: 220 20% 98%;
  --sidebar-foreground: 220 20% 20%;
  --sidebar-primary: 217 91% 50%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 217 91% 95%;
  --sidebar-accent-foreground: 217 91% 35%;
  --sidebar-border: 220 14% 91%;
  --blue: #2558a8;
  --blue-dark: #1d4688;
  --navy: #1c2f51;
  --orange: #f6b526;
  --bg: #f1f5f9;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --text: #1a2233;
  --muted: #6b7385;
  --border: #d6dce5;
  --danger: #e54848;
  --success: #2da868;
  --focus-ring: #f7a419;
  --sidebar: 256px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(18, 24, 35, .1), 0 1px 2px -1px rgba(18, 24, 35, .1);
}

html.dark {
  --background: 220 20% 7%;
  --foreground: 220 14% 95%;
  --card: 220 20% 10%;
  --card-foreground: 220 14% 95%;
  --popover: 220 20% 10%;
  --popover-foreground: 220 14% 95%;
  --primary: 213 66% 53%;
  --muted-token: 220 14% 14%;
  --muted-foreground: 220 10% 55%;
  --accent: 217 50% 18%;
  --accent-foreground: 217 91% 70%;
  --destructive: 0 62% 30%;
  --border-token: 220 14% 18%;
  --input: 220 14% 18%;
  --ring: 217 91% 55%;
  --sidebar-background: 220 20% 8%;
  --sidebar-foreground: 220 14% 90%;
  --sidebar-primary: 217 91% 55%;
  --sidebar-accent: 217 50% 15%;
  --sidebar-accent-foreground: 217 91% 70%;
  --sidebar-border: 220 14% 16%;
  --bg: hsl(var(--background));
  --surface: hsl(var(--card));
  --surface-soft: hsl(var(--muted-token));
  --text: hsl(var(--foreground));
  --muted: hsl(var(--muted-foreground));
  --border: hsl(var(--border-token));
  --blue: hsl(var(--primary));
  --blue-dark: hsl(213 66% 60%);
  --orange: hsl(var(--secondary));
  --danger: hsl(var(--destructive));
  --success: hsl(152 60% 50%);
  --focus-ring: hsl(var(--ring));
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  font-size: 15px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

body { margin: 0; color: var(--text); background: var(--bg); font-size: .933rem; line-height: 1.45; }
strong, b { font-weight: 500; }
h1, h2, h3, h4, h5, h6 { font-weight: 500; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(37,88,168,.11), transparent 32%),
    radial-gradient(circle at 85% 85%, rgba(246,181,38,.12), transparent 30%),
    var(--bg);
}

.login-card {
  display: grid;
  width: min(420px,100%);
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(23,40,70,.14);
}

.login-brand { display: flex; align-items: center; gap: 13px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.login-brand img { width: 44px; height: 44px; object-fit: contain; }
.login-brand div { display: grid; line-height: 1.2; }
.login-brand strong { color: var(--navy); font-size: 1.2rem; letter-spacing: -.02em; }
.login-brand span { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.login-status { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); font-size: .8rem; }
.login-status.error { color: #a52e2e; }
.login-form { display: grid; gap: 15px; }
.login-form h1 { margin: 0; font-size: 1.35rem; }
.login-form p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.login-form .button { width: 100%; min-height: 42px; }
.login-error { padding: 10px 12px; border: 1px solid #efb8b8; border-radius: 8px; color: #a52e2e; background: #fff3f3; font-size: .77rem; }
.login-note { color: var(--muted); font-size: .7rem; text-align: center; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  width: var(--sidebar); padding: 20px 16px 16px; overflow-y: auto;
  color: hsl(var(--sidebar-foreground)); border-right: 1px solid hsl(var(--sidebar-border)); background: hsl(var(--sidebar-background));
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 2px 10px 16px; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: 1.08rem; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.main-nav { display: grid; gap: 4px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 9px 12px; border-radius: 10px; color: hsl(var(--sidebar-foreground)); font-size: .9rem; font-weight: 400; letter-spacing: -.005em; }
.main-nav a:hover { color: hsl(var(--sidebar-accent-foreground)); background: hsl(var(--sidebar-accent)); }
.main-nav a.active { color: hsl(var(--sidebar-primary-foreground)); background: hsl(var(--sidebar-primary)); font-weight: 450; }
.main-nav .nav-external { margin-left: auto; color: var(--muted); font-size: .7rem; }
.nav-icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-separator { height: 1px; margin: 8px 4px; background: #eceef2; }
.sidebar-bottom { display: grid; gap: 10px; margin-top: auto; padding-top: 22px; }
.sidebar-account { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 8px; border-top: 1px solid #eceef2; }
.sidebar-account > span:last-child { display: grid; min-width: 0; }
.sidebar-account strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account small { color: var(--muted); font-size: .72rem; }
.sidebar-account small[data-kind="ok"] { color: #16865c; }
.sidebar-account small[data-kind="saving"] { color: #b7791f; }
.sidebar-account small[data-kind="error"] { color: #d14b4b; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--navy); font-size: .72rem; font-weight: 500; }
.account-password-button { display:flex;align-items:center;gap:10px;width:100%;min-height:36px;padding:7px 12px;border:0;border-radius:9px;color:var(--muted);background:transparent;font-size:.78rem;text-align:left;cursor:pointer; }
.account-password-button:hover { color:var(--blue);background:#eef5ff; }
.account-password-button span { color:var(--blue);font-size:.9rem; }
.logout { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 9px; color: #c93e3e; background: transparent; text-align: left; cursor: pointer; }
.logout:hover { background: #fff1f1; }
.sidebar-close { display: none !important; }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--sidebar); overflow-x: clip; }
.mobile-topbar { display: none; }
main { width: 100%; max-width: none; min-height: calc(100vh - 42px); margin: 0; padding: clamp(18px,2.2vw,32px); }
.app-footer { display: grid; justify-items: center; gap: 2px; padding: 18px 32px; border-top: 1px solid var(--border); color: #7d8594; font-size: .72rem; text-align: center; }
.app-footer strong { color: var(--text); font-weight: 500; }
.page { display: grid; width: 100%; min-width: 0; max-width: none; gap: 24px; }
.page > *, .page-header > *, .section-header > * { min-width: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-header h1, .detail-heading h1 { margin: 0; font-size: 1.6rem; line-height: 1.35; letter-spacing: -.025em; font-weight: 500; }
.page-header .subtitle, .detail-heading .subtitle { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-header h2, .card h2, .card h3 { margin: 0; font-size: 1rem; }
.section-header p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.button, .icon-button, .chip, .tab, .phase-tile, .classification-option {
  border: 1px solid var(--border); background: #fff; cursor: pointer;
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: .875rem; font-weight: 500; white-space: nowrap; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { border-color: #c4cad3; background: #fafbfc; }
.button.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.success, .button.success:disabled { border-color: #86d5aa; color: #0d6b3d; background: #e8f8ef; opacity: 1; }
.process-actions .button.success { border-color: var(--success); color: #fff; background: var(--success); }
.process-actions .button.success:hover { border-color: #238956; background: #238956; }
.process-module-scanner { display: grid; grid-template-columns: auto minmax(220px,1fr) minmax(320px,.9fr); align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #9bd5b5; border-radius: 10px; background: #f0fbf5; }
.process-scanner-state { display: inline-flex; align-items: center; gap: 7px; color: #147647; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.process-scanner-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(45,168,104,.14); animation: scanner-pulse 1.8s ease-in-out infinite; }
.process-scanner-copy { display: grid; gap: 2px; min-width: 0; }
.process-scanner-copy strong { font-size: .82rem; }
.process-scanner-copy small { color: var(--muted); font-size: .7rem; }
.process-module-scan-form { display: grid; grid-template-columns: minmax(150px,1fr) auto; gap: 8px; }
.process-module-scan-form input { width: 100%; min-height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
.process-module-scan-form input:focus { border-color: var(--success); box-shadow: 0 0 0 2px rgba(45,168,104,.16); outline: 0; }
.process-module-scanner.compact { margin: 0 0 14px; grid-template-columns: auto minmax(190px,1fr) minmax(280px,.75fr); }
@keyframes scanner-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
@media (max-width: 900px) {
  .process-module-scanner, .process-module-scanner.compact { grid-template-columns: auto 1fr; }
  .process-module-scan-form { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .process-module-scanner, .process-module-scanner.compact { grid-template-columns: 1fr; }
  .process-module-scan-form { grid-column: auto; grid-template-columns: 1fr; }
  .process-module-scan-form .button { width: 100%; }
}
.button.accent { border-color: var(--orange); color: #312100; background: var(--orange); }
.button.danger { border-color: #f2c2c2; color: #bd3434; background: #fff7f7; }
.button.ghost { background: transparent; box-shadow: none; }
.button.small { min-height: 32px; padding: 0 12px; font-size: .75rem; }
.button.link { padding: 0; border: 0; color: var(--blue); background: transparent; box-shadow: none; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.icon-button:hover { background: #f4f6f8; }

.card, .table-card, .order-card, .settings-card {
  width: 100%; min-width: 0; max-width: none; border: 1px solid rgba(223,226,231,.8); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.card-body { padding: 24px; }
.grid-14 { grid-template-columns: repeat(14,minmax(0,1fr)); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi-card { display: flex; align-items: center; justify-content: space-between; min-height: 94px; padding: 18px 20px; }
.kpi-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.kpi-card strong { display: block; margin-top: 5px; font-size: 1.7rem; line-height: 1; }
.kpi-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: #fff; background: var(--navy); font-size: 1.2rem; }
.phase-panel { padding: 20px; }
.phase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.phase-tile { display: grid; gap: 5px; min-height: 78px; padding: 15px; border-radius: 10px; text-align: left; }
.phase-tile:hover { border-color: #a9c4e7; background: #f8fbff; }
.phase-tile.active { border-color: var(--blue); background: #eef5ff; box-shadow: 0 0 0 2px rgba(37,88,168,.12); }
.phase-tile.active strong, .phase-tile.active span { color: var(--blue); }
.phase-tile strong { color: var(--navy); font-size: 1.35rem; }
.phase-tile span { color: var(--muted); font-size: .76rem; }
.phase-tile.attention { border-color: #f4d5a0; background: #fffaf0; }

.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.toolbar-group { display: flex; align-items: end; gap: 12px; width: 100%; }
.field { display: grid; gap: 6px; color: #303641; font-size: .78rem; font-weight: 500; }
.field.grow { flex: 1; }
.field input, .field select, .field textarea, .search-input, .compact-select {
  width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.025); font-size: .87rem; font-weight: 400;
}
.field textarea { min-height: 94px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 2px rgba(247,164,25,.2); }
.field input:disabled { color: #7b818c; background: #f2f4f6; }
.field small, .form-hint, .muted { color: var(--muted); font-size: .76rem; font-weight: 400; }
.field small[data-status="available"] { color: var(--success); }
.field small[data-status="error"] { color: var(--danger); }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(216,67,67,.12); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.search-wrap { position: relative; flex: 1; }
.search-wrap::before { content: "⌕"; position: absolute; z-index: 1; left: 11px; top: 7px; color: #777f8b; }
.search-wrap .search-input { padding-left: 34px; }

.badge, .level-chip, .category-chip { display: inline-flex; align-items: center; width: fit-content; min-height: 22px; padding: 2px 10px; border: 1px solid transparent; border-radius: 999px; font-size: .8rem; font-weight: 500; line-height: 1.2; }
.badge { color: #374151; background: #f3f4f6; }
.status-waiting, .status-spares { color: #a16207; background: #fef9c3; }
.status-received, .status-inspection { color: #1d4ed8; background: #dbeafe; }
.status-offer { color: #c2410c; background: #ffedd5; }
.status-repair { color: #fff; background: #3b82f6; }
.status-final-inspection { color: #0f766e; background: #ccfbf1; }
.status-ready { color: #047857; background: #d1fae5; }
.status-invoice { color: #7e22ce; background: #f3e8ff; }
.status-complete { color: #15803d; background: #dcfce7; }
.status-cancelled { color: #b91c1c; background: #fee2e2; }
.level-chip { color: #4b5563; background: #f1f3f6; }
.level-chip.l1 { color: #15803d; background: #dcfce7; }
.level-chip.l2 { color: #1d4ed8; background: #dbeafe; }
.level-chip.l3 { color: #c2410c; background: #ffedd5; }
.level-chip.l4, .level-chip.rk { color: #9a3d35; background: #ffe9e6; }
.level-chip.rk { color: #7e22ce; background: #f3e8ff; }
.level-chip.donor { color: #0f766e; background: #ccfbf1; }
.material-indoor { color: #1d4ed8; background: #eff6ff; }
.material-outdoor { color: #c2410c; background: #fff7ed; }
.material-unknown { color: #374151; background: #f3f4f6; }

.orders-groups { display: grid; width: 100%; min-width: 0; gap: 24px; }
.order-group { display: grid; gap: 10px; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 0 2px; color: #6e7581; font-size: .7rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.group-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; border-radius: 999px; color: #606773; background: #e9ebef; font-size: .67rem; letter-spacing: 0; }
.empty-group { padding: 8px 3px; color: #969ba4; font-size: .78rem; font-style: italic; }
.order-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 18px 20px; cursor: pointer; }
.order-card:hover { border-color: #b9cbe1; }
.order-card.awaiting-inbound { border-color: #edc35a; background: #fff8dc; box-shadow: inset 4px 0 0 #f0b51c, var(--shadow); cursor: default; }
.order-card.awaiting-inbound:hover { border-color: #e2b536; }
.order-card-main { display: grid; gap: 9px; }
.order-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-card-title strong { font-size: .96rem; }
.order-card-customer { color: #353b45; font-size: .86rem; }
.order-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .75rem; }
.order-activity { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #707888; font-size: .7rem; font-variant-numeric: tabular-nums; }
.order-activity-updated, .order-runtime { display: inline-flex; align-items: center; gap: 4px; }
.order-activity-updated > span:first-child, .order-runtime > span:first-child { color: #718096; font-size: .78rem; }
.order-activity-date { color: #9299a5; }
.order-runtime { padding-left: 11px; border-left: 1px solid var(--border); }
.order-processing-status { display:flex;flex-wrap:wrap;gap:7px;width:fit-content;max-width:100%; }
.order-processing-item { display:grid;grid-template-columns:auto auto;align-items:center;gap:2px 12px;min-width:158px;padding:7px 10px;border:1px solid #cadbf3;border-radius:8px;color:#315f9f;background:#f5f9ff;font-size:.7rem;font-variant-numeric:tabular-nums; }
.order-processing-item > span { display:inline-flex;align-items:center;gap:6px;font-weight:500; }
.order-processing-item > span i { width:7px;height:7px;border-radius:50%;background:#2d6fc4;box-shadow:0 0 0 3px rgba(45,111,196,.12); }
.order-processing-item > strong { justify-self:end;color:#17355e;font-size:.75rem;font-weight:600; }
.order-processing-item.repair { border-color:#cce5d7;color:#17734b;background:#f3fbf7; }
.order-processing-item.repair > span i { background:#1b9b65;box-shadow:0 0 0 3px rgba(27,155,101,.12); }
.order-processing-item.repair > strong { color:#12613f; }
.order-processing-item.complete { border-color:#a8dabc;background:#ecfaf2; }
.order-processing-track { grid-column:1/-1;height:3px;overflow:hidden;border-radius:999px;background:rgba(40,75,118,.12); }
.order-processing-track b { display:block;height:100%;border-radius:inherit;background:#2d6fc4; }
.order-processing-item.repair .order-processing-track b,.order-processing-item.complete .order-processing-track b { background:#1b9b65; }
.order-shipment-status { display:flex;flex-wrap:wrap;align-items:center;gap:7px 11px;width:fit-content;max-width:100%;padding:8px 10px;border:1px solid #b7dbc7;border-radius:8px;color:#536273;background:#f0fbf5;font-size:.72rem; }
.order-shipment-state { display:inline-flex;align-items:center;gap:7px;color:#08783e;font-weight:600; }
.order-shipment-dot { width:8px;height:8px;border-radius:50%;background:#12a36d;box-shadow:0 0 0 3px rgba(18,163,109,.14); }
.order-shipment-carrier { color:#172033;font-weight:600; }
.order-shipment-number { font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.order-shipment-status .tracking-action { min-height:30px;margin-left:3px; }
.order-note { width: fit-content; max-width: 100%; padding: 6px 9px; border-radius: 7px; color: #74520e; background: #fff8e4; font-size: .75rem; }
.order-card-actions { display: flex; align-items: center; gap: 7px; }
.module-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.tracking-page { gap:14px; }
.tracking-kpis { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.tracking-kpis article { display:grid;gap:3px;padding:15px 17px; }
.tracking-kpis article span { color:var(--muted);font-size:.72rem; }
.tracking-kpis article strong { color:var(--navy);font-size:1.42rem;font-weight:600; }
.tracking-kpis article small { color:var(--muted);font-size:.68rem; }
.tracking-kpis article.attention { border-color:#efd393;background:#fffaf0; }
.tracking-kpis article.attention strong { color:#a26400; }
.tracking-toolbar { margin-top:0; }
.tracking-toolbar .toolbar-group { width:100%; }
.tracking-toolbar .search-wrap { flex:1; }
.tracking-list { display:grid;gap:9px; }
.tracking-list-row { display:grid;grid-template-columns:minmax(225px,1.25fr) minmax(92px,.55fr) minmax(100px,.55fr) minmax(170px,.9fr) minmax(205px,1fr) 245px;align-items:center;gap:12px;min-height:72px;padding:13px 15px; }
.tracking-list-order { display:flex;align-items:center;gap:11px;min-width:0; }
.tracking-list-order>span:last-child { display:grid;gap:3px;min-width:0; }
.tracking-list-order strong,.tracking-list-order small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.tracking-list-order strong { font-size:.83rem;font-weight:600; }
.tracking-list-order small,.tracking-list-detail small { color:var(--muted);font-size:.68rem; }
.tracking-list-detail { display:grid;gap:3px;min-width:0; }
.tracking-list-detail strong { overflow:hidden;font-size:.76rem;font-weight:550;text-overflow:ellipsis;white-space:nowrap; }
.tracking-list-number strong { font-variant-numeric:tabular-nums; }
.tracking-list-status { display:flex;flex-wrap:wrap;align-items:center;gap:5px; }
.tracking-list-state { display:inline-flex;align-items:center;gap:6px;width:100%;margin-top:2px;font-size:.67rem; }
.tracking-list-state.available { color:#08783e; }
.tracking-list-state.incomplete { color:#9a6500; }
.tracking-list-state.customer { color:#526274; }
.tracking-live-summary { display:inline-flex;align-items:center;gap:7px;width:100%;margin-top:3px;color:#285b9d;font-size:.66rem;line-height:1.15; }
.tracking-live-summary>span:last-child { display:grid;gap:1px;min-width:0; }
.tracking-live-summary small { color:var(--muted);font-size:.59rem;font-weight:500;text-transform:uppercase;letter-spacing:.025em; }
.tracking-live-summary strong { overflow:hidden;font-size:.69rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap; }
.tracking-live-dot { flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 13%,transparent); }
.tracking-live-summary.delivered { color:#08783e; }
.tracking-live-summary.out-for-delivery { color:#0b78a8; }
.tracking-live-summary.pre-transit { color:#9a6500; }
.tracking-live-summary.failure,.tracking-live-summary.exception,.tracking-live-summary.error { color:#b73737; }
.tracking-live-summary.loading { color:#758196; }
.tracking-live-spinner { flex:0 0 auto;width:10px;height:10px;border:2px solid #cbd3df;border-top-color:#2c67b6;border-radius:50%;animation:spin .8s linear infinite; }
.tracking-list-actions { display:flex;justify-content:flex-end;gap:6px;min-width:0;white-space:nowrap; }
.tracking-list-row .tracking-carrier-mark { flex:0 0 auto;width:46px;height:34px;font-size:.66rem; }
.tracking-list-row .tracking-carrier-mark.spedition { background:#4b617c; }
.tracking-list-row .tracking-carrier-mark.kuhne-nagel,.tracking-carrier-mark.kuhne-nagel { width:58px;background:#064b7b;letter-spacing:.02em; }
.tracking-list-row .tracking-carrier-mark.sonstiges,.tracking-list-row .tracking-carrier-mark.unbekannt { background:#7a8493; }
.manual-tracking-form { display:grid;gap:14px; }
.manual-tracking-form .field-row { grid-template-columns:repeat(2,minmax(0,1fr)); }

.table-card { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 14px; color: #777e8a; background: #fafbfc; font-size: .67rem; font-weight: 500; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 12px 14px; border-top: 1px solid #eceef1; vertical-align: middle; font-size: .79rem; }
.data-table tbody tr:hover { background: #fbfcfd; }
.cell-title { display: block; font-weight: 500; }
.cell-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }
.portal-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #aeb4bd; }
.portal-dot.active { background: var(--success); }

.dashboard-filter-empty { padding: 22px; border: 1px dashed var(--border); border-radius: 9px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.disposition-help { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #cbd9ea; border-radius: 9px; color: var(--muted); background: #f6f9fd; font-size: .76rem; }
.drag-help-icon { color: var(--blue); font-size: 1rem; }
.disposition-list { display: grid; gap: 9px; }
.disposition-item { display: grid; grid-template-columns: 32px 28px minmax(180px,1fr) minmax(120px,.65fr) minmax(160px,1fr) auto; gap: 12px; align-items: center; min-height: 74px; padding: 12px 14px; transition: transform .14s ease, opacity .14s ease, border-color .14s ease, box-shadow .14s ease; }
.drag-handle { display: grid; place-items: center; width: 30px; height: 42px; border: 1px solid transparent; border-radius: 7px; color: #8b96a7; background: transparent; font-size: 1.05rem; cursor: grab; user-select: none; touch-action: none; }
.drag-handle:hover, .drag-handle:focus-visible { border-color: #b9cbe1; color: var(--blue); background: #eef5ff; outline: none; }
.drag-handle:active { cursor: grabbing; }
.disposition-item.is-dragging { opacity: .48; border-style: dashed; transform: scale(.995); }
.disposition-item.is-drop-target { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,88,168,.12); }
.priority { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: var(--navy); font-size: .7rem; font-weight: 500; }
.due-over { color: #c53e3e; font-weight: 500; }
.due-soon { color: #a46b04; font-weight: 500; }

.timesheet-page { gap: 14px; }
.timesheet-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 13px 15px; }
.timesheet-week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.timesheet-week-nav > strong { margin-left: 6px; color: var(--navy); font-size: .82rem; }
.timesheet-employee-select { width: min(300px,100%); }
.timesheet-summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.timesheet-summary article { display: grid; gap: 2px; min-height: 88px; padding: 14px 16px; align-content: center; }
.timesheet-summary span,.timesheet-summary small { color: var(--muted); font-size: .72rem; }
.timesheet-summary strong { color: var(--navy); font-size: 1.08rem; }
.timesheet-days { display: grid; gap: 10px; }
.timesheet-day { overflow: hidden; }
.timesheet-day.is-today { border-color: #8fb2de; box-shadow: 0 0 0 2px rgba(37,88,168,.07); }
.timesheet-day-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.timesheet-day-header h2 { margin: 0; font-size: .9rem; }
.timesheet-day-header span { color: var(--muted); font-size: .7rem; }
.timesheet-day-total { display: flex; align-items: center; gap: 12px; }
.timesheet-day-total > strong { color: var(--blue); font-size: .82rem; }
.timesheet-entry-list { display: grid; }
.timesheet-entry { display: grid; grid-template-columns: 145px minmax(220px,1.2fr) minmax(170px,.8fr) auto; gap: 16px; align-items: center; min-height: 68px; padding: 10px 14px; border-top: 1px solid #edf0f4; }
.timesheet-entry:first-child { border-top: 0; }
.timesheet-entry:hover { background: #fbfcfe; }
.timesheet-time,.timesheet-work,.timesheet-location { display: grid; min-width: 0; gap: 2px; }
.timesheet-entry strong { font-size: .79rem; }
.timesheet-entry span,.timesheet-entry small { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.timesheet-empty { padding: 15px; color: var(--muted); font-size: .74rem; text-align: center; }
.time-entry-employee { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.time-entry-employee > span:last-child { display: grid; gap: 1px; }
.time-entry-employee small { color: var(--muted); font-size: .72rem; }

.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,.8fr); gap: 16px; }
.order-detail-page { gap: 14px; }
.order-detail-page > * { width: 100%; max-width: none; }
.order-hero { display: grid; grid-template-columns: minmax(220px,240px) minmax(360px,500px); width: 100%; gap: 18px; align-items: stretch; justify-content: start; }
.order-id-card { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 122px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: center; }
.order-id-card > span:first-child { color: var(--muted); font-size: .72rem; font-weight: 500; }
.order-id-card > strong { font-size: 1.75rem; line-height: 1; }
.order-id-card small { width: 100%; color: var(--muted); line-height: 1.3; text-align: center; }
.order-specs { display: grid; grid-template-columns: repeat(2,minmax(160px,210px)); gap: 9px 26px; align-content: center; justify-content: start; margin: 0; }
.order-specs div { min-width: 0; }
.order-specs dt { color: var(--muted); font-size: .72rem; }
.order-specs dd { margin: 2px 0 0; font-size: .8rem; font-weight: 500; }
.order-context { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); }
.order-context > strong { color: var(--text); }
.process-actions { align-items: center; padding: 2px 0; }
.process-hint { color: var(--muted); font-size: .76rem; }
.process-actions:empty { display: none; }
.order-toolbar { padding-bottom: 4px; }
.deadline-extension-action {
  border-color:#e7b34c;
  color:#875900;
  background:#fff7df;
}
.deadline-extension-action:hover { border-color:#c88d18;color:#704900;background:#fff0bf; }
.locked-deadline-field { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center; }
.locked-deadline-field .button { white-space:nowrap; }
.deadline-extension-form { display:grid;gap:14px; }
.pipedrive-deal-link {
  border-color: #91d0ad;
  color: #006b35;
  background: #effaf4;
  text-decoration: none;
}
.pipedrive-deal-link:hover {
  border-color: #017737;
  color: #005d2e;
  background: #e1f6ea;
}
.pipedrive-deal-link-mark {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 2px;
  border-radius: 6px;
  color: #fff;
  background: #017737;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1;
}
.order-detail-tabs { display: flex; gap: 2px; margin-top: 4px; border-bottom: 1px solid var(--border); }
.order-detail-tab { min-height: 42px; padding: 0 6px; margin-right: 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: .8rem; cursor: pointer; }
.order-detail-tab:hover { color: var(--text); }
.order-detail-tab.active { color: var(--text); border-bottom-color: var(--blue); font-weight: 500; }
.order-overview { display: grid; gap: 16px; }
.order-level-counts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.order-level-counts .level-chip { min-height: 30px; padding-inline: 13px; }
.order-level-counts .level-filter-chip { font-family: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.order-level-counts .level-filter-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(24,34,51,.12); }
.order-level-counts .level-filter-chip.active { border-color: currentColor; box-shadow: 0 0 0 2px rgba(37,88,168,.18); }
.order-level-counts .level-filter-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.order-modules-title { margin-top: 2px; }
.order-modules-title .section-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.order-module-list { display: grid; gap: 8px; }
.module-filter-empty { min-height: 150px; }
.order-module-card { display: grid; gap: 4px; min-height: 74px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(24,34,51,.05); }
.order-module-card:hover { border-color: #9ab7dc; }
.order-module-card.final-inspection-passed { border-color: #74c99c; background: #edfaf3; box-shadow: 0 1px 3px rgba(22,115,74,.1); }
.order-module-card.final-inspection-passed:hover { border-color: #46ac76; }
.order-module-card.module-repaired { border-left: 4px solid #159a61; }
.order-module-card > div { display: flex; align-items: center; gap: 8px; }
.order-module-card-head > a { color: var(--text); }
.module-repair-state { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 3px 9px; border: 1px solid; border-radius: 999px; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.module-repair-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.module-repair-state.is-repaired { border-color: #9dd9b9; color: #087346; background: #e9f9f1; }
.module-repair-state.not-repaired { border-color: #efca85; color: #9a5d00; background: #fff7e8; }
.module-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.order-module-card > span, .order-module-card > small { color: var(--muted); font-size: .74rem; }
.order-module-card.pending-number { border-style: dashed; border-color: #e4aa36; background: #fffbef; }
.barcode-assignment { display: grid; gap: 14px; }
.barcode-camera-preview { width: 100%; max-height: 360px; border: 1px solid var(--border); border-radius: 10px; background: #101318; object-fit: cover; }
.module-scan-session { min-width: min(520px,75vw); }
.module-scan-instruction { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #b9cff1; border-radius: 10px; background: #f2f7ff; }
.module-scan-instruction > div { display: grid; gap: 3px; }
.module-scan-instruction strong { font-size: 1.02rem; }
.module-scan-instruction small { color: var(--muted); }
.module-scan-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 9px; color: #fff; background: var(--primary); font-size: 1.25rem; }
.module-scan-input input { text-align: center; font-size: 1rem; letter-spacing: .04em; }
.module-scan-status { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.module-scan-status[data-kind="success"] { border-color: #9dd9b4; color: #16633a; background: #eefaf2; }
.module-scan-status[data-kind="error"] { border-color: #f2b6b6; color: #a82424; background: #fff2f2; }
html.dark .module-scan-instruction { border-color: #315784; background: #172b45; }
html.dark .module-scan-status[data-kind="success"] { border-color: #245f42; color: #8ed5ac; background: #153526; }
html.dark .module-scan-status[data-kind="error"] { border-color: #743838; color: #f1a0a0; background: #3a1e1e; }
.inbound-lock { min-height: 260px; place-items: center; align-content: center; gap: 10px; text-align: center; }
.inbound-lock h2, .inbound-lock p { margin: 0; }
.inbound-lock p { max-width: 560px; color: var(--muted); }
.inbound-lock-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #8a5a00; background: #fff1cc; font-size: 1.35rem; }
.inbound-confirmation { display: grid; gap: 16px; min-width: min(480px,72vw); }
.inbound-confirmation p { margin: 0; }
.meta-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; margin: 0; }
.meta-list div { min-width: 0; }
.meta-list dt { color: var(--muted); font-size: .7rem; }
.meta-list dd { margin: 3px 0 0; font-size: .82rem; font-weight: 500; }
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: #e9ecf0; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #e9ecf0; }
.tab { flex: 1; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; color: #5f6672; background: transparent; font-size: .78rem; }
.tab.active { color: var(--text); background: #fff; box-shadow: var(--shadow); }
.module-list { display: grid; gap: 8px; }
.module-row { display: grid; grid-template-columns: minmax(150px,1fr) minmax(105px,.5fr) minmax(120px,.7fr) auto; gap: 12px; align-items: center; min-height: 58px; padding: 10px 12px; border: 1px solid #e4e7eb; border-radius: 9px; background: #fff; }
.module-row:hover { border-color: #b8cce5; }
.history-list { display: grid; gap: 0; }
.history-item { display: grid; grid-template-columns: 9px 130px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid #eceef1; }
.history-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--blue); }

.wizard-head { display: grid; gap: 16px; }
.wizard-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; }
.wizard-step { position: relative; display: grid; justify-items: center; gap: 6px; color: #9298a2; font-size: .7rem; text-align: center; }
.wizard-step::after { content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 2px; background: #e0e3e8; z-index: 0; }
.wizard-step:last-child::after { display: none; }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #777f8c; background: #e0e3e8; font-size: .7rem; font-weight: 500; }
.wizard-step.active, .wizard-step.done { color: var(--blue); }
.wizard-step.active .step-dot, .wizard-step.done .step-dot { color: #fff; background: var(--blue); }
.wizard-step.done::after { background: var(--blue); }
.wizard-card { display: grid; gap: 18px; padding: 20px; }
.wizard-section { display: grid; gap: 14px; }
.wizard-section + .wizard-section { padding-top: 18px; border-top: 1px solid #eceef1; }
.wizard-section h3 { margin: 0; font-size: .92rem; }
.timeline-mini { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--border); border-radius: 9px; background: #fafbfc; }
.timeline-mini-row { display: grid; grid-template-columns: 94px 1fr; gap: 10px; align-items: center; font-size: .69rem; }
.timeline-track { position: relative; height: 18px; overflow: hidden; border-radius: 5px; background: repeating-linear-gradient(90deg,#eef0f3 0,#eef0f3 calc(10% - 1px),#dfe3e8 calc(10% - 1px),#dfe3e8 10%); }
.timeline-bar { position: absolute; inset-block: 3px; border-radius: 4px; background: rgba(37,102,182,.72); }
.timeline-bar.orange { background: rgba(255,173,15,.78); }
.summary-box { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 15px; border-radius: 9px; background: #f6f8fa; }
.summary-box span { display: block; color: var(--muted); font-size: .68rem; }
.summary-box strong { display: block; margin-top: 3px; font-size: .8rem; }
.info-box, .warning-box, .inspection-summary { padding: 12px 14px; border-radius: 9px; font-size: .78rem; }
.info-box, .inspection-summary { color: #24547f; background: #eef7ff; }
.warning-box { color: #7d5710; background: #fff7df; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-card { position: relative; display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: .78rem; font-weight: 500; }
.radio-card:has(input:checked) { border-color: var(--blue); color: var(--blue); background: #f5f9ff; box-shadow: 0 0 0 1px var(--blue); }
.radio-card input { margin: 0; accent-color: var(--blue); }

.module-page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.module-title { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.repair-measures { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.measure-option { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.measure-option.selected { border-color: var(--blue); color: var(--blue); background: #f4f9ff; }
.upload-zone { display: grid; place-items: center; min-height: 112px; padding: 18px; border: 1px dashed #b9c0ca; border-radius: 9px; color: var(--muted); background: #fafbfc; text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--blue); color: var(--blue); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.classification-groups { display: grid; gap: 16px; }
.classification-group { display: grid; gap: 7px; }
.classification-group h3 { margin: 0; color: #555d69; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.classification-settings-page { display: grid; gap: 16px; }
.classification-settings-page > .section-header { padding: 4px 2px; }
.level-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.classification-settings-group { display: grid; gap: 12px; padding: 16px; }
.classification-settings-group > h3 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.classification-setting { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.classification-setting input, .classification-setting select { min-height: 34px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
.classification-name { font-weight: 500 !important; }
.classification-quantity-toggle { display: flex; align-items: center; gap: 7px; width: fit-content; font-size: .75rem; }
.classification-quantity-toggle input { min-height: 0; padding: 0; }
.classification-level-field { display: grid; grid-template-columns: 60px 110px; align-items: center; gap: 12px; font-size: .75rem; }
.classification-rule-title { color: var(--muted); font-size: .72rem; }
.classification-rule-list { display: grid; gap: 7px; }
.classification-rule { display: grid; grid-template-columns: auto 80px auto 110px; align-items: center; gap: 8px; width: fit-content; font-size: .75rem; }
.classification-rule input, .classification-rule select { width: 100%; }
.classification-option { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; width: 100%; min-height: 39px; padding: 8px 10px; border-radius: 8px; text-align: left; }
.classification-option:hover { background: #f8faff; }
.classification-option.selected { border-color: var(--blue); background: #f3f8ff; }
.check-box { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #b8bec8; border-radius: 4px; color: #fff; background: #fff; font-size: .67rem; }
.selected .check-box { border-color: var(--blue); background: var(--blue); }
.recommended-level { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 8px; color: #174f86; background: #eaf4ff; }

.settings-list { display: grid; gap: 10px; }
.settings-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 76px; padding: 14px 17px; text-align: left; cursor: pointer; }
.settings-card:hover { border-color: #b4c8e1; }
.settings-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; color: var(--blue); background: #edf5ff; font-size: 1.1rem; }
.settings-card strong { display: block; font-size: .87rem; }
.settings-card small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; }
.price-settings { display: grid; gap: 14px; }
.price-settings-head { display: grid; gap: 16px; }
.price-category-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.price-category-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font: inherit; font-size: .75rem; cursor: pointer; }
.price-category-chip strong { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 999px; color: var(--text); background: var(--surface-soft); font-size: .68rem; }
.price-category-chip:hover, .price-category-chip.active { border-color: var(--blue); color: var(--blue); background: #f3f8ff; }
.price-category-chip.active strong { color: #fff; background: var(--blue); }
.price-category-section { overflow: hidden; }
.price-category-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.price-category-head h3 { margin: 0; font-size: .9rem; }
.price-category-head span { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; }
.price-table { border: 0; border-radius: 0; box-shadow: none; }
.price-table th:last-child, .price-table td:last-child { text-align: right; }
.price-value { font-size: .82rem; font-variant-numeric: tabular-nums; }
.price-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
@media (max-width: 620px) {
  .price-form-grid { grid-template-columns: 1fr; }
  .price-category-head { align-items: stretch; flex-direction: column; }
  .price-category-head .button { width: 100%; }
}
.settings-chevron { color: #8f959f; font-size: 1.2rem; }
.main-nav [hidden] { display: none !important; }

/* Kunden-Anfrageformular und interne Anfrageprüfung */
.customer-request-settings { display: grid; gap: 20px; }
.customer-request-share { display: grid; gap: 16px; }
.customer-request-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #f7f9fc; }
.customer-request-link code { overflow: hidden; padding: 0 6px; color: var(--navy); font: 500 .82rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; text-overflow: ellipsis; white-space: nowrap; }
.customer-request-field-list { display: grid; gap: 8px; margin-top: 16px; }
.customer-request-field-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto; align-items: center; gap: 12px; min-height: 62px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.customer-request-field-row > div:nth-child(2) { display: grid; min-width: 0; }
.customer-request-field-row > div:nth-child(2) strong { font-weight: 550; }
.customer-request-field-row > div:nth-child(2) span { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.request-field-position { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--navy); font-size: .72rem; font-weight: 600; }
.customer-request-field-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.customer-request-field-form .info-box { grid-column: 1/-1; }
.customer-request-options { grid-column: 1/-1; }

.customer-request-inbox { overflow: hidden; padding: 0; border-color: #e5ca88; background: #fffdf8; }
.customer-request-inbox-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid #ead8ac; background: linear-gradient(105deg,#fff8e7 0%,#fffdfa 75%); }
.customer-request-inbox-header h2 { margin: 2px 0; font-size: 1.05rem; font-weight: 550; }
.customer-request-inbox-header h2 span { display: inline-grid; place-items: center; min-width: 23px; height: 23px; margin-left: 5px; padding: 0 6px; border-radius: 999px; color: #7e5407; background: #ffe5a8; font-size: .72rem; }
.customer-request-inbox-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .76rem; }
.customer-request-inbox-list { display: grid; gap: 1px; background: #eee3c9; }
.customer-request-inbox-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 14px 20px; background: #fff; }
.customer-request-reference { display: flex; align-items: baseline; gap: 10px; }
.customer-request-reference strong { color: var(--blue); font-size: .74rem; font-weight: 650; }
.customer-request-reference span { color: var(--muted); font-size: .68rem; }
.customer-request-inbox-main h3 { margin: 4px 0 5px; font-size: .9rem; font-weight: 580; }
.customer-request-inbox-meta { display: flex; flex-wrap: wrap; gap: 5px 15px; color: var(--muted); font-size: .72rem; }
.customer-request-inbox-meta strong { color: var(--text); font-weight: 600; }
.customer-request-inbox-actions { display: flex; align-items: center; gap: 10px; }
.customer-request-inbox-state { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; color: var(--muted); }
.customer-request-inbox-state.error { color: var(--danger); }
.customer-request-inbox-state.good { color: var(--success); }
.customer-request-review-source,.customer-request-conversion { display: grid; gap: 15px; }
.customer-request-review-source { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.customer-request-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.customer-request-source-grid > div { min-width: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.customer-request-source-grid span { display: block; overflow: hidden; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.customer-request-source-grid strong { display: block; overflow-wrap: anywhere; margin-top: 3px; font-size: .78rem; font-weight: 550; }
.customer-request-conversion-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px 15px; }

@media (max-width: 900px) {
  .customer-request-inbox-header,.customer-request-inbox-card { align-items: stretch; flex-direction: column; }
  .customer-request-inbox-header { display: flex; }
  .customer-request-inbox-card { grid-template-columns: 1fr; }
  .customer-request-inbox-actions { justify-content: space-between; }
  .customer-request-source-grid,.customer-request-conversion-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .customer-request-link,.customer-request-field-form,.customer-request-source-grid,.customer-request-conversion-grid { grid-template-columns: 1fr; }
  .customer-request-link code { white-space: normal; overflow-wrap: anywhere; }
  .customer-request-field-row { grid-template-columns: 30px minmax(0,1fr) auto; }
  .customer-request-field-row > .badge { display: none; }
  .customer-request-field-row .table-actions { grid-column: 2/-1; justify-content: flex-end; }
}
.user-management, .role-overview { display: grid; gap: 16px; }
.user-management > .section-header { align-items: center; }
.user-list { display: grid; gap: 9px; }
.user-card { display: grid; grid-template-columns: 42px minmax(280px,1fr) minmax(250px,.72fr) 340px; align-items: center; gap: 14px; min-height: 88px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px rgba(24,34,51,.05); }
.user-card.inactive { background: var(--surface-soft); opacity: .78; }
.user-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: var(--navy); font-size: .76rem; font-weight: 500; }
.user-identity, .user-role { display: grid; gap: 3px; min-width: 0; }
.user-identity strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.user-identity > small, .user-role small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.user-email-row { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 22px; }
.user-email-row > span:first-child { overflow: hidden; min-width: 0; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.user-invite-link-create, .user-invite-link button { flex: 0 0 auto; padding: 0; border: 0; color: var(--blue); background: transparent; font: inherit; font-size: .68rem; cursor: pointer; }
.user-invite-link-create:hover, .user-invite-link button:hover, .user-invite-link a:hover { text-decoration: underline; }
.user-invite-link { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding-left: 8px; border-left: 1px solid var(--border); }
.user-invite-link a { color: var(--blue); font-size: .68rem; font-weight: 600; white-space: nowrap; }
.user-role { grid-template-columns: repeat(2,max-content); align-items: center; }
.user-role small { grid-column: 1 / -1; }
.user-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.user-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.toggle-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); cursor: pointer; }
.toggle-row input { margin-top: 2px; accent-color: var(--blue); }
.toggle-row span { display: grid; gap: 2px; }
.toggle-row strong { font-size: .8rem; }
.toggle-row small { color: var(--muted); font-size: .7rem; }
.permission-group { min-width: 0; margin: 14px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.permission-group legend { padding: 0 6px; color: var(--muted); font-size: .72rem; font-weight: 500; text-transform: uppercase; }
.permission-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.permission-option { display: flex; align-items: flex-start; gap: 8px; min-height: 58px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.permission-option:has(input:checked) { border-color: #8fb2de; background: #f3f8ff; }
.permission-option input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--blue); }
.permission-option span { display: grid; gap: 2px; min-width: 0; }
.permission-option strong { font-size: .75rem; }
.permission-option small { color: var(--muted); font-size: .65rem; line-height: 1.35; }
.role-card { align-content: start; gap: 12px; }
.role-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.access-denied-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #9a3d35; background: #ffe9e6; font-size: 1.4rem; }
.token-preview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.token-preview span { display: grid; place-items: center; min-height: 56px; border-radius: 8px; color: #fff; font-size: .75rem; font-weight: 500; }
.phase-stats { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.phase-stat { min-height: 86px; padding: 14px; border: 1px solid #f2d5d7; border-radius: 10px; background: #f0f7ff; }
.phase-stat span { display: block; color: #68717d; font-size: .7rem; }
.phase-stat strong { display: block; margin-top: 8px; font-size: 1.4rem; }
.portal-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.portal-hero h2 { margin: 0; font-size: 1.25rem; }
.portal-hero .field { min-width: 240px; }
.scanner-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 16px; }
.scanner-card h2 { margin: 0; font-size: 1rem; }
.scanner-card p { margin: 4px 0 0; }
.documents-workspace { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.document-source-card { min-width: 0; }
.document-upload-zone { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; min-height: 92px; margin-top: 16px; padding: 15px; border: 1px dashed #9eacc0; border-radius: 10px; background: #f8fbff; color: var(--text); cursor: pointer; transition: border-color .16s ease,background .16s ease; }
.document-upload-zone:hover { border-color: var(--blue); background: #f2f7ff; }
.document-upload-zone.disabled { opacity: .66; cursor: not-allowed; }
.document-upload-icon,.document-file-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: hsl(var(--accent)); color: var(--blue); font-size: 1.15rem; }
.document-upload-zone strong,.document-upload-zone small { display: block; }
.document-upload-zone small { margin-top: 3px; color: var(--muted); font-size: .71rem; }
.stored-document-list { display: grid; gap: 8px; margin-top: 14px; }
.stored-document { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.stored-document > div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.stored-document strong { overflow-wrap: anywhere; font-size: .78rem; }
.stored-document > div:nth-child(2) > span { color: var(--muted); font-size: .68rem; }
.document-actions { display: flex !important; align-items: center; gap: 6px !important; }
.danger-icon { color: var(--danger); }
.small-mark { width: 32px; height: 32px; border-radius: 8px; font-size: .78rem; }
.document-empty,.document-loading { display: grid; place-items: center; gap: 8px; min-height: 170px; padding: 20px; color: var(--muted); text-align: center; }
.document-empty strong { color: var(--text); }
.document-empty.compact { min-height: 118px; }
.document-empty.error { color: var(--danger); }
.document-loading { grid-template-columns: auto auto; align-content: center; }
.chat-list { display: grid; gap: 10px; margin-top: 16px; }
.chat-message { max-width: 82%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px 10px 10px 3px; background: var(--surface-soft); }
.chat-message > div { display: flex; justify-content: space-between; gap: 20px; font-size: .75rem; }
.chat-message time { color: var(--muted); }
.chat-message p { margin: 6px 0 0; white-space: pre-wrap; }
.alert { padding: 11px 14px; border: 1px solid #f1d18a; border-radius: 9px; color: #76500a; background: #fff8e7; font-size: .78rem; }
.empty-state { display: grid; justify-items: center; gap: 5px; padding: 34px 20px; color: var(--muted); text-align: center; }
.empty-state strong { color: #4e5560; }

dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; border: 0; border-radius: 13px; color: var(--text); background: #fff; box-shadow: 0 25px 80px rgba(20,30,45,.28); }
dialog.wide { width: min(920px, calc(100vw - 32px)); }
dialog.document-viewer-dialog { width: min(1180px,calc(100vw - 24px)); height: min(900px,calc(100vh - 24px)); max-height: calc(100vh - 24px); }
dialog.document-viewer-dialog form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; }
dialog.document-viewer-dialog .dialog-content { min-height: 0; max-height: none; padding: 0; overflow: hidden; }
dialog.job-sheet-dialog { width: min(1240px,calc(100vw - 24px)); height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
dialog.job-sheet-dialog form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; }
dialog.job-sheet-dialog .dialog-content { min-height: 0; max-height: none; padding: 0; overflow: hidden; background: #dfe4eb; }
.job-sheet-frame { width: 100%; height: 100%; min-height: 0; border: 0; background: #dfe4eb; }
dialog.tracking-viewer-dialog { width: min(1180px,calc(100vw - 24px)); height: min(860px,calc(100vh - 24px)); max-height: calc(100vh - 24px); }
dialog.tracking-viewer-dialog form { display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%; }
dialog.tracking-viewer-dialog .dialog-content { min-height:0;max-height:none;padding:0;overflow:hidden;background:#eef2f6; }
.shipment-form { display:grid;gap:14px; }
.shipment-tracking-fields { display:grid;gap:11px;padding:14px;border:1px solid #cbd7e6;border-radius:10px;background:#f5f8fc; }
.shipment-tracking-fields::before { content:"Sendungsverfolgung";color:var(--blue-dark);font-size:.74rem;font-weight:650;letter-spacing:.05em;text-transform:uppercase; }
.shipment-tracking-fields.customer-shipping::before { content:"Versand durch Kunde"; }
.customer-shipping-info { margin:0; }
.tracking-action { border-color:#b7dbc7;color:#08783e;background:#f0fbf5; }
.tracking-action:hover { border-color:#12a36d;background:#e3f8ec; }
.tracking-action-dot { display:inline-block;width:8px;height:8px;margin-right:3px;border-radius:50%;background:#12a36d;box-shadow:0 0 0 3px rgba(18,163,109,.14); }
.tracking-viewer-shell { display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;min-height:0; }
.tracking-viewer-summary { display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));align-items:center;gap:14px;padding:13px 18px;border-bottom:1px solid var(--border);background:#fff; }
.tracking-viewer-summary>span:not(.tracking-carrier-mark) { display:grid;gap:2px;min-width:0; }
.tracking-viewer-summary small { color:var(--muted);font-size:.68rem; }
.tracking-viewer-summary strong { overflow:hidden;font-size:.82rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap; }
.tracking-carrier-mark { display:grid;width:36px;height:36px;place-items:center;border-radius:9px;color:#fff;background:#12a36d;font-weight:700; }
.tracking-frame-wrap { min-height:0;padding:10px; }
.tracking-frame { width:100%;height:100%;min-height:420px;border:1px solid var(--border);border-radius:9px;background:#fff; }
.tracking-frame-note { margin:0;padding:8px 18px 12px;color:var(--muted);font-size:.7rem; }
.dhl-mark { display:grid;min-width:56px;height:34px;padding:0 8px;place-items:center;border-radius:6px;color:#d40511;background:#ffcc00;font-size:.84rem;font-weight:750;font-style:italic;letter-spacing:-.04em; }
.tracking-carrier-mark.dhl { width:52px;color:#d40511;background:#ffcc00;font-size:.75rem;font-style:italic;letter-spacing:-.04em; }
.tracking-carrier-mark.dpd { width:52px;background:#dc0032;font-size:.72rem;letter-spacing:.02em; }
.tracking-carrier-mark.fedex { width:58px;background:#4d148c;font-size:.7rem;letter-spacing:-.02em; }
.carrier-settings-mark { display:grid;min-width:48px;height:36px;padding-inline:8px;place-items:center;border-radius:9px;color:#fff;font-size:.72rem;font-weight:700; }
.carrier-settings-mark:not(.dpd):not(.fedex) { background:#2f67b2;font-size:1rem; }
.carrier-settings-mark.dpd { background:#dc0032; }
.carrier-settings-mark.fedex { background:#4d148c; }
#dhl-tracking-live { height:100%;overflow:auto;background:#f5f7fa; }
.dhl-live-state { display:grid;min-height:420px;padding:40px;place-content:center;justify-items:center;gap:10px;text-align:center; }
.dhl-live-state .tracking-carrier-mark { margin-bottom:5px; }
.dhl-live-state h3,.dhl-live-state p { margin:0; }
.dhl-live-state p { max-width:560px;color:var(--muted); }
.dhl-live-state.error h3 { color:var(--red); }
.dhl-live-panel { min-height:100%;background:#f5f7fa; }
.dhl-live-overview { display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,.8fr);gap:12px;padding:16px 18px; }
.dhl-current-status,.dhl-delivery-estimate { display:flex;align-items:flex-start;gap:13px;padding:16px;border:1px solid var(--border);border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(22,34,51,.04); }
.dhl-current-status small,.dhl-delivery-estimate small { color:var(--muted);font-size:.64rem;font-weight:700;letter-spacing:.06em; }
.dhl-current-status h3 { margin:3px 0 2px;font-size:1.05rem;font-weight:650; }
.dhl-current-status p { margin:3px 0;color:var(--text);font-size:.78rem; }
.dhl-current-status div>span,.dhl-delivery-estimate span { color:var(--muted);font-size:.72rem; }
.dhl-status-dot { flex:0 0 auto;width:12px;height:12px;margin-top:6px;border:3px solid #fff;border-radius:50%;background:#2d69b5;box-shadow:0 0 0 3px rgba(45,105,181,.2); }
.dhl-current-status.delivered .dhl-status-dot { background:#17985b;box-shadow:0 0 0 3px rgba(23,152,91,.2); }
.dhl-current-status.failure .dhl-status-dot { background:#d40511;box-shadow:0 0 0 3px rgba(212,5,17,.18); }
.dhl-delivery-estimate { display:grid;align-content:center;gap:5px; }
.dhl-delivery-estimate strong { font-size:.92rem;font-weight:650; }
.dhl-event-section { margin:0 18px 16px;padding:16px 18px;border:1px solid var(--border);border-radius:10px;background:#fff; }
.dhl-event-section .section-header { margin-bottom:12px; }
.dhl-event-section h3 { margin:0;font-size:.92rem; }
.dhl-event-section .section-header p { margin:2px 0 0;color:var(--muted);font-size:.7rem; }
.dhl-event-list { display:grid;margin:0;padding:0;list-style:none; }
.dhl-event-list li { position:relative;display:grid;grid-template-columns:20px 1fr;gap:11px;min-height:58px;padding:0 0 14px; }
.dhl-event-list li:not(:last-child)::before { content:"";position:absolute;top:14px;bottom:0;left:6px;width:2px;background:#d9e0ea; }
.dhl-event-marker { position:relative;z-index:1;width:13px;height:13px;margin-top:2px;border:3px solid #fff;border-radius:50%;background:#aab5c4;box-shadow:0 0 0 2px #d9e0ea; }
.dhl-event-list li.current .dhl-event-marker { background:#2d69b5;box-shadow:0 0 0 3px rgba(45,105,181,.18); }
.dhl-event-list strong { display:block;font-size:.78rem;font-weight:620; }
.dhl-event-list p { margin:2px 0;color:var(--text);font-size:.72rem; }
.dhl-event-list div>span { display:block;margin-top:3px;color:var(--muted);font-size:.68rem; }
.dhl-attribution { display:flex;justify-content:space-between;gap:12px;padding:11px 18px;border-top:1px solid var(--border);color:var(--muted);background:#fff;font-size:.66rem; }
.dhl-attribution strong { color:#384659;font-weight:600; }
.document-viewer-shell { display: grid; grid-template-rows: auto minmax(0,1fr); min-height: 0; height: 100%; background: #eef1f5; }
.document-viewer-name { overflow: hidden; padding: 9px 16px; border-bottom: 1px solid var(--border); color: var(--muted); background: var(--surface); font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.document-frame { width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; }
.media-viewer { display: grid; min-height: 0; place-items: center; overflow: auto; padding: 18px; background: #16191e; }
.media-viewer img,.media-viewer video { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-viewer video { width: 100%; height: 100%; }
.audio-viewer audio { width: min(640px,100%); }
.document-preview-unavailable { display: grid; place-items: center; align-content: center; gap: 10px; padding: 30px; text-align: center; }
.document-preview-unavailable p { margin: 0; color: var(--muted); }
dialog.order-wizard-dialog { width: min(1180px, calc(100vw - 48px)); }
dialog.order-wizard-dialog .dialog-header,
dialog.order-wizard-dialog .dialog-footer { padding-inline: 28px; }
dialog.order-wizard-dialog .dialog-content { gap: 20px; padding: 24px 28px 28px; }
dialog.order-wizard-dialog .wizard-section { gap: 18px; }
dialog.order-wizard-dialog .field-row { gap: 18px 20px; }
dialog.order-wizard-dialog .field input,
dialog.order-wizard-dialog .field select { height: 42px; min-height: 42px; padding: 8px 12px; line-height: 1.2; }
dialog.order-wizard-dialog .field textarea { min-height: 104px; padding: 10px 12px; }
dialog.order-wizard-dialog select[name="customerId"],
dialog.order-wizard-dialog input[name="pipedriveDealId"] { height: 42px; min-height: 42px; padding-block: 8px; line-height: 1.2; }
dialog.order-wizard-dialog .order-new-customer-cell { display: flex; align-items: flex-start; padding-top: 23px; }
dialog.order-wizard-dialog .order-new-customer-cell .button { width: 100%; min-height: 42px; }
dialog.order-wizard-dialog.order-wizard-compact { width: min(1040px, calc(100vw - 32px)); }
dialog.order-wizard-compact .dialog-header { padding: 13px 24px; }
dialog.order-wizard-compact .dialog-header .eyebrow { display: none; }
dialog.order-wizard-compact .dialog-content { max-height: calc(100vh - 142px); padding: 14px 24px; overflow-y: auto; }
dialog.order-wizard-compact .dialog-footer { justify-content: center; padding: 11px 24px; }
dialog.order-wizard-compact .order-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; }
dialog.order-wizard-compact .order-entry-grid > * { align-self: start; }
dialog.order-wizard-compact .order-entry-grid .field { gap: 4px; }
dialog.order-wizard-compact .order-entry-grid .field input,
dialog.order-wizard-compact .order-entry-grid .field select { height: 36px; min-height: 36px; padding-block: 6px; }
dialog.order-wizard-compact .order-entry-grid .field textarea { height: 36px; min-height: 36px; padding: 7px 10px; line-height: 1.25; resize: none; }
dialog.order-wizard-compact .order-customer-line { display: grid; grid-template-columns: minmax(0,1fr) 38px 38px; gap: 8px; align-items: end; }
dialog.order-wizard-compact .order-add-customer { width: 38px; min-width: 38px; height: 36px; min-height: 36px; max-height: 36px; margin-top: 0; padding: 0; font-size: 1.1rem; }
.pipedrive-button-mark { display: grid; place-items: center; width: 22px; height: 22px; margin: auto; border-radius: 6px; color: #fff; background: #017737; font-size: .72rem; font-weight: 600; }
dialog.order-wizard-compact .order-split-2,
dialog.order-wizard-compact .order-split-3 { display: grid; gap: 12px; }
dialog.order-wizard-compact .order-split-2 .field,
dialog.order-wizard-compact .order-split-3 .field { align-self: start; align-content: start; }
dialog.order-wizard-compact .order-split-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
dialog.order-wizard-compact .order-split-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
dialog.order-wizard-compact .order-express { display: grid; align-content: start; gap: 4px; color: #303641; font-size: .78rem; font-weight: 500; }
dialog.order-wizard-compact .order-express .radio-card { width: fit-content; min-width: 235px; min-height: 36px; }
dialog.order-wizard-compact .order-notes { grid-column: 1 / -1; }
dialog.order-wizard-dialog .order-planning-section { gap: 10px; }
dialog.order-wizard-dialog .order-planning-section .timeline-mini { grid-template-columns: repeat(2,minmax(0,1fr)); }
dialog.order-wizard-dialog .order-planning-dates { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
dialog.order-edit-dialog { width: min(1020px,calc(100vw - 32px)); }
dialog.order-edit-dialog .dialog-header { padding: 12px 20px; }
dialog.order-edit-dialog .dialog-content { gap: 10px; max-height: calc(100vh - 132px); padding: 13px 20px 15px; }
dialog.order-edit-dialog .dialog-footer { padding: 10px 20px; }
dialog.order-edit-dialog .order-edit-status { display: flex; align-items: center; gap: 8px 14px; padding: 9px 12px; }
dialog.order-edit-dialog .order-edit-status span { color: #31547f; font-size: .75rem; }
dialog.order-edit-dialog .order-edit-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px 14px; }
dialog.order-edit-dialog .order-edit-grid .field { align-content: start; gap: 4px; }
dialog.order-edit-dialog .order-edit-span-2 { grid-column: span 2; }
dialog.order-edit-dialog .field input,
dialog.order-edit-dialog .field select { height: 35px; min-height: 35px; padding-block: 6px; }
dialog.order-edit-dialog .order-edit-note textarea { height: 68px; min-height: 68px; resize: vertical; }
dialog.order-edit-dialog .locked-deadline-field .button { min-height: 35px; }
dialog::backdrop { background: rgba(19,27,39,.48); backdrop-filter: blur(2px); }
dialog form { margin: 0; }
.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; }
.dialog-header { border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 0; font-size: 1.04rem; }
.dialog-header .eyebrow { margin-bottom: 2px; }
.dialog-content { display: grid; gap: 16px; max-height: calc(100vh - 190px); padding: 19px 20px; overflow-y: auto; }
.dialog-footer { justify-content: flex-end; border-top: 1px solid var(--border); background: #fafbfc; }
.secondary-dialog { width: min(430px, calc(100vw - 32px)); z-index: 90; }
.secondary-dialog.pipedrive-customer-dialog { width: min(680px,calc(100vw - 24px)); }
.pipedrive-customer-state { display: grid; min-height: 120px; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.pipedrive-customer-state.error { color: var(--danger); }
.pipedrive-customer-results { display: grid; gap: 8px; max-height: min(460px,55vh); overflow: auto; }
.pipedrive-customer-result { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; }
.pipedrive-customer-result:hover { border-color: var(--blue); background: hsl(var(--accent)); }
.pipedrive-customer-result > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.pipedrive-customer-result strong,.pipedrive-customer-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipedrive-customer-result small { color: var(--muted); }
.pipedrive-customer-result > span:last-child { color: var(--blue); font-size: .72rem; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: min(390px,calc(100vw - 44px)); padding: 11px 14px; border-left: 4px solid var(--orange); border-radius: 9px; color: #fff; background: var(--navy); box-shadow: 0 16px 40px rgba(17,29,49,.28); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.search-results { display: grid; gap: 7px; }
.search-result { display: grid; gap: 2px; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.search-result:hover { border-color: var(--blue); background: #f6faff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1400px) {
  .grid-14 { grid-template-columns: repeat(7,minmax(0,1fr)); }
}

@media (max-width: 1100px) {
  .phase-grid, .phase-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .disposition-item { grid-template-columns: 32px 28px minmax(160px,1fr) minmax(120px,.7fr) auto; }
  .disposition-item .disp-note { grid-column: 3 / 5; }
  .disposition-item .disp-actions { grid-column: 5; grid-row: 1 / 3; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .permission-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .user-card { grid-template-columns: 42px minmax(200px,1fr) minmax(170px,.7fr); }
  .user-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .timesheet-entry { grid-template-columns: 135px minmax(200px,1fr) auto; }
  .timesheet-entry .timesheet-location { grid-column: 2; }
  .timesheet-entry .table-actions { grid-column: 3; grid-row: 1 / 3; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: transform .18s ease; }
  .app-shell.menu-open .sidebar { transform: translateX(0); box-shadow: 18px 0 50px rgba(17,29,49,.18); }
  .sidebar-close { position: absolute; top: 12px; right: 10px; display: inline-grid !important; }
  .workspace { margin-left: 0; }
  .mobile-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand img { width: 30px; height: 30px; object-fit: contain; }
  main { width: 100%; max-width: none; padding: 22px 18px; }
  .kpi-grid, .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .order-hero { grid-template-columns: minmax(190px,220px) minmax(0,1fr); }
  .app-footer { padding-inline: 18px; }
}

@media (max-width: 760px) {
  dialog.order-wizard-dialog { width: calc(100vw - 24px); }
  dialog.order-wizard-dialog .dialog-header,
  dialog.order-wizard-dialog .dialog-footer { padding-inline: 20px; }
  dialog.order-wizard-dialog .dialog-content { padding: 20px; }
  dialog.order-wizard-dialog .field-row,
  dialog.order-wizard-dialog .field-row.three { grid-template-columns: 1fr; }
  dialog.order-wizard-dialog .order-new-customer-cell { padding-top: 0; }
  dialog.order-wizard-compact .order-entry-grid { grid-template-columns: 1fr; }
  dialog.order-wizard-compact .order-notes { grid-column: auto; }
  dialog.order-wizard-dialog .order-planning-section .timeline-mini,
  dialog.order-wizard-dialog .order-planning-dates { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  main { padding: 18px 14px; }
  .page { gap: 18px; }
  .page-header { display: grid; }
  .section-header, .detail-heading { align-items: flex-start; flex-wrap: wrap; }
  .page-header .button-row, .page-header .button { width: 100%; }
  .user-form-grid, .permission-grid { grid-template-columns: 1fr; }
  .user-card { grid-template-columns: 38px minmax(0,1fr); align-items: start; }
  .user-avatar { width: 36px; height: 36px; }
  .user-role, .user-actions { grid-column: 2; }
  .user-actions .button { flex: 1; }
  .kpi-grid, .grid-2, .grid-3, .grid-4, .grid-5, .phase-grid, .phase-stats, .field-row, .field-row.three, .summary-box { grid-template-columns: 1fr; }
  .toolbar, .toolbar-group { display: grid; width: 100%; }
  .order-card { grid-template-columns: 1fr; }
  .order-card-actions { justify-content: flex-end; }
  .data-table { min-width: 720px; }
  .table-card { overflow-x: auto; }
  .disposition-item { grid-template-columns: 32px 28px 1fr; }
  .disposition-item > * { grid-column: 3; }
  .disposition-item .drag-handle { grid-column: 1; grid-row: 1; }
  .disposition-item .priority { grid-column: 2; grid-row: 1; }
  .disposition-item .disp-actions { grid-column: 3; grid-row: auto; justify-self: end; }
  .timesheet-toolbar,.timesheet-day-header { align-items: stretch; flex-direction: column; }
  .timesheet-week-nav > strong { width: 100%; margin: 3px 0 0; }
  .timesheet-summary { grid-template-columns: 1fr; }
  .timesheet-summary article { min-height: 74px; }
  .timesheet-entry { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .timesheet-entry .timesheet-time,.timesheet-entry .timesheet-work,.timesheet-entry .timesheet-location { grid-column: 1; }
  .timesheet-entry .table-actions { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .module-row { grid-template-columns: 1fr auto; }
  .module-row > :nth-child(2), .module-row > :nth-child(3) { grid-column: 1; }
  .history-item { grid-template-columns: 9px 1fr; }
  .history-item time { grid-column: 2; }
  .repair-measures { grid-template-columns: 1fr; }
  .portal-hero, .scanner-card { display: grid; }
  .order-hero { grid-template-columns: 1fr; }
  .order-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .order-module-card > div { align-items: flex-start; flex-wrap: wrap; }
  .module-card-actions { width: 100%; margin-left: 0; }
  .detail-actions .button { max-width: 100%; white-space: normal; text-align: center; }
  .order-detail-tabs { overflow-x: auto; }
  .order-detail-tab { white-space: nowrap; }
  .process-actions { display: grid; }
  .process-actions .button { width: 100%; }
  .documents-workspace { grid-template-columns: 1fr; }
  .token-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-hero .field { min-width: 0; }
  .wizard-step span:last-child { display: none; }
  dialog.order-edit-dialog .order-edit-grid { grid-template-columns: 1fr; }
  dialog.order-edit-dialog .order-edit-span-2 { grid-column: auto; }
  dialog.order-edit-dialog .order-edit-status { align-items: flex-start; flex-direction: column; }
  dialog.order-edit-dialog .locked-deadline-field { grid-template-columns: 1fr; }
  dialog.order-edit-dialog .locked-deadline-field .button { width: 100%; }
  .classification-rule { grid-template-columns: auto minmax(62px,1fr) auto minmax(82px,1fr); width: 100%; }
  dialog { width: calc(100vw - 18px); }
}

@media print {
  .sidebar, .mobile-topbar, .detail-actions, .button-row, .tabs, .app-footer, .toast { display: none !important; }
  .workspace { margin: 0; }
  main { width: 100%; padding: 0; }
  .card, .table-card, .order-card { box-shadow: none; }
}

/* Modulprüfung – Layout entsprechend der freigegebenen Referenzansicht */
.module-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 18px;
}

.module-back {
  width: fit-content;
  color: #5f6978;
  font-size: .88rem;
}

.module-back:hover { color: var(--blue); }

.module-page-head {
  align-items: flex-start;
  min-height: 72px;
}

.module-identity { min-width: 240px; }
.module-title { gap: 8px; }
.module-title h1 {
  margin: 0;
  color: #111820;
  font-size: 1.58rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.module-state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #354052;
  background: #f7f8fa;
  font-size: .7rem;
  font-weight: 500;
}

.module-identity p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0;
  color: #667181;
  font-size: .86rem;
}

.module-label-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab-lock {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-tabs {
  display: flex;
  align-items: stretch;
  gap: 15px;
  min-height: 49px;
  border-bottom: 1px solid #d8dde4;
}

.module-tab {
  position: relative;
  min-width: 86px;
  padding: 4px 15px 12px;
  border: 0;
  color: #374151;
  background: transparent;
  font-size: .88rem;
  cursor: pointer;
}

.module-tab .tab-lock { display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }

.module-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

.module-tab.active { color: var(--blue); font-weight: 500; }
.module-tab.active::after { background: var(--blue); }
.module-tab:disabled { color: #b8bdc6; cursor: not-allowed; }

.inspection-process {
  display: grid;
  gap: 22px;
}

.inspection-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 33px;
}

.inspection-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #758090;
  font-size: .78rem;
  white-space: nowrap;
}

.inspection-step.active { color: #111820; font-weight: 500; }
.inspection-step.done { color: var(--blue); }

.step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #6d7786;
  background: #edf0f4;
  font-size: .72rem;
  font-weight: 500;
}

.inspection-step.active .step-number,
.inspection-step.done .step-number {
  color: #fff;
  background: var(--blue);
}

.step-chevron { color: #6f7987; font-size: 1.1rem; }

.inspection-card {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 20px;
  border-color: #e0e3e8;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(18,24,35,.1), 0 1px 2px -1px rgba(18,24,35,.1);
}

.inspection-card h2 {
  margin: 0 0 3px;
  font-size: 1.06rem;
  font-weight: 500;
}

.inspection-card h3 { margin: 0; font-size: .94rem; }
.inspection-card .field { gap: 6px; color: #111820; font-size: .82rem; }
.inspection-card .field input,
.inspection-card .field select,
.inspection-card .field textarea {
  min-height: 37px;
  border-color: #d7dce3;
  background: #f7f8fa;
}

.inspection-card .field input[type="date"],
.inspection-card .field select[name="technician"] { background: #fff; }

.classification-trigger {
  width: 100%;
  min-height: 33px;
  margin: -2px 0 5px;
  background: #f7f8fa;
  font-size: .76rem;
}

.assistant-icon {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1.5px solid #1e2936;
  border-radius: 50%;
  font-size: .58rem;
  font-weight: 500;
}

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

.inspection-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.inspection-actions.split { justify-content: space-between; }
.inspection-actions .next-button { min-width: 104px; min-height: 37px; }
.inspection-actions .next-button:disabled {
  border-color: #90b2dc;
  color: #fff;
  background: #90b2dc;
  opacity: 1;
}

.upload-label { margin-bottom: 6px; }

dialog.classification-modal {
  width: min(454px,calc(100vw - 12px));
  max-height: calc(100vh - 12px);
  border-radius: 10px;
  background: #f8f9fb;
}

dialog.classification-modal::backdrop { background: rgba(0,0,0,.78); }
.classification-modal .dialog-header {
  padding: 17px 25px 0;
  border: 0;
  background: #f8f9fb;
}

.classification-modal .dialog-header .eyebrow { display: none; }
.classification-modal .dialog-header h2 {
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: -.015em;
}

.classification-modal .dialog-header .icon-button {
  width: 24px;
  height: 24px;
  border: 0;
  color: #5f6671;
  font-size: 1.2rem;
}

.classification-modal .dialog-content {
  gap: 0;
  max-height: calc(100vh - 128px);
  padding: 5px 25px 10px;
  background: #f8f9fb;
}

.classification-intro {
  margin: 0 0 17px;
  color: #727d8d;
  font-size: .86rem;
  line-height: 1.4;
}

.classification-modal .classification-groups { gap: 14px; }
.classification-modal .classification-group { gap: 3px; }
.classification-modal .classification-group h3 {
  margin-bottom: 5px;
  color: #737d8d;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .035em;
}

.classification-modal .classification-option {
  grid-template-columns: 18px minmax(0,1fr) auto;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #252b35;
  background: transparent;
  font-size: .86rem;
}

.classification-modal .classification-option:hover { background: #f6f7f9; }
.classification-modal .classification-group .classification-option.selected { border-color: transparent; background: #f5f7fa; }
.classification-modal .classification-option.disabled-option { opacity: .42; cursor: not-allowed; }
.classification-modal .check-box {
  width: 16px;
  height: 16px;
  border-color: #9da4ad;
  border-radius: 3px;
  font-size: .6rem;
}

.classification-special {
  display: grid;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid #e3e5e9;
}

.classification-count {
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #1764bd;
  background: #e6eefb;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.classification-modal .claim-option { border-color: #e8c7ff; background: #fbf8ff; }
.classification-modal .donor-option { border-color: #5cead8; background: #f2fcfa; }
.classification-modal .claim-option.selected { border-color: #bd75ef; background: #f6ecfd; }
.classification-modal .donor-option.selected { border-color: #13bca8; background: #e8faf7; }

.classification-scanner-state {
  display: grid;
  grid-template-columns: 10px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid #b8e4cd;
  border-radius: 8px;
  color: #235c3e;
  background: #f1fbf6;
}
.classification-scanner-dot { width: 8px; height: 8px; border-radius: 50%; background: #22a862; box-shadow: 0 0 0 3px rgba(34,168,98,.13); }
.classification-scanner-copy { display: grid; min-width: 0; gap: 1px; }
.classification-scanner-copy strong { font-size: .73rem; font-weight: 600; }
.classification-scanner-copy small { overflow: hidden; color: #527060; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.classification-scanner-target { max-width: 150px; padding: 4px 7px; border-radius: 999px; color: #145b38; background: #d9f4e5; font-size: .65rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repair-scanner-state { margin: 12px 0 14px; }

.classification-modal .dialog-footer {
  padding: 16px 25px 24px;
  border: 0;
  background: #f8f9fb;
}

.classification-modal .dialog-footer .button { min-height: 36px; padding-inline: 16px; }
.classification-modal .dialog-footer .primary { border-color: var(--blue); color: #fff; background: var(--blue); box-shadow: 0 2px 5px rgba(37,88,168,.28); }
.classification-modal .dialog-footer .primary:hover { border-color: var(--blue-dark); color: #fff; background: var(--blue-dark); }

.classification-modal .recommended-level {
  margin-top: 31px;
  padding: 14px 16px;
  border: 1px solid #d9dde4;
  border-radius: 8px;
  color: #6f7a8d;
  background: #f7f8fa;
  font-size: .86rem;
}

.barcode-settings { display: grid; gap: 16px; }
.scanner-control-settings .section-header { align-items: center; }
.scanner-control-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 17px 0 14px; }
.scanner-control-summary span { display: grid; gap: 3px; min-height: 64px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: .76rem; }
.scanner-control-summary strong { color: var(--navy); font-size: .92rem; font-weight: 600; }

.inspection-complete { padding: 12px 8px 18px; }
.inspection-auto-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid #cfe0f5;
  border-radius: 9px;
  color: #335f8e;
  background: #f2f7fd;
  font-size: .78rem;
}
.inspection-countdown { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.inspection-countdown > strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: .84rem;
}
.complete-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 5px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 1.3rem;
  font-weight: 500;
}

@media (max-width: 760px) {
  .module-page-head { display: grid; }
  .module-label-tools { width: 100%; }
  .inspection-steps { gap: 7px; overflow-x: auto; }
  .inspection-step { gap: 5px; font-size: .72rem; }
  .step-chevron { font-size: .9rem; }
}

@media (max-width: 520px) {
  .module-label-tools { align-items: stretch; flex-direction: column; }
  .module-tabs { gap: 2px; }
  .module-tab { flex: 1; min-width: 0; padding-inline: 6px; }
  .inspection-step span:last-child { display: none; }
  .inspection-split { grid-template-columns: 1fr; }
  .inspection-card { padding: 16px; }
}

/* Pipedrive integration */
.pipedrive-panel { min-height: 280px; }
.pipedrive-settings-grid,
.pipedrive-columns {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.pipedrive-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  background: #017737;
  font-size: 1rem;
  font-weight: 500;
}

.integration-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 16px 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.integration-state > span:last-child { display: grid; gap: 2px; }
.integration-state small { color: var(--muted); }
.integration-state.connected { border-color: #a9dfbf; background: #effaf3; }
.integration-state.error { align-items: flex-start; flex-direction: column; border-color: #f1b6b6; background: #fff4f4; }
.integration-dot { width: 10px; height: 10px; border-radius: 50%; background: #98a2b3; }
.integration-state.connected .integration-dot { background: #159455; box-shadow: 0 0 0 4px rgba(21,148,85,.12); }
.integration-form { display: grid; gap: 12px; }
.setup-steps { display: grid; gap: 10px; margin: 14px 0 18px; padding-left: 22px; color: var(--text); }
.small-spinner { width: 20px !important; height: 20px !important; border-width: 3px !important; }

.pipedrive-empty,
.pipedrive-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 250px;
  text-align: center;
}

.pipedrive-empty p { max-width: 620px; margin: 0; color: var(--muted); }
.pipedrive-empty .button-row { justify-content: center; }
.pipedrive-empty.error .pipedrive-mark { background: var(--danger); }
.pipedrive-loading { color: var(--muted); }
.pipedrive-loading strong { color: var(--text); }
.pipedrive-shell { display: grid; gap: 16px; }
.pipedrive-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pipedrive-title { display: flex; align-items: center; gap: 11px; }
.pipedrive-title h2 { margin: 0 0 2px; font-size: 1.05rem; }
.pipedrive-title p,
.pipedrive-head small { margin: 0; color: var(--muted); font-size: .75rem; }
.pipedrive-head > div:first-child { display: grid; gap: 6px; }

.pipedrive-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 9px;
}

.pipedrive-kpis.expanded { grid-template-columns: repeat(6,minmax(0,1fr)); }

.pipedrive-kpis article {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.pipedrive-kpis span { color: var(--muted); font-size: .72rem; }
.pipedrive-kpis strong { font-size: 1.25rem; }
.pipedrive-kpis .open { border-color: #f4d598; background: #fff8e8; }
.pipedrive-kpis .done { border-color: #b5e4c7; background: #f1faf4; }
.pipedrive-section { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pipedrive-section h3 { margin: 0; font-size: .92rem; }
.pipedrive-section .section-header p { font-size: .72rem; }
.pipedrive-activity-list { display: grid; gap: 7px; max-height: 430px; margin-top: 12px; overflow: auto; }
.pipedrive-activity {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pipedrive-activity.done { opacity: .72; }
.activity-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid #e0a321;
  border-radius: 50%;
  color: #a56b00;
  font-weight: 500;
}

.pipedrive-activity.done .activity-check { border-color: #2da868; color: #187943; }
.activity-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.activity-title strong { min-width: 0; font-size: .8rem; overflow-wrap: anywhere; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; color: var(--muted); font-size: .69rem; }
.pipedrive-activity p { margin: 6px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.pipedrive-record-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}

.pipedrive-record-section { min-width: 0; }
.pipedrive-record-list { display: grid; gap: 7px; max-height: 460px; margin-top: 12px; overflow: auto; }
.pipedrive-record {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.record-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: #2558a8;
  background: #eaf2ff;
  font-size: .78rem;
  font-weight: 500;
}

.pipedrive-record.email .record-icon { color: #8a5a00; background: #fff3d5; }
.pipedrive-record.document .record-icon { color: #16633a; background: #e6f7ed; }
.pipedrive-record > div { display: grid; min-width: 0; gap: 2px; }
.pipedrive-record strong { overflow-wrap: anywhere; font-size: .77rem; }
.pipedrive-record div > span { color: var(--muted); font-size: .67rem; }
.pipedrive-record p { margin: 4px 0 0; color: var(--muted); font-size: .71rem; line-height: 1.4; }
.empty-state.compact { min-height: 110px; padding: 18px; }
.flow-section { margin-top: 0; }
.pipedrive-flow { display: grid; margin-top: 12px; }
.pipedrive-flow-item { position: relative; display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 8px; min-height: 48px; }
.pipedrive-flow-item:not(:last-child)::before { content: ""; position: absolute; top: 15px; bottom: -2px; left: 4px; width: 1px; background: var(--border); }
.pipedrive-flow-item .history-dot { z-index: 1; width: 9px; height: 9px; margin-top: 3px; background: #017737; }
.pipedrive-flow-item div { display: grid; align-content: start; gap: 2px; padding-bottom: 10px; }
.pipedrive-flow-item strong { font-size: .77rem; font-weight: 500; }
.pipedrive-flow-item span:last-child { color: var(--muted); font-size: .68rem; }

@media (max-width: 1400px) {
  .pipedrive-kpis.expanded { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pipedrive-record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .pipedrive-settings-grid,
  .pipedrive-columns { grid-template-columns: 1fr; }
  .pipedrive-kpis,
  .pipedrive-kpis.expanded { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pipedrive-record-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .pipedrive-head { flex-direction: column; }
  .pipedrive-head .button-row { width: 100%; }
  .pipedrive-head .button { flex: 1; }
  .pipedrive-kpis { grid-template-columns: 1fr 1fr; }
}

.customer-portal-access { display: grid; gap: 14px; padding: 16px; border: 1px solid #cddbef; border-radius: 11px; background: #f6f9fd; }
.customer-pipedrive-import { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid #cddbef; border-radius: 11px; background: #f7faff; }
.customer-pipedrive-import > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.customer-pipedrive-import > div > span:last-child { display: grid; gap: 2px; }
.customer-pipedrive-import strong { font-size: .82rem; }
.customer-pipedrive-import small { color: var(--muted); font-size: .72rem; }
.customer-pipedrive-import .button { flex: 0 0 auto; }
.customer-portal-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-portal-head h3 { margin: 2px 0; font-size: 1rem; }
.customer-portal-head span { color: var(--muted); font-size: .77rem; }
.portal-active-switch { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-weight: 600; white-space: nowrap; }
.portal-active-switch input { width: 17px; height: 17px; accent-color: var(--primary); }
.customer-portal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.customer-portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.customer-portal-actions a { color: var(--primary); font-size: .75rem; overflow-wrap: anywhere; }
.customer-portal-actions small { flex-basis: 100%; color: var(--muted); }
.portal-security-note { margin-top: 14px; }
.portal-account-list { display: grid; gap: 9px; margin-top: 16px; }
.portal-account-row { display: grid; grid-template-columns: minmax(190px,.9fr) auto minmax(330px,1.4fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.portal-account-row.active { border-color: #afdcc6; }
.portal-account-company { display: grid; gap: 2px; }
.portal-account-company span { color: var(--muted); font-size: .72rem; }
.portal-account-credentials { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.portal-account-credentials > span { display: grid; min-width: 0; gap: 2px; }
.portal-account-credentials small { color: var(--muted); font-size: .68rem; }
.portal-account-credentials code { overflow: hidden; color: var(--text); font-family: inherit; font-size: .75rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.portal-user-hint { margin: 2px 0 0 14px; font-weight: 400; }

@media (max-width: 1050px) {
  .portal-account-row { grid-template-columns: minmax(180px,1fr) auto; }
  .portal-account-credentials { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .customer-pipedrive-import { align-items: stretch; flex-direction: column; }
  .customer-pipedrive-import .button { width: 100%; }
  .customer-portal-head { align-items: flex-start; flex-direction: column; }
  .customer-portal-fields, .portal-account-credentials { grid-template-columns: 1fr; }
  .portal-account-row { grid-template-columns: 1fr auto; }
  .portal-account-row > .button { grid-column: 1 / -1; }
}

@keyframes accordion-down { from { max-height: 0; opacity: 0; } to { max-height: 800px; opacity: 1; } }
.label-provider-states{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.label-provider-states>span{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--muted)}.label-provider-states>span.ready{border-color:#8bd3ad;background:#edf9f2;color:#176a41}.label-settings-form{display:grid;gap:14px}.label-provider-config .field-row{align-items:start}.label-settings-footer{display:flex;gap:10px;justify-content:flex-end}.shipping-label-form{display:grid;gap:14px}.shipping-label-form section{padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.shipping-label-form section h3{margin:0 0 12px}.label-confirmation{border:1px solid #e3bd63;background:#fff8e7}.shipping-label-viewer{display:grid;grid-template-rows:auto minmax(520px,72vh);gap:10px}.shipping-label-viewer>header{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.shipping-label-viewer>header span{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft)}.shipping-label-viewer>header small{color:var(--muted)}.shipping-label-viewer iframe{width:100%;height:100%;border:1px solid var(--border);border-radius:8px;background:#fff}
.shipping-packages-section>.section-header{align-items:center;margin-bottom:12px}.shipping-packages-section>.section-header h3{margin:0}.shipping-packages-section>.section-header p{margin:2px 0 0;color:var(--muted);font-size:.72rem}.shipping-package-list{display:grid;gap:9px}.shipping-package-row{padding:11px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}.shipping-package-row>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.shipping-package-number{color:var(--navy);font-size:.78rem;font-weight:600}.shipping-package-remove:disabled{visibility:hidden}.shipping-label-bundle{display:grid;grid-template-columns:minmax(190px,240px) minmax(0,1fr);gap:12px;min-height:0}.shipping-label-bundle>aside{display:flex;flex-direction:column;gap:7px;min-height:0;overflow:auto}.shipping-label-bundle-title{display:flex;align-items:center;justify-content:space-between;padding:8px 4px}.shipping-label-bundle-title span{color:var(--muted);font-size:.7rem}.shipping-label-package{display:grid;gap:3px;width:100%;padding:10px 11px;border:1px solid var(--border);border-radius:9px;color:var(--text);background:var(--surface);font:inherit;text-align:left;cursor:pointer}.shipping-label-package:hover,.shipping-label-package.active{border-color:var(--blue);background:#f1f6fd}.shipping-label-package span,.shipping-label-package small{color:var(--muted);font-size:.65rem}.shipping-label-package strong{overflow:hidden;font-size:.72rem;text-overflow:ellipsis;white-space:nowrap}.tracking-package-numbers{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shipment-package-confirmation{display:grid;gap:7px;padding:12px;border:1px solid #bdd5ee;border-radius:9px;background:#f4f8fd}.shipment-package-confirmation>.section-header{margin-bottom:2px}.shipment-package-confirmation h3,.shipment-package-confirmation p{margin:0}.shipment-package-confirmation p{margin-top:2px;color:var(--muted);font-size:.7rem}.shipment-package-confirmation>div:not(.section-header){display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;border-radius:7px;background:var(--surface);font-size:.72rem}.shipment-bundle-viewer{display:grid;gap:14px}.shipment-bundle-viewer>header{display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.shipment-bundle-viewer>header>div{display:grid;gap:2px}.shipment-bundle-viewer>header small,.shipment-bundle-card small,.shipment-bundle-card span{color:var(--muted);font-size:.68rem}.shipment-bundle-list{display:grid;gap:9px}.shipment-bundle-card{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 13px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.shipment-bundle-index{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;color:#fff;background:var(--blue);font-size:.72rem;font-weight:600}.shipment-bundle-card>div:nth-child(2){display:grid;gap:3px;min-width:0}.shipment-bundle-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shipment-bundle-actions{display:flex;gap:7px}
.shipping-settings-page{display:grid;gap:22px}.shipping-settings-overview{display:grid;gap:14px}.shipping-provider-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.shipping-provider-summary{display:grid;gap:12px;padding:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.shipping-provider-heading{display:flex;align-items:center;gap:10px}.shipping-provider-heading strong{font-size:.88rem}.shipping-capabilities{display:grid;gap:7px}.shipping-capability{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:.72rem}.shipping-capability strong{font-weight:600}.shipping-capability.ready strong{color:#168653}.shipping-capability.error strong{color:var(--danger)}.shipping-capability.loading strong{color:var(--blue)}.shipping-settings-section,.shipping-tracking-stack{display:grid;gap:14px}.shipping-settings-section-title{display:flex;align-items:center;gap:12px;padding:0 3px}.shipping-settings-section-title h2,.shipping-settings-section-title p{margin:0}.shipping-settings-section-title h2{font-size:1rem}.shipping-settings-section-title p{margin-top:2px;color:var(--muted);font-size:.74rem}.shipping-provider-detail{display:grid;gap:10px;padding-top:4px}.shipping-provider-detail+.shipping-provider-detail{padding-top:18px;border-top:1px solid var(--border)}
@keyframes accordion-up { from { max-height: 800px; opacity: 1; } to { max-height: 0; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-accordion-down { animation: accordion-down .2s ease-out; }
.animate-accordion-up { animation: accordion-up .2s ease-out; }
.spinner { width: 32px; height: 32px; border: 4px solid #e2e8f0; border-top-color: #1e293b; border-radius: 50%; animation: spin .8s linear infinite; }

html.dark .brand,
html.dark .mobile-topbar,
html.dark .button,
html.dark .icon-button,
html.dark .chip,
html.dark .tab,
html.dark .phase-tile,
html.dark .classification-option,
html.dark .module-row,
html.dark .measure-option,
html.dark .radio-card,
  html.dark .search-result,
html.dark dialog,
html.dark .classification-modal .dialog-footer {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

html.dark .card,
html.dark .table-card,
html.dark .order-card,
html.dark .settings-card,
html.dark .user-card,
html.dark .permission-option,
html.dark .portal-account-row,
html.dark .portal-active-switch { border-color: var(--border); background: var(--surface); }
html.dark .order-card.awaiting-inbound { border-color: #b98b1d; background: #332a12; box-shadow: inset 4px 0 0 #f0b51c, var(--shadow); }
html.dark .customer-portal-access { border-color: #29496d; background: #10243a; }
html.dark .customer-pipedrive-import { border-color: #29496d; background: #10243a; }
html.dark .permission-option:has(input:checked) { border-color: #5488c9; background: #102b47; }
html.dark .data-table th,
html.dark .dialog-footer,
html.dark .timeline-mini,
html.dark .timeline-track,
html.dark .summary-box,
html.dark .field input:disabled { background: var(--surface-soft); }
html.dark .data-table td,
html.dark .history-item,
html.dark .wizard-section + .wizard-section,
html.dark .nav-separator,
html.dark .sidebar-account { border-color: var(--border); }
html.dark .field,
html.dark .inspection-card .field { color: var(--text); }
html.dark .field input,
html.dark .field select,
html.dark .field textarea,
html.dark .search-input,
html.dark .compact-select,
html.dark .inspection-card .field input,
html.dark .inspection-card .field select,
html.dark .inspection-card .field textarea { color: var(--text); border-color: var(--border); background: hsl(var(--popover)); }
html.dark .order-note { color: #fbd38d; background: #3b2b0d; }
html.dark .order-activity { color: #aab3c2; }
html.dark .order-activity-date { color: #7f8999; }
html.dark .order-processing-item { border-color:#315784;color:#9fc8f4;background:#172b45; }
html.dark .order-processing-item > strong { color:#d7eaff; }
html.dark .order-processing-item.repair,html.dark .order-processing-item.complete { border-color:#245f42;color:#8ed5ac;background:#153526; }
html.dark .order-processing-item.repair > strong,html.dark .order-processing-item.complete > strong { color:#b9efcf; }
html.dark .order-processing-track { background:rgba(255,255,255,.12); }
html.dark .order-shipment-status { border-color:#245f42;color:#aab3c2;background:#153526; }
html.dark .order-shipment-carrier { color:#e5eaf2; }
html.dark .phase-tile.active { border-color: #5f91d0; background: #102b47; }
html.dark .phase-tile.active strong, html.dark .phase-tile.active span { color: #8ec2ff; }
html.dark .disposition-help { border-color: #29496d; background: #10243a; }
html.dark .timesheet-week-nav > strong,
html.dark .timesheet-summary strong { color: #9bc6ff; }
html.dark .timesheet-day-header,
html.dark .time-entry-employee { border-color: var(--border); background: var(--surface-soft); }
html.dark .timesheet-entry { border-color: var(--border); }
html.dark .timesheet-entry:hover { background: var(--surface-soft); }
html.dark .phase-tile.attention,
html.dark .warning-box { color: #fcd58b; border-color: #5c4212; background: #342709; }
html.dark .info-box,
html.dark .inspection-summary { color: #aed5ff; background: #112a42; }
html.dark .inspection-auto-next { color: #aed5ff; border-color: #29496d; background: #10243a; }
html.dark .process-module-scanner { border-color: #245f43; background: #102b20; }
html.dark .process-scanner-state { color: #72dfa7; }
html.dark .price-category-chip:hover, html.dark .price-category-chip.active { border-color: #5488c9; background: #102b47; }
html.dark .settings-icon { color: #8ec2ff; background: #112a42; }
html.dark .classification-modal .classification-option:hover { background: var(--surface-soft); }
html.dark .classification-modal .classification-option.selected { background: #102b48; }
html.dark .classification-modal .claim-option { background: #2d1839; }
html.dark .classification-modal .donor-option { background: #10332e; }
html.dark .classification-scanner-state { border-color: #245f43; color: #72dfa7; background: #102b20; }
html.dark .classification-scanner-copy small { color: #93b9a4; }
html.dark .classification-scanner-target { color: #8aebba; background: #174b32; }
html.dark .scanner-control-summary strong { color: var(--text); }
html.dark .integration-state,
html.dark .pipedrive-kpis article,
html.dark .pipedrive-activity,
html.dark .pipedrive-record,
html.dark .pipedrive-section { border-color: var(--border); background: var(--surface-soft); }
html.dark .integration-state.connected,
html.dark .pipedrive-kpis .done { border-color: #245f42; background: #153526; }
html.dark .integration-state.error { border-color: #713838; background: #3c1f22; }
html.dark .pipedrive-kpis .open { border-color: #6f5622; background: #392e16; }
html.dark .shipment-tracking-fields { border-color:var(--border);background:var(--surface-soft); }
html.dark .tracking-action { border-color:#245f42;color:#72dfa7;background:#153526; }
html.dark .tracking-viewer-summary { border-color:var(--border);background:var(--surface); }
html.dark dialog.tracking-viewer-dialog .dialog-content { background:#101722; }
html.dark #dhl-tracking-live,html.dark .dhl-live-panel { background:#101722; }
html.dark .dhl-current-status,html.dark .dhl-delivery-estimate,html.dark .dhl-event-section,html.dark .dhl-attribution { border-color:var(--border);background:var(--surface); }
html.dark .dhl-attribution strong { color:#e5eaf2; }
html.dark .tracking-kpis article.attention { border-color:#6f5622;background:#392e16; }
html.dark .tracking-kpis article.attention strong { color:#f4c56b; }
html.dark .tracking-list-state.incomplete { color:#f4c56b; }
html.dark .label-provider-states>span,html.dark .shipping-label-form section,html.dark .shipping-label-viewer>header span{border-color:var(--border);background:var(--surface-soft)}html.dark .label-provider-states>span.ready{border-color:#245f42;background:#153526;color:#72dfa7}html.dark .label-confirmation{border-color:#6f5622;background:#392e16}
html.dark .shipping-package-row,html.dark .shipping-label-package,html.dark .shipment-bundle-card,html.dark .shipment-package-confirmation>div:not(.section-header){border-color:var(--border);background:var(--surface)}html.dark .shipping-label-package:hover,html.dark .shipping-label-package.active{border-color:#5488c9;background:#102b47}html.dark .shipment-package-confirmation{border-color:#29496d;background:#10243a}html.dark .shipment-bundle-viewer>header{border-color:var(--border);background:var(--surface-soft)}
html.dark .shipping-provider-summary{border-color:var(--border);background:var(--surface-soft)}
@media(max-width:1180px){
  .tracking-list-row{grid-template-columns:minmax(240px,1.2fr) repeat(2,minmax(120px,.65fr));}
  .tracking-list-number{grid-column:1/2}.tracking-list-status{grid-column:2/3}.tracking-list-actions{grid-column:3/4}
}
@media(max-width:680px){
  .label-provider-states,.shipping-provider-overview,.shipping-label-viewer>header{grid-template-columns:1fr}.label-settings-footer{justify-content:stretch;flex-direction:column}.shipping-label-viewer{grid-template-rows:auto minmax(420px,65vh)}
  .shipping-label-bundle{grid-template-columns:1fr}.shipping-label-bundle>aside{max-height:190px}.shipment-bundle-viewer>header{grid-template-columns:auto 1fr}.shipment-bundle-viewer>header>div:nth-child(n+3){grid-column:2}.shipment-bundle-card{grid-template-columns:34px minmax(0,1fr)}.shipment-bundle-actions{grid-column:2;flex-wrap:wrap}
  .tracking-viewer-summary{grid-template-columns:auto 1fr;gap:8px 12px}.tracking-viewer-summary>span:nth-child(n+3){grid-column:2}.tracking-frame{min-height:360px}.tracking-frame-note{font-size:.66rem}
  .dhl-live-overview{grid-template-columns:1fr;padding:12px}.dhl-event-section{margin:0 12px 12px;padding:13px}.dhl-attribution{display:grid}.dhl-live-state{min-height:340px;padding:24px 16px}
  .scanner-control-summary{grid-template-columns:1fr}.classification-scanner-state{grid-template-columns:10px minmax(0,1fr)}.classification-scanner-target{grid-column:2;max-width:none;justify-self:start}
  .tracking-kpis{grid-template-columns:1fr}.tracking-list-row{grid-template-columns:1fr 1fr}.tracking-list-order{grid-column:1/-1}.tracking-list-number{grid-column:1/-1}.tracking-list-status{grid-column:1/-1}.tracking-list-actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap}.tracking-toolbar .toolbar-group{display:grid;grid-template-columns:1fr}.tracking-toolbar .compact-select{max-width:none}
}
