/* порт rent: graphite / racing yellow / white / brushed metal */
:root {
  --graphite: #1A1A1A;
  --yellow: #F4C300;
  --white: #FFFFFF;
  --metal: #B0B0B0;

  --bg: #111111;
  --surface: var(--graphite);
  --surface-2: #222222;
  --line: #2C2C2C;
  --text: var(--white);
  --muted: var(--metal);
  --dim: #6E6E6E;
  --ok: #49C98A;
  --danger: #FF5A4F;
  --metal-grad: linear-gradient(135deg, #F2F2F2 0%, #A9A9A9 45%, #D6D6D6 70%, #8E8E8E 100%);

  --radius: 6px;
  --head: "Exo 2", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--body);
  font-feature-settings: "tnum";
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: .01em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--graphite);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand img { width: 40px; }
.brand span { font: 600 21px/1 var(--head); letter-spacing: -.01em; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius);
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--yellow); }
.nav .count {
  background: var(--yellow); color: var(--graphite);
  font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 7px;
}
.nav .count.red { background: var(--danger); color: var(--white); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .who { margin-top: auto; padding: 12px; color: var(--dim); font-size: 13px; }
.side .who b { color: var(--muted); display: block; font-weight: 500; }

.main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* stripe accent from the brand mark */
.stripe { display: inline-block; width: 22px; height: 6px; background: var(--yellow); transform: skewX(-25deg); margin-right: 10px; vertical-align: middle; }

/* ---------- cards / kpi ---------- */
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3-1 { grid-template-columns: 2fr 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; }
.card-head a { color: var(--yellow); font-size: 13px; font-weight: 500; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font: 700 28px/1.1 var(--head); margin-top: 6px; }
.kpi .sub { color: var(--dim); font-size: 12px; margin-top: 4px; }
.kpi.accent { border-color: var(--yellow); box-shadow: inset 0 3px 0 var(--yellow); }
.kpi.alert .value { color: var(--danger); }
.section-title { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 26px 0 10px; }

/* ---------- park bars ---------- */
.stack { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.stack i { display: block; }
.s-rented { background: var(--yellow); }
.s-free { background: var(--metal); }
.s-repair { background: var(--danger); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); }
.park-row + .park-row { margin-top: 18px; }
.park-row .top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.park-row .top b { font: 700 18px var(--head); }

/* ---------- revenue chart ---------- */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 8px; }
.chart .bar { flex: 1; background: var(--surface-2); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.chart .bar.has { background: var(--metal); }
.chart .bar.today { background: var(--yellow); }
.chart .bar:hover { background: var(--white); }
.chart-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: 6px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #1F1F1F; }
td.num, th.num { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 13px; }
.red { color: var(--danger); }
.green { color: var(--ok); }
.empty { color: var(--dim); padding: 18px 0 6px; text-align: center; }

.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--metal); }
.progress i.done { background: var(--ok); }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.yellow { background: rgba(244, 195, 0, .14); color: var(--yellow); }
.badge.red { background: rgba(255, 90, 79, .14); color: var(--danger); }
.badge.green { background: rgba(73, 201, 138, .14); color: var(--ok); }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 600 14px var(--body); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--metal); }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--graphite); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.form { display: grid; gap: 18px; max-width: 640px; }
.field label, .field .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field .help { font-size: 12px; color: var(--dim); margin-top: 4px; }
.field .err { font-size: 13px; color: var(--danger); margin-top: 4px; }
input[type=text], input[type=number], input[type=password], input[type=tel], input[type=date], select, textarea {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 15px var(--body);
}
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--yellow); }
input[type=file] { color: var(--muted); font-size: 14px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { margin: 0; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label > span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; font-size: 14px;
}
.choices input:checked + span { border-color: var(--yellow); color: var(--text); box-shadow: inset 0 0 0 1px var(--yellow); }
.choices input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
.info dt { color: var(--dim); }
.info dd { margin: 0; }
.passport { display: flex; gap: 10px; flex-wrap: wrap; }
.passport img, .photos img { width: 150px; height: 100px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a.on { color: var(--text); border-color: var(--yellow); }
.tabs .n { color: var(--dim); margin-left: 4px; }

.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); }
.flash.success { border-color: var(--ok); }
.flash.error { border-color: var(--danger); }
.warn { border: 1px solid var(--danger); background: rgba(255, 90, 79, .08); padding: 12px 16px; border-radius: var(--radius); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .brand { padding: 0 0 26px; justify-content: center; }
.login .brand img { width: 56px; }
.login .brand span { font-size: 28px; }

/* ---------- mobile ---------- */
.topbar { display: none; }
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3-1, .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: var(--graphite); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 5;
  }
  .topbar .brand { padding: 0; }
  .topbar .brand img { width: 32px; }
  .topbar .brand span { font-size: 18px; }
  .main { padding: 18px 16px 90px; }
  h1 { font-size: 22px; }
  .kpi .value { font-size: 22px; }
  .card { padding: 14px; }
  .table-wrap { margin: 0 -14px; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .row-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--graphite); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { padding: 12px 4px; text-align: center; font-size: 12px; color: var(--muted); position: relative; }
  .bottom-nav a.on { color: var(--yellow); }
  .bottom-nav .count { position: absolute; top: 4px; right: 18%; background: var(--yellow); color: var(--graphite); font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 5px; }
}
@media (min-width: 761px) { .bottom-nav { display: none; } }

