:root {
  font: 14px "Inter", "Segoe UI", Arial, sans-serif;
  color: #f7f7f8;
  background: #0b0b0d;
  --bg: #0b0b0d;
  --panel: #141417;
  --panel-2: #1b1b20;
  --line: #2d2d33;
  --text: #f7f7f8;
  --muted: #a4a4ad;
  --red: #f04444;
  --red-deep: #b91f2b;
  --red-soft: #35171b;
  --green: #4ade80;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 83% -8%, #4a121c 0, transparent 33rem), var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 800; transition: .2s ease; }
button:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:active { transform: translateY(0); }
[hidden] { display: none !important; }

.auth { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 24px; }
.auth::before, .auth::after { content: ""; position: absolute; width: 440px; height: 440px; border-radius: 50%; filter: blur(90px); opacity: .22; pointer-events: none; }
.auth::before { background: var(--red); top: -190px; right: -120px; }
.auth::after { background: #7f1d1d; bottom: -250px; left: -140px; }
.auth-glow { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, #f0444409 50%, transparent 70%); pointer-events: none; }
.card { background: linear-gradient(145deg, #17171b, #111114); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px #0008; padding: 24px; }
.auth-card { width: min(470px, 100%); position: relative; z-index: 1; padding: 38px; }
.auth-card h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.04; letter-spacing: -.05em; margin: 34px 0 10px; }
.auth-card p { color: var(--muted); line-height: 1.6; margin: 0; }
.auth-card form { display: grid; gap: 14px; margin-top: 27px; }
.auth-card form button { margin-top: 6px; }

.brand { display: flex; gap: 11px; align-items: center; font-size: 19px; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; }
.brand b { color: var(--red); }
.brand small { display: block; color: #85858e; font-size: 9px; font-weight: 800; letter-spacing: .16em; margin-top: 3px; }
.brand-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; color: #fff; background: linear-gradient(145deg, #ff6868, #a91827); box-shadow: 0 8px 22px #f0444440; font-size: 14px; letter-spacing: -.06em; }
.mark { color: #fff; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.eyebrow.light { color: #ffb0b0; }
.muted { color: var(--muted); }
.link { color: var(--red); background: transparent; padding: 7px 0; }
.primary { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 8px 22px #f0444430; }
.secondary { color: #f5c3c3; background: #32171b; border: 1px solid #5c252d; }
.danger { color: #ffb1b1; background: #321318; border: 1px solid #65232c; }
.icon-button { padding: 4px 9px; background: transparent; color: var(--muted); font-size: 27px; }

#app { display: flex; min-height: 100vh; }
aside { width: 260px; flex: none; display: flex; flex-direction: column; padding: 27px 17px 19px; background: #101013eF; border-right: 1px solid var(--line); }
.side-label { color: #686871; font-size: 10px; font-weight: 900; letter-spacing: .16em; margin: 52px 13px 11px; }
nav { display: grid; gap: 4px; }
nav button { display: flex; align-items: center; gap: 13px; width: 100%; color: #aaaab3; text-align: left; background: transparent; border: 1px solid transparent; }
nav button i { width: 27px; height: 27px; display: inline-grid; place-items: center; color: #85858d; font-style: normal; font-size: 0; text-align: center; }
nav button i::before, .metric-icon::before, .quick-icon::before { content: ""; display: block; position: relative; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 5px; box-shadow: 2px 3px 0 #0005, inset 1px 1px 0 #fff3; }
nav button i.home::before { border-radius: 3px 3px 5px 5px; transform: rotate(45deg) scale(.72); }
nav button i.person::before, .metric-icon.icon-person::before, .quick-icon.icon-person::before { border-radius: 50%; width: 12px; height: 12px; box-shadow: 0 7px 0 -2px currentColor, 2px 4px 0 #0005; }
nav button i.bike::before, .metric-icon.icon-bike::before { border-radius: 50%; width: 15px; height: 9px; box-shadow: -7px 6px 0 -3px currentColor, 7px 6px 0 -3px currentColor, 2px 3px 0 #0005; }
nav button i.parts::before, .quick-icon.icon-parts::before { border-radius: 4px; transform: rotate(45deg) scale(.72); }
nav button i.service::before, .metric-icon.icon-orders::before { border-radius: 3px; box-shadow: inset 0 4px 0 -2px currentColor, inset 0 8px 0 -2px currentColor, 2px 3px 0 #0005; }
nav button i.backup::before { border-radius: 4px 4px 8px 8px; box-shadow: inset 0 -4px 0 -2px currentColor, 2px 3px 0 #0005; }
nav button i.billing::before { border-radius: 50%; transform: rotate(-25deg); box-shadow: 2px 3px 0 #0005, inset 1px 1px 0 #fff3; }
nav button.active i { color: var(--red); }
nav button:hover i { color: #ff9d9d; }
nav button.active, nav button:hover { color: #fff; background: linear-gradient(90deg, #3a171c, #231619); border-color: #5a262d; }
nav button.active i { color: var(--red); }
.side-note { color: #777780; font-size: 12px; line-height: 1.5; padding: 18px 12px; border-top: 1px solid var(--line); margin-top: auto; }
#tenant { color: #c6c6cd; font-size: 12px; padding: 0 12px 10px; overflow-wrap: anywhere; }
.logout { color: #aaaab3; background: #1e1e23; text-align: left; }

main { flex: 1; min-width: 0; }
header { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 29px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line); background: #0f0f12cc; backdrop-filter: blur(12px); }
header h1 { font-size: 28px; line-height: 1.1; margin: 7px 0 0; letter-spacing: -.045em; }
header .subtitle { color: var(--muted); margin: 7px 0 0; }
#account { color: var(--muted); font-size: 12px; }
#content { max-width: 1450px; margin: auto; padding: 34px clamp(20px, 4vw, 48px) 60px; }

.hero { display: flex; justify-content: space-between; gap: 25px; min-height: 270px; align-items: center; padding: clamp(27px, 5vw, 52px); overflow: hidden; border: 1px solid #5a252c; border-radius: 22px; background: radial-gradient(circle at 90% 0%, #a51d2f 0, transparent 30%), linear-gradient(120deg, #30171b, #151518 65%); box-shadow: inset 0 0 55px #ff4b4b12, 0 18px 45px #0005; }
.hero h2 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -.07em; line-height: .98; margin: 14px 0; max-width: 600px; }
.hero h2 em { color: var(--red); font-style: normal; }
.hero p { color: #d4aeb0; line-height: 1.6; max-width: 550px; margin: 0 0 25px; }
.hero-art { width: 165px; height: 165px; flex: none; display: grid; place-items: center; position: relative; border: 1px solid #d24d572f; border-radius: 50%; background: radial-gradient(circle, #c3293c 0, #5e1724 38%, #201317 70%); box-shadow: 0 0 0 18px #f0444407, 0 0 80px #f0444440; }
.hero-art::before { content: ""; position: absolute; inset: 17px; border: 1px solid #ff969633; border-radius: 50%; }
.hero-art span { font-size: 47px; font-weight: 1000; font-style: italic; letter-spacing: -.13em; transform: translateX(-4px); }
.hero-art small { position: absolute; bottom: 27px; right: -18px; color: #ffb8b8; font-size: 8px; line-height: 1.1; letter-spacing: .17em; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 36px 0 16px; }
.section-head h2 { margin: 7px 0 0; font-size: 23px; letter-spacing: -.04em; }
.section-head p { margin: 6px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.metric { min-height: 165px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -50px; bottom: -50px; background: #f0444411; }
.metric small { display: block; color: #96969f; font-size: 10px; font-weight: 900; letter-spacing: .13em; margin-top: 18px; }
.metric strong { display: block; color: #fff; font-size: 32px; margin: 10px 0 7px; letter-spacing: -.06em; }
.metric-foot { color: #75757d; font-size: 12px; }
.metric-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; position: relative; border: 1px solid #6e2e37; border-radius: 11px; color: #ff9494; background: linear-gradient(145deg, #4b1c25, #1e1014); box-shadow: 0 5px 0 #180b0e, 0 10px 18px #0005, inset 1px 1px 0 #fff2; font-weight: 900; transform: perspective(80px) rotateX(5deg) rotateZ(-2deg); }
.metric-icon::before { width: 14px; height: 14px; }
.metric-icon.icon-money { font-size: 11px; }
.metric-icon.icon-money::before { display: none; }
.metric-icon.red { color: #fff; background: linear-gradient(135deg, var(--red), var(--red-deep)); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 15px; margin-top: 15px; }
.card-title { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-title h2 { font-size: 18px; margin: 0; }
.quick-card h2 { font-size: 21px; margin: 9px 0 19px; }
.quick { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 0; color: #fff; text-align: left; border-top: 1px solid var(--line); background: transparent; border-radius: 0; }
.quick b { display: grid; place-items: center; position: relative; width: 39px; height: 39px; border: 1px solid #6e2e37; border-radius: 11px; background: linear-gradient(145deg, #4b1c25, #1e1014); color: #ff9292; font-size: 18px; box-shadow: 0 4px 0 #180b0e, 0 8px 14px #0005, inset 1px 1px 0 #fff2; transform: perspective(80px) rotateX(5deg) rotateZ(-2deg); }
.quick-icon.icon-plus::before { width: 17px; height: 3px; border: 0; border-radius: 3px; background: currentColor; box-shadow: none; }
.quick-icon.icon-plus::after { content: ""; position: absolute; width: 3px; height: 17px; border-radius: 3px; background: currentColor; }
.quick span { flex: 1; display: grid; gap: 3px; }
.quick small { color: var(--muted); }
.quick i { color: var(--red); font-style: normal; font-size: 18px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #777780; }
.search input { width: 100%; padding: 12px 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.list-card { padding: 10px 22px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 66px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row b { color: #fff; }
.row small { display: block; color: var(--muted); margin-top: 6px; }
.row > strong { white-space: nowrap; }
.row .actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.row .actions button { padding: 8px 11px; font-size: 12px; }
.pill { padding: 6px 10px; border-radius: 20px; background: #302a13; color: #f3d36d; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill.approved, .pill.ready { background: #14301f; color: #7bea9e; }
.pill.service { background: #2f1b31; color: #e4a1f6; }
.pill.done { background: #172c34; color: #83d5e9; }
.pill.waiting { background: #352317; color: #ffbf82; }
.wa { color: #b4f7c7; background: #143322; border: 1px solid #225e38; }
.empty { padding: 42px 18px; color: var(--muted); text-align: center; }
.empty-symbol { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 11px; border-radius: 12px; color: #ff9696; background: var(--red-soft); font-size: 25px; }
.empty h3 { color: #dadade; font-size: 15px; margin: 0 0 15px; }
.editor { margin-top: 18px; scroll-margin-top: 20px; }
.editor-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.editor-head h2 { margin: 7px 0 0; font-size: 21px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
label { display: grid; gap: 7px; color: #c9c9d0; font-size: 12px; font-weight: 800; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #0e0e11; color: var(--text); }
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px #f0444415; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.billing-card { max-width: 700px; }
.billing-card h2 { margin: 15px 0 7px; }
.billing-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--red), var(--red-deep)); font-size: 25px; }
.billing-card p { color: var(--muted); line-height: 1.6; }
#notice { position: fixed; z-index: 4; right: 22px; bottom: 22px; max-width: min(400px, calc(100vw - 44px)); padding: 14px 18px; border: 1px solid #5e282f; border-radius: 11px; color: #fff; background: #241316; box-shadow: 0 12px 35px #0009; }

.admin-page { min-height: 100vh; }
.admin-shell { width: min(1100px, 100%); margin: auto; padding: 28px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.admin-header h1 { margin: 8px 0 0; font-size: 29px; letter-spacing: -.05em; }
.admin-login { max-width: 500px; }
.admin-login h2 { margin: 0 0 8px; }
.admin-login form { display: grid; gap: 14px; margin-top: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 22px 0; }
.admin-grid .metric { min-height: 125px; }
.admin-tenants { margin-top: 12px; }
.admin-tenants .row { gap: 18px; }
.admin-tenants .row > div:first-child { flex: 1; min-width: 0; }
.admin-tenants small { display: block; overflow-wrap: anywhere; }
#message { color: #ffaaa9; margin-top: 14px; }

@media (max-width: 980px) {
  aside { width: 78px; padding-left: 8px; padding-right: 8px; }
  aside .brand > span:last-child, aside .side-label, aside .side-note, aside #tenant { display: none; }
  nav button { justify-content: center; padding: 12px 8px; }
  nav button i { font-size: 19px; }
  nav button:not(.active) { font-size: 0; }
  nav button.active { font-size: 0; }
  nav button.active i, nav button i { font-size: 19px; }
  .logout { font-size: 0; text-align: center; padding: 12px 8px; }
  .logout::before { content: "↪"; font-size: 20px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .admin-shell { padding: 20px 16px; }
  .admin-header { align-items: flex-start; }
  .admin-header h1 { font-size: 24px; }
  .admin-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 27px 22px; }
  header { padding: 22px 20px; }
  header h1 { font-size: 23px; }
  #content { padding: 23px 16px 45px; }
  .hero { min-height: 0; padding: 27px 22px; }
  .hero-art { width: 88px; height: 88px; }
  .hero-art span { font-size: 25px; }
  .hero-art small { bottom: 8px; right: -14px; font-size: 6px; }
  .hero h2 { font-size: 35px; }
  .hero p { font-size: 13px; }
  .split { grid-template-columns: 1fr; }
  .metrics { gap: 10px; }
  .metric { padding: 17px; min-height: 145px; }
  .metric strong { font-size: 27px; }
  .section-head { align-items: start; flex-direction: column; gap: 12px; }
  .section-head > button { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }
  .row { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .row .actions { justify-content: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .list-card { padding: 8px 15px; }
}
