:root {
  font-family: "Open Sans", Arial, Helvetica, "Noto Sans JP", sans-serif;
  --top: #242526;
  --rail: #333438;
  --rail-active: #25262a;
  --page: #343539;
  --work: #fbfbfb;
  --panel: #fff;
  --line: #d9d9d9;
  --soft: #f3f3f3;
  --text: #222;
  --muted: #777;
  --blue: #337ab7;
  --cyan: #48b9dc;
  --green: #75af3b;
  --red: #ff0909;
  --amber: #f0ad4e;
}
@font-face {
  font-family: "FontAwesome";
  src: url("./assets/fontawesome-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 13px; line-height: 1.42857143; }
button, input, select, textarea { font: inherit; font-weight: 400; line-height: 1.42857143; }
button { cursor: pointer; }

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: 50px minmax(0, 1fr);
  background: var(--page);
  transition: grid-template-columns .18s ease;
}
.app.nav-open { grid-template-columns: 230px minmax(0, 1fr); }

.systembar {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 50px;
  background: var(--top);
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #191a1c;
  z-index: 1000;
}
.system-brand { display: flex; align-items: center; gap: 6px; min-width: 0; position: relative; overflow: hidden; isolation: isolate; padding-right: 3px; }
.system-brand strong { font-size: 21px; font-weight: 400; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.mark {
  position: relative;
  width: 26px;
  height: 26px;
  color: #d8dde5;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fa-ico {
  width: 1em;
  height: 1em;
  display: inline-grid;
  place-items: center;
  font-family: "FontAwesome";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
.system-brand:after { content: ""; position: absolute; top: -55%; bottom: -55%; left: -62px; width: 54px; z-index: 2; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 18%, rgba(255,255,255,.82) 48%, rgba(91,195,235,.5) 58%, transparent 100%); transform: skewX(-22deg); animation: gear-sheen 4.6s ease-in-out infinite; pointer-events: none; mix-blend-mode: screen; }
.mark:after { content: none; }
.mark .fa-ico { position: relative; z-index: 1; font-size: 21px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); animation: header-gear-spin 18s linear infinite; }
.system-tools { display: flex; align-items: center; gap: 12px; }
.system-tools .seg { border: 0; background: transparent; display: flex; gap: 4px; overflow: visible; }
.system-tools .seg button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #d7d7d7;
  padding: 4px 6px;
}
.system-tools .seg .on { color: #fff; background: transparent; box-shadow: inset 0 -2px 0 var(--cyan); }
.system-tools select {
  height: 34px;
  min-width: 160px;
  background: var(--top);
  color: #eee;
  border: 0;
  padding: 0 8px;
}

.side {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  background: var(--rail);
  color: #eee;
  padding-top: 58px;
  overflow: visible;
}
.menu-toggle {
  position: absolute;
  top: 18px;
  right: -1px;
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
  color: #333;
  font-size: 25px;
  line-height: 1;
  z-index: 4;
}
.menu-toggle:focus { outline: 0; box-shadow: 0 0 0 2px rgba(72,185,220,.45); }
.nav { display: grid; }
.nav button {
  height: 42px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #26272a;
  border-left: 4px solid transparent;
  background: transparent;
  color: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 0 8px;
  text-align: left;
  overflow: hidden;
}
.nav button .fa-ico { width: 20px; height: 20px; flex: 0 0 20px; color: #bfc3c9; font-size: 16px; text-align: center; }
.nav button:nth-child(2) .fa-ico { color: #5bc0de; }
.nav button:nth-child(3) .fa-ico { color: #f0ad4e; }
.nav button:nth-child(4) .fa-ico { color: #c6a4d9; }
.nav button:nth-child(5) .fa-ico { color: #f08a8a; }
.nav button span:not(.fa-ico) { display: none; white-space: nowrap; }
.app.nav-open .nav button span:not(.fa-ico) { display: inline; }
.nav button.active { background: var(--rail-active); border-left-color: #f04b37; }
.nav button:hover { background: #2a2b2f; }
.user { display: none; }
.mobile-nav { display: none; }

main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  background: var(--work); box-shadow: inset 0 -96px 0 var(--page), inset 0 -97px 0 var(--line);
  padding: 24px 24px 120px;
  align-content: start;
  display: grid;
  gap: 18px;
}
.top { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { display: none; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: 0; }
h1 { color: #666; font-size: 26px; font-weight: 300; letter-spacing: -1px; text-transform: uppercase; }
h2 { font-size: 20px; }
h3 { font-size: 16px; font-weight: 600; }
.screen { display: none; gap: 18px; }
.screen.active { display: grid; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 337px));
  gap: 30px;
  align-items: start;
}
.stat {
  position: relative;
  min-height: 54px;
  border: 1px solid #999;
  border-radius: 4px;
  background: #eaecf8;
  overflow: visible;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  padding: 8px 12px; text-align: left; transition: box-shadow .18s ease, transform .18s ease;
}
.stat::before {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 42px;
  font-family: "FontAwesome";
  font-size: 33px;
  line-height: 1;
  text-align: center;
  color: #111;
  -webkit-font-smoothing: antialiased;
}
.stat.b::before { content: "\f1b9"; }
.stat.a::before { content: "\f0d1"; }
.stat.g::before { content: "\f071"; color: white; }
.stat.x::before { content: "\f187"; color: #333; }
.stat span { color: #111; text-transform: uppercase; grid-column: 2; }
.stat strong { font-size: 18px; grid-column: 2; grid-row: 1; }
.stat.g { background: #db2d2d; color: white; border-color: #db2d2d; }
.stat.g span, .stat.g strong { color: white; }
.cars-panel>.filter-card,.cars-panel>.filter-grid>label:nth-child(2),.cars-panel>.filter-grid>label:nth-child(3){display:none}
.cars-panel{display:grid;grid-template-columns:252px max-content max-content minmax(0,1fr);gap:10px;align-items:end;justify-content:stretch}.cars-panel>.filter-grid{grid-column:2;grid-row:1;margin:0;grid-template-columns:220px 126px 126px 84px 42px;gap:8px;justify-content:start}.cars-panel>.filter-grid select{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cars-panel>.table-actions{display:contents}.cars-panel>.table-actions>span{display:none}.cars-panel>.table-actions>.primary{grid-column:3;grid-row:1;align-self:end;justify-self:start;width:auto;white-space:nowrap}.cars-panel>.table-actions>.table-search{grid-column:1;grid-row:1;justify-self:start;width:252px;align-self:end;margin-left:0}.cars-panel>.wrap,.cars-panel>.table-count,.cars-panel>.pager{grid-column:1/-1;width:100%}.page-size-field{width:84px}.pager{display:flex;align-items:center;gap:8px;margin:2px 0 10px}.pager:empty{display:none}.pager span{font-size:13px;color:#222}.pager .mini-btn:disabled{opacity:.45;cursor:default}
.stat.is-active,.stat-card.is-active{box-shadow:0 0 0 3px rgba(72,185,220,.25);border-color:var(--cyan);transform:translateY(-1px)}.stat.is-active::after,.stat-card.is-active::after{content:"";position:absolute;left:50%;top:100%;width:34px;height:13px;border-radius:0 0 4px 4px;background:linear-gradient(180deg,rgba(72,185,220,.58),rgba(72,185,220,0));transform:translate(-50%,3px);pointer-events:none}.screen.active .stats .stat,.stats-row .stat-card{animation:statEnter .62s cubic-bezier(.18,.9,.2,1.08) backwards}.screen.active .stats .stat:nth-child(2),.stats-row .stat-card:nth-child(2){animation-delay:.06s}.screen.active .stats .stat:nth-child(3),.stats-row .stat-card:nth-child(3){animation-delay:.12s}.screen.active .stats .stat:nth-child(4),.stats-row .stat-card:nth-child(4){animation-delay:.18s}.dashboard-results{--dashboard-origin-x:50%;--dashboard-launch-scale:.2;--dashboard-launch-y:-12px;transform-origin:var(--dashboard-origin-x) 0;animation:dashboardTableDrop .74s cubic-bezier(.18,.86,.24,1.04) both;overflow:visible}.dashboard-results .filter-card,.dashboard-results .filter-grid,.dashboard-results .table-actions{display:none}@keyframes statEnter{0%{opacity:0;transform:translateY(18px) scale(.96);filter:blur(4px);box-shadow:0 0 0 rgba(72,185,220,0)}58%{opacity:1;transform:translateY(-3px) scale(1.018);filter:blur(0);box-shadow:0 18px 34px rgba(72,185,220,.22)}100%{opacity:1;transform:none;filter:none;box-shadow:0 0 0 rgba(72,185,220,0)}}@keyframes dashboardTableDrop{0%{opacity:0;transform:translateY(var(--dashboard-launch-y)) scaleX(var(--dashboard-launch-scale)) scaleY(.04);filter:blur(3px)}42%{opacity:1;transform:translateY(14px) scaleX(var(--dashboard-launch-scale)) scaleY(.9);filter:blur(1px)}74%{transform:translateY(-3px) scaleX(1.018) scaleY(1.035);filter:blur(0)}100%{opacity:1;transform:none;filter:none}}@keyframes drop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.role-hero { display: none; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tasks { display: none; }
.owner { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.cars-panel { border: 0; background: transparent; }
.filter-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  margin-bottom: 14px;
}
.filter-title {
  height: 44px;
  padding: 8px 12px;
  background: var(--soft);
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
}
.filter-title span { display: inline-flex; align-items: center; gap: 7px; }
.filter-tools { position: relative; gap: 5px !important; }
.filter-empty { padding: 12px 12px; color: #111; background: #fff; }
.filter-card.is-collapsed .filter-empty { display: none; }
.filter-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 25;
  display: none !important;
  min-width: 172px;
  padding: 5px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.filter-menu.open { display: grid !important; gap: 3px; }
.filter-menu button, .saved-filter {
  min-height: 28px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #222;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.filter-menu button:hover, .saved-filter:hover { background: #f5f5f5; }
.saved-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; border: 1px solid #d8d8d8; padding: 4px 8px; }
.mini-btn {
  width: 29px;
  height: 25px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.mini-btn .fa-ico { color: inherit; font-size: 13px; transform: none; }
.tri-down { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transform: translateY(1px); }
.filter-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.45fr 1.15fr 1.15fr 46px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.filter-grid label { min-width: 0; display: grid; gap: 3px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.filter-grid label span b { color: #0d6692; font-size: 18px; }
input, select {
  height: 34px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  padding: 6px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
}
.filter-grid input::placeholder,.filter-grid select:has(option[value="all"]:checked){color:#999;font-weight:400}
.date-range { display: grid; grid-template-columns: 1fr 1fr; }
.date-range input:first-child { border-radius: 4px 0 0 4px; }
.date-range input:last-child { border-radius: 0 4px 4px 0; border-left: 0; }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) 42px; }
.input-action input { border-radius: 4px 0 0 4px; }
.input-action button, .table-search button {
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.input-action svg, .table-search svg { width: 19px; height: 19px; stroke: #333; fill: none; }
.reset-btn { width: 46px; height: 34px; justify-content: center; padding: 0; }
.table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 14px;
}
.primary, .secondary, .task button, .file-action {
  min-height: 34px;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}
.primary { background: var(--blue); border-color: #2e6da4; color: white; }
.secondary { background: #fff; border-color: var(--line); color: #333; }
.primary .button-ico, .secondary .button-ico, .task button .button-ico, .file-action .button-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  font-size: 15px;
}
.table-search {
  display: grid;
  grid-template-columns: 34px 176px 42px;
  align-items: center;
  margin-left: auto;
  position: relative;
}
.table-search .search-menu-btn {
  height: 34px;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #333;
}
.table-search .search-menu-btn:hover { background: #f9f9f9; }
.table-search .search-menu-btn .fa-ico { font-size: 15px; }
.table-search input { height: 34px; border-radius: 0; font-size: 13px; }
.table-search input::placeholder { color: #888; font-size: 13px; }
.search-submit {
  height: 34px;
  border: 1px solid #43afd0 !important;
  border-radius: 0 4px 4px 0 !important;
  background: var(--cyan) !important;
}
.search-submit svg { width: 21px !important; height: 21px !important; stroke: white !important; stroke-width: 3; }
.search-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 265px;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: none;
}
.table-search.open .search-menu { display: grid; gap: 8px; }
.search-menu label { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 400; color: #333; line-height: 1.25; }
.search-menu input { width: 17px; height: 17px; min-height: 0; margin: 0; }
.search-menu hr { width: 100%; border: 0; border-top: 1px solid #ddd; margin: 4px 0; }

.wrap { max-width: 100%; min-width: 0; overflow: auto; }
table { width: 100%; min-width: 1320px; border-collapse: collapse; background: white; }
th, td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: middle; }
th { background: #f7f7f7; color: #222; font-size: 14px; font-weight: 600; text-transform: none; }
td { font-size: 13px; }
td span { display: block; color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.file { border: 0; background: transparent; padding: 0; display: inline-flex !important; align-items: center; gap: 5px; color: #0b72b5 !important; font-weight: 400; }
.file .fa-ico { width: 15px !important; height: 15px !important; color: currentColor !important; font-size: 14px !important; margin: 0 !important; }
.file:hover { text-decoration: underline; }
.muted-dash { color: var(--muted) !important; }
.chip, .state-on, .state-off {
  display: inline-flex !important;
  align-items: center;
  min-width: 170px;
  border-radius: 4px;
  padding: 5px 8px;
  color: white !important;
  font-size: 13px !important;
  font-weight: 700;
  text-transform: uppercase;
}
.not_confirmed { background: var(--red); }
.stock { background: #3c8dbc; }
.delivery { background: var(--green); }
.accepted { background: var(--green); }
.archived { background: #999; }
.condition-chip{display:inline-flex!important;align-items:center;gap:6px;min-width:132px;border-radius:4px;padding:5px 8px;color:white!important;font-size:13px!important;font-weight:700;text-transform:uppercase}.condition-chip .fa-ico{width:15px;height:15px;font-size:14px;color:currentColor!important}.condition-chip.driveable{background:linear-gradient(135deg,#f7b34d,#f08a24)}.condition-chip.not-driveable{background:linear-gradient(135deg,#111827,#3a3f47)}
.state-on { background: var(--green); min-width: auto; }
.state-off { background: #999; min-width: auto; }
.muted-row { opacity: .64; }
.row-actions { white-space: nowrap; display: flex; gap: 5px; align-items: center; min-height: 27px; }
.row-actions > * + * { margin-left: 0; }
@media (min-width: 681px) {
  td.row-actions { display: table-cell; }
  .row-actions > * { margin-right: 5px; vertical-align: middle; }
  .row-actions > *:last-child { margin-right: 0; }
}
.icon {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  color: #333;
  padding: 0;
  line-height: 1;
}
.icon .fa-ico { width: 14px !important; height: 14px !important; color: currentColor !important; font-size: 13px !important; margin: 0 !important; }
.file-action { background: var(--blue); color: white; cursor: pointer; }
.file-action input { display: none; }
.table-count { margin: 10px 0 0; }

.title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title strong { background: #e8f0ff; color: #1d5bff; border-radius: 999px; padding: 4px 8px; }
.mini, .admin-list, .audit-list, .task-list { display: grid; gap: 10px; margin-top: 12px; }
.mini div, .admin-list div, .audit-list div, .task {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}
.owner .panel, .admin { padding: 14px; }
.dict-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.dict-tabs button { border: 1px solid var(--line); background: #fafafa; border-radius: 4px; padding: 8px 10px; }
.dict-tabs button.active { background: var(--blue); border-color: var(--blue); color: white; }
.dict-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 14px 0; color: var(--muted); }
.dict-table { min-width: 960px; }
.dict-readonly { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; background: #fafafa; }
.empty { border: 1px dashed var(--line); border-radius: 4px; padding: 14px; color: var(--muted); text-align: center; }

.back {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0,0,0,.45);
  display: none;
  place-items: center;
  padding: 18px;
}
.back.open { display: grid; }
.modal { width: min(780px, 100%); max-height: calc(100dvh - 36px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: white; border-radius: 4px; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.dict-modal, .user-modal { width: min(720px, 100%); }
.modal header, .modal footer {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.modal footer { border-top: 1px solid var(--line); border-bottom: 0; justify-content: flex-end; gap: 10px; }
.modal header span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; } #carForm header strong { font-size: 20px; line-height: 1.2; font-weight: 600; color: var(--text); }
.form { min-height: 0; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; overflow-y: auto; overscroll-behavior: contain; } #carForm { width: min(620px, calc(100vw - 28px)); } #carForm .form { grid-template-columns: 1fr; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; } #carForm .form label { grid-template-columns: minmax(118px, 30%) minmax(0, 1fr); align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 700; } #carForm .form label > span:first-child { white-space: nowrap; text-transform: uppercase; }
.form input, .form select { width: 100%; }
.upload-row {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafafa;
  min-height: 38px;
  padding: 4px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
.upload-row input { display: none; }
.upload-button {
  background: var(--blue);
  color: white;
  border-radius: 4px;
  padding: 7px 10px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upload-button .fa-ico { width: 16px; height: 16px; color: currentColor; font-size: 15px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-name.selected { color: var(--text); font-weight: 600; }
.check { display: flex !important; align-items: center; align-content: end; gap: 8px !important; color: var(--text) !important; }
.check input { width: auto; }
.note { align-self: center; color: var(--muted); font-size: 13px; }

.sheet-back { z-index: 1600; }
.sheet-modal { width: min(1280px, calc(100vw - 24px)); height: min(920px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); background: white; border-radius: 4px; box-shadow: 0 22px 90px rgba(0,0,0,.35); display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; }
.sheet-modal header { min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; } .sheet-modal header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-actions .secondary, .sheet-actions .primary { min-height: 36px; text-decoration: none; }
.sheet-stage { min-width: 0; min-height: 0; background: #f5f5f5; display: grid; place-items: center; overflow: hidden; }
.pdf-viewer { display: block; width: 100%; height: 100%; min-width: 0; border: 0; background: white; }
.image-viewer { width: 100%; height: 100%; min-width: 0; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.image-viewer.is-panning { cursor: grabbing; }
.image-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; transition: transform .08s ease; user-select: none; pointer-events: none; }
.sheet-stage.is-zoomed .image-viewer { cursor: grab; }

@keyframes gear-sheen {
  0%, 38% { left: -62px; opacity: 0; }
  48% { opacity: .95; }
  76%, 100% { left: calc(100% + 18px); opacity: 0; }
}
@keyframes header-gear-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .system-brand:after { animation: none; opacity: 0; }
  .mark .fa-ico { animation: none; }
}

@media (max-width: 980px) {
  .app, .app.nav-open { grid-template-columns: 40px minmax(0, 1fr); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .owner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  button, input, select, textarea { font-size: 16px; min-height: 44px; }
  .app { display: block; min-height: 100dvh; }
  .systembar { position: sticky; top: 0; height: auto; min-height: 52px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
  .system-brand strong { font-size: 16px; }
  .system-tools select { min-width: 0; width: 128px; }
  .side { display: none; }
  main { padding: 14px 12px calc(88px + env(safe-area-inset-bottom)); box-shadow: none; }
  h1 { font-size: 25px; }
  .filter-grid, .table-actions { display: grid; grid-template-columns: 1fr; }
  .table-search { width: 100%; grid-template-columns: 44px minmax(0,1fr) 46px; }
  .wrap { overflow: visible; }
  table, .dict-table { display: block; min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; }
  tr { display: grid; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 4px; }
  td { display: grid; grid-template-columns: minmax(88px,34%) minmax(0,1fr); gap: 8px; align-items: center; min-width: 0; padding: 10px 12px; border-width: 0 0 1px; }
  td:last-child { border-bottom: 0; }
  td:before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
  .row-actions { justify-content: flex-end; }
  .chip { min-width: 0; justify-content: center; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -12px 34px rgba(0,0,0,.12); }
  .mobile-nav button { min-width: 0; min-height: 52px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 7px 4px; display: grid; place-items: center; }
  .mobile-nav button .fa-ico { width: auto; color: currentColor; font-size: 22px; }
  .mobile-nav button.active { background: #e8f4fb; color: var(--blue); }
  .back { padding: 0; place-items: stretch; }
  .modal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; box-shadow: none; }
  .modal header { padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
  .modal footer { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .modal footer button { flex: 1; }
  .form { grid-template-columns: 1fr; overflow: auto; padding: 14px; } #carForm .upload-row { grid-template-columns: minmax(0,1fr); } #carForm .upload-name { display: none; }
  .sheet-modal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .sheet-modal header { padding: calc(12px + env(safe-area-inset-top)) 14px 12px; align-items: flex-start; flex-direction: column; }
  .sheet-actions { width: 100%; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); }
  .sheet-actions > :nth-child(1) { grid-column: 1 / 3; } .sheet-actions > :nth-child(2) { grid-column: 3 / 5; } .sheet-actions > :nth-child(3) { grid-column: 5 / 7; } .sheet-actions > :nth-child(4) { grid-column: 1 / 4; } .sheet-actions > :last-child { grid-column: 4 / 7; } .sheet-actions .primary, .sheet-actions .secondary { width: 100%; min-width: 0; min-height: 44px; padding-inline: 6px; }
}
@media (max-width: 680px){.cars-panel{display:block}.cars-panel>.filter-grid,.cars-panel>.table-actions{display:grid;grid-template-columns:1fr;margin:0 0 12px}.cars-panel>.table-actions>*{grid-column:1;width:100%}.dashboard-results .filter-grid,.dashboard-results .table-actions{display:none}}
