:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue: #0071e3;
  --blue-dark: #005bb5;
  --green: #16845f;
  --orange: #d97706;
  --red: #c2413d;
  --cyan: #0e7490;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 113, 227, 0.08), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(22, 132, 95, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(460px, 560px);
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 113, 227, 0.18), transparent 28%),
    linear-gradient(135deg, #fbfbfd 0%, #eef3f8 100%);
}

.login-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.7) 0%, rgba(10, 31, 55, 0.42) 48%, rgba(255, 255, 255, 0.02) 100%),
    url("https://images.unsplash.com/photo-1494412519320-aa613dfb7738?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.18), transparent 25%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 62%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.24), transparent 50%);
  pointer-events: none;
}

.login-hero::after {
  content: "";
  position: absolute;
  left: 8vw;
  right: 10vw;
  bottom: 56px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent);
  pointer-events: none;
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 22px;
}

.login-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 6.8vw, 94px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 900;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.login-hero p {
  max-width: 780px;
  margin: 0 0 36px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 650;
  line-height: 1.58;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 18px;
  max-width: 860px;
}

.hero-metric {
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(26px);
  padding: 21px 20px;
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

.hero-metric strong {
  display: block;
  font-size: clamp(22px, 2vw, 34px);
  margin-bottom: 12px;
}

.hero-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.login-panel {
  padding: 64px 56px;
  display: flex;
  align-items: center;
}

.login-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.1);
  padding: 38px;
  position: relative;
  overflow: hidden;
}

.login-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0f172a, #0071e3, #12a594);
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.login-card h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.15;
}

.login-card p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.role-tabs button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 13px 8px;
  color: var(--muted);
  font-weight: 850;
  min-height: 48px;
}

.role-tabs button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.09);
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 22px;
  border: 1px solid rgba(0, 113, 227, 0.12);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 4px;
  flex-shrink: 0;
}

.lang-switch button {
  min-width: 46px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.lang-switch button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 95, 209, 0.22);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field label {
  font-weight: 700;
  color: #334155;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 101, 214, 0.12);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 12px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  font-size: 13px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--blue), #36a3ff);
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 113, 227, 0.25);
}

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

.secondary-btn {
  background: #fff;
  border-color: rgba(209, 213, 219, 0.9);
  color: #1f2937;
}

.ghost-btn {
  background: #eef4fb;
  color: var(--blue);
}

.danger-btn {
  background: #fff1f2;
  color: var(--red);
  border-color: #fecdd3;
}

.full {
  width: 100%;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 850;
  padding: 13px 14px;
  margin-top: 10px;
  border-radius: 999px;
}

.link-btn:hover {
  background: rgba(0, 113, 227, 0.08);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow-x: hidden;
}

.sidebar {
  background: rgba(15, 23, 42, 0.96);
  color: #dbeafe;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.sidebar .brand {
  color: #fff;
  padding: 0 8px 12px;
  margin-bottom: 10px;
}

.nav-group {
  margin-top: 14px;
}

.nav-title {
  color: #8fb3d9;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
}

.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #dbeafe;
  border-radius: 7px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 700;
  min-height: 36px;
  font-size: 13px;
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  min-height: 64px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  max-width: 720px;
}

.search {
  width: min(360px, 32vw);
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.9);
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 36px;
  outline: none;
}

.search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 101, 214, 0.1);
}

