:root {
  --black: #050505;
  --black-soft: #0d0d0f;
  --panel: #080809;
  --white: #f8f8f8;
  --muted: #aaa7b2;
  --line: #dedde2;
  --purple: #8d35f5;
  --pink: #ef3cab;
  --lime: #acd400;
  --orange: #ff7a00;
  --danger: #ff5973;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 84% -12%, #8d35f529 0 18%, transparent 36%),
    radial-gradient(circle at 108% 4%, #ff7a001d 0 13%, transparent 28%),
    var(--black);
  font: 15px/1.5 "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

a { color: var(--white); text-decoration: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 252px;
  padding: 34px 24px 26px;
  border-right: 1px solid #26242b;
  background: #030303e8;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  margin: 0 0 46px 14px;
}
.brand-image-wrap { position: relative; display: block; width: 170px; height: 132px; overflow: hidden; }
.brand-image-wrap img { position: absolute; top: 50%; left: 50%; width: 294px; max-width: none; transform: translate(-50%, -50%); }

nav { display: flex; flex-direction: column; gap: 9px; }
nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #d6d3dc;
  font-size: 16px;
  font-weight: 750;
  transition: .18s ease;
}
nav a:hover { border-color: #55515e; color: var(--white); background: #16151a; transform: translateX(3px); }
.nav-dot { width: 11px; height: 11px; flex: 0 0 11px; border: 2px solid currentColor; border-radius: 4px; }
.nav-dot.purple { color: var(--purple); }.nav-dot.pink { color: var(--pink); }.nav-dot.lime { color: var(--lime); }.nav-dot.orange { color: var(--orange); }

.sidebar-footer { margin-top: auto; padding: 17px 15px 0; border-top: 1px solid #27252b; }
.user-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.logout-form { margin: 0; }
.link-button { padding: 0; border: 0; color: var(--white); background: none; font: inherit; font-weight: 750; cursor: pointer; }
.link-button:hover { color: var(--pink); }

.mobile-header { display: none; }
.container { width: calc(100% - 252px); max-width: 1500px; margin-left: 252px; padding: 46px 4vw 78px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 7px; color: var(--lime); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.muted, small { color: var(--muted); }
small { display: block; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { margin: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid #59565f;
  border-radius: 11px;
  color: var(--white);
  background: #111114;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--white); }
.button.primary { border-color: transparent; background: linear-gradient(110deg, #7e2ced, #a63cf5); box-shadow: 0 10px 28px #8d35f52b; }
.button.primary:hover { background: linear-gradient(110deg, #8d35f5, #ef3cab); }
.button.danger { border-color: #ff597388; color: #ffd7dd; background: #45131b; }
.button.danger:hover { border-color: var(--danger); background: #651b27; }
.button.compact { min-height: 34px; padding: 6px 11px; font-size: 12px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.sync-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -8px 0 22px; padding: 13px 17px; border: 1px solid #55515f; border-radius: 13px; background: #0b0a0d; }
.sync-strip div { display: flex; align-items: center; gap: 12px; }
.sync-strip span { color: var(--muted); }
.sync-strip.success { border-color: #acd40066; }
.sync-strip.success strong { color: #dfff62; }
.sync-strip.error { border-color: #ff597366; }
.sync-strip.error strong { color: #ffb2bd; }
.backup-strip { margin-top: -12px; }
.backup-strip.success { border-color: #8d35f566; }
.backup-strip.success strong { color: #d6b5ff; }
.module-note { display: flex; gap: 12px; margin: -8px 0 22px; padding: 14px 17px; border: 1px solid #8d35f566; border-radius: 13px; background: #8d35f512; }
.module-note strong { color: #d6b5ff; white-space: nowrap; }
.module-note span { color: #c5c1ca; }
.section-gap { margin-top: 20px; }
.metrics article {
  position: relative;
  min-height: 145px;
  overflow: hidden;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #060607d9;
}
.metrics article::after { content: ""; position: absolute; right: -35px; bottom: -45px; width: 115px; height: 115px; border-radius: 50%; background: currentColor; opacity: .12; }
.metrics article > span { color: #dad8df; font-weight: 750; }
.metrics article strong { display: block; margin-top: 15px; font-size: 40px; line-height: 1; letter-spacing: -.05em; }
.metrics article strong small { display: inline; margin-left: 5px; color: #b9b5c0; font-size: 14px; letter-spacing: 0; }
.metrics article i { position: absolute; top: 22px; right: 22px; width: 13px; height: 13px; border-radius: 50%; background: currentColor; box-shadow: 0 0 22px currentColor; }
.metrics .accent-purple { color: var(--purple); }.metrics .accent-pink { color: var(--pink); }.metrics .accent-lime { color: var(--lime); }.metrics .accent-orange { color: var(--orange); }
.metrics .warning { box-shadow: inset 0 -3px 0 var(--pink); }

.grid-two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.panel, .form-card, .login-card {
  border: 1px solid #aaa8af;
  border-radius: 20px;
  background: #070708e6;
  box-shadow: 0 18px 50px #0008;
}
.panel-title { display: flex; align-items: center; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid #29272e; }
.panel-title a { color: var(--purple); font-weight: 800; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; border-bottom: 1px solid #242229; text-align: left; vertical-align: top; white-space: nowrap; }
th { color: #9e9aa7; background: #0d0c0f; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #151219; }
.number { color: var(--lime); font-variant-numeric: tabular-nums; font-weight: 850; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.catalog-table td { vertical-align: middle; }
.catalog-image { display: block; width: 72px; height: 58px; border-radius: 9px; background: #fff; object-fit: contain; }
.catalog-image-cell { display: flex; min-width: 104px; flex-direction: column; align-items: flex-start; gap: 6px; }
.inline-action { color: #c899ff; font-size: 11px; font-weight: 800; }
.inline-action:hover { color: var(--pink); }
.image-placeholder { display: inline-flex; width: 72px; height: 58px; align-items: center; justify-content: center; border: 1px dashed #4b4851; border-radius: 9px; color: #7e7a84; font-size: 10px; text-align: center; }
.description-cell { min-width: 300px; max-width: 520px; white-space: normal; color: #cbc8d0; }
.catalog-footer { display: flex; justify-content: flex-end; padding: 18px 20px; border-top: 1px solid #29272e; }
.row-actions { display: flex; gap: 7px; }
.current-catalog-image { margin-bottom: 20px; }
.current-catalog-image img { display: block; width: min(260px, 100%); max-height: 190px; border-radius: 13px; background: #fff; object-fit: contain; }
.stock-status { display: inline-block; min-width: 84px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; text-align: center; }
.stock-status.good { color: #dfff62; background: #acd40020; }
.stock-status.necessary { color: #ffd29f; background: #ff7a0024; }
.stock-status.urgent { color: #ffb2bd; background: #ff597324; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; color: #e7d8ff; background: #8d35f538; font-size: 11px; font-weight: 850; }
.badge.draft { color: #ffe1ba; background: #ff7a0033; }

.search { display: flex; gap: 10px; margin-bottom: 16px; }
.search input { flex: 1; }
.stock-filters { display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; border: 1px solid #403d47; border-radius: 16px; background: #09090be8; }
.stock-filters label { display: block; margin-bottom: 6px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.notes-cell { min-width: 230px; max-width: 420px; white-space: normal; }
.notes-cell span { display: block; margin-bottom: 5px; color: #cbc8d0; }
.movement-filters { display: grid; grid-template-columns: 1fr 1.45fr 1.2fr 1.2fr auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; border: 1px solid #403d47; border-radius: 16px; background: #09090be8; }
.technician-history-filters { grid-template-columns: 1.15fr 1.45fr 1fr 1fr 1fr auto; }
.movement-filters label { display: block; margin-bottom: 6px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.audit-filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; border: 1px solid #403d47; border-radius: 16px; background: #09090be8; }
.audit-filters label { display: block; margin-bottom: 6px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.audit-action { display: inline-block; padding: 5px 9px; border-radius: 999px; color: #e7d8ff; background: #8d35f538; font-size: 11px; font-weight: 900; }
.audit-action.delete { color: #ffb2bd; background: #ff597324; }
.audit-action.consume { color: #dfff62; background: #acd40020; }
.audit-action.sync { color: #ffd29f; background: #ff7a0024; }
.audit-summary { min-width: 300px; white-space: normal; }
.audit-details summary { color: #c899ff; cursor: pointer; font-weight: 800; }
.audit-details pre { max-width: 430px; margin: 8px 0 0; padding: 10px; overflow: auto; border-radius: 8px; color: #cbc8d0; background: #111014; font: 12px/1.4 Consolas, monospace; white-space: pre-wrap; }
.filter-actions { display: flex; gap: 8px; }
.form-card { max-width: 760px; padding: 28px; }
.login-card { width: min(450px, 100%); margin: 8vh auto 0; padding: 36px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: #3c3941; }
.quick-access-link, .technician-back { width: 100%; }
.technician-access-card { width: min(560px, 100%); }
.technician-access-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 25px 0; }
.technician-access-list form { margin: 0; }
.technician-access-button { display: flex; width: 100%; min-height: 62px; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #514d58; border-radius: 13px; color: var(--white); background: #111014; font: inherit; font-weight: 850; text-align: left; cursor: pointer; }
.technician-access-button:hover { border-color: var(--lime); background: #171a0d; }
.mobile-technician-nav { display: none; }
.route-technician-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.route-technician-card { overflow: hidden; border: 1px solid #aaa8af; border-radius: 20px; background: #070708e6; box-shadow: 0 18px 50px #0008; }
.route-card-heading, .route-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; }
.route-card-heading { border-bottom: 1px solid #29272e; }
.route-card-heading > div { display: flex; align-items: center; gap: 11px; }
.route-avatar { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px; color: #dfff62; background: #acd40020; font-size: 18px; font-weight: 900; }
.route-preview { min-height: 168px; padding: 11px 20px; }
.route-preview > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #242229; }
.route-preview > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-preview > div strong { flex: none; color: var(--lime); }
.route-card-footer { border-top: 1px solid #29272e; }
.route-detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; }
.compact-stock-cards { max-height: 440px; overflow-y: auto; }
.dashboard-secondary { margin-top: 18px; }
.route-dashboard-list a { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #242229; }
.route-dashboard-list a:last-child { border-bottom: 0; }
.route-dashboard-list a:hover { background: #151219; }
.route-dashboard-list a div { min-width: 0; flex: 1; }
.route-dashboard-list a strong, .route-dashboard-list a small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-dashboard-list a b { color: #c899ff; font-size: 12px; }
.period-filter { min-width: 210px; }
.period-filter label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.analytics-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.analytics-panel { min-width: 0; }
.dashboard-hero-charts { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, .85fr); gap: 18px; margin-bottom: 18px; }
.trend-panel, .donut-panel { position: relative; overflow: hidden; background: linear-gradient(145deg, #0a090c 0%, #100b17 100%); }
.trend-panel::after { content: ""; position: absolute; right: -120px; bottom: -180px; width: 330px; height: 330px; border-radius: 50%; background: #8d35f51a; filter: blur(10px); pointer-events: none; }
.trend-panel .panel-title > div:first-child small { margin-top: 3px; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.chart-legend span, .donut-legend span { display: inline-flex; align-items: center; gap: 6px; color: #bdb9c4; font-size: 11px; font-weight: 800; }
.chart-legend i, .donut-legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart-legend i.purple, .donut-legend i.purple { background: var(--purple); }.chart-legend i.orange, .donut-legend i.orange { background: var(--orange); }.chart-legend i.lime, .donut-legend i.lime { background: var(--lime); }.chart-legend i.pink, .donut-legend i.pink { background: var(--pink); }
.line-chart-wrap { position: relative; z-index: 1; padding: 12px 20px 17px; }
.line-chart { display: block; width: 100%; height: auto; min-height: 230px; overflow: visible; }
.chart-grid-line { stroke: #5b56651f; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-x-label, .chart-y-label { fill: #8f8a97; font-size: 10px; }
.chart-series { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px currentColor); }
.chart-series.purple { color: var(--purple); stroke: var(--purple); }.chart-series.orange { color: var(--orange); stroke: var(--orange); }.chart-series.lime { color: var(--lime); stroke: var(--lime); }.chart-series.pink { color: var(--pink); stroke: var(--pink); }
.chart-point { stroke: #09080b; stroke-width: 2; vector-effect: non-scaling-stroke; }.chart-point.purple { fill: var(--purple); }.chart-point.orange { fill: var(--orange); }.chart-point.lime { fill: var(--lime); }.chart-point.pink { fill: var(--pink); }
.donut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px 18px 12px; }
.donut-block { min-width: 0; text-align: center; }
.donut { position: relative; display: grid; width: 128px; height: 128px; margin: 0 auto 13px; place-items: center; border-radius: 50%; }
.donut::before { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: #0c0910; box-shadow: inset 0 0 18px #0009; }
.donut > div { position: relative; z-index: 1; }
.donut strong, .donut small { display: block; }
.donut strong { font-size: 27px; line-height: 1; }
.donut small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.stock-donut { background: conic-gradient(var(--lime) 0 var(--stock-angle), #29262e var(--stock-angle) 360deg); box-shadow: 0 0 35px #acd40018; }
.movement-donut { box-shadow: 0 0 35px #8d35f520; }.movement-donut.empty-donut { background: #29262e !important; }
.donut-block h3 { margin: 0 0 3px; font-size: 14px; }
.donut-block p { margin: 0; color: var(--muted); font-size: 11px; }
.donut-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; padding: 13px 20px 21px; }
.donut-legend span b { margin-left: auto; color: var(--white); }
.bar-chart { display: flex; flex-direction: column; gap: 20px; padding: 23px; }
.bar-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row strong { flex: none; }
.bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: #242229; }
.bar-track i { display: block; min-width: 4px; height: 100%; border-radius: inherit; }
.bar-track i.purple { background: var(--purple); }.bar-track i.orange { background: var(--orange); }.bar-track i.lime { background: var(--lime); }.bar-track i.pink { background: var(--pink); }
.technician-analytics a { display: flex; align-items: center; gap: 12px; padding: 15px 19px; border-bottom: 1px solid #242229; }
.technician-analytics a:last-child { border-bottom: 0; }
.technician-analytics a:hover { background: #151219; }
.technician-analytics a > div { min-width: 0; flex: 1; }
.technician-analytics a strong, .technician-analytics a small { display: block; }
.technician-analytics a > b { color: var(--lime); font-size: 22px; text-align: right; }
.technician-analytics a > b small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.category-coverage { padding: 9px 20px; }
.category-coverage > .category-row { display: block; padding: 10px 0; border-bottom: 1px solid #242229; }
.category-coverage > .category-row:last-child { border-bottom: 0; }
.category-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; }
.category-coverage strong { color: var(--lime); }
.category-coverage strong small { display: inline; }
.category-track { height: 7px; overflow: hidden; border-radius: 999px; background: #242229; }
.category-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--pink)); }
.login-logo-wrap { position: relative; display: block; width: 155px; height: 120px; margin: -8px 0 22px; overflow: hidden; }
.login-logo-wrap img { position: absolute; top: 50%; left: 50%; width: 270px; max-width: none; transform: translate(-50%, -50%); }
.stacked-form p { margin: 0 0 18px; }
.stacked-form label { display: block; margin-bottom: 7px; color: #dedce3; font-weight: 750; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #55515c;
  border-radius: 10px;
  color: var(--white);
  background: #111014;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid #8d35f53d; border-color: var(--purple); }
option { background: #111014; }
.product-combobox { position: relative; width: 100%; }
.product-search { width: 100%; margin-bottom: 0; padding-right: 42px; }
.product-search::placeholder { color: #85818c; }
.product-select-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.product-combobox::after { position: absolute; top: 50%; right: 16px; color: #bdb9c4; content: "⌄"; pointer-events: none; transform: translateY(-54%); font-size: 20px; }
.product-combobox-list { position: absolute; inset: calc(100% + 7px) 0 auto; z-index: 80; max-height: 280px; padding: 6px; overflow-y: auto; border: 1px solid #4a4552; border-radius: 12px; background: #151219; box-shadow: 0 18px 45px #000a; }
.product-combobox-option { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; color: #f5f2f7; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.product-combobox-option:hover, .product-combobox-option.active { color: #fff; background: #8d35f52e; }
.product-combobox-empty { padding: 13px 12px; color: #9f9aa6; }
.minimum-add-panel { margin-bottom: 18px; }
.minimum-add-form { display: grid; grid-template-columns: minmax(280px, 1.6fr) minmax(140px, .55fr) minmax(170px, .65fr) auto; align-items: end; gap: 14px; padding: 18px 22px 22px; }
.minimum-add-form label { display: block; margin-bottom: 6px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.minimum-number-input { min-width: 118px; padding: 9px 10px; text-align: right; }
.errorlist { margin: 0 0 9px; padding: 11px 14px; border: 1px solid #ff597366; border-radius: 9px; color: #ffb2bd; background: #ff59731c; list-style: none; }
.message { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #acd40066; border-radius: 10px; color: #dfff62; background: #acd4001a; font-weight: 750; }
.message.error { border-color: #ff597366; color: #ffb2bd; background: #ff59731c; }
.message.warning { border-color: #ff7a0066; color: #ffd29f; background: #ff7a001c; }
.confirmation-card h2 { margin-bottom: 6px; }
.movement-summary { display: flex; justify-content: space-between; gap: 20px; margin: 20px 0; padding: 15px 0; border-block: 1px solid #29272e; }
.movement-summary span { color: var(--lime); font-weight: 850; }
.movement-multi-form { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.6fr); align-items: start; gap: 18px; }
.movement-header-card { max-width: none; }
.movement-header-card h2 { margin-bottom: 22px; }
.movement-lines-panel { min-width: 0; }
.movement-lines { padding: 8px 18px 18px; }
.movement-line { display: grid; grid-template-columns: 34px minmax(260px, 1fr) 130px auto; align-items: end; gap: 12px; padding: 14px 0; border-bottom: 1px solid #29272e; }
.movement-multi-form .movement-line { grid-template-columns: 34px minmax(220px, 1fr) 110px minmax(175px, .68fr) minmax(185px, .72fr) minmax(170px, .64fr) auto; }
.line-reason[hidden], .line-returner[hidden], .line-applied-date[hidden] { display: none; }
.movement-line:last-child { border-bottom: 0; }
.movement-line[hidden] { display: none; }
.line-number { display: grid; width: 30px; height: 30px; margin-bottom: 8px; place-items: center; border-radius: 9px; color: #d6b5ff; background: #8d35f528; font-weight: 900; }
.movement-line label { display: block; margin-bottom: 6px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.line-delete { padding-bottom: 1px; }
.line-delete > input { display: none; }
.movement-submit-actions { grid-column: 1 / -1; justify-content: flex-end; }
.formset-errors { margin: 14px 18px 0; }
.movement-products { display: flex; min-width: 270px; flex-direction: column; gap: 5px; }
.movement-product-line { display: grid; grid-template-columns: minmax(260px, 1fr) 72px minmax(190px, .8fr); align-items: baseline; gap: 14px; padding-bottom: 7px; border-bottom: 1px solid #29272e; }
.movement-product-line:last-child { padding-bottom: 0; border-bottom: 0; }
.movement-product-line b { color: var(--lime); text-align: right; font-variant-numeric: tabular-nums; }
.movement-product-line small { color: var(--muted); line-height: 1.3; }
.technician-consumption-row { background: linear-gradient(90deg, #e94aac13, #8d35f50a 70%, transparent); }
.technician-consumption-row td:first-child { box-shadow: inset 4px 0 0 #e94aac; }
.movement-kind-label { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 8px; font-weight: 800; white-space: nowrap; }
.movement-kind-label.consumption { color: #ffb5dd; background: #e94aac22; box-shadow: inset 0 0 0 1px #e94aac4d; }
.movement-stock-note { display: block; margin-top: 7px; color: #db91bc; font-size: 10px; font-weight: 750; white-space: nowrap; }
.consumption-destination { color: #ff9cd2; font-weight: 750; white-space: nowrap; }
.warning-text { margin: 22px 0; padding: 13px 15px; border-left: 3px solid var(--danger); color: #ffd7dd; background: #ff597312; }

.technician-panel { margin-bottom: 18px; }
.stock-cards article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 21px; border-bottom: 1px solid #242229; }
.stock-cards article:last-child { border-bottom: 0; }
.stock-cards article > span { flex: none; padding: 7px 10px; border-radius: 8px; color: #dfff62; background: #acd4001b; font-weight: 850; font-variant-numeric: tabular-nums; }
.recent-mobile { margin-top: 18px; }
.route-kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.route-kit-card { display: grid; gap: 16px; padding: 20px; }
.route-kit-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.route-kit-card h2 { margin-top: 5px; }
.route-kit-lines { display: grid; border-block: 1px solid #29272e; }
.route-kit-lines > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 2px; border-bottom: 1px solid #242229; }
.route-kit-lines > div:last-child { border-bottom: 0; }
.route-kit-lines b { flex: none; color: var(--lime); }
.daily-dispatch-controls { display: grid; grid-template-columns: minmax(260px, .55fr) minmax(420px, 1.45fr); align-items: end; gap: 18px; padding: 18px; }
.daily-dispatch-controls > label, .daily-dispatch-controls > div > label, .daily-technician-kit > label { display: grid; gap: 7px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.daily-dispatch-controls > div { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 10px; }
.daily-dispatch-date { max-width: 430px; padding: 18px; }
.daily-dispatch-date label { display: grid; gap: 7px; color: #bdb9c4; font-size: 12px; font-weight: 800; }
.daily-technician-kits { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.daily-technician-kit { display: grid; align-content: start; gap: 13px; padding: 16px; }
.daily-technician-kit header { display: flex; align-items: center; gap: 11px; }
.daily-technician-kit header small { color: var(--muted); }
.daily-technician-kit h2 { margin-top: 2px; font-size: 17px; }
.daily-technician-kit .technician-avatar { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; color: #ddff72; background: #acd40019; font-weight: 900; }
.daily-technician-kit .actions { display: grid; grid-template-columns: 1fr auto; }
.daily-dispatch-table { min-width: 980px; }
.daily-dispatch-table th:not(:first-child), .daily-dispatch-table td:not(:first-child) { text-align: center; }
.daily-fixed-table th:first-child, .daily-fixed-table td:first-child { min-width: 330px; text-align: left; }
.daily-fixed-table td:first-child small { display: block; margin-top: 4px; color: var(--muted); }
.daily-fixed-table tbody tr:hover { background: #ffffff06; }
.daily-product-cell { min-width: 300px; }
.daily-product-cell strong, .daily-product-cell small { display: block; }
.daily-product-cell small { margin-top: 4px; color: var(--muted); }
.daily-quantity-input { width: 105px; min-width: 90px; padding: 9px; text-align: right; }
.daily-dispatch-submit { justify-content: flex-end; margin-top: 18px; }

@media (max-width: 1050px) {
  .sidebar { width: 210px; padding-inline: 17px; }
  .container { width: calc(100% - 210px); margin-left: 210px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .grid-two { grid-template-columns: 1fr; }
  .route-detail-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .dashboard-hero-charts { grid-template-columns: 1fr; }
  .route-kit-grid { grid-template-columns: 1fr; }
  .daily-technician-kits { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .movement-multi-form { grid-template-columns: 1fr; }
  .movement-filters { grid-template-columns: 1fr 1fr; }
  .audit-filters { grid-template-columns: 1fr 1fr; }
  .stock-filters { grid-template-columns: 1fr 1fr; }
  .minimum-add-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 5vw; border-bottom: 1px solid #2e2b33; background: #050505ed; backdrop-filter: blur(12px); }
  .mobile-header > span { color: var(--muted); font-size: 12px; }
  .mobile-brand { display: flex; align-items: center; font-weight: 800; }
  .mobile-logo-wrap { position: relative; display: block; width: 72px; height: 56px; overflow: hidden; }
  .mobile-logo-wrap img { position: absolute; top: 50%; left: 50%; width: 122px; max-width: none; transform: translate(-50%, -50%); }
  .container { width: 100%; margin-left: 0; padding: 27px 5vw 60px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .actions, .actions .button { width: 100%; }
  .inline-form { width: 100%; }
  .sync-strip, .sync-strip div { align-items: flex-start; flex-direction: column; }
  .module-note { flex-direction: column; }
  .search { flex-direction: column; }
  .movement-filters { grid-template-columns: 1fr; }
  .audit-filters { grid-template-columns: 1fr; }
  .stock-filters { grid-template-columns: 1fr; }
  .minimum-add-form { grid-template-columns: 1fr; padding: 16px; }
  .minimum-add-form .button { width: 100%; }
  .filter-actions, .filter-actions .button { width: 100%; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metrics article { min-height: 118px; padding: 17px; border-radius: 15px; }
  .metrics article strong { font-size: 31px; }
  .metrics article i { top: 17px; right: 17px; }
  th, td { padding: 12px 14px; }
  .login-card { margin-top: 3vh; padding: 27px; }
  .route-technician-grid { grid-template-columns: 1fr; }
  .daily-dispatch-controls, .daily-dispatch-controls > div, .daily-technician-kits { grid-template-columns: 1fr; }
  .movement-line { grid-template-columns: 30px minmax(0, 1fr); }
  .line-quantity { grid-column: 2; }
  .movement-multi-form .movement-line { grid-template-columns: 30px minmax(0, 1fr); }
  .line-reason { grid-column: 2; }
  .line-returner { grid-column: 2; }
  .line-applied-date { grid-column: 2; }
  .line-delete { grid-column: 2; }
  .chart-legend { justify-content: flex-start; }
  .trend-panel .panel-title { align-items: flex-start; flex-direction: column; gap: 10px; }
  .line-chart-wrap { padding-inline: 8px; }
  body:has(.mobile-technician-nav) .container { padding-bottom: 105px; }
  .mobile-technician-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid #37333d; background: #050505f2; backdrop-filter: blur(14px); }
  .mobile-technician-nav a, .mobile-technician-nav button { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border: 0; border-radius: 10px; color: var(--white); background: #131116; font: inherit; font-size: 12px; font-weight: 850; text-align: center; }
  .mobile-technician-nav form { display: flex; margin: 0; }
  .mobile-technician-nav button { width: 100%; color: #ffb2bd; }
}

@media (max-width: 430px) {
  .metrics { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
  .stock-cards article { align-items: flex-start; }
  .technician-access-list { grid-template-columns: 1fr; }
}
