:root {
  --ink: #17211f;
  --muted: #697571;
  --soft: #f0f3ef;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --line: #e2e7e2;
  --brand: #1d6b57;
  --brand-strong: #115140;
  --brand-soft: #dff1e9;
  --accent: #c8ed66;
  --danger: #bc4b4b;
  --warning: #a76b17;
  --navy: #10231f;
  --shadow: 0 18px 55px rgba(21, 54, 45, .10);
  --radius: 18px;
  --radius-sm: 11px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--surface-2); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.is-hidden { display: none !important; }
.mobile-only { display: none !important; }

.loading-screen {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center;
  justify-items: center; gap: 18px; background: var(--navy); color: #fff;
  transition: opacity .25s ease;
}
.loading-screen.is-leaving { opacity: 0; pointer-events: none; }
.loading-screen p { margin: 0; color: #aec0ba; font-size: 14px; letter-spacing: .04em; }
.loading-line { width: 150px; height: 3px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.13); }
.loading-line i { display: block; width: 45%; height: 100%; background: var(--accent); animation: loading 1s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(330%); } }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { font-size: 12px; color: #81928d; letter-spacing: .06em; text-transform: uppercase; }
.brand-light small { color: #a5b7b1; }
.brand-mark {
  display: grid; width: 40px; height: 40px; place-items: center; flex: 0 0 40px;
  border-radius: 13px 13px 4px 13px; background: var(--accent); color: var(--navy);
  box-shadow: 0 9px 25px rgba(200,237,102,.15);
}
.brand-mark span { font-weight: 850; font-size: 14px; letter-spacing: -.04em; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 1.08fr) minmax(420px, .92fr); }
.auth-story {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  padding: 48px clamp(48px, 7vw, 110px); color: #fff; background:
    radial-gradient(circle at 83% 18%, rgba(200,237,102,.18), transparent 27%),
    radial-gradient(circle at 18% 88%, rgba(62,158,128,.24), transparent 32%),
    var(--navy);
}
.auth-story::after {
  content: ""; position: absolute; right: -160px; bottom: -240px; width: 560px; height: 560px;
  border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow:
    0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018);
}
.story-content { position: relative; z-index: 1; max-width: 700px; margin: 10vh 0; }
.eyebrow, .section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; color: #b7d7cd; font-weight: 700;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.story-content h1 { margin: 24px 0 22px; max-width: 770px; font-size: clamp(43px, 5vw, 72px); line-height: 1.02; letter-spacing: -.055em; }
.story-content > p { max-width: 600px; margin: 0; color: #b9c7c2; font-size: 18px; line-height: 1.65; }
.story-points { display: grid; gap: 16px; padding: 0; margin: 42px 0 0; list-style: none; }
.story-points li { display: flex; align-items: center; gap: 14px; color: #e4ece8; font-size: 14px; }
.story-points span { color: var(--accent); font: 700 11px/1 monospace; }
.story-note { position: relative; z-index: 1; margin: 0; color: #879993; font-size: 13px; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: #f4f5f1; }
.auth-card { width: min(100%, 430px); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin: 0 0 8px; font-size: 29px; letter-spacing: -.035em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.mobile-logo { display: none; }
.auth-form { display: grid; gap: 17px; }
.auth-form label, .field { display: grid; gap: 7px; }
.auth-form label span, .field > span { font-size: 13px; font-weight: 700; color: #45514d; }
input, select {
  width: 100%; height: 46px; border: 1px solid #d9dfda; border-radius: 10px;
  padding: 0 13px; outline: none; background: #fff; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,107,87,.11); }
input::placeholder { color: #a0aaa6; }
.form-error { min-height: 18px; margin: 14px 0 0; color: var(--danger); font-size: 13px; }
.text-button { display: block; width: 100%; margin: 10px 0 0; padding: 8px; border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; }
.legal-note { margin: 18px 0 0; color: #9ba39f; font-size: 12px; line-height: 1.5; text-align: center; }

.auth-form label.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent input[type="checkbox"] {
  width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; padding: 0;
  accent-color: var(--brand); cursor: pointer;
}
.auth-form label.consent span { font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.consent a { color: var(--brand); text-decoration: underline; }
.auth-legal { margin: 18px 0 0; text-align: center; }
.auth-legal p { margin: 0 0 5px; color: #9ba39f; font-size: 12px; line-height: 1.5; }
.auth-legal p:last-child { margin-bottom: 0; }
.auth-legal a { color: #7f8b86; text-decoration: underline; }
.auth-legal a:hover { color: var(--brand); }

.button {
  display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px;
  padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 750;
  font-size: 14px; cursor: pointer; transition: transform .12s, background .15s, border .15s, opacity .15s;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 8px 22px rgba(29,107,87,.17); }
.button-primary:hover { background: var(--brand-strong); }
.button-secondary { border-color: var(--line); background: #fff; }
.button-secondary:hover { border-color: #b8c4be; }
.button-quiet { border-color: transparent; background: var(--soft); }
.button-danger { border-color: #f0d7d7; color: var(--danger); background: #fffafa; }
.button-wide { width: 100%; min-height: 48px; margin-top: 4px; }
.button-compact { min-height: 38px; padding: 0 14px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: sticky; top: 0; z-index: 30; display: flex; height: 100vh; flex-direction: column;
  padding: 27px 20px 20px; border-right: 1px solid var(--line); background: #fff;
}
.sidebar .brand { margin: 0 8px 34px; }
.side-nav { display: grid; gap: 5px; }
.nav-item {
  display: grid; grid-template-columns: 26px 1fr auto; min-height: 45px; align-items: center;
  padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #59645f;
  font-size: 14px; font-weight: 700; text-align: left; cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-strong); }
.nav-icon { font-size: 17px; color: #73807b; }
.nav-item.is-active .nav-icon { color: var(--brand); }
.nav-item b { min-width: 21px; padding: 3px 6px; border-radius: 7px; background: #edf0ed; font-size: 12px; text-align: center; }
#admin-incident-count { color:#fff; background:#b23a3a; }
.account-compact { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; margin-top: auto; padding: 12px 5px 0; border-top: 1px solid var(--line); }
.account-compact > span:nth-child(2) { display: grid; min-width: 0; }
.account-compact strong, .account-compact small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-compact strong { font-size: 13px; }
.account-compact small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.logout-button {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 42px; margin-top: 11px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; color: #5d6b66; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: border .15s, color .15s, background .15s;
}
.logout-button::before { content: "→"; font-size: 15px; line-height: 1; }
.logout-button:hover { border-color: #e0bcbc; background: #fdf6f6; color: var(--danger); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 850; font-size: 13px; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; min-height: 88px; align-items: center;
  justify-content: space-between; gap: 20px; padding: 18px clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line); background: rgba(247,248,245,.93); backdrop-filter: blur(14px);
}
.page-kicker { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.service-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.service-state i { width: 7px; height: 7px; border-radius: 50%; background: #47a06c; box-shadow: 0 0 0 4px #e0f0e5; }
.view-root { max-width: 1480px; margin: 0 auto; padding: 34px clamp(24px, 4vw, 58px) 60px; outline: none; }

.hero-strip { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.hero-strip h2 { max-width: 720px; margin: 7px 0 8px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; line-height: 1.12; }
.hero-strip p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.section-eyebrow { color: var(--brand); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 132px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric-card::after { content: ""; position: absolute; right: -24px; bottom: -37px; width: 96px; height: 96px; border: 18px solid var(--brand-soft); border-radius: 50%; opacity: .7; }
.metric-card.is-dark { border-color: var(--navy); background: var(--navy); color: #fff; }
.metric-card.is-dark::after { border-color: rgba(200,237,102,.13); }
.metric-label { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-card.is-dark .metric-label { color: #9cafaa; }
.metric-value { display: block; margin-top: 15px; font-size: 31px; font-weight: 800; letter-spacing: -.05em; }
.metric-note { display: block; margin-top: 3px; color: #87928e; font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 26px; margin-top: 26px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 1px rgba(20,50,42,.02); }
.panel-head { display: flex; min-height: 65px; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }
.link-button { border: 0; background: none; color: var(--brand); font-size: 13px; font-weight: 750; cursor: pointer; }

.recent-list, .object-list { display: grid; }
.recent-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(130px,.7fr) 100px 34px; align-items: center; gap: 13px; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.recent-row:last-child { border-bottom: 0; }
.recent-row:hover { background: #fbfcfa; }
.recent-main { display: grid; gap: 4px; min-width: 0; }
.recent-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.recent-main span, .recent-cell { color: var(--muted); font-size: 12px; }
.row-arrow { color: #9aa59f; }

.pipeline { display: grid; gap: 14px; }
.pipeline-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pipeline-row span { font-size: 13px; font-weight: 700; }
.pipeline-row b { color: var(--muted); font-size: 13px; }
.pipeline-bar {
  grid-column: 1 / -1; height: 10px; overflow: hidden; border: 1px solid #cfd9d4;
  border-radius: 10px; background: transparent;
}
.pipeline-bar progress {
  display: block; width: 100%; height: 100%; border: 0; border-radius: inherit;
  appearance: none; -webkit-appearance: none; background: transparent;
}
.pipeline-bar progress::-webkit-progress-bar { border-radius: inherit; background: transparent; }
.pipeline-bar progress::-webkit-progress-value { border-radius: inherit; background: var(--brand); }
.pipeline-bar progress::-moz-progress-bar { border-radius: inherit; background: var(--brand); }

.view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.search-box { position: relative; width: min(430px, 100%); }
.search-box input { padding-left: 38px; }
.search-box::before { content: "⌕"; position: absolute; z-index: 1; left: 14px; top: 10px; color: #8b9792; }
.filter-group { display: flex; gap: 8px; }
.filter-group select { width: auto; min-width: 145px; }
.object-card-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.object-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s, border .15s; }
.object-card:hover { transform: translateY(-2px); border-color: #c8d4ce; box-shadow: var(--shadow); }
.object-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.object-card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.025em; }
.object-location { color: var(--muted); font-size: 13px; }
.object-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.object-stats span { display: grid; gap: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.object-stats b { color: var(--ink); font-size: 14px; letter-spacing: normal; text-transform: none; }
.status-pill { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 20px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-NEW { color: #38648f; background: #e7f1fa; }
.status-IN_WORK { color: #8a5d16; background: #fbefd8; }
.status-RENTED { color: #246b45; background: #dcf2e5; }
.status-ARCHIVED { color: #66706c; background: #ecefec; }

.empty-state { display: grid; min-height: 330px; place-content: center; justify-items: center; padding: 35px; border: 1px dashed #ccd5cf; border-radius: var(--radius); background: rgba(255,255,255,.6); text-align: center; }
.empty-symbol { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--brand); font-size: 25px; }
.empty-state h3 { margin: 18px 0 7px; font-size: 17px; }
.empty-state p { max-width: 360px; margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.form-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; align-items: start; }
.form-card { padding: clamp(22px, 4vw, 34px); }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section-head { margin-bottom: 18px; }
.form-section-head h3 { margin: 0 0 5px; font-size: 16px; }
.form-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.field.is-wide { grid-column: 1 / -1; }
.field small { color: var(--muted); font-size: 11px; }
.city-picker { position: relative; }
.city-suggestions {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0;
  max-height: 250px; overflow-y: auto; padding: 5px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; box-shadow: var(--shadow);
}
.city-suggestion {
  display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer;
}
.city-suggestion:hover, .city-suggestion:focus { outline: none; background: var(--brand-soft); color: var(--brand-strong); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 28px; }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.back-button { display: inline-flex; gap: 7px; margin-bottom: 12px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.detail-title-row { display: flex; align-items: center; gap: 12px; }
.detail-title-row h2 { margin: 0; font-size: 29px; letter-spacing: -.045em; }
.detail-location { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.object-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.summary-cell { min-height: 83px; padding: 17px; background: #fff; }
.summary-cell span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.summary-cell b { display: block; margin-top: 8px; font-size: 16px; }
.tabs { display: flex; gap: 3px; margin-bottom: 16px; padding: 4px; border-radius: 12px; background: #e9ede9; width: fit-content; }
.tab-button { min-height: 36px; padding: 0 15px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; cursor: pointer; }
.tab-button.is-active { background: #fff; color: var(--ink); box-shadow: 0 3px 12px rgba(20,50,42,.08); }

.tenant-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-bottom: 1px solid var(--line); }
.tenant-tools .search-box { max-width: 340px; }
.tenant-filters { display: flex; gap: 7px; }
.tenant-filters select { width: auto; min-width: 145px; height: 39px; }
.tenant-list { display: grid; }
.tenant-row { display: grid; grid-template-columns: 44px minmax(200px,1.7fr) minmax(110px,.6fr) minmax(140px,.6fr) 38px minmax(150px,.7fr); align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.tenant-row:last-child { border-bottom: 0; }
.tenant-rank { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 800; }
.tenant-main { display: grid; min-width: 0; gap: 4px; }
.tenant-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tenant-main span, .tenant-spec { color: var(--muted); font-size: 11px; }
.tenant-source { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 7px; background: #eef3ef; color: #51625b; font-size: 11px; font-weight: 700; }
.tenant-status-select { height: 37px; font-size: 12px; }
.favorite-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #a4ada9; cursor: pointer; }
.favorite-button.is-active { border-color: #e8d997; background: #fffbea; color: #c38a1c; }
.results-count { color: var(--muted); font-size: 12px; }

.history-list { display: grid; }
.history-row { display: grid; width: 100%; grid-template-columns: 130px 1fr repeat(3, 100px) 75px; align-items: center; gap: 13px; padding: 15px 20px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; font-size: 13px; cursor: pointer; }
.history-row:hover { background: var(--surface-2); }
.history-row:last-child { border: 0; }
.history-row span { color: var(--muted); }
.history-row b { font-size: 13px; }
.history-row i { color: var(--brand); font-size: 12px; font-style: normal; font-weight: 750; }
.history-detail .object-summary { margin: 18px; }
.tenant-row-history { grid-template-columns: 44px minmax(180px,1.5fr) 120px 1fr 80px; }

.admin-users-panel { margin-top: 18px; overflow: hidden; }
.admin-users-head .search-box { width: min(320px, 100%); }
.admin-user-table { overflow-x: auto; }
.admin-user-row {
  display: grid; grid-template-columns: minmax(210px, 1.25fr) 100px repeat(3, minmax(135px, .8fr)) 110px;
  min-width: 1010px; align-items: center; gap: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); font-size: 12px;
}
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-header { background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-user-identity { display: grid; min-width: 0; gap: 4px; }
.admin-user-identity b, .admin-user-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity b { font-size: 13px; }
.admin-user-identity small { color: var(--muted); font-size: 11px; }
.presence-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 750; }
.presence-status i { width: 7px; height: 7px; border-radius: 50%; background: #aeb7b3; }
.presence-status.is-online { color: var(--brand-strong); }
.presence-status.is-online i { background: #47a06c; box-shadow: 0 0 0 4px #e0f0e5; }
.admin-users-empty { padding: 42px 20px; color: var(--muted); text-align: center; font-size: 13px; }
.admin-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; color: var(--muted); font-size: 12px; }
.admin-pagination > div { display: flex; align-items: center; gap: 12px; }
.admin-pagination .button { min-height: 34px; padding: 0 13px; }
.admin-pagination .button:disabled { cursor: default; opacity: .45; }
.admin-incident-filter { display:flex; align-items:center; gap:8px; color:var(--muted); font-size: 13px; }
.admin-incident-list { display:grid; gap:10px; padding:16px 20px; }
.admin-incident { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr) auto; align-items:center; gap:16px; padding:15px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.admin-incident.is-acknowledged { opacity:.65; }
.admin-incident-main { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.admin-incident-main div { display:grid; gap:4px; min-width:0; }
.admin-incident-main b { overflow-wrap:anywhere; }
.admin-incident-main small,.admin-incident-meta { color:var(--muted); font-size: 13px; }
.admin-incident-meta { display:grid; gap:5px; min-width:0; }
.admin-incident-meta span,.admin-incident-meta code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.incident-severity { flex:0 0 auto; padding:4px 7px; border-radius:999px; font-size: 11px; font-weight:800; letter-spacing:.06em; background:#eef2f1; color:var(--muted); }
.incident-severity.is-error,.incident-severity.is-critical { color:#a13535; background:#fbeaea; }
.incident-severity.is-warning { color:#8a5b12; background:#fff3d7; }
.incident-severity.is-info { color:#245e52; background:#e3f3ef; }
.admin-settings-panel { margin-top: 18px; overflow: hidden; }
.admin-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 20px 20px; }
.admin-product-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.admin-product-heading { grid-column: 1 / -1; display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.admin-product-heading h4 { margin: 5px 0 0; font-size: 16px; }
.admin-product-form > .button { min-height: 40px; }
.admin-switch { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.admin-switch input { accent-color: var(--brand); }
.admin-tz-price-list { display: grid; }
.admin-tz-price-form { display: grid; grid-template-columns: minmax(240px, 1fr) 130px auto auto; align-items: end; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.admin-tz-price-form:last-child { border-bottom: 0; }
.admin-tz-price-form .field span { margin-bottom: 4px; }
.admin-tz-price-reset:disabled { cursor: default; opacity: .35; }
.admin-audit-list span small { display: block; margin-top: 4px; color: var(--muted); }

.potential-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 18px; }
.potential-score { display: grid; min-height: 260px; place-content: center; justify-items: center; border-radius: var(--radius); background: var(--navy); color: #fff; }
.score-ring { display: grid; width: 130px; height: 130px; place-items: center; border: 10px solid rgba(255,255,255,.12); border-top-color: var(--accent); border-radius: 50%; }
.score-ring b { font-size: 40px; letter-spacing: -.06em; }
.potential-score strong { margin-top: 15px; font-size: 14px; }
.potential-score span { margin-top: 5px; color: #a4b7b0; font-size: 12px; }
.potential-components { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.component-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.component-card span { color: var(--muted); font-size: 12px; }
.component-card b { display: block; margin-top: 9px; font-size: 23px; }
.potential-form { display: flex; gap: 9px; margin-bottom: 16px; }
.potential-form input { flex: 1; }

.mini-button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--brand-strong); font-size: 11px; font-weight: 750; cursor: pointer; }
.mini-button:hover { border-color: #afc2b9; background: var(--brand-soft); }
.tenant-data-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.notice-card { margin-bottom: 18px; padding: 17px 20px; border: 1px solid #e7d9a4; border-radius: var(--radius); background: #fffbea; }
.notice-card strong { font-size: 13px; }
.notice-card p, .muted-copy { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice-inline { padding: 12px 14px; border-radius: 10px; background: #fff6db; color: #7b5d19; font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { display: grid; align-content: start; min-height: 245px; padding: 20px; }
.product-card h3 { margin: 13px 0 7px; font-size: 17px; }
.product-card p { min-height: 50px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.product-card > strong { margin: 20px 0 15px; font-size: 24px; letter-spacing: -.04em; }
.product-card .button { margin-top: auto; }
.metrics-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.metrics-inline span { display: grid; gap: 7px; padding: 13px; border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.metrics-inline b { color: var(--ink); font-size: 15px; }
.referral-box { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 9px; margin-bottom: 13px; }
.compact-list { display: grid; }
.compact-list > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 12px; }
.compact-list > div:last-child { border-bottom: 0; }
.compact-list small { color: var(--muted); }
.payment-status { padding: 5px 8px; border-radius: 8px; background: var(--surface-2); font-size: 11px; font-weight: 750; }
.payment-SUCCEEDED { color: #246b45; background: #dcf2e5; }
.payment-CANCELED, .payment-FAILED { color: var(--danger); background: #fff0f0; }
.contact-search-panel { max-width: 900px; overflow: hidden; }
.contact-search-panel > form { padding: 20px; border-bottom: 1px solid var(--line); margin: 0; }
.contact-card { padding: 28px; }
.contact-card h3 { margin: 12px 0 22px; font-size: 24px; }
.contact-fields { display: grid; gap: 9px; margin: 0; }
.contact-fields div { display: grid; grid-template-columns: minmax(110px,.35fr) 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.contact-fields dt { color: var(--muted); font-size: 12px; }
.contact-fields dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.contact-value, .document-text { white-space: normal; overflow-wrap: anywhere; color: #44534d; font-size: 13px; line-height: 1.75; }
.suggestion-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.tz-library-card { border: 1px solid var(--line); text-align: left; }
.modal-root { position: fixed; z-index: 1300; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 27, 23, .58); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(820px, 100%); max-height: min(850px, calc(100vh - 40px)); overflow: auto; padding: 30px; border-radius: 20px; background: #fff; box-shadow: 0 28px 90px rgba(7,25,20,.3); }
.modal-close { position: sticky; z-index: 2; top: 0; float: right; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-card h2 { margin: 12px 44px 7px 0; font-size: 25px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.confirm-card { width: min(460px, 100%); padding: 28px; text-align: center; }
.confirm-card h2 { margin: 0 0 10px; font-size: 21px; }
.confirm-message { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.confirm-actions .button { min-width: 140px; justify-content: center; }
.document-text {
  margin-top: 18px; padding: 18px; border-radius: 13px; background: var(--surface-2);
  /* Сдерживает выделение и копирование расширенного ТЗ (п.11). */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.document-full { max-height: 480px; overflow: auto; background: #f7f8f5; }
.admin-money-metrics { grid-template-columns: repeat(4, 1fr); margin-top: 20px; }
.admin-money-form { display: grid; grid-template-columns: repeat(3, 1fr) auto auto; align-items: end; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-grant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.admin-grant-grid form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
#admin-bonus-form { grid-template-columns: 150px 1fr auto; }

.toast-region {
  position: fixed; z-index: 1200; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 10px; width: min(460px, calc(100vw - 40px)); justify-items: center;
  pointer-events: none;
}
.toast {
  width: 100%; padding: 17px 24px; border: 2px solid #2f4b43; border-radius: 14px;
  background: var(--navy); color: #f2f7f5; box-shadow: 0 26px 70px rgba(7, 25, 20, .45);
  font-size: 15px; font-weight: 600; line-height: 1.5; text-align: center;
  pointer-events: auto; animation: toast-in .18s ease;
}
.toast.is-error { border-color: #d96a6a; background: #4a1f1f; color: #ffdede; }
@keyframes toast-in { from { opacity: 0; transform: scale(.96); } }

/* Разделение крупных блоков внутри одного экрана (п.12, п.13). */
.section-gap { margin-top: 26px; }

/* Замена инлайновых стилей: их блокирует Content-Security-Policy. */
/* Базовое правило .skeleton объявлено ниже, поэтому модификаторам нужна
   большая специфичность. */
.skeleton.skeleton-body { margin-top: 14px; min-height: 380px; }
.skeleton.skeleton-modal { min-height: 260px; }
.skeleton.skeleton-inline { margin: 20px; }
.field-spaced { margin-top: 12px; }
.component-value { font-size: 16px; }
.score-suffix { color: var(--muted); font-size: 12px; }

/* Подсказка о том, что список городов обрезан (п.6). */
.city-suggestion-more { margin: 7px 5px 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }

/* Удаление объекта прямо из карточки списка (п.14). */
.object-card-tools { display: flex; align-items: flex-start; gap: 8px; }
.object-delete {
  display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #9aa5a1;
  font-size: 13px; line-height: 1; cursor: pointer;
  transition: border .15s, color .15s, background .15s;
}
.object-delete:hover, .object-delete:focus-visible {
  border-color: #e0bcbc; background: #fdf6f6; color: var(--danger); outline: none;
}

/* Нулевые статусы воронки не должны выглядеть заполненными (п.16). */
.pipeline-row.is-empty span, .pipeline-row.is-empty b { color: #a7b0ac; }
.pipeline-row.is-empty .pipeline-bar { border-color: #dde4e0; background: transparent; }
.skeleton { position: relative; overflow: hidden; min-height: 100px; border-radius: 14px; background: #e9ede9; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 1120px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .object-summary { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-money-form { grid-template-columns: repeat(3, 1fr); }
  .admin-product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 20px; }
  .mobile-logo { display: block; margin-bottom: 30px; color: var(--brand); font-weight: 850; }
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-only { display: inline-grid !important; place-items: center; }
  .topbar { min-height: 76px; padding: 14px 18px; }
  .topbar h1 { font-size: 20px; }
  .service-state { display: none; }
  .view-root { padding: 24px 18px 45px; }
  .object-card-list { grid-template-columns: 1fr; }
  .detail-head { display: block; }
  .detail-actions { justify-content: flex-start; margin-top: 16px; }
  .tenant-row { grid-template-columns: 38px 1fr 38px; }
  .tenant-row .tenant-source, .tenant-row .tenant-spec { display: none; }
  .tenant-data-actions { grid-column: 2 / 3; }
  .tenant-status-select { grid-column: 2 / 3; }
  .history-row { grid-template-columns: 1fr 1fr; }
  .history-row i { display: none; }
  .admin-users-head { align-items: stretch; flex-direction: column; }
  .admin-users-head .search-box { width: 100%; }
  .admin-pagination { align-items: stretch; flex-direction: column; }
  .admin-pagination > div { justify-content: space-between; }
  .potential-layout { grid-template-columns: 1fr; }
  .admin-money-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-grant-grid { grid-template-columns: 1fr; }
  .admin-tz-price-form { grid-template-columns: 1fr 120px auto auto; }
  .admin-incident { grid-template-columns:1fr; align-items:stretch; }
}

@media (max-width: 590px) {
  .auth-card { padding: 26px 22px; border-radius: 18px; }
  .top-actions .button { width: 39px; overflow: hidden; padding: 0; font-size: 0; }
  .top-actions .button::first-letter { font-size: 18px; }
  .hero-strip, .view-toolbar, .tenant-tools { align-items: stretch; flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 115px; padding: 16px; }
  .metric-value { font-size: 26px; }
  .recent-row { grid-template-columns: 1fr 25px; }
  .recent-cell { display: none; }
  .filter-group, .tenant-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-group select, .tenant-filters select { min-width: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field.is-wide { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .object-summary { grid-template-columns: repeat(2, 1fr); }
  .tabs { width: 100%; overflow-x: auto; }
  .tab-button { flex: 0 0 auto; }
  .potential-components { grid-template-columns: 1fr; }
  .potential-form { flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; }
  .referral-box, .contact-fields div { grid-template-columns: 1fr; }
  .compact-list > div { grid-template-columns: 1fr auto; }
  .compact-list small { grid-column: 1 / -1; }
  .modal-card { padding: 22px; }
  .admin-money-form, #admin-bonus-form { grid-template-columns: 1fr; }
  .admin-product-grid { padding: 0 14px 14px; }
  .admin-product-form, .admin-tz-price-form { grid-template-columns: 1fr; }
  .admin-product-heading { grid-column: 1; }
}
