/* Мадера · Монтаж — визуальный слой прототипа.
   Оформление повторяет основной сайт dverimadera.ru: монохром, тонкие линии,
   Raleway, настоящий логотип. */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/raleway-300.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/raleway-400.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/raleway-500.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/raleway-600.woff2") format("woff2");
}

:root {
  --terra: #111111;
  --terra-dark: #000000;
  --terra-soft: #EFEFEC;
  --terra-line: #D6D6D2;
  --cream: #F4F4F2;
  --paper: #FFFFFF;
  --ink: #0F0F0F;
  --ink-soft: #333333;
  --muted: #7C7C78;
  --line: #E5E5E1;
  --line-strong: #CFCFCB;
  --green: #3F6B4A;
  --green-soft: #EAF0EB;
  --amber: #8C6D45;
  --amber-soft: #F3EDE3;
  --red: #A33A2A;
  --red-soft: #F7E7E3;
  --gold: #A9885C;
  --sidebar: #0D0D0D;
  --sidebar-2: #191919;
  --radius: 2px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --font-body: "Raleway", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-serif: "Raleway", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
body.modal-open { overflow: hidden; }
a { color: var(--terra-dark); }
button { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.muted { color: var(--muted); }
.logo { display: block; width: 100%; height: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 18px;
  font: 600 14px/1.1 var(--font-body); cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}
.btn .ico { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-dark); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: #fff; border-color: var(--terra-line); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8A3B2D; }
.btn-danger-ghost { color: var(--red); border-color: var(--red-soft); background: transparent; }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; flex: 0 0 auto;
}
.icon-btn:hover { background: rgba(43, 36, 32, 0.06); color: var(--ink); }
.linklike { background: none; border: 0; color: var(--terra); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- forms ---------- */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px; width: 100%; outline: none;
  transition: border-color 0.16s, box-shadow 0.16s; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--terra); box-shadow: 0 0 0 3px rgba(184, 94, 61, 0.12); }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.field--wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid--tight { gap: 10px; margin-top: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.hint { font-size: 12px; color: var(--muted); font-style: normal; line-height: 1.45; display: block; margin-top: 6px; }
.calc-line {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--cream); border-radius: 12px; padding: 12px 14px; margin: 14px 0; font-size: 13px;
}
.calc-line b { font: 600 22px/1 var(--font-serif); color: var(--terra); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px;
  padding: 8px 15px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chip-btn.is-active { background: var(--terra); border-color: var(--terra); color: #fff; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.slot-chip {
  border: 1px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: 8px 11px; font-size: 12px; cursor: pointer; color: var(--ink-soft);
}
.slot-chip.is-active { border-color: var(--terra); background: var(--terra-soft); color: var(--terra-dark); font-weight: 600; }
.hours-input { max-width: 140px; margin-top: 8px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; position: fixed; inset: 0 auto 0 0; z-index: 20;
  background: var(--sidebar); color: #F4EAE2;
  display: flex; flex-direction: column; padding: 28px 18px 18px;
}
.main { margin-left: 260px; flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 32px 14px;
  background: rgba(246, 240, 233, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 220, 209, 0.75);
}
.topbar-text h1 { font: 600 26px/1.15 var(--font-serif); letter-spacing: 0.01em; }
.topbar-text p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.content { padding: 26px 32px 70px; max-width: 1240px; }
.mobile-brand, .mobile-logout { display: none; }
.bottomnav { display: none; }

.sidebar-brand { display: block; width: 176px; margin: 0 4px 6px; }
.sidebar-caption {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: #A8978A; margin: 10px 6px 0;
}
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border-radius: 12px; color: #CBBDB2; text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.nav-link .ico { width: 19px; height: 19px; opacity: 0.92; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.is-active { background: rgba(184, 94, 61, 0.3); color: #fff; }
.nav-link.is-active .ico { color: #EDB096; }
.nav-badge {
  margin-left: auto; background: var(--terra); color: #fff; border-radius: 999px;
  font-size: 10px; font-style: normal; padding: 2px 7px; font-weight: 700;
}
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.sidebar-foot .btn { margin-bottom: 12px; }
.sidebar-foot .btn-primary { background: #C46B48; }
.sidebar-foot .btn-primary:hover { background: #D27652; }
.sidebar-note {
  display: flex; gap: 8px; font-size: 10.5px; line-height: 1.45;
  color: #B9A99D; background: rgba(255, 255, 255, 0.05);
  border-radius: 10px; padding: 10px; margin: 4px 0 14px;
}
.sidebar-note .ico { width: 14px; height: 14px; color: #D9A28B; margin-top: 1px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 14px;
}
.user-chip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-chip-text b { font-size: 12.5px; color: #FBF4EE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text i { font-style: normal; font-size: 10.5px; color: #B9A99D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .avatar { background: rgba(255, 255, 255, 0.12); color: #F6EDE6; }
.sidebar .icon-btn { color: #B9A99D; width: 32px; height: 32px; }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--terra-soft); color: var(--terra-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: 0 0 auto; letter-spacing: 0.02em;
}
.avatar--sm { width: 32px; height: 32px; font-size: 10.5px; }
.avatar--lg { width: 52px; height: 52px; font-size: 15px; }
.avatar--xl { width: 72px; height: 72px; font-size: 20px; }
.avatar[style*="--team-color"] { background: var(--team-color); color: #fff; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font: 600 30px/1.1 var(--font-serif); color: var(--ink); }
.stat span { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.stat i { display: block; margin-top: 2px; font-size: 11.5px; font-style: normal; color: var(--muted); }
.stat--terra b { color: var(--terra); }
.stat--green b { color: var(--green); }

/* ---------- panels ---------- */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 18px;
}
.panel--flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font: 600 19px/1.2 var(--font-serif); letter-spacing: 0.01em; }
.panel-hint { font-size: 12px; color: var(--muted); margin: -6px 0 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.badge .ico { width: 12px; height: 12px; }
.panel-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.filters { display: flex; gap: 5px; flex-wrap: wrap; }
.filter {
  border: 1px solid transparent; background: transparent; border-radius: 999px;
  padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.filter em {
  font-style: normal; background: var(--cream); padding: 2px 7px;
  border-radius: 999px; font-size: 10.5px; color: var(--muted);
}
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--terra-soft); color: var(--terra-dark); }
.filter.is-active em { background: #fff; color: var(--terra-dark); }
.search-field input {
  min-width: 250px; border-radius: 999px; padding: 10px 16px;
  background: #fff; font-size: 13px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 12px; }
.section-head h2 { font: 600 21px var(--font-serif); }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--terra); text-decoration: none; font-weight: 600; }
.link-arrow .ico { width: 14px; height: 14px; }
.page-note {
  display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px;
  color: var(--muted); margin: 18px 2px 0; line-height: 1.5;
}
.page-note .ico { width: 15px; height: 15px; color: var(--terra); margin-top: 2px; }

/* ---------- order table ---------- */
.order-table { margin-top: 2px; }
.order-head, .order-row {
  display: grid; grid-template-columns: 104px minmax(220px, 1.6fr) 92px 1.05fr 120px 128px;
  gap: 14px; align-items: center; padding: 13px 8px;
}
.order-head {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 700;
}
.order-row { border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background 0.14s; }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: #FBF6F0; }
.or-no b { display: block; font-size: 13.5px; }
.or-no i, .or-client i, .or-items i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.or-client b { font-size: 13.5px; font-weight: 600; }
.or-client i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-items b { font-size: 14px; }
.or-brigade { font-size: 12.5px; }
.or-date { font-size: 12.5px; color: var(--ink-soft); }
.status {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: 0.01em;
}
.status--sent { background: var(--amber-soft); color: var(--amber); }
.status--quoted { background: var(--terra-soft); color: var(--terra-dark); }
.status--booked { background: var(--green-soft); color: var(--green); }
.status--done { background: #EDE8E2; color: #6F6258; }
.status--cancelled { background: var(--red-soft); color: var(--red); }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; color: var(--terra); opacity: 0.6; }
.empty h3 { font: 600 20px var(--font-serif); color: var(--ink); margin: 10px 0 6px; }
.empty p { font-size: 13.5px; max-width: 440px; margin: 0 auto 16px; line-height: 1.55; }
.empty .btn { margin-top: 6px; }

/* ---------- detail ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--muted); text-decoration: none; margin-bottom: 14px;
}
.back-link:hover { color: var(--terra); }
.back-link .ico { width: 15px; height: 15px; }
.detail-head {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px 24px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 18px;
}
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); font-weight: 700; }
.detail-title { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.detail-title h2 { font: 600 30px/1 var(--font-serif); letter-spacing: 0.01em; }
.detail-sub { font-size: 13.5px; color: var(--muted); margin-top: 9px; }
.detail-sub a { color: var(--ink); }
.detail-facts { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--ink-soft); min-width: 280px; }
.detail-facts > div { display: flex; align-items: flex-start; gap: 8px; }
.detail-facts .ico { width: 16px; height: 16px; color: var(--terra); margin-top: 1px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.detail-col, .detail-side { min-width: 0; }
.detail-side .panel:last-child { margin-bottom: 0; }

.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.items li:last-child { border-bottom: 0; }
.item-idx {
  width: 24px; height: 24px; border-radius: 50%; background: var(--cream);
  display: grid; place-items: center; font-size: 10.5px; color: var(--muted);
  font-weight: 700; flex: 0 0 auto;
}
.item-name { flex: 1; font-size: 13.5px; }
.item-qty { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.comment-text { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

.drawing-box { display: flex; flex-direction: column; gap: 10px; }
.drawing-open {
  display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: #fff; padding: 0; cursor: pointer; text-align: left;
}
.drawing-open img {
  display: block; width: 100%; height: auto; max-height: 380px;
  object-fit: contain; background: #fff;
}
.drawing-open--file {
  display: flex; align-items: center; gap: 10px; padding: 18px;
  text-decoration: none; color: var(--ink); font-size: 13px;
}
.drawing-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px; color: var(--muted); border: 1px dashed var(--line-strong);
  border-radius: 12px; font-size: 12.5px;
}
.drawing-empty .ico { width: 24px; height: 24px; opacity: 0.7; }

/* ---------- offers ---------- */
.offers { display: flex; flex-direction: column; gap: 10px; }
.offer { border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; background: #fff; }
.offer--accepted { border-color: #BFD6C5; background: #FBFDFB; }
.offer--declined { opacity: 0.62; }
.offer-top { display: flex; align-items: center; gap: 10px; }
.offer-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.offer-who b { font-size: 13.5px; }
.offer-who span { font-size: 11.5px; color: var(--muted); }
.offer-state { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.offer--accepted .offer-state { color: var(--green); }
.offer--pending .offer-state { color: var(--amber); }
.offer-money { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.offer-money b { font: 600 24px/1 var(--font-serif); color: var(--ink); }
.offer-money span { font-size: 11.5px; color: var(--muted); }
.offer-meta { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.offer-meta .ico { width: 14px; height: 14px; color: var(--muted); }
.offer-comment { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; line-height: 1.5; }
.offer .btn { margin-top: 10px; }
.waiting {
  display: flex; gap: 10px; align-items: center; background: var(--cream);
  border-radius: 12px; padding: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.waiting .ico { width: 18px; height: 18px; color: var(--terra); }

/* ---------- booking ---------- */
.booking-ribbon {
  display: inline-flex; align-items: center; gap: 7px; background: var(--green-soft);
  color: var(--green); font-size: 10.5px; font-weight: 700; border-radius: 999px;
  padding: 7px 12px; text-transform: uppercase; letter-spacing: 0.07em;
}
.booking-ribbon .ico { width: 14px; height: 14px; }
.booking-who { display: flex; gap: 13px; align-items: center; margin-top: 16px; }
.booking-who h2 { font: 600 22px var(--font-serif); }
.booking-who p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.booking-when { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; background: var(--cream); border-radius: 12px; padding: 14px; }
.booking-when div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.booking-when span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.booking-when b { font-size: 13px; line-height: 1.35; text-align: right; }
.booking-who a { white-space: nowrap; }
.booking-money { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.booking-money span { font-size: 11.5px; color: var(--muted); }
.booking-money b { font: 600 30px/1 var(--font-serif); color: var(--terra); }
.booking-money i { font-style: normal; font-size: 11.5px; color: var(--muted); flex-basis: 100%; }
.contact-box { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; font-size: 12.5px; }
.contact-box > div { display: flex; align-items: center; gap: 8px; }
.contact-box .ico { width: 16px; height: 16px; color: var(--terra); }
.contact-box a { color: var(--ink); text-decoration: none; }
.contact-box i { font-style: normal; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- timeline / kv ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 7px 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terra); margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 4px var(--terra-soft); }
.timeline b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.timeline i { font-style: normal; font-size: 11px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }
.meta-panel .btn { margin-top: 12px; }

/* ---------- create order ---------- */
.items-edit { display: flex; flex-direction: column; gap: 8px; }
.item-edit { display: grid; grid-template-columns: 1fr 92px 36px; gap: 8px; align-items: center; }
.item-edit input { padding: 10px 12px; }
.ie-qty { text-align: center; }
.ie-del { color: var(--muted); }
.upload {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 26px; border: 1.5px dashed var(--line-strong); border-radius: 14px;
  cursor: pointer; background: #FDFAF7; transition: border-color 0.16s, background 0.16s;
}
.upload:hover { border-color: var(--terra); background: #FBF4EE; }
.upload .ico { width: 28px; height: 28px; color: var(--terra); }
.upload b { font-size: 13.5px; }
.upload span { font-size: 11.5px; color: var(--muted); max-width: 430px; line-height: 1.5; }
.upload-preview { display: flex; align-items: center; gap: 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.upload-preview img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.upload-preview > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.upload-preview b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-preview span { font-size: 11px; color: var(--muted); }
.file-badge { width: 52px; height: 44px; border-radius: 8px; background: var(--cream); display: grid; place-items: center; }
.brigade-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff;
}
.pick:has(input:checked) { border-color: var(--terra); background: #FDF7F3; box-shadow: inset 0 0 0 1px var(--terra); }
.pick input { accent-color: var(--terra); width: 17px; height: 17px; flex: 0 0 auto; }
.pick-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pick-body b { font-size: 13px; }
.pick-body i { font-style: normal; font-size: 11px; color: var(--muted); }

/* ---------- brigade tasks ---------- */
.greeting { display: flex; justify-content: space-between; gap: 22px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.greeting h2 { font: 600 30px var(--font-serif); margin: 6px 0; }
.greeting p { font-size: 13px; color: var(--muted); max-width: 560px; line-height: 1.55; }
.greeting-stats { display: flex; gap: 9px; }
.greeting-stats div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; text-align: center; min-width: 84px; }
.greeting-stats b { display: block; font: 600 24px/1 var(--font-serif); }
.greeting-stats span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform 0.15s, border-color 0.15s;
}
.task-card:hover { border-color: var(--terra-line); transform: translateY(-1px); }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-no { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
.task-card h3 { font: 600 20px var(--font-serif); margin: 8px 0 3px; }
.task-address { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.task-address .ico { width: 14px; height: 14px; color: var(--terra); }
.task-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; font-size: 12px; color: var(--ink-soft); }
.task-meta span { display: flex; gap: 5px; align-items: center; }
.task-meta .ico { width: 14px; height: 14px; color: var(--muted); }
.task-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 11px; gap: 10px; }
.task-cta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--terra); }
.task-cta .ico { width: 14px; height: 14px; }
.task-sum { font: 600 14px var(--font-serif); }
.price-big { font: 600 34px/1 var(--font-serif); color: var(--terra); margin-bottom: 14px; }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cal-toolbar b { font: 600 22px var(--font-serif); }
.cal-toolbar span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.cal-toolbar > div { text-align: center; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-dow span { text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day {
  position: relative; min-height: 86px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; transition: border-color 0.14s, background 0.14s;
  color: var(--ink);
}
.cal-day:hover { border-color: var(--terra-line); }
.cal-num { font-size: 12px; font-weight: 700; color: var(--ink-soft); width: 22px; height: 22px; display: grid; place-items: center; }
.cal-day.is-other { opacity: 0.36; }
.cal-day.is-today .cal-num { background: var(--ink); color: #fff; border-radius: 50%; }
.cal-day.is-selected { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra-soft); }
.cal-day.has-booking { background: #FBF3EE; }
.cal-day.has-free { background: #F7FBF7; }
.cal-day.is-off { background: #F4F1ED; }
.cal-marks { display: flex; gap: 3px; }
.mk { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.mk--book { background: var(--terra); }
.mk--free { background: var(--green); }
.mk--busy { background: #B9AEA4; }
.cal-label { font-size: 9px; color: var(--terra-dark); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: auto; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 11px; color: var(--muted); }
.cal-legend span { display: flex; align-items: center; gap: 5px; }
.day-panel .panel-head { margin-bottom: 8px; }
.day-block { margin-top: 14px; }
.day-label { display: flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.day-label .ico { width: 14px; height: 14px; }
.day-booking {
  display: flex; align-items: center; gap: 12px; background: var(--terra-soft);
  border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; margin-bottom: 8px;
}
.day-booking-time { font-weight: 700; font-size: 12px; color: var(--terra-dark); white-space: nowrap; }
.day-booking-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.day-booking-main b { font-size: 12.5px; }
.day-booking-main i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.window-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.window-row--off .window-dot { background: #B9AEA4; }
.window-time { font-weight: 600; min-width: 98px; }
.window-kind { flex: 1; color: var(--muted); font-size: 11.5px; }
.window-row--off .window-kind { color: #9A8F85; }
.window-del { width: 30px; height: 30px; color: var(--muted); }
.day-edit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.window-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.window-add select { width: auto; min-width: 96px; padding: 9px 12px; }
.window-add .btn { white-space: nowrap; }
.dash { color: var(--muted); }
.day-quick { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- plan ---------- */
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.week-switch {
  display: flex; align-items: center; gap: 12px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; box-shadow: var(--shadow-sm);
}
.week-switch > div { text-align: center; min-width: 168px; }
.week-switch b { font: 600 15px var(--font-serif); }
.week-switch span { display: block; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }
.plan-kpis { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.plan-kpis span { display: flex; gap: 6px; align-items: center; }
.plan-kpis .ico { width: 16px; height: 16px; color: var(--terra); }
.plan-kpis b { color: var(--ink); }
.plan-legend { color: var(--muted); }
.lg { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.lg--book { background: var(--terra); }
.lg--free { background: var(--green); }
.plan-scroll { overflow-x: auto; }
.plan { min-width: 980px; }
.plan-row { display: grid; grid-template-columns: 180px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-row--head { background: var(--cream); }
.plan-sticky { position: sticky; left: 0; background: var(--paper); z-index: 2; }
.plan-row--head .plan-sticky { background: var(--cream); }
.plan-brigade { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-right: 1px solid var(--line); }
.plan-brigade b { display: block; font-size: 12px; }
.plan-brigade i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.plan-day { padding: 9px 5px; text-align: center; border-right: 1px solid var(--line); }
.plan-day:last-child { border-right: 0; }
.plan-day b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.plan-day span { font-size: 15px; font-weight: 600; }
.plan-day.is-today span { background: var(--terra); color: #fff; border-radius: 50%; width: 25px; height: 25px; display: inline-grid; place-items: center; }
.plan-cell { padding: 6px; border-right: 1px solid var(--line); min-height: 70px; display: flex; flex-direction: column; gap: 4px; }
.plan-cell:last-child { border-right: 0; }
.plan-cell.has-booking { background: #FDF8F5; }
.plan-booking { display: flex; flex-direction: column; background: var(--terra-soft); border-left: 3px solid var(--terra); border-radius: 6px; padding: 4px 6px; text-decoration: none; color: var(--ink); }
.plan-booking b { font-size: 9.5px; letter-spacing: 0.02em; }
.plan-booking span { font-size: 9px; color: var(--terra-dark); }
.plan-free { font-size: 9px; color: var(--green); line-height: 1.3; }
.plan-off { font-size: 9px; color: #A2968B; }
.booking-list { display: flex; flex-direction: column; }
.booking-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.booking-row:last-child { border-bottom: 0; }
.br-date { min-width: 72px; display: flex; flex-direction: column; }
.br-date b { font-size: 12px; }
.br-date i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.br-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.br-main b { font-size: 12.5px; }
.br-main i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-team { font-size: 11.5px; color: var(--terra-dark); white-space: nowrap; }
.booking-row > .ico { width: 16px; height: 16px; color: var(--muted); }

/* ---------- teams ---------- */
.teams-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.teams-intro p { font-size: 13px; color: var(--muted); max-width: 640px; line-height: 1.55; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.team-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.team-head { display: flex; align-items: center; gap: 12px; }
.team-title { flex: 1; min-width: 0; }
.team-title h2 { font: 600 21px var(--font-serif); }
.team-title p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rating { font-size: 11px; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 4px 8px; border-radius: 999px; }
.team-facts { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.team-facts a, .team-facts span { display: flex; gap: 7px; align-items: center; color: var(--ink-soft); text-decoration: none; }
.team-facts .ico { width: 15px; height: 15px; color: var(--terra); }
.team-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--cream); border-radius: 12px; padding: 12px; }
.team-stats b { display: block; font: 600 22px/1 var(--font-serif); }
.team-stats span { font-size: 10.5px; color: var(--muted); }
.team-label { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.team-next-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 11.5px; text-decoration: none; color: inherit; border-bottom: 1px dashed var(--line); }
.team-next-row b { min-width: 54px; }
.team-next-row span { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-next-row .ico { width: 13px; height: 13px; color: var(--muted); }
.free-chip { display: inline-block; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 4px 9px; font-size: 10.5px; font-weight: 600; margin: 0 5px 5px 0; }

/* ---------- profile ---------- */
.profile-card {
  display: flex; align-items: center; gap: 18px; color: #FBF4EE;
  background: linear-gradient(120deg, #0D0D0D, #262626);
  border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.profile-card .avatar { background: rgba(255, 255, 255, 0.16); color: #fff; }
.profile-card h2 { font: 600 26px var(--font-serif); }
.profile-card p { font-size: 12.5px; color: #F0D3C5; margin-top: 3px; }
.privacy-list { display: flex; flex-direction: column; gap: 9px; }
.privacy-list > div { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--cream); }
.privacy-list .ico { width: 16px; height: 16px; margin-top: 1px; flex: 0 0 auto; }
.privacy-ok .ico { color: var(--green); }
.privacy-no .ico { color: var(--terra); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; background: var(--cream); }
.login-brand {
  position: relative; overflow: hidden; color: #FBF4EE; padding: 48px 56px;
  background: #0D0D0D;
  display: flex; flex-direction: column;
}
.login-brand::before, .login-brand::after {
  content: ""; position: absolute; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%;
}
.login-brand::before { width: 520px; height: 520px; right: -180px; bottom: -200px; }
.login-brand::after { width: 320px; height: 320px; right: -60px; top: -120px; border-color: rgba(255, 255, 255, 0.1); }
.login-logo { width: 190px; }
.login-brand-body { margin: auto 0; max-width: 520px; position: relative; z-index: 1; }
.login-brand-body .eyebrow { color: #F0C9B6; }
.login-brand h1 { font: 600 46px/1.1 var(--font-serif); letter-spacing: 0.01em; margin: 14px 0 18px; }
.login-brand p { font-size: 15px; line-height: 1.65; color: #F4DCD0; max-width: 470px; }
.login-features { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 15px; }
.login-features li { display: flex; gap: 13px; align-items: flex-start; }
.login-features .ico { width: 21px; height: 21px; color: #F0C9B6; margin-top: 2px; }
.login-features b { display: block; font-size: 13.5px; }
.login-features i { display: block; font-style: normal; font-size: 12px; color: #EBC7B6; margin-top: 2px; }
.login-brand-foot { font-size: 11px; color: #E9C3B0; letter-spacing: 0.04em; position: relative; z-index: 1; }
.login-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 16px; }
.login-card {
  width: 100%; max-width: 430px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow); padding: 30px;
}
.login-card h2 { font: 600 27px var(--font-serif); margin: 6px 0 18px; }
.role-tabs { display: flex; background: var(--cream); border-radius: 999px; padding: 4px; gap: 4px; }
.role-tab { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.role-tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.login-hint { font-size: 11.5px; color: var(--muted); margin: 14px 0 10px; }
.account-list { display: flex; flex-direction: column; gap: 8px; }
.account {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color 0.16s, background 0.16s;
}
.account:hover { border-color: var(--terra); background: #FDF8F4; }
.account-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.account-text b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-text i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-go .ico { width: 17px; height: 17px; color: var(--muted); }
.login-note {
  display: flex; gap: 8px; margin: 16px 0 0; font-size: 11px; color: var(--muted);
  line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px;
}
.login-note .ico { width: 15px; height: 15px; color: var(--terra); margin-top: 1px; flex: 0 0 auto; }
.login-foot { font-size: 11px; color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(38, 30, 25, 0.5); backdrop-filter: blur(4px); animation: fade 0.2s;
}
.modal {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  background: var(--paper); border-radius: 20px; box-shadow: 0 30px 80px rgba(30, 20, 15, 0.3);
  padding: 26px; animation: pop 0.2s;
}
.modal--wide { max-width: 900px; }
.modal-x { position: absolute; right: 14px; top: 14px; background: var(--cream); }
.modal-title { font: 600 23px var(--font-serif); margin-bottom: 6px; padding-right: 30px; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.modal .form-grid { margin-bottom: 14px; }
.modal-note { display: flex; gap: 8px; background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: 11px; color: var(--muted); margin: 14px 0; line-height: 1.5; }
.modal-note .ico { width: 15px; height: 15px; color: var(--terra); margin-top: 1px; flex: 0 0 auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.drawing-modal img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #fff; border-radius: 10px; }

.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; background: #111111; color: #FBF4EE;
  border-radius: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); animation: slideIn 0.25s;
}
.toast .ico { width: 17px; height: 17px; color: #9CC5A5; margin-top: 1px; }
.toast--error { background: #7E3328; }
.toast--error .ico { color: #FFD7CE; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: 0.25s; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   Фирменная тема «Мадера»: монохром основного сайта, тонкие линии, Raleway.
   Блок стоит перед адаптивом, чтобы мобильные правила могли уточнять сетку.
   ========================================================================== */
body { background: var(--cream); }
h1, h2, h3, h4 { font-family: var(--font-body); }
::selection { background: #111; color: #fff; }
::placeholder { color: #A3A39E; opacity: 1; }
:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

/* типографика */
.topbar-text h1 { font-weight: 300; font-size: 28px; letter-spacing: 0.01em; }
.topbar-text p { font-size: 11.5px; }
.panel-head h2, .section-head h2, .team-title h2, .booking-who h2,
.task-card h3, .empty h3, .cal-toolbar b, .week-switch b, .login-card h2 { font-weight: 500; letter-spacing: 0.01em; }
.panel-head h2 { font-size: 17px; }
.detail-title h2, .login-brand h1, .greeting h2, .profile-card h2, .modal-title { font-weight: 300; }
.stat b, .greeting-stats b, .team-stats b, .booking-money b, .offer-money b,
.price-big, .calc-line b { font-weight: 300; }
.detail-title h2 { font-size: 32px; }
.greeting h2 { font-size: 32px; }
.modal-title { font-size: 26px; }
.login-card h2 { font-size: 34px; }
.login-brand h1 { font-size: 50px; line-height: 1.08; }

/* кнопки и поля */
.btn {
  border-radius: 0; padding: 12px 18px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
}
.btn .ico { width: 15px; height: 15px; }
.btn-sm { padding: 8px 12px; font-size: 9.5px; }
.btn-primary { background: #111; color: #fff; }
.btn-primary:hover { background: #333; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: #111; }
.btn-ghost:hover { border-color: #111; background: #fff; }
.btn-danger { background: var(--red); }
.btn-danger-ghost { background: transparent; }
.icon-btn { border-radius: 0; }
.icon-btn:hover { background: #EDEDEA; color: #111; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-radius: 0; border-color: var(--line-strong); background: #fff; padding: 12px 13px;
}
input:focus, select:focus, textarea:focus { border-color: #111; box-shadow: 0 0 0 1px #111; }
.field > span { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.hint { font-size: 11px; }
.calc-line { border-radius: 0; }

/* каркас */
.sidebar { background: var(--sidebar); padding: 30px 18px 18px; }
.sidebar-brand { width: 196px; margin: 0 2px 4px; }
.sidebar-caption { color: #6F6F6B; font-size: 9px; letter-spacing: 0.2em; margin-top: 8px; }
.nav { margin-top: 20px; }
.nav-link { color: #A6A6A1; border-radius: 0; font-size: 12.5px; letter-spacing: 0.02em; padding: 12px 13px; }
.nav-link:hover { background: #181818; color: #fff; }
.nav-link.is-active { background: #1B1B1B; color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.nav-link.is-active .ico { color: var(--gold); }
.nav-badge { background: var(--gold); color: #111; border-radius: 0; font-size: 9px; padding: 2px 6px; }
.sidebar-note { background: #151515; color: #8F8F8A; border-radius: 0; font-size: 10px; }
.sidebar-note .ico { color: var(--gold); }
.user-chip { border-top-color: #242424; }
.user-chip-text b { color: #fff; }
.user-chip-text i { color: #7F7F7A; }
.sidebar .avatar { background: #242424; color: #fff; }
.sidebar .icon-btn { color: #7F7F7A; }
.sidebar .icon-btn:hover { background: #242424; color: #fff; }
.sidebar-foot .btn-primary { background: #fff; color: #111; }
.sidebar-foot .btn-primary:hover { background: #E6E6E1; }

.topbar { background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--line); padding: 18px 32px 14px; }
.content { padding: 26px 32px 70px; }
.avatar { border-radius: 0; background: #EFEFEC; color: #111; font-size: 11px; }

/* панели, карточки, таблица */
.panel { border-radius: 2px; box-shadow: none; border-color: var(--line); padding: 22px 24px; }
.stat { border-radius: 2px; box-shadow: none; padding: 20px 22px; }
.stat b { font-size: 34px; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat i { font-size: 10.5px; }
.stat--terra b { color: #111; }
.stat--green b { color: var(--green); }
.badge {
  border-radius: 0; text-transform: uppercase; letter-spacing: 0.09em;
  font-size: 8px; background: #F4F4F2; padding: 5px 8px;
}
.badge .ico { width: 11px; height: 11px; }
.filter { border-radius: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 9.5px; padding: 8px 10px; }
.filter.is-active { background: #111; color: #fff; }
.filter.is-active em { background: #333; color: #fff; }
.filter em { border-radius: 0; font-size: 9px; }
.search-field input { border-radius: 0; }
.order-head { border-bottom: 1px solid #111; font-size: 8.5px; letter-spacing: 0.14em; }
.order-row { padding: 15px 8px; }
.order-row:hover { background: #F7F7F5; }
.or-no b, .or-client b { font-weight: 600; }
.status {
  border-radius: 0; font-size: 8.5px; letter-spacing: 0.1em;
  padding: 5px 8px; text-transform: uppercase;
}
.status--sent { background: var(--amber-soft); color: var(--amber); }
.status--quoted { background: #EFEFEC; color: #111; }
.status--booked { background: var(--green-soft); color: var(--green); }
.status--done { background: #EFEFEC; color: var(--muted); }
.status--cancelled { background: var(--red-soft); color: var(--red); }
.back-link { text-transform: uppercase; letter-spacing: 0.1em; font-size: 9.5px; font-weight: 600; }
.detail-head { border-radius: 2px; box-shadow: none; padding: 24px 26px; }
.detail-sub { font-size: 12.5px; }
.detail-facts .ico { color: #111; }
.item-idx { border-radius: 0; background: #F4F4F2; font-size: 9px; }

/* сметы и брони */
.offer { border-radius: 2px; }
.offer--accepted { border-color: var(--line-strong); background: #FAFAF8; }
.offer-state { font-size: 8px; letter-spacing: 0.12em; }
.offer-money b { font-size: 25px; }
.booking-ribbon { border-radius: 0; font-size: 8.5px; letter-spacing: 0.12em; }
.booking-when { border-radius: 0; background: #F4F4F2; }
.booking-who h2 { font-size: 23px; }
.booking-money b { font-size: 32px; }
.tl-dot { background: #111; box-shadow: 0 0 0 4px #EFEFEC; }

/* создание заказа */
.upload { border-radius: 0; background: #FAFAF8; border-color: var(--line-strong); }
.upload:hover { background: #F4F4F2; }
.upload .ico { color: #111; }
.upload-preview { border-radius: 0; }
.pick { border-radius: 0; }
.pick:has(input:checked) { border-color: #111; background: #F7F7F5; box-shadow: inset 0 0 0 1px #111; }
.pick input { accent-color: #111; }
.brigade-picker + .panel-hint { margin-top: 14px; }

/* кабинет бригады */
.greeting-stats div { border-radius: 2px; }
.task-card { border-radius: 2px; box-shadow: none; }
.task-card:hover { border-color: #111; transform: none; }
.task-card h3 { font-size: 19px; }
.task-cta { color: #111; text-transform: uppercase; letter-spacing: 0.08em; font-size: 9.5px; }
.task-cta .ico { color: var(--gold); }

/* календарь */
.cal-day { border-radius: 0; border-color: var(--line); }
.cal-day:hover { border-color: #111; }
.cal-day.is-selected { border-color: #111; box-shadow: 0 0 0 1px #111; }
.cal-day.has-booking { background: #F5EFE6; }
.cal-day.has-free { background: #FBFBF9; }
.cal-day.is-off { background: #F0F0ED; }
.cal-day.is-today .cal-num { background: #111; }
.cal-label { color: #8C6D45; }
.day-booking { border-radius: 0; background: #F3EDE3; }
.day-booking-time { color: #8C6D45; }
.window-add select { border-radius: 0; }

/* план и бригады */
.week-switch { border-radius: 0; }
.plan-row--head { background: #F7F7F5; }
.plan-booking { border-radius: 0; border-left-color: var(--gold); background: #F3EDE3; }
.plan-cell.has-booking { background: #FCFAF7; }
.plan-day.is-today span { background: #111; }
.team-card { border-radius: 2px; box-shadow: none; }
.team-stats { border-radius: 0; background: #F4F4F2; }
.rating { border-radius: 0; background: #F3EDE3; color: #8C6D45; }
.free-chip { border-radius: 0; }

/* профиль */
.profile-card { border-radius: 2px; background: linear-gradient(120deg, #0D0D0D, #262626); }
.profile-card p { color: #B0B0AB; }
.profile-card .avatar { background: #242424; }
.privacy-list > div { border-radius: 0; background: #F4F4F2; }

/* вход */
.login { background: #F4F4F2; }
.login-brand {
  background:
    linear-gradient(90deg, rgba(6, 6, 6, 0.97) 0%, rgba(6, 6, 6, 0.9) 42%, rgba(6, 6, 6, 0.55) 100%),
    url("assets/brand/login-door.jpg") center / cover no-repeat;
  color: #fff;
}
.login-brand::before, .login-brand::after { border-color: rgba(255, 255, 255, 0.1); }
.login-logo { width: 232px; }
.login-brand-body::before {
  content: ""; display: block; width: 44px; height: 1px; background: var(--gold); margin-bottom: 20px;
}
.login-brand-body .eyebrow { color: var(--gold); }
.login-brand p { color: #D8D8D3; font-size: 14.5px; }
.login-features { gap: 0; margin-top: 28px; }
.login-features li { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 14px; margin-top: 14px; }
.login-features .ico { color: var(--gold); }
.login-features b { font-weight: 500; }
.login-features i { color: #A6A6A1; }
.login-brand-foot { color: #8A8A86; }
.login-side { background: #F4F4F2; }
.login-card { border-radius: 0; border-color: #E0E0DC; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.07); padding: 34px; }
.role-tabs { border-radius: 0; background: #EFEFEC; padding: 3px; }
.role-tab { border-radius: 0; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.role-tab.is-active { background: #fff; color: #111; box-shadow: none; border: 1px solid #E0E0DC; }
.account { border-radius: 0; border-color: var(--line); }
.account:hover { border-color: #111; background: #fff; }
.account .avatar { background: #EFEFEC; }
.login-note { border-top-color: var(--line); }

.chip-btn, .slot-chip { border-radius: 0; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.07em; }
.chip-btn { padding: 9px 13px; }
.slot-chip { padding: 9px 11px; font-size: 10px; }
.drawing-open, .drawing-empty, .waiting { border-radius: 0; }
.window-add select { border-radius: 0; }

.detail-sub a, .contact-box a, .kv a, .team-facts a, .login-note a {
  text-decoration: none; border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}
.detail-sub a:hover, .contact-box a:hover, .kv a:hover, .team-facts a:hover { border-bottom-color: #111; }

/* кнопки импорта и добавления в шапке состава */
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* импорт состава */
.import-upload { margin-bottom: 4px; }
.import-status { min-height: 20px; font-size: 11.5px; color: var(--muted); margin: 10px 0; line-height: 1.45; }
.import-preview { max-height: 330px; overflow: auto; border: 1px solid var(--line); }
.import-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-table th {
  position: sticky; top: 0; background: #F4F4F2; text-align: left;
  font-size: 8px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  padding: 8px; border-bottom: 1px solid var(--line); z-index: 1;
}
.import-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.import-table tr:last-child td { border-bottom: 0; }
.import-table input { padding: 7px 8px; border-radius: 0; }
.import-table .imp-name { min-width: 260px; }
.import-table .imp-qty { width: 74px; }
.import-table td:first-child { color: var(--muted); font-size: 10px; width: 28px; }
.import-table td:last-child { width: 36px; }

/* монтаж — розовая штриховка, выходной — серая */
.cal2-day.is-booked { background: #FDF7F4; }
.cal2-day.is-booked.is-full {
  background: repeating-linear-gradient(135deg, rgba(190, 90, 70, 0.28) 0 1px, transparent 1px 6px), #FBEDE7;
}
.cal2-day.is-booked .cal2-fill {
  background: repeating-linear-gradient(135deg, rgba(190, 90, 70, 0.34) 0 1px, transparent 1px 6px);
  border-top-color: rgba(190, 90, 70, 0.2);
}
.cal2-day.is-booked .cal2-status { color: #A34F3C; }
.cal2-day.is-booked .cal2-entry { border-left-color: #C97B68; }
.cal2-day.is-full:not(.is-booked) {
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 6px), #FAFAF8;
}
.cal2-day.is-off {
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.13) 0 1px, transparent 1px 6px), #EFEFEC;
}
.cal2-legend .lg--book {
  background: repeating-linear-gradient(135deg, rgba(190, 90, 70, 0.35) 0 1px, transparent 1px 5px), #FBEDE7;
}
.cal2-legend .lg--off {
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 5px), #EFEFEC;
}
.cal2-legend .lg--empty { background: #fff; border-style: dashed; }

/* календарь: две недели и штриховка */
.cal2-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal2-month { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); padding: 6px 10px; }
.cal2-month > div { text-align: center; min-width: 190px; }
.cal2-month b { display: block; font: 500 18px/1.2 var(--font-body); }
.cal2-month span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.cal2-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.cal2-legend span { display: flex; align-items: center; gap: 6px; }
.cal2-legend .lg { width: 18px; height: 12px; border: 1px solid var(--line-strong); }
.cal2-legend .lg--free { background: #fff; }
.cal2-legend .lg--part { background: repeating-linear-gradient(135deg, rgba(0,0,0,.22) 0 1px, transparent 1px 5px), linear-gradient(to top, #fff 55%, transparent 55%); }
.cal2-legend .lg--full { background: repeating-linear-gradient(135deg, rgba(0,0,0,.18) 0 1px, transparent 1px 5px), #F0F0ED; }
.cal2-panel { padding: 12px; }
.cal2-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal2-day {
  position: relative; overflow: hidden; min-height: 158px; background: #fff;
  border: 1px solid var(--line); padding: 12px; text-align: left; cursor: pointer;
  display: flex; color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.cal2-day:hover { border-color: #111; }
.cal2-day.is-today { border-color: #111; }
.cal2-day.is-selected { box-shadow: inset 0 0 0 2px #111; border-color: #111; }
.cal2-day.is-full { background: repeating-linear-gradient(135deg, rgba(0,0,0,.14) 0 1px, transparent 1px 6px), #FAFAF8; }
.cal2-day.is-off { background: repeating-linear-gradient(135deg, rgba(0,0,0,.13) 0 1px, transparent 1px 6px), #EFEFEC; }
.cal2-day.is-empty { border-style: dashed; color: var(--muted); }
.cal2-day.is-partial { background: #fff; }
.cal2-fill {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.2) 0 1px, transparent 1px 6px);
  border-top: 1px solid rgba(0,0,0,.08);
}
.cal2-content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 5px; width: 100%; }
.cal2-date { display: flex; align-items: baseline; gap: 7px; }
.cal2-date b { font: 300 30px/1 var(--font-body); }
.cal2-date i { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.cal2-status { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.cal2-entry {
  display: block; background: rgba(255,255,255,.9); border-left: 2px solid var(--gold);
  padding: 3px 5px; font-size: 9.5px; line-height: 1.35; color: var(--ink);
}
.cal2-entry b { font-size: 9.5px; }
.cal2-free { display: block; font-size: 9.5px; color: var(--green); line-height: 1.4; }
.cal2-empty { font-size: 10px; color: var(--muted); }
.cal2-day.is-full .cal2-status { color: #555; }

/* сотрудники РОП */
.emp-head, .emp-row {
  display: grid; grid-template-columns: 1.6fr 1fr .55fr .55fr 180px;
  gap: 12px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line);
}
.emp-head {
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); border-bottom: 1px solid #111; font-weight: 600;
}
.emp-row:last-child { border-bottom: 0; }
.emp-row.is-inactive { opacity: 0.55; }
.emp-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.emp-name > div { display: flex; flex-direction: column; min-width: 0; }
.emp-name b { font-size: 13px; }
.emp-name span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 0; }
.emp-cell a { color: var(--ink); text-decoration: none; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-cell b { font-size: 14px; font-weight: 600; }
.emp-cell span { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.emp-cell .ico { width: 13px; height: 13px; color: var(--muted); display: inline-block; vertical-align: -2px; margin-right: 4px; }
.emp-action { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.emp-status {
  font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green); background: var(--green-soft); padding: 4px 7px; white-space: nowrap;
}
.emp-status--off { color: var(--muted); background: #F0F0ED; }

/* дашборд РОП */
.dash-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-month { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); padding: 6px 10px; }
.dash-month > div { text-align: center; min-width: 170px; }
.dash-month b { display: block; font: 500 18px/1.2 var(--font-body); }
.dash-month span { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.dash-top-note { display: flex; align-items: center; gap: 6px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dash-top-note .ico { width: 14px; height: 14px; color: var(--gold); }
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.dash-kpi { background: #fff; border: 1px solid var(--line); padding: 20px 22px; }
.dash-kpi b { display: block; font: 300 30px/1.1 var(--font-body); }
.dash-kpi span { display: block; margin-top: 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.dash-kpi i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.dash-kpi--dark { background: #111; color: #fff; border-color: #111; }
.dash-kpi--dark i { color: #B0B0AB; }
.dash-kpi--gold b { color: var(--gold); }
.dash-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.dash-panel { padding-bottom: 14px; }
.dash-head, .dash-row {
  display: grid; grid-template-columns: 1.5fr .8fr 1fr 1fr .7fr 1.2fr;
  gap: 12px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line);
}
.dash-head { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); border-bottom: 1px solid #111; font-weight: 600; }
.dash-row:last-child { border-bottom: 0; }
.dash-team b { display: block; font-size: 13px; }
.dash-team span { font-size: 9.5px; color: var(--gold); }
.dash-num b { display: block; font-size: 12.5px; }
.dash-num span { display: block; font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.dash-bar { height: 8px; background: #F0F0ED; }
.dash-bar i { display: block; height: 100%; background: #111; }
.dash-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding: 16px 6px 0; border-bottom: 1px solid var(--line); }
.dash-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.dash-col span { font-size: 8px; color: var(--muted); white-space: nowrap; }
.dash-col i { width: 100%; max-width: 46px; background: #111; display: block; }
.dash-col b { font-size: 8.5px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.dash-col em { font-style: normal; font-size: 8.5px; color: var(--muted); }
.dash-legend { font-size: 10px; color: var(--muted); margin-top: 10px; }

/* неделя заказов */
.week-bar {
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
  padding: 16px 18px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 14px;
}
.week-nav { display: flex; align-items: center; gap: 12px; }
.week-nav > div { flex: 1; text-align: center; }
.week-nav span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }
.week-nav b { font: 500 18px/1.2 var(--font-body); }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { border: 1px solid var(--line); background: #fff; padding: 8px 4px; text-align: center; }
.week-day b { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.week-day span { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.week-day i { display: block; font-style: normal; font-size: 8.5px; color: var(--muted); margin-top: 3px; }
.week-day.is-today { border-color: #111; box-shadow: inset 0 2px 0 var(--gold); }
.week-jump { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.week-jump input { width: auto; max-width: 180px; padding: 7px 10px; }
.list-caption { display: flex; align-items: baseline; gap: 10px; padding: 14px 0 2px; border-bottom: 1px solid var(--line); }
.list-caption b { font-size: 13px; font-weight: 600; }
.list-caption span { font-size: 10px; color: var(--muted); }
.filter-reset {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer; text-decoration: underline; padding: 0;
}
.filter-reset:hover { color: #111; }

/* бригады: действия и оценки */
.teams-intro-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.team-actions {
  display: flex; gap: 8px; border-top: 1px solid var(--line);
  padding-top: 12px; margin-top: auto;
}
.team-actions .btn { flex: 1 1 0; }
.rating--empty { background: #F4F4F2; color: var(--muted); font-weight: 500; }
.rating-picker { display: flex; gap: 4px; margin: 8px 0 4px; }
.rating-star {
  border: 0; background: none; padding: 0 2px; cursor: pointer;
  font-size: 34px; line-height: 1; color: #D8D8D3;
  transition: color .15s, transform .15s;
}
.rating-star:hover, .rating-star.is-on { color: var(--gold); }
.rating-star:hover { transform: translateY(-1px); }

/* подпись разработчика P/.Dev */
.dev-badge {
  position: fixed; right: 18px; bottom: 18px; z-index: 45;
  width: 40px; height: 40px; opacity: 0.72;
  transition: opacity 0.18s, transform 0.18s;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}
.dev-badge img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.dev-badge:hover { opacity: 1; transform: translateY(-1px) scale(1.03); }
.dev-badge:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.dev-badge--login { right: 20px; bottom: 20px; width: 44px; height: 44px; }

/* модалки и тосты */
.modal { border-radius: 0; }
.modal-x { border-radius: 0; background: #F4F4F2; }
.modal-note { border-radius: 0; }
.toast { border-radius: 0; background: #111; }

/* ---------- responsive ---------- */
@media (max-width: 1150px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .detail-side .panel { margin-bottom: 0; }
  .detail-head { gap: 18px; }
  .detail-facts { min-width: 0; }
}
@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .order-head, .order-row { grid-template-columns: 92px minmax(180px, 1.5fr) 78px 1fr 110px 118px; gap: 10px; }
  .content { padding: 22px 22px 70px; }
  .topbar { padding: 16px 22px 12px; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 14px 16px 10px; gap: 10px; flex-wrap: wrap; }
  .mobile-brand { display: block; width: 112px; }
  .mobile-logout { display: inline-flex; margin-left: auto; }
  .topbar-text { width: 100%; order: 3; }
  .topbar-text h1 { font-size: 24px; }
  .topbar-text p { font-size: 11.5px; }
  .topbar-actions { order: 4; width: 100%; margin-left: 0; }
  .topbar-actions .btn { width: 100%; }
  .content { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); max-width: none; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(var(--bn-count, 3), 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 40;
  }
  .bn-link {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px;
    border-radius: 0; text-decoration: none; color: var(--muted); font-size: 9px;
    font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; position: relative;
  }
  .bn-link.is-active { color: #111; background: #F0F0ED; box-shadow: inset 0 2px 0 var(--gold); }
  .bn-link .ico { width: 21px; height: 21px; }
  .bn-badge {
    position: absolute; top: 2px; right: calc(50% - 22px); background: var(--gold); color: #111;
    border-radius: 0; font-size: 8.5px; font-style: normal; padding: 1px 5px; font-weight: 700;
  }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 25px; }
  .order-head { display: none; }
  .order-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "no status" "client client" "brigade date";
    gap: 4px 10px; padding: 14px 8px;
  }
  .or-no { grid-area: no; display: flex; gap: 8px; align-items: baseline; }
  .or-no i { margin: 0; }
  .or-status { grid-area: status; }
  .or-client { grid-area: client; margin-top: 2px; }
  .or-client i { white-space: normal; overflow: visible; line-height: 1.4; }
  .or-items { display: none; }
  .or-brigade { grid-area: brigade; font-size: 12px; color: var(--muted); margin-top: 6px; }
  .or-date { grid-area: date; font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
  .search-field { width: 100%; }
  .search-field input { min-width: 0; width: 100%; }
  .panel { padding: 16px 15px; border-radius: 2px; }
  .panel-head h2 { font-size: 17px; }
  .detail-head { padding: 16px; }
  .detail-title h2 { font-size: 24px; }
  .detail-facts { min-width: 0; font-size: 12px; }
  .detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .detail-grid--booked { display: flex; flex-direction: column; }
  .detail-grid--booked .detail-side { order: -1; }
  .detail-side { display: block; }
  .detail-side .panel { margin-bottom: 14px; }
  .booking-when { grid-template-columns: 1fr; gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .brigade-picker { grid-template-columns: 1fr; }
  .item-edit { grid-template-columns: 1fr 74px 34px; }
  .cal-day { min-height: 56px; padding: 5px; border-radius: 0; }
  .cal-num { font-size: 11px; width: 20px; height: 20px; }
  .cal-label { display: none; }
  .cal-grid, .cal-dow { gap: 4px; }
  .cal-legend { gap: 10px; }
  .cal-toolbar b { font-size: 19px; }
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 30px 24px 24px; }
  .login-brand h1 { font-size: 36px; margin: 10px 0 12px; }
  .login-brand p { font-size: 13px; }
  .login-features { display: none; }
  .login-logo { width: 140px; }
  .login-brand-foot { display: none; }
  .login-side { padding: 18px 14px 30px; }
  .login-card { padding: 26px 20px; border-radius: 0; }
  .login-foot { display: none; }
  .greeting { align-items: flex-start; gap: 14px; }
  .greeting h2 { font-size: 25px; }
  .greeting-stats { width: 100%; }
  .greeting-stats div { flex: 1; padding: 10px 8px; }
  .booking-row { flex-wrap: wrap; gap: 6px 10px; }
  .br-main { flex-basis: 100%; order: 3; }
  .br-team { order: 2; margin-left: auto; }
  .booking-row > .ico { display: none; }
  .teams-grid { grid-template-columns: 1fr; }
  .profile-card { padding: 18px; }
  .dev-badge {
    width: 32px; height: 32px; right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom)); opacity: 0.62;
  }
  .dev-badge--login { width: 36px; height: 36px; right: 14px; bottom: 14px; }
  .toast-root { left: 14px; right: 14px; bottom: 86px; max-width: none; }
  .modal { padding: 20px; max-height: 94vh; }
  .modal-title { font-size: 21px; }
  .btn { padding: 11px 15px; }
  .task-card h3 { font-size: 18px; }
  .cal2-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 8px; padding-bottom: 8px; scrollbar-width: thin;
  }
  .cal2-day { flex: 0 0 152px; min-height: 180px; scroll-snap-align: start; }
  .cal2-top { align-items: stretch; }
  .cal2-month { width: 100%; justify-content: space-between; }
  .cal2-month > div { min-width: 0; }
  .cal2-legend { gap: 10px; font-size: 8px; }
  .cal2-panel { padding: 10px; }
  .emp-head { display: none; }
  .emp-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .emp-name { grid-column: 1 / -1; }
  .emp-action { grid-column: 1 / -1; justify-content: space-between; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-side { grid-template-columns: 1fr 1fr; }
  .dash-kpi { padding: 14px; }
  .dash-kpi b { font-size: 24px; }
  .dash-head { display: none; }
  .dash-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .dash-bar { grid-column: 1 / -1; }
  .dash-team { grid-column: 1 / -1; }
  .dash-month { width: 100%; justify-content: space-between; }
  .dash-top-note { display: none; }
  .dash-chart { gap: 6px; height: 160px; }
  .dash-col span { font-size: 7px; }
  .plan-top { gap: 12px; }
  .week-switch { width: 100%; justify-content: space-between; }
  .week-switch > div { min-width: 0; }
  .plan-kpis { width: 100%; justify-content: space-between; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 22px; }
  .window-add select { min-width: 0; flex: 1; }
  .window-add .btn { width: 100%; }
  .greeting-stats b { font-size: 21px; }
  .greeting-stats span { font-size: 8.5px; }
  .login-brand h1 { font-size: 30px; }
  .detail-title { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