/* ---------- staff: verification ---------- */
.verify-bar { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; border-color: var(--yellow); }
@media (max-width: 760px) { .verify-bar { grid-template-columns: 1fr; } }
.photos a { display: inline-block; text-align: center; }

/* ======================= клиентское приложение ======================= */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 84px; }
.app-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; position: sticky; top: 0; z-index: 5;
  background: rgba(17, 17, 17, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.app-top .brand { padding: 0; }
.app-top .brand img { width: 30px; }
.app-top .brand span { font-size: 18px; }
.app-top .bal { font: 700 15px var(--head); background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; }
.app-main { padding: 18px 16px; display: grid; gap: 14px; }
.app-main h1 { font-size: 24px; }
.app-main .lead { color: var(--muted); margin: 6px 0 0; }

.hero {
  position: relative; overflow: hidden; border-radius: 10px; padding: 20px;
  background: var(--graphite); border: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; right: -30px; top: 18px; width: 140px; height: 22px;
  background: var(--yellow); transform: skewX(-28deg); opacity: .9;
}
.hero .label { color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.hero .big { font: 700 40px/1.1 var(--head); margin: 6px 0 2px; position: relative; z-index: 1; }
.hero .sub { color: var(--dim); font-size: 13px; position: relative; z-index: 1; }
.hero .actions { margin-top: 16px; position: relative; z-index: 1; }

.btn.block { width: 100%; height: 52px; font-size: 16px; }
.btn.lg { height: 52px; font-size: 16px; padding: 0 22px; }

.ride { border: 1px solid var(--yellow); border-radius: 10px; padding: 18px; background: var(--graphite); }
.ride.over { border-color: var(--danger); }
.ride .num { font: 700 30px var(--head); }
.ride .left { font: 700 22px var(--head); color: var(--yellow); }
.ride.over .left { color: var(--danger); }

.list { display: grid; gap: 8px; }
.list a, .list .item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px; border-radius: 8px; background: var(--graphite); border: 1px solid var(--line);
}
.list a:active { border-color: var(--yellow); }
.list .t { font: 700 17px var(--head); }
.list .go { color: var(--yellow); font-weight: 600; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--graphite); font-weight: 600; }
.chips a.on, .chips a:active { border-color: var(--yellow); color: var(--yellow); }

.tariffs .choices { display: grid; gap: 8px; }
.tariffs .choices label > span { height: auto; padding: 14px; width: 100%; justify-content: space-between; display: flex; font-size: 15px; color: var(--text); }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--yellow); margin: 0; flex: none; }

.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); }
.steps i.on { background: var(--yellow); }
.state { text-align: center; padding: 30px 10px; }
.state .icon { font-size: 44px; line-height: 1; margin-bottom: 14px; }

.tx { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.legal h2 { margin: 18px 0 6px; font-size: 15px; }
.legal p { color: var(--muted); margin: 0 0 8px; font-size: 14px; }

.app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  background: var(--graphite); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.app-nav div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.app-nav a { padding: 12px 4px 14px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 500; }
.app-nav a.on { color: var(--yellow); }
.app-nav a.take { color: var(--graphite); }
.app-nav a.take b { display: block; margin: -2px auto 0; background: var(--yellow); border-radius: 8px; padding: 8px 0; font-size: 13px; width: 90%; }

[hidden] { display: none !important; }
.tariffs em { font-style: normal; text-align: right; }

/* подпись пальцем */
.sig-pad { width: 100%; height: 160px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); touch-action: none; display: block; margin-bottom: 8px; }
.sign input[name=code] { font: 700 20px var(--head); letter-spacing: .3em; text-align: center; }

/* переписка */
.thread { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 10px; background: var(--graphite); border: 1px solid var(--line); font-size: 14px; }
.bubble.in { justify-self: end; background: var(--surface-2); }
.bubble.out { justify-self: start; border-color: rgba(244, 195, 0, .45); }
.bubble .dim { font-size: 11px; margin-top: 4px; }
.staff-thread .bubble.in { justify-self: start; background: var(--surface-2); border-color: var(--line); }
.staff-thread .bubble.out { justify-self: end; }
.app-nav a { position: relative; }
.dot { position: absolute; top: 9px; right: 30%; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }

/* меню сотрудников */
.side { overflow-y: auto; }
.side .nav a { padding: 8px 12px; }
.more-sheet { position: fixed; inset: 0; z-index: 6; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; }
.more-sheet > div { width: 100%; background: var(--graphite); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; padding: 10px 10px calc(70px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.more-sheet a { padding: 14px; border-radius: 8px; background: var(--surface-2); font-weight: 500; }
@media (min-width: 761px) { .more-sheet { display: none !important; } }