.search-btn {
  flex-shrink: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 13px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.content {
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 150px;
  max-width: 100%;
}

.upload-btn {
  position: relative;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
}

.table-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.loading-panel {
  color: #526071;
  border-style: dashed;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 38px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.metric-card,
.panel,
.item-card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
}

.metric-card {
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}

.metric-card small {
  color: var(--green);
  font-weight: 800;
}

.panel {
  padding: 16px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.code-block {
  margin: 12px 0 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
  color: #e5eefb;
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 13px;
}

tr:hover td {
  background: #fbfdff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.status.blue {
  color: var(--blue);
  background: #eaf2ff;
}

.status.green {
  color: var(--green);
  background: #e9f8f1;
}

.status.orange {
  color: var(--orange);
  background: #fff4df;
}

.status.red {
  color: var(--red);
  background: #fff1f2;
}

.status.cyan {
  color: var(--cyan);
  background: #e6f7fb;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--line);
  margin-top: 2px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.step.done .dot {
  background: var(--green);
  box-shadow: 0 0 0 1px #b7e4ce;
}

.step.now .dot {
  background: var(--blue);
  box-shadow: 0 0 0 1px #bfdbfe;
}

.step strong {
  display: block;
}

.step span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-row > div:first-child {
  display: flex;
  justify-content: space-between;
  color: #475569;
  font-weight: 800;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

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

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

.quote-core-grid {
  grid-template-columns: 1.1fr 0.8fr 1fr 0.8fr;
}

.quote-advanced {
  margin-top: 12px;
}

.quote-advanced summary {
  width: max-content;
  cursor: pointer;
  color: #6b7280;
  font-size: 12px;
  font-weight: 760;
}

.quote-advanced[open] summary {
  margin-bottom: 12px;
  color: #111;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.scan-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.scan-box input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
}

.lane {
  background: #eef3f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 360px;
}

.lane h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.mini-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 20px;
}

.modal {
  width: min(1080px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.modal-head h2 {
  margin: 0;
}

.modal-body {
  padding: 20px;
}

.quote-rule-modal {
  width: min(980px, 96vw);
}

.quote-rule-modal .modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.quote-rule-section {
  box-shadow: none;
}

.quote-rule-section h3 {
  margin-top: 0;
}

.quote-switch,
.quote-check-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.quote-switch {
  margin-top: 18px;
  font-weight: 700;
}

.quote-check-group + .quote-check-group {
  margin-top: 24px;
}

.quote-check-group strong {
  flex-basis: 100%;
}

.quote-switch input,
.quote-check-group input {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}

.quote-ups-rules {
  margin-top: 16px;
}

.quote-rule-actions {
  justify-content: flex-end;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #10233d;
  color: #fff;
  border-radius: 8px;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  z-index: 30;
  font-weight: 800;
}

.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
}

.customer-track {
  max-width: 900px;
  margin: 0 auto;
}

.tracking-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

.tracking-hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.tracking-hero p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1100px) {
  .grid.cols-4,
  .grid.cols-3,
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .login-shell,
  .app-shell,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-hero {
    padding: 36px 22px;
  }

  .login-panel {
    padding: 22px;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .topbar {
    position: relative;
    height: auto;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px;
  }

  .search {
    width: 100%;
  }

  .search-wrap {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
  }

  .content {
    padding: 16px;
  }

  .page-head {
    display: grid;
  }

  .form-grid .wide {
    grid-column: span 1;
  }
}

/* Minimal production polish */
:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --blue: #0071e3;
  --blue-dark: #0066cc;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.07);
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  background: #f5f5f7;
}

.login-hero {
  padding: 70px 7vw;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08)),
    url("https://images.unsplash.com/photo-1494412519320-aa613dfb7738?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}

.login-hero::before,
.login-hero::after {
  display: none;
}

.hero-eyebrow {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.login-hero h1 {
  font-size: clamp(48px, 7vw, 104px);
  font-weight: 800;
  line-height: 0.96;
  margin-bottom: 18px;
}

.login-hero p {
  max-width: 680px;
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 500;
  line-height: 1.5;
}

.hero-metrics {
  gap: 10px;
  max-width: 760px;
}

.hero-metric {
  min-height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: none;
  padding: 16px;
}

.hero-metric strong {
  font-size: 24px;
  margin-bottom: 8px;
}

.hero-metric span {
  font-size: 12px;
  font-weight: 600;
}

.login-panel {
  padding: 34px;
}

.login-card {
  border-radius: 22px;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-card::before {
  display: none;
}

.brand {
  font-size: 16px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.login-card h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.login-card p {
  font-size: 13px;
  line-height: 1.55;
}

.role-tabs {
  border-radius: 999px;
  padding: 4px;
}

.role-tabs button {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px;
  font-size: 13px;
}

.field {
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: #515154;
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 31px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 650;
}

.primary-btn {
  background: var(--blue);
  box-shadow: none;
}

.secondary-btn {
  background: #fff;
}

.ghost-btn {
  background: #f5f5f7;
  color: #1d1d1f;
}

.app-shell {
  grid-template-columns: 214px minmax(0, 1fr);
  background: #f5f5f7;
}

.sidebar {
  background: rgba(255, 255, 255, 0.82);
  color: #1d1d1f;
  border-right: 1px solid var(--line);
  backdrop-filter: blur(28px);
  padding: 16px 12px;
}

.sidebar .brand {
  color: #1d1d1f;
}

.nav-title {
  color: #86868b;
  font-size: 11px;
  font-weight: 650;
}

.nav-btn {
  color: #424245;
  border-radius: 10px;
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 650;
}

.nav-btn:hover,
.nav-btn.active {
  background: #e8e8ed;
  color: #1d1d1f;
}

.topbar {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0 18px;
}

.search {
  min-height: 32px;
  width: min(340px, 30vw);
  background: #fff;
  font-size: 12px;
}

.top-actions {
  gap: 6px;
}

.user-chip {
  font-size: 12px;
  font-weight: 700;
}

.avatar {
  width: 28px;
  height: 28px;
}

.content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px;
}

.page-head {
  margin-bottom: 14px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 750;
  margin-bottom: 4px;
}

.page-head p:empty {
  display: none;
}

.page-head p {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.45;
}

.grid {
  gap: 12px;
}

.compact-grid {
  gap: 12px;
}

.metric-card,
.panel,
.item-card {
  border-radius: 16px;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.9);
}

.metric-card {
  padding: 13px;
}

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

.metric-card strong {
  font-size: 20px;
  margin-top: 6px;
}

.panel {
  padding: 14px;
}

.panel h2,
.item-card h2 {
  font-size: 15px;
  font-weight: 750;
}

.item-card p,
.panel p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.item-card .form-actions {
  display: none;
}

.result-panel {
  margin-bottom: 12px;
}

.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.result-head strong {
  font-size: 14px;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-list span {
  border: 1px solid var(--line);
  background: #fbfbfd;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  color: #424245;
}

.test-console {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.test-console h2 {
  margin-bottom: 4px;
}

.test-console p {
  margin: 0;
}

.test-console .toolbar {
  margin: 0;
  flex-shrink: 0;
}

.slim-console {
  align-items: end;
  padding-top: 12px;
  padding-bottom: 12px;
}

.inline-field {
  margin: 0;
  min-width: min(420px, 100%);
  flex: 1;
}

.inline-field input {
  min-height: 38px;
  border-radius: 999px;
}

.compact-table {
  margin-top: 10px;
}

.compact-table table {
  min-width: 0;
}

@media (max-width: 900px) {
  .test-console {
    display: grid;
  }
}

.table-wrap {
  border-radius: 14px;
}

table {
  min-width: 920px;
}

th,
td {
  padding: 8px 10px;
}

th {
  font-size: 11px;
  font-weight: 700;
  background: #fbfbfd;
}

td {
  font-size: 12px;
}

.status {
  padding: 3px 7px;
  font-size: 10px;
}

.split {
  gap: 12px;
}

.steps {
  gap: 8px;
}

.step {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
}

.dot {
  width: 14px;
  height: 14px;
  border-width: 3px;
}

.step span {
  font-size: 12px;
}

.toolbar {
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar input,
.toolbar select {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.scan-box input {
  font-size: 13px;
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav-group {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .nav-title {
    display: none;
  }

  .nav-btn {
    width: auto;
    white-space: nowrap;
  }
}

/* Minimal luxury tuning */
:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #1d1d1f;
  --muted: #767676;
  --line: #e8e4dc;
  --blue: #111111;
  --blue-dark: #000000;
  --shadow: 0 10px 28px rgba(30, 24, 18, 0.055);
}

body {
  background: #f7f7f5;
  font-size: 13px;
}

.sidebar {
  background: #fbfbfa;
  color: #1d1d1f;
  border-right: 1px solid var(--line);
}

.sidebar .brand,
.nav-btn,
.nav-btn:hover,
.nav-btn.active {
  color: #1d1d1f;
}

.nav-title {
  color: #989898;
}

.nav-btn.active {
  background: #eeeeea;
}

.nav-btn:hover {
  background: #f2f2ef;
}

.brand-mark {
  background: #fff;
  box-shadow: none;
}

.topbar {
  min-height: 58px;
  background: rgba(251, 251, 250, 0.9);
}

.content {
  padding: 18px 20px;
}

.page-head {
  margin-bottom: 14px;
}

.page-head h1 {
  font-size: 20px;
  font-weight: 760;
}

.page-head p,
.test-console p,
.item-card p,
.panel p {
  font-size: 12px;
  color: #7b7b7b;
}

.metric-card,
.panel,
.item-card,
.table-wrap {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.desk-metrics .metric-card {
  min-height: 86px;
}

.desk-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 12px;
  margin-top: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
}

.quick-queue {
  display: grid;
  align-content: start;
}

.queue-row {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid #efebe4;
  background: transparent;
  text-align: left;
  color: #1d1d1f;
}

.queue-row:hover {
  background: #fbfaf8;
}

.queue-row strong {
  color: #1770d6;
  font-size: 12px;
}

.queue-row span {
  min-width: 0;
  overflow: hidden;
  color: #666;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-empty {
  padding: 18px 10px;
}

.primary-btn {
  background: #111;
  box-shadow: none;
}

.primary-btn:hover {
  background: #000;
}

.secondary-btn,
.ghost-btn {
  background: #fff;
  color: #1d1d1f;
  border-color: var(--line);
}

.ghost-btn {
  background: #f1f1ee;
}

.field input,
.field select,
.field textarea,
.search,
.toolbar input,
.toolbar select {
  border-color: var(--line);
  border-radius: 10px;
  background: #fff;
}

.status.green,
.status.blue,
.status.orange,
.status.red,
.status.cyan {
  background: #f2f2ef;
  color: #1d1d1f;
}

.active-result,
.recommended {
  border-color: #cfc8bc;
  background: linear-gradient(180deg, #fff, #fbfaf8);
}

.quote-form-panel {
  display: grid;
  gap: 16px;
}

.quote-dimensions {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fbfbfa;
}

.quote-dimensions summary {
  cursor: pointer;
  color: #5f6775;
  font-weight: 760;
}

.quote-empty,
.quote-error {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  color: #6b7280;
  background: #fff;
}

.quote-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.quote-rate-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.quote-order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-color: #b8dfca;
  background: #f4fbf7;
}

.quote-order-summary h2 {
  margin: 8px 0 4px;
}

.quote-order-summary p {
  margin: 0;
}

.quote-rate-card h2 {
  margin: 8px 0 4px;
  font-size: 18px;
}

.quote-results strong {
  display: block;
  font-size: 24px;
  color: #111;
}

.quote-fees {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

.quote-fees div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quote-fees dt,
.quote-fees dd {
  margin: 0;
}

.muted-time {
  color: #8a8a8a;
  font-size: 12px;
}

/* Logistics desk: compact, operational, low-luxury */
.dxm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.dxm-status-panel,
.dxm-filter-panel,
.dxm-actionbar,
.dxm-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.dxm-status-panel {
  position: relative;
  top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(20, 20, 20, 0.035);
  overflow-x: auto;
  overflow-y: hidden;
}

.dxm-status-title {
  flex: 0 0 auto;
  padding: 0 8px 0 2px;
  color: #888;
  font-size: 12px;
  font-weight: 700;
}

.dxm-status-btn {
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}

.dxm-status-btn:hover,
.dxm-status-btn.active {
  background: #f1f1ee;
}

.dxm-status-btn strong {
  min-width: 26px;
  text-align: right;
  color: #777;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dxm-orders-main {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 22px;
}

.dxm-filter-panel {
  padding: 10px 12px;
  margin-bottom: 12px;
}

.dxm-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid #f0eee9;
}

.dxm-filter-row:last-child {
  border-bottom: 0;
}

.dxm-filter-row > span {
  width: 72px;
  color: #777;
  font-size: 12px;
  font-weight: 700;
}

.filter-chip {
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #2570c2;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: #e8e4dc;
  background: #f7f7f5;
  color: #111;
}

.dxm-actionbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
}

.dxm-actionbar .toolbar {
  margin: 0;
}

.accent-btn {
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.dxm-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin: 8px 0 0;
}

.dxm-tabs button {
  min-height: 32px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #efefec;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dxm-tabs button.active {
  background: #fff;
  color: #111;
}

.dxm-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 0 10px 10px 10px;
  max-width: 100%;
  max-height: calc(100vh - 252px);
  min-height: 430px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: auto;
  scrollbar-width: auto;
  scrollbar-color: #8f877c #f0eee9;
}

.dxm-order-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dxm-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.dxm-table-wrap::-webkit-scrollbar-track {
  background: #f0eee9;
  border-radius: 999px;
}

.dxm-table-wrap::-webkit-scrollbar-thumb {
  background: #b8b1a6;
  border: 3px solid #f0eee9;
  border-radius: 999px;
}

.dxm-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8f877c;
}

.dxm-order-table .col-check {
  width: 34px;
}

.dxm-order-table .col-product {
  width: 220px;
}

.dxm-order-table .col-amount {
  width: 88px;
}

.dxm-order-table .col-recipient {
  width: 148px;
}

.dxm-order-table .col-order {
  width: 110px;
}

.dxm-order-table .col-time {
  width: 112px;
}

.dxm-order-table .col-route {
  width: 238px;
}

.dxm-order-table .col-status {
  width: 78px;
}

.dxm-order-table .col-action {
  width: 152px;
}

.dxm-order-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 32px;
  border-bottom: 1px solid #dcd8cf;
  background: #f7f7f5;
  color: #2a2a2a;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}

.dxm-order-table td {
  border-bottom: 1px solid #e7e3db;
  border-right: 1px solid #eeeae3;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.dxm-order-table td:last-child,
.dxm-order-table th:last-child {
  border-right: 0;
}

.dxm-group-row td {
  padding: 7px 9px;
  background: #fbfbfa;
}

.dxm-data-row td {
  padding: 9px;
  background: #fff;
}

.dxm-data-row:hover td {
  background: #fcfbf8;
}

.dxm-link {
  color: #1770d6;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.dxm-link:hover {
  text-decoration: underline;
}

.dxm-small-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0f7f2;
  color: #16834d;
  font-size: 10px;
  font-weight: 800;
}

.dxm-order-note {
  display: inline-block;
  max-width: min(520px, 60vw);
  margin-left: 14px;
  color: #444;
  font-size: 12px;
  overflow-wrap: break-word;
  vertical-align: middle;
}

.dxm-product {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.dxm-product > div:last-child {
  min-width: 0;
}

.dxm-product > div:last-child .dxm-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dxm-product-name {
  display: -webkit-box;
  max-height: 38px;
  overflow: hidden;
  overflow-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dxm-product small,
.dxm-time span,
.dxm-logistics small,
.block-muted {
  display: block;
  margin-top: 4px;
  color: #6f6f6f;
  font-size: 11px;
  line-height: 1.35;
}

.dxm-thumb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #f3f2ee);
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

.dxm-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  border-radius: 999px;
  background: #999;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.dxm-money strong {
  display: block;
  color: #111;
  font-size: 11px;
  white-space: nowrap;
}

.dxm-money small {
  display: block;
  max-width: 100%;
  color: #777;
  font-size: 11px;
  white-space: normal;
}

.dxm-logistics {
  min-width: 0;
}

.dxm-logistics strong {
  display: block;
  font-size: 12px;
}

.route-picker {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 5px 6px;
  align-items: center;
  margin-top: 7px;
  max-width: 100%;
}

.route-picker label {
  color: #777;
  font-size: 10px;
  font-weight: 800;
}

.route-select {
  width: 100%;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #e2ddd3;
  border-radius: 7px;
  background: #fff;
  color: #1d1d1f;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 650;
}

.tracking-stack {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  font-size: 11px;
  color: #555;
}

.tracking-stack span {
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.tracking-stack a,
.code,
.dxm-money strong,
.dxm-time span {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.doc-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.doc-buttons .secondary-btn {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}

.order-action-stack {
  display: grid;
  gap: 7px;
  align-content: start;
}

.order-action-stack .primary-btn,
.order-action-stack .secondary-btn,
.order-action-stack .danger-btn {
  width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
  box-shadow: none;
}

.doc-menu {
  position: relative;
}

.doc-menu summary {
  list-style: none;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.doc-menu summary::-webkit-details-marker {
  display: none;
}

.doc-menu[open] summary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.doc-menu-body {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 10;
  width: 166px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.danger-text {
  color: #d93636;
}

.dxm-pagination {
  margin-top: 12px;
  color: #666;
  font-size: 12px;
}

@media (max-width: 980px) {
  .desk-grid {
    grid-template-columns: 1fr;
  }

  .dxm-layout {
    grid-template-columns: 1fr;
  }

  .dxm-status-panel {
    position: relative;
    top: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .dxm-status-title {
    display: none;
  }

  .dxm-status-btn {
    width: auto;
    min-width: 112px;
  }

  .dxm-actionbar {
    flex-direction: column;
  }
}
