:root {
  color-scheme: dark;
  --bg: #07100b;
  --bg-soft: #0b1710;
  --panel: rgba(15, 28, 19, .92);
  --panel-strong: #101f16;
  --card: #12251a;
  --card-2: #172e20;
  --line: rgba(144, 255, 147, .13);
  --line-strong: rgba(144, 255, 147, .26);
  --text: #f5fff6;
  --muted: #94aa99;
  --green: #8ef08a;
  --green-strong: #65d96c;
  --green-dark: #1f6132;
  --danger: #ff7a83;
  --warning: #ffc76a;
  --info: #79c8ff;
  --shadow: 0 26px 80px rgba(0,0,0,.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sidebar: 290px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(430px, .65fr); }
.login-visual { position: relative; overflow: hidden; padding: 70px clamp(48px, 7vw, 120px); display: flex; flex-direction: column; justify-content: space-between; background:
  radial-gradient(circle at 78% 20%, rgba(99, 221, 110, .18), transparent 32%),
  linear-gradient(145deg, #07100b 0%, #0b1b11 48%, #0d2415 100%); }
.login-visual::after { content:""; position:absolute; inset:0; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 85%); pointer-events:none; }
.login-logo { width: 78px; height: 78px; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(0 12px 30px rgba(105, 225, 112, .22)); }
.login-copy { position: relative; z-index: 2; max-width: 760px; }
.login-copy h1 { margin: 16px 0 20px; font-size: clamp(44px, 5vw, 82px); line-height: .98; letter-spacing: -.055em; }
.login-copy p { max-width: 640px; margin:0; color:#bdd0c0; font-size: clamp(17px, 1.4vw, 22px); line-height:1.65; }
.eyebrow { display:inline-flex; align-items:center; gap:8px; color:var(--green); font-weight:800; font-size:12px; letter-spacing:.16em; text-transform:uppercase; }
.eyebrow::before { content:""; width:22px; height:1px; background:currentColor; }
.feature-row { position:relative; z-index:2; display:flex; gap:18px; flex-wrap:wrap; }
.feature-row > div { min-width:145px; padding:18px 20px; border:1px solid var(--line); border-radius:18px; background:rgba(13,31,19,.55); backdrop-filter: blur(16px); }
.feature-row b, .feature-row span { display:block; }
.feature-row b { font-size:18px; }
.feature-row span { margin-top:5px; color:var(--muted); font-size:13px; }
.ambient { position:absolute; border-radius:999px; filter:blur(2px); opacity:.7; }
.ambient-one { width:430px; height:430px; right:-160px; top:18%; background:radial-gradient(circle, rgba(103,233,112,.22), transparent 68%); }
.ambient-two { width:360px; height:360px; left:20%; bottom:-210px; background:radial-gradient(circle, rgba(42,123,65,.35), transparent 70%); }

.login-panel { display:grid; place-items:center; padding:48px; background:#09110c; border-left:1px solid var(--line); }
.login-card { width:min(440px, 100%); padding:36px; border-radius:30px; background:linear-gradient(180deg, rgba(18,37,26,.96), rgba(10,22,14,.96)); border:1px solid var(--line); box-shadow:var(--shadow); }
.login-card h2 { margin:15px 0 8px; font-size:34px; letter-spacing:-.03em; }
.mobile-brand { display:none; align-items:center; gap:10px; margin-bottom:28px; }
.mobile-brand img { width:42px; height:42px; object-fit:contain; }
.mobile-brand strong { font-size:22px; }
.muted { color:var(--muted); }
.login-card .muted { line-height:1.55; margin-bottom:28px; }
.login-note { margin:20px 0 0; color:var(--muted); font-size:12px; line-height:1.55; text-align:center; }
.field { display:grid; gap:8px; margin:16px 0; }
.field > span { color:#caddcd; font-weight:700; font-size:13px; }
input, textarea, select { width:100%; border:1px solid var(--line); background:#0b1710; color:var(--text); border-radius:14px; padding:14px 15px; outline:none; transition:.2s ease; }
textarea { resize:vertical; min-height:110px; }
input:focus, textarea:focus, select:focus { border-color:var(--green-strong); box-shadow:0 0 0 4px rgba(101,217,108,.1); }
.password-wrap { position:relative; }
.password-wrap input { padding-right:52px; }
.password-wrap .icon-button { position:absolute; right:7px; top:7px; }
.form-error { margin-top:14px; border:1px solid rgba(255,122,131,.3); background:rgba(255,122,131,.09); color:#ffb4ba; padding:12px 14px; border-radius:13px; font-size:13px; }

.primary-button, .secondary-button, .ghost-button, .danger-button { border:0; border-radius:13px; min-height:42px; padding:0 16px; font-weight:850; transition:.18s ease; }
.primary-button { background:linear-gradient(135deg, var(--green), var(--green-strong)); color:#07100b; box-shadow:0 12px 28px rgba(101,217,108,.18); }
.primary-button:hover { transform:translateY(-1px); filter:brightness(1.04); }
.primary-button.large { width:100%; min-height:52px; margin-top:10px; }
.secondary-button { background:var(--card); color:var(--text); border:1px solid var(--line); }
.secondary-button:hover, .ghost-button:hover { border-color:var(--line-strong); background:var(--card-2); }
.ghost-button { background:transparent; color:var(--text); border:1px solid var(--line); }
.danger-button { background:rgba(255,122,131,.12); color:#ffb0b7; border:1px solid rgba(255,122,131,.25); }
.icon-button { width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:12px; background:transparent; color:var(--muted); }
.icon-button:hover { background:rgba(255,255,255,.06); color:var(--text); }
.icon-button.danger:hover { color:var(--danger); background:rgba(255,122,131,.08); }

.app-shell { min-height:100vh; display:grid; grid-template-columns:var(--sidebar) minmax(0,1fr); background:
  radial-gradient(circle at 74% 0%, rgba(72,180,88,.11), transparent 30%), var(--bg); }
.sidebar { position:sticky; top:0; height:100vh; display:flex; flex-direction:column; gap:22px; padding:24px 18px; background:rgba(7,16,11,.93); border-right:1px solid var(--line); backdrop-filter:blur(20px); z-index:20; }
.brand-block { display:flex; align-items:center; gap:13px; padding:4px 10px 18px; border-bottom:1px solid var(--line); }
.brand-block img { width:48px; height:48px; object-fit:contain; filter:drop-shadow(0 8px 18px rgba(105,225,112,.18)); }
.brand-block strong, .brand-block span { display:block; }
.brand-block strong { font-size:22px; letter-spacing:-.02em; }
.brand-block span { color:var(--muted); font-size:12px; margin-top:2px; }
.navigation { display:flex; flex-direction:column; gap:5px; overflow:auto; padding-right:2px; }
.nav-section-label { padding:17px 12px 6px; color:#617466; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.16em; }
.nav-item { position:relative; display:flex; align-items:center; gap:11px; width:100%; border:0; color:#b8c9bb; background:transparent; padding:11px 12px; border-radius:13px; text-align:left; font-weight:750; }
.nav-item:hover { color:var(--text); background:rgba(255,255,255,.035); }
.nav-item.active { color:#07100b; background:linear-gradient(135deg, var(--green), #73df79); box-shadow:0 10px 24px rgba(101,217,108,.15); }
.nav-icon { width:25px; text-align:center; font-size:17px; }
.nav-badge { margin-left:auto; min-width:22px; height:22px; display:grid; place-items:center; padding:0 7px; border-radius:999px; background:var(--danger); color:white; font-size:11px; font-weight:900; box-shadow:0 6px 14px rgba(255,122,131,.2); }
.nav-item.active .nav-badge { background:#0e2b17; color:var(--green); }
.sidebar-profile { margin-top:auto; display:flex; align-items:center; gap:10px; padding:13px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.025); }
.avatar { flex:0 0 auto; width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:linear-gradient(135deg, #2f7b43, var(--green)); color:#061009; font-weight:950; }
.sidebar-profile-copy { min-width:0; flex:1; }
.sidebar-profile-copy strong, .sidebar-profile-copy span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-profile-copy strong { font-size:13px; }
.sidebar-profile-copy span { color:var(--muted); font-size:11px; margin-top:3px; }

.workspace { min-width:0; }
.topbar { min-height:108px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px clamp(24px, 4vw, 54px); border-bottom:1px solid var(--line); background:rgba(7,16,11,.7); backdrop-filter:blur(18px); position:sticky; top:0; z-index:15; }
.topbar h1 { margin:7px 0 0; font-size:30px; letter-spacing:-.035em; }
.topbar-actions { display:flex; align-items:center; gap:12px; }
.connection-pill { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:999px; background:rgba(255,255,255,.035); border:1px solid var(--line); color:var(--muted); font-size:12px; font-weight:700; }
.connection-pill span { width:8px; height:8px; border-radius:50%; background:var(--warning); box-shadow:0 0 0 5px rgba(255,199,106,.08); }
.connection-pill.online span { background:var(--green); box-shadow:0 0 0 5px rgba(142,240,138,.08); }
.mobile-menu { display:none; }
.page-content { padding:32px clamp(24px, 4vw, 54px) 70px; }

.hero-card { position:relative; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; align-items:center; padding:32px; border-radius:var(--radius-xl); background:linear-gradient(135deg, rgba(24,59,34,.95), rgba(13,31,19,.95)); border:1px solid var(--line-strong); box-shadow:var(--shadow); }
.hero-card::after { content:""; position:absolute; width:340px; height:340px; border-radius:50%; right:-130px; top:-190px; background:radial-gradient(circle, rgba(142,240,138,.28), transparent 68%); }
.hero-card > * { position:relative; z-index:1; }
.hero-card h2 { margin:10px 0 10px; font-size:clamp(28px, 3vw, 44px); letter-spacing:-.045em; }
.hero-card p { max-width:680px; color:#c3d4c6; line-height:1.6; margin:0; }
.hero-stat { min-width:170px; padding:18px 20px; border-radius:20px; background:rgba(5,18,10,.48); border:1px solid var(--line); }
.hero-stat strong { display:block; font-size:32px; color:var(--green); }
.hero-stat span { display:block; color:var(--muted); margin-top:5px; font-size:12px; }

.stats-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:16px; margin-top:18px; }
.stat-card { padding:20px; border-radius:var(--radius-lg); background:var(--panel); border:1px solid var(--line); }
.stat-card .stat-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:rgba(142,240,138,.09); color:var(--green); font-size:18px; }
.stat-card strong { display:block; margin-top:18px; font-size:28px; letter-spacing:-.035em; }
.stat-card span { display:block; color:var(--muted); margin-top:4px; font-size:12px; }

.section-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr); gap:18px; margin-top:18px; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-xl); overflow:hidden; }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid var(--line); }
.panel-header h3 { margin:0; font-size:17px; }
.panel-body { padding:22px; }
.empty-state { padding:52px 24px; text-align:center; color:var(--muted); }
.empty-state .empty-icon { width:64px; height:64px; margin:0 auto 16px; display:grid; place-items:center; border-radius:20px; background:rgba(142,240,138,.08); color:var(--green); font-size:26px; }
.empty-state h3 { color:var(--text); margin:0 0 8px; }
.empty-state p { margin:0 auto 18px; max-width:440px; line-height:1.55; }

.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.toolbar input, .toolbar select { width:auto; min-width:190px; }
.toolbar .spacer { flex:1; }

.ticket-layout { display:grid; grid-template-columns:minmax(280px, .7fr) minmax(0,1.3fr); min-height:650px; }
.ticket-list { border-right:1px solid var(--line); overflow:auto; max-height:calc(100vh - 230px); }
.ticket-item { width:100%; border:0; border-bottom:1px solid var(--line); padding:16px 18px; background:transparent; color:var(--text); text-align:left; display:grid; gap:8px; }
.ticket-item:hover, .ticket-item.active { background:rgba(142,240,138,.055); }
.ticket-item.active { box-shadow:inset 3px 0 var(--green); }
.ticket-item-top { display:flex; gap:10px; align-items:flex-start; }
.ticket-item-title { flex:1; font-weight:850; line-height:1.35; }
.ticket-item-meta { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:11px; flex-wrap:wrap; }
.unread-dot { min-width:24px; height:24px; display:grid; place-items:center; border-radius:999px; background:var(--danger); color:white; font-size:11px; font-weight:900; }
.status-chip, .role-chip, .soft-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; border-radius:999px; background:rgba(255,255,255,.045); border:1px solid var(--line); color:#c4d3c6; font-size:11px; font-weight:800; }
.status-chip.closed { color:#ffb4ba; border-color:rgba(255,122,131,.25); background:rgba(255,122,131,.08); }
.status-chip.new { color:var(--green); }
.ticket-thread { min-width:0; display:flex; flex-direction:column; }
.thread-header { padding:20px 22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.thread-header h3 { margin:0 0 6px; }
.thread-user { color:var(--muted); font-size:12px; }
.thread-messages { flex:1; overflow:auto; padding:24px; background:radial-gradient(circle at 50% 0%, rgba(82,158,91,.05), transparent 35%); }
.message { max-width:72%; margin-bottom:12px; padding:13px 15px; border-radius:18px; background:var(--card); border:1px solid var(--line); }
.message.mine { margin-left:auto; background:#17351f; border-color:rgba(142,240,138,.2); }
.message-author { color:var(--green); font-size:11px; font-weight:900; margin-bottom:6px; }
.message-text { white-space:pre-wrap; line-height:1.5; }
.message-time { margin-top:7px; color:#708076; font-size:10px; }
.closed-banner { margin:16px 22px 0; padding:14px 16px; border-radius:16px; background:rgba(255,122,131,.08); border:1px solid rgba(255,122,131,.2); color:#ffc0c5; line-height:1.45; }
.thread-compose { padding:16px 20px 20px; border-top:1px solid var(--line); }
.compose-row { display:flex; gap:10px; align-items:flex-end; }
.compose-row textarea { min-height:48px; max-height:150px; }
.thread-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

.data-table-wrap { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:760px; }
.data-table th, .data-table td { padding:13px 15px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
.data-table th { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.data-table td { font-size:13px; }
.data-table tr:hover td { background:rgba(255,255,255,.018); }

.audit-list { display:grid; gap:12px; }
.audit-item { display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; padding:17px; border-radius:18px; background:var(--panel); border:1px solid var(--line); }
.audit-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:13px; background:rgba(142,240,138,.08); color:var(--green); }
.audit-item h4 { margin:0 0 5px; font-size:14px; }
.audit-item p { margin:0; color:#c4d3c6; line-height:1.5; }
.audit-meta { margin-top:8px; color:var(--muted); font-size:11px; }

.report-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
.report-card { padding:18px; border-radius:20px; background:var(--panel); border:1px solid var(--line); }
.report-card.unread { border-color:rgba(142,240,138,.35); box-shadow:inset 0 0 0 1px rgba(142,240,138,.08); }
.report-card h3 { margin:10px 0 8px; font-size:16px; }
.report-card p { color:#c4d3c6; line-height:1.55; white-space:pre-wrap; }
.report-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:11px; }

.profile-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:22px; align-items:center; padding:28px; border-radius:var(--radius-xl); background:var(--panel); border:1px solid var(--line); }
.profile-avatar { width:88px; height:88px; display:grid; place-items:center; border-radius:26px; background:linear-gradient(135deg, #2e7440, var(--green)); color:#07100b; font-size:32px; font-weight:950; }
.profile-card h2 { margin:0 0 7px; }
.profile-details { display:flex; flex-wrap:wrap; gap:8px; }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:rgba(0,0,0,.7); backdrop-filter:blur(8px); }
.modal { width:min(560px,100%); max-height:90vh; overflow:auto; padding:24px; border-radius:26px; background:#0f2016; border:1px solid var(--line-strong); box-shadow:var(--shadow); }
.modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.modal-header h2 { margin:0; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

.toast-stack { position:fixed; right:22px; top:22px; z-index:200; display:grid; gap:10px; }
.toast { width:min(360px, calc(100vw - 44px)); padding:14px 16px; border-radius:16px; background:#14261a; border:1px solid var(--line-strong); box-shadow:var(--shadow); animation:toast-in .25s ease; }
.toast strong { display:block; margin-bottom:4px; }
.toast p { margin:0; color:#c4d3c6; font-size:12px; line-height:1.45; }
.toast.error { border-color:rgba(255,122,131,.35); }
@keyframes toast-in { from { transform:translateY(-10px); opacity:0; } }

.skeleton { border-radius:14px; min-height:72px; background:linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.07), rgba(255,255,255,.025)); background-size:200% 100%; animation:shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position:-200% 0; } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .section-grid { grid-template-columns:1fr; }
  .report-grid { grid-template-columns:1fr; }
}

@media (max-width: 920px) {
  .login-screen { grid-template-columns:1fr; }
  .login-visual { display:none; }
  .login-panel { min-height:100vh; padding:24px; border-left:0; background:radial-gradient(circle at 80% 10%, rgba(84,190,94,.15), transparent 35%), var(--bg); }
  .mobile-brand { display:flex; }
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:0; transform:translateX(-105%); width:min(88vw, 310px); transition:.24s ease; box-shadow:var(--shadow); }
  .sidebar.open { transform:translateX(0); }
  .mobile-menu { display:grid; }
  .topbar { min-height:90px; padding:18px 20px; }
  .topbar-actions .connection-pill { display:none; }
  .page-content { padding:22px 18px 55px; }
  .ticket-layout { grid-template-columns:1fr; }
  .ticket-list { max-height:300px; border-right:0; border-bottom:1px solid var(--line); }
  .ticket-thread { min-height:580px; }
}

@media (max-width: 620px) {
  .login-card { padding:26px 22px; }
  .topbar h1 { font-size:23px; }
  .topbar .secondary-button { display:none; }
  .hero-card { grid-template-columns:1fr; padding:24px; }
  .hero-stat { width:100%; }
  .stats-grid { grid-template-columns:1fr; }
  .message { max-width:90%; }
  .profile-card { grid-template-columns:1fr; text-align:center; }
  .profile-avatar { margin:auto; }
  .profile-details { justify-content:center; }
  .toolbar input, .toolbar select { width:100%; }
}

/* Build 37: адреса, карта и права доступа */
.row-actions { display:flex; gap:7px; flex-wrap:wrap; }
.table-button { border:1px solid var(--line); background:rgba(255,255,255,.04); color:var(--text); border-radius:10px; padding:8px 10px; font:inherit; font-size:11px; font-weight:800; cursor:pointer; }
.table-button:hover { border-color:var(--green); }
.table-button.danger { color:#ffb2b8; }
.wide-modal { width:min(1180px, 96vw); }
.address-editor-grid { display:grid; grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr); gap:18px; }
.address-form-column { min-width:0; }
.address-map-column { position:relative; min-height:610px; border-radius:22px; overflow:hidden; border:1px solid var(--line); background:#d9e5db; }
.address-admin-map { position:absolute; inset:0; }
.map-mode-hint { position:absolute; left:14px; right:14px; bottom:14px; z-index:5; padding:11px 14px; border-radius:14px; background:rgba(7,16,11,.9); color:#d8e7db; font-size:12px; box-shadow:var(--shadow); }
.form-grid { display:grid; gap:12px; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.coordinate-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 15px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.025); margin:12px 0; }
.coordinate-card strong, .coordinate-card span { display:block; }
.coordinate-card span { color:var(--muted); font-size:11px; margin-top:4px; }
.subsection-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:20px 0 10px; }
.subsection-header strong, .subsection-header span { display:block; }
.entrance-list { display:grid; gap:10px; }
.entrance-row { display:grid; grid-template-columns:55px 82px 82px minmax(130px,1fr) auto auto; gap:7px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:14px; }
.entrance-row input { min-width:0; padding:9px 10px; }
.entrance-row small { grid-column:1/-1; color:var(--muted); }
.staff-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.staff-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:17px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.02); }
.staff-avatar { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; background:linear-gradient(135deg,#2e7440,var(--green)); color:#07100b; font-weight:950; }
.staff-card h3 { margin:0 0 4px; }
.staff-card p { margin:0; color:var(--muted); }
.permissions-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; max-height:58vh; overflow:auto; padding-right:4px; }
.permission-group { border:1px solid var(--line); border-radius:16px; padding:13px; }
.permission-group legend { padding:0 7px; color:var(--green); font-weight:900; font-size:12px; }
.permission-item { display:flex; gap:9px; align-items:flex-start; padding:7px 2px; color:#cfddd1; font-size:12px; line-height:1.4; }
.permission-item input { width:auto; margin-top:2px; accent-color:var(--green); }
@media (max-width:900px) { .address-editor-grid { grid-template-columns:1fr; } .address-map-column { min-height:440px; } .staff-grid,.permissions-grid { grid-template-columns:1fr; } }
@media (max-width:620px) { .form-grid.two { grid-template-columns:1fr; } .entrance-row { grid-template-columns:50px 1fr 1fr; } .entrance-row input:nth-child(4) { grid-column:1/-1; } }

/* Build 40: поддержка и ошибки как аккуратная социальная лента */
.social-shell { width:min(920px,100%); margin:0 auto; }
.social-head { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; margin-bottom:18px; }
.social-head h2, .social-compose-card h2 { margin:7px 0 8px; font-size:clamp(26px,3vw,38px); letter-spacing:-.04em; }
.social-head p, .social-compose-card p { margin:0; max-width:680px; color:var(--muted); line-height:1.55; }
.social-toolbar { position:sticky; top:108px; z-index:8; display:grid; gap:12px; margin-bottom:16px; padding:14px; border:1px solid var(--line); border-radius:20px; background:rgba(7,16,11,.92); backdrop-filter:blur(18px); }
.feed-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.feed-tab { border:1px solid var(--line); background:rgba(255,255,255,.025); color:#bdd0c0; border-radius:999px; padding:9px 13px; font:inherit; font-size:12px; font-weight:850; cursor:pointer; }
.feed-tab.active { color:#07100b; background:var(--green); border-color:var(--green); }
.feed-search { position:relative; display:flex; align-items:center; gap:9px; }
.feed-search > span { position:absolute; left:14px; color:var(--muted); font-size:20px; pointer-events:none; }
.feed-search input { padding-left:42px; }
.social-feed { display:grid; gap:15px; }
.social-card { position:relative; padding:20px 21px 0; border:1px solid var(--line); border-radius:24px; background:linear-gradient(180deg,rgba(22,43,29,.98),rgba(12,27,17,.98)); box-shadow:0 16px 42px rgba(0,0,0,.16); cursor:pointer; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; overflow:hidden; }
.social-card:hover { transform:translateY(-2px); border-color:var(--line-strong); box-shadow:0 22px 50px rgba(0,0,0,.22); }
.social-card.unread { border-color:rgba(142,240,138,.48); box-shadow:0 0 0 1px rgba(142,240,138,.09),0 18px 46px rgba(0,0,0,.2); }
.social-author { display:flex; align-items:center; gap:12px; }
.social-avatar, .comment-avatar { width:46px; height:46px; flex:0 0 46px; display:grid; place-items:center; border-radius:15px; background:linear-gradient(135deg,#2f7b43,var(--green)); color:#061009; font-weight:950; font-size:18px; }
.social-avatar.warning { background:linear-gradient(135deg,#8b6324,var(--warning)); }
.social-author-copy { min-width:0; flex:1; display:grid; gap:3px; }
.social-author-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.social-author-copy span { color:var(--muted); font-size:11px; }
.social-tags { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:16px 0 12px; }
.social-tags span, .social-tags b { padding:6px 9px; border-radius:999px; background:rgba(255,255,255,.04); border:1px solid var(--line); color:#b9cabd; font-size:10px; font-weight:850; }
.social-tags b { color:var(--green); }
.social-card h3 { margin:0 0 9px; font-size:19px; line-height:1.35; }
.social-text { margin:0; color:#d7e3d9; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.social-actions { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin:18px -21px 0; padding:13px 21px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.social-actions .link-button { margin-left:auto; }
.link-button { border:0; background:transparent; color:var(--green); padding:6px 0; font:inherit; font-weight:900; cursor:pointer; }
.attachment-strip { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.attachment-strip a, .screenshot-preview { display:inline-flex; align-items:center; gap:7px; padding:9px 11px; border:1px solid var(--line); border-radius:12px; color:#d4e2d6; text-decoration:none; background:rgba(255,255,255,.025); }
.admin-note { margin-top:15px; padding:14px 15px; border-radius:16px; background:rgba(121,200,255,.07); border:1px solid rgba(121,200,255,.18); }
.admin-note p { margin:6px 0 0; white-space:pre-wrap; line-height:1.5; }
.feed-empty { padding:58px 26px; border:1px dashed var(--line-strong); border-radius:24px; text-align:center; color:var(--muted); }
.feed-empty .empty-icon { width:64px; height:64px; margin:0 auto 16px; display:grid; place-items:center; border-radius:20px; background:rgba(142,240,138,.08); color:var(--green); font-size:28px; }
.feed-empty h3 { margin:0 0 8px; color:var(--text); }
.feed-empty p { margin:0 auto 18px; max-width:480px; }
.social-compose-card { width:min(920px,100%); margin:0 auto 20px; display:grid; grid-template-columns:minmax(240px,.7fr) minmax(320px,1.3fr); gap:24px; padding:24px; border:1px solid var(--line); border-radius:26px; background:linear-gradient(135deg,rgba(24,53,32,.92),rgba(11,25,16,.96)); }
.compose-fields { display:grid; gap:12px; }
.conversation-modal { width:min(900px,96vw); padding:0; overflow:hidden; }
.conversation-modal .modal-header { margin:0; padding:22px 24px; border-bottom:1px solid var(--line); }
.conversation-stream { max-height:58vh; overflow:auto; padding:22px 24px; background:radial-gradient(circle at 50% 0%,rgba(82,158,91,.07),transparent 36%); }
.comment-row { display:flex; align-items:flex-start; gap:11px; margin-bottom:14px; }
.comment-row.mine { flex-direction:row-reverse; }
.comment-row.mine .comment-bubble { background:#17351f; border-color:rgba(142,240,138,.2); }
.comment-bubble { max-width:min(72%,650px); padding:13px 15px; border:1px solid var(--line); border-radius:18px; background:var(--card); }
.comment-bubble > div { display:flex; gap:12px; justify-content:space-between; align-items:center; }
.comment-bubble strong { color:var(--green); font-size:12px; }
.comment-bubble span { color:var(--muted); font-size:10px; }
.comment-bubble p { margin:7px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.conversation-compose { padding:17px 22px 22px; border-top:1px solid var(--line); }

/* Единое телефонное поле +7 */
.phone-field-wrap { position:relative; }
.phone-prefix { position:absolute; left:15px; top:50%; transform:translateY(-50%); z-index:2; color:var(--text); font-weight:850; pointer-events:none; }
.phone-field-wrap input { padding-left:48px; }

@media (max-width:920px) {
  .social-toolbar { top:90px; }
  .social-compose-card { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .social-head { align-items:stretch; flex-direction:column; }
  .social-head .primary-button { width:100%; }
  .social-card { padding:17px 16px 0; border-radius:20px; }
  .social-actions { margin:16px -16px 0; padding:12px 16px; }
  .social-actions .link-button { width:100%; margin-left:0; text-align:left; }
  .social-author { align-items:flex-start; }
  .social-author .status-chip { margin-left:auto; }
  .comment-bubble { max-width:82%; }
  .conversation-stream { padding:17px 14px; }
  .conversation-compose { padding:14px; }
  .compose-row { flex-direction:column; align-items:stretch; }
}
.restriction-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.restriction-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:13px; padding:16px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.022); }
.restriction-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; background:rgba(142,240,138,.1); color:var(--green); font-size:22px; font-weight:900; }
.restriction-card h4 { margin:0 0 6px; }
.restriction-card p { margin:0 0 7px; color:#d2dfd4; line-height:1.45; }
.restriction-card span { color:var(--muted); font-size:10px; }
@media (max-width:760px) { .restriction-grid { grid-template-columns:1fr; } }

/* Build 42: онлайн-карта, тарифы и статистика сотрудников */
.live-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;align-items:stretch}.live-map-panel{overflow:hidden}.admin-live-map{height:clamp(480px,68vh,760px);min-height:480px;background:#0d1510}.live-driver-detail{min-height:480px;overflow:hidden}.live-car-marker{width:38px;height:38px;border:2px solid rgba(255,255,255,.9);border-radius:12px;display:grid;place-items:center;cursor:pointer;box-shadow:0 7px 20px rgba(0,0,0,.34);color:#071009;font-size:20px}.live-car-marker.free{background:#52df74}.live-car-marker.busy{background:#ffbd4a}.live-car-marker.stale{background:#7d877f;opacity:.7;filter:saturate(.3)}.live-car-icon{display:block;transition:transform .2s ease}.detail-list{display:grid;gap:0}.detail-list>div{display:grid;grid-template-columns:minmax(110px,.7fr) minmax(0,1.3fr);gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.detail-list span{color:var(--muted)}.detail-list strong{text-align:right;word-break:break-word}.pricing-list{display:grid;gap:10px}.pricing-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.018)}.pricing-row h4{margin:0 0 4px}.pricing-row p{margin:0 0 4px}.pricing-examples{display:grid;gap:10px}.pricing-examples span{padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:rgba(82,223,116,.06)}.staff-card.clickable{cursor:pointer;transition:border-color .18s ease,transform .18s ease}.staff-card.clickable:hover{border-color:var(--green);transform:translateY(-1px)}.staff-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.chevron{font-size:30px;color:var(--muted)}.viz-callout{margin:12px 0;padding:12px 14px;border-radius:14px;background:rgba(82,223,116,.08);border:1px solid rgba(82,223,116,.25);color:var(--muted)}
@media(max-width:1000px){.live-map-layout{grid-template-columns:1fr}.live-driver-detail{min-height:auto}.admin-live-map{height:58vh}}@media(max-width:640px){.pricing-row{align-items:flex-start;flex-direction:column}.detail-list>div{grid-template-columns:1fr}.detail-list strong{text-align:left}.admin-live-map{height:52vh;min-height:400px}}

/* Адреса по населённым пунктам */
.breadcrumb { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.settlement-district + .settlement-district { margin-top:24px; }
.settlement-district h4 { margin:0 0 12px; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.settlement-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:10px; }
.settlement-card { display:grid; gap:8px; padding:15px 16px; border-radius:var(--radius-md); background:var(--card); border:1px solid var(--line); color:var(--text); text-align:left; transition:border-color .15s ease, background .15s ease; }
.settlement-card:hover { border-color:var(--line-strong); background:var(--card-2); }
.settlement-card:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.settlement-card strong { font-size:15px; }
.settlement-card .muted { font-size:11px; }
.settlement-counts { display:flex; flex-wrap:wrap; gap:4px 10px; color:#c4d3c6; font-size:12px; font-variant-numeric:tabular-nums; }
.settlement-card.sparse .settlement-counts { color:var(--muted); }

/* Поддержка: диалоги слева, переписка справа — как во ВКонтакте */
.im-shell { display:grid; grid-template-columns:minmax(290px, 360px) minmax(0, 1fr); height:calc(100vh - 190px); min-height:520px; border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--panel); overflow:hidden; }
.im-sidebar { display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--line); background:rgba(7,16,11,.35); }
.im-sidebar-head { display:flex; gap:8px; padding:14px 14px 10px; }
.im-sidebar-head .feed-search { flex:1; min-width:0; }
.im-sidebar-head input { padding-top:11px; padding-bottom:11px; }
.im-new { min-height:44px; padding:0 15px; font-size:20px; line-height:1; }
.im-filters { display:flex; gap:6px; padding:0 14px 12px; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid var(--line); }
.im-filters::-webkit-scrollbar { display:none; }
.im-filters .feed-tab { flex:0 0 auto; display:inline-flex; gap:5px; align-items:center; padding:7px 11px; font-size:11px; }
.im-filters .feed-tab span { opacity:.7; font-variant-numeric:tabular-nums; }
.im-dialogs { flex:1; min-height:0; overflow-x:hidden; overflow-y:auto; }
.im-empty-list { padding:34px 22px; color:var(--muted); text-align:center; line-height:1.55; font-size:13px; }
.im-dialog { width:100%; display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border:0; border-bottom:1px solid rgba(144,255,147,.06); background:transparent; color:var(--text); text-align:left; }
.im-dialog:hover { background:rgba(142,240,138,.04); }
.im-dialog.active { background:rgba(142,240,138,.09); box-shadow:inset 3px 0 var(--green); }
.im-dialog:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
.im-avatar { flex:0 0 44px; width:44px; height:44px; display:grid; place-items:center; border-radius:50%; background:linear-gradient(135deg, #2f7b43, var(--green)); color:#061009; font-weight:950; font-size:17px; }
.im-dialog-body { min-width:0; flex:1; display:grid; grid-template-columns:minmax(0, 1fr); gap:3px; }
.im-dialog-top { display:flex; gap:8px; align-items:baseline; }
.im-dialog-top strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.im-dialog-top time { flex:0 0 auto; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.im-dialog-subject { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#d7e3d9; font-size:12px; font-weight:750; }
.im-dialog-bottom { display:flex; gap:8px; align-items:center; }
.im-dialog-preview { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
.im-dialog.unread .im-dialog-preview { color:var(--text); }
.im-unread { flex:0 0 auto; min-width:20px; height:20px; padding:0 6px; display:grid; place-items:center; border-radius:999px; background:var(--green); color:#07100b; font-size:11px; font-weight:900; font-variant-numeric:tabular-nums; }
.im-dialog-meta { display:flex; align-items:center; gap:6px; margin-top:2px; color:var(--muted); font-size:11px; }
.im-status-dot { flex:0 0 auto; width:7px; height:7px; border-radius:50%; background:var(--muted); }
.im-status-dot.new { background:var(--green); }
.im-status-dot.in_progress { background:var(--info); }
.im-status-dot.waiting_user { background:var(--warning); }
.im-status-dot.closed { background:var(--danger); }
.im-presence { display:inline-flex; margin-left:auto; }
.im-viewer { min-width:32px; height:19px; padding:0 5px; display:grid; place-items:center; margin-left:-5px; border-radius:999px; border:2px solid var(--panel-strong); background:var(--info); color:#06131d; font-size:10px; font-weight:900; font-variant-numeric:tabular-nums; }
.im-viewer:first-child { margin-left:0; }
.im-viewer.me { background:#35513d; color:var(--text); }

.im-thread { display:flex; flex-direction:column; min-width:0; min-height:0; }
.im-thread-head { display:flex; align-items:center; gap:12px; padding:13px 18px; border-bottom:1px solid var(--line); }
.im-thread-head .im-avatar { flex-basis:40px; width:40px; height:40px; font-size:15px; }
.im-thread-title { flex:1; min-width:0; display:grid; grid-template-columns:minmax(0, 1fr); gap:3px; }
.im-thread-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.im-thread-title > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
.im-thread-title > .im-thread-presence { display:flex; align-items:center; gap:7px; }
.im-thread-presence b { color:var(--info); font-weight:800; }
.im-live-dot { flex:0 0 auto; width:7px; height:7px; border-radius:50%; background:var(--info); box-shadow:0 0 0 4px rgba(121,200,255,.14); }
.im-live-dot.quiet { background:#4f6b57; box-shadow:none; }
.im-back { display:none; flex:0 0 auto; }
.im-messages { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding:16px 22px 8px; background:radial-gradient(circle at 50% 0%, rgba(82,158,91,.05), transparent 40%); }
.im-day { align-self:center; margin:10px 0 4px; }
.im-day span { padding:4px 11px; border-radius:999px; background:rgba(255,255,255,.05); color:var(--muted); font-size:11px; font-weight:700; }
.im-message { display:flex; }
.im-message.mine { justify-content:flex-end; }
.im-bubble { max-width:min(72%, 620px); padding:9px 13px 7px; border:1px solid var(--line); border-radius:16px 16px 16px 5px; background:var(--card); }
.im-message.mine .im-bubble { border-radius:16px 16px 5px 16px; border-color:rgba(142,240,138,.2); background:#17351f; }
.im-author { margin-bottom:3px; color:var(--info); font-size:11.5px; font-weight:850; }
.im-message.staff .im-author { color:var(--green); }
.im-bubble p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; font-size:14px; }
.im-bubble .attachment-strip { margin-top:8px; }
.im-bubble time { display:block; margin-top:3px; text-align:right; color:#7c9282; font-size:10.5px; font-variant-numeric:tabular-nums; }
.im-typing { min-height:22px; display:flex; align-items:center; gap:8px; padding:0 22px; color:var(--muted); font-size:12px; }
.im-typing-dots { display:inline-flex; gap:3px; }
.im-typing-dots i { width:5px; height:5px; border-radius:50%; background:var(--green); animation:im-typing 1.2s infinite ease-in-out; }
.im-typing-dots i:nth-child(2) { animation-delay:.15s; }
.im-typing-dots i:nth-child(3) { animation-delay:.3s; }
@keyframes im-typing { 0%, 60%, 100% { opacity:.25; transform:translateY(0); } 30% { opacity:1; transform:translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .im-typing-dots i { animation:none; opacity:.7; } }
.im-compose { display:grid; gap:9px; padding:10px 18px 16px; border-top:1px solid var(--line); }
.im-compose-row { display:flex; gap:10px; align-items:flex-end; }
.im-compose-row textarea { flex:1; min-height:46px; max-height:160px; padding:12px 14px; resize:none; line-height:1.45; }
.im-compose .thread-actions { margin-top:0; }
.im-compose .thread-actions:empty { display:none; }
.im-compose .closed-banner { margin:0; }
.im-hint { margin:0; color:#6f8575; font-size:11px; }
.im-close-form { flex:1; display:flex; gap:8px; flex-wrap:wrap; }
.im-close-form input { flex:1; min-width:200px; padding-top:10px; padding-bottom:10px; }
.im-delete-warning { flex-basis:100%; margin:0; color:#ffb0b7; font-size:13px; line-height:1.45; }
.im-compose .thread-actions .im-delete-button { margin-left:auto; }
.im-placeholder { margin:auto; max-width:440px; }
.im-new-form { overflow-y:auto; max-width:660px; padding:6px 22px 22px; }

@media (max-width: 920px) {
  .im-shell { grid-template-columns:1fr; height:calc(100vh - 140px); }
  .im-shell.has-thread .im-sidebar { display:none; }
  .im-shell:not(.has-thread) .im-thread { display:none; }
  .im-back { display:grid; }
}

@media (max-width: 620px) {
  .im-shell { border-radius:18px; }
  .im-thread-head { padding:10px 12px; gap:9px; }
  .im-thread-head .status-chip { display:none; }
  .im-messages { padding:12px 12px 6px; }
  .im-bubble { max-width:86%; }
  .im-compose { padding:8px 12px 12px; }
  .im-compose .thread-actions { gap:6px; }
  .im-compose .thread-actions button { min-height:34px; padding:0 11px; font-size:12px; border-radius:11px; }
  .im-hint { display:none; }
}

/* Сворачиваемое левое меню: узкая полоса иконок с подсказками */
.brand-block { position:relative; }
.brand-copy { min-width:0; flex:1; }
.sidebar-toggle { flex:0 0 auto; width:32px; height:32px; margin-left:auto; border:1px solid var(--line); border-radius:10px; font-size:18px; line-height:1; transition:transform .2s ease; }
.app-shell { transition:grid-template-columns .22s ease; }
@media (min-width: 921px) {
  .app-shell.nav-collapsed { grid-template-columns:84px minmax(0,1fr); }
  .nav-collapsed .sidebar { padding:20px 12px; gap:16px; }
  .nav-collapsed .brand-block { flex-direction:column; gap:10px; padding:4px 0 14px; }
  .nav-collapsed .brand-block img { width:40px; height:40px; }
  .nav-collapsed .brand-copy,
  .nav-collapsed .nav-label,
  .nav-collapsed .sidebar-profile-copy { display:none; }
  .nav-collapsed .sidebar-toggle { margin-left:0; transform:rotate(180deg); }
  .nav-collapsed .nav-section-label { height:1px; margin:10px 8px; padding:0; overflow:hidden; font-size:0; background:var(--line); }
  .nav-collapsed .nav-item { justify-content:center; padding:11px 0; }
  .nav-collapsed .nav-icon { width:auto; font-size:18px; }
  .nav-collapsed .nav-badge { position:absolute; top:3px; right:3px; min-width:18px; height:18px; padding:0 5px; font-size:10px; }
  .nav-collapsed .sidebar-profile { flex-direction:column; padding:10px 6px; }
}
@media (prefers-reduced-motion: reduce) { .app-shell, .sidebar-toggle { transition:none; } }

/* Фильтры диалогов и отчётов переносятся на новую строку и видны целиком */
.im-filters { flex-wrap:wrap; overflow:visible; }

/* «Ошибки пользователей»: трекер ошибок — тот же принцип, что у поддержки,
   но свой янтарный цвет, номера отчётов и полосы статусов. */
.bug-shell { --bug:#ffc76a; --bug-soft:rgba(255,199,106,.1); --bug-line:rgba(255,199,106,.22); display:grid; grid-template-columns:minmax(300px, 380px) minmax(0, 1fr); height:calc(100vh - 190px); min-height:520px; border:1px solid var(--bug-line); border-radius:var(--radius-xl); background:linear-gradient(180deg, rgba(34,27,12,.55), rgba(15,22,16,.94) 140px), var(--panel); overflow:hidden; }
.bug-sidebar { display:flex; flex-direction:column; min-height:0; border-right:1px solid var(--bug-line); }
.bug-summary { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; padding:14px 14px 4px; }
.bug-stat { display:grid; gap:2px; padding:9px 10px; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.18); color:var(--muted); font-size:11px; }
.bug-stat b { color:var(--text); font-size:20px; font-variant-numeric:tabular-nums; }
.bug-stat.new b { color:var(--bug); }
.bug-stat.in_progress b { color:var(--info); }
.bug-stat.fixed b { color:var(--green); }
.bug-sidebar-head { display:flex; gap:8px; padding:10px 14px; }
.bug-sidebar-head .feed-search { flex:1; min-width:0; }
.bug-sidebar-head input { padding-top:11px; padding-bottom:11px; }
.bug-new { flex:0 0 auto; width:46px; border:0; border-radius:14px; background:var(--bug); color:#1d1406; font-size:22px; font-weight:900; }
.bug-filters { display:flex; flex-wrap:wrap; gap:6px; padding:0 14px 12px; border-bottom:1px solid var(--bug-line); }
.bug-filter { display:inline-flex; align-items:center; gap:5px; padding:7px 11px; border:1px solid var(--line); border-radius:9px; background:transparent; color:#cdbf9f; font:inherit; font-size:11px; font-weight:850; }
.bug-filter span { opacity:.7; font-variant-numeric:tabular-nums; }
.bug-filter.active { background:var(--bug); border-color:var(--bug); color:#1d1406; }
.bug-list { flex:1; min-height:0; overflow-x:hidden; overflow-y:auto; }
.bug-empty-list { padding:34px 22px; color:var(--muted); text-align:center; line-height:1.55; font-size:13px; }
.bug-item { width:100%; display:grid; gap:5px; padding:12px 14px 12px 17px; border:0; border-bottom:1px solid rgba(255,199,106,.07); background:transparent; color:var(--text); text-align:left; box-shadow:inset 4px 0 var(--status-color, var(--muted)); }
.bug-item:hover { background:var(--bug-soft); }
.bug-item.active { background:rgba(255,199,106,.14); }
.bug-item:focus-visible { outline:2px solid var(--bug); outline-offset:-2px; }
.bug-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13.5px; }
.bug-item.unread strong { color:var(--bug); }
.bug-item-top { display:flex; justify-content:space-between; gap:8px; }
.bug-item-top time { color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.bug-item-meta { display:flex; align-items:center; gap:8px; min-width:0; color:var(--muted); font-size:11px; }
.bug-item-meta > span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bug-new-dot { margin-left:auto; color:var(--bug); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.bug-number { color:var(--bug); font-size:12px; font-weight:900; font-variant-numeric:tabular-nums; white-space:nowrap; }
.bug-number.large { font-size:14px; }
.bug-who { display:inline-flex; align-items:center; gap:8px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:850; font-size:13px; }
.bug-avatar { flex:0 0 auto; width:24px; height:24px; display:grid; place-items:center; border-radius:8px; background:rgba(255,199,106,.16); color:var(--bug, #ffc76a); font-size:12px; font-weight:900; }
.bug-avatar.large { width:42px; height:42px; border-radius:13px; font-size:17px; }
.bug-reporter { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.bug-reporter > div { display:grid; gap:2px; min-width:0; }
.bug-reporter strong { font-size:15px; }
.bug-reporter span { color:var(--muted); font-size:12px; }
.bug-quote { margin:0; padding:12px 14px; border-left:3px solid var(--bug, #ffc76a); border-radius:0 12px 12px 0; background:rgba(255,199,106,.07); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; font-size:14.5px; }
.bug-report-message { border-color:rgba(255,199,106,.28); }
.bug-pill { display:inline-flex; align-items:center; padding:3px 8px; border-radius:6px; background:rgba(255,255,255,.05); color:var(--status-color, var(--muted)); font-size:10.5px; font-weight:850; white-space:nowrap; border:1px solid currentColor; }
.status-new { --status-color:var(--bug, #ffc76a); }
.status-in_progress { --status-color:var(--info); }
.status-fixed { --status-color:var(--green); }
.status-rejected { --status-color:#b39ddb; }
.status-closed { --status-color:#7d8a80; }

.bug-detail { display:flex; flex-direction:column; min-width:0; min-height:0; }
.bug-detail-head { display:flex; align-items:flex-start; gap:12px; padding:16px 20px; border-bottom:1px solid var(--bug-line); }
.bug-detail-title { flex:1; min-width:0; display:grid; grid-template-columns:minmax(0,1fr); gap:4px; }
.bug-detail-title strong { font-size:17px; line-height:1.3; }
.bug-detail-title > span:last-child { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bug-back { display:none; flex:0 0 auto; }
.bug-detail-body { flex:1; min-height:0; overflow-y:auto; display:grid; align-content:start; gap:14px; padding:18px 20px 22px; }
.bug-card { padding:16px 18px; border:1px solid var(--line); border-radius:18px; background:rgba(0,0,0,.16); }
.bug-card h4 { margin:0 0 10px; color:var(--bug); font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.bug-description { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.bug-screenshot { display:inline-grid; gap:6px; margin-top:14px; color:var(--muted); font-size:12px; text-decoration:none; }
.bug-screenshot img { max-width:min(100%, 320px); max-height:240px; border-radius:12px; border:1px solid var(--line); object-fit:cover; }
.bug-diagnostics { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:8px 16px; margin:0; }
.bug-diagnostics div { display:grid; gap:2px; min-width:0; }
.bug-diagnostics dt { color:var(--muted); font-size:11px; }
.bug-diagnostics dd { margin:0; font-size:13px; font-weight:700; overflow-wrap:anywhere; }
.bug-status-picker { display:flex; flex-wrap:wrap; gap:6px; }
.bug-status-option { padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:transparent; color:var(--muted); font:inherit; font-size:12px; font-weight:800; }
.bug-status-option.active { border-color:var(--status-color); color:var(--status-color); background:rgba(255,255,255,.05); box-shadow:inset 0 0 0 1px var(--status-color); }
.bug-resolution .field { margin:14px 0 12px; }
.bug-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.bug-primary { min-height:42px; padding:0 18px; border:0; border-radius:13px; background:var(--bug, #ffc76a); color:#1d1406; font-weight:900; }
.bug-primary:hover { filter:brightness(1.05); }
.bug-placeholder { margin:auto; max-width:440px; }
.bug-placeholder .empty-icon { background:rgba(255,199,106,.1); color:#ffc76a; }

@media (max-width: 920px) {
  .bug-shell { grid-template-columns:1fr; height:calc(100vh - 140px); }
  .bug-shell.has-detail .bug-sidebar { display:none; }
  .bug-shell:not(.has-detail) .bug-detail { display:none; }
  .bug-back { display:grid; }
}
@media (max-width: 620px) {
  .bug-shell { border-radius:18px; }
  .bug-detail-head { padding:12px; }
  .bug-detail-body { padding:12px; }
}

/* Вложения внутри переписки и просмотрщик поверх страницы */
.att-strip { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.att-thumb { position:relative; width:168px; height:120px; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:rgba(0,0,0,.25); cursor:zoom-in; }
.att-thumb img { width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .2s ease; }
.att-thumb.ready img { opacity:1; }
.att-thumb.ready .att-loading { display:none; }
.att-thumb:hover { border-color:var(--line-strong); }
.att-thumb:focus-visible, .att-file:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.att-loading { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); font-size:11px; }
.att-file { display:inline-flex; align-items:center; gap:8px; padding:9px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.03); color:var(--text); font:inherit; font-size:12px; font-weight:750; }
.lightbox { position:fixed; inset:0; z-index:300; display:flex; flex-direction:column; background:rgba(3,7,5,.92); backdrop-filter:blur(6px); animation:lightbox-in .16s ease; }
@keyframes lightbox-in { from { opacity:0; } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation:none; } .att-thumb img { transition:none; } }
.lightbox-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; color:var(--muted); font-size:13px; }
.lightbox-bar > div { display:flex; gap:8px; }
.lightbox-button { display:inline-flex; align-items:center; min-height:38px; padding:0 14px; border:1px solid var(--line-strong); border-radius:11px; background:rgba(255,255,255,.06); color:var(--text); font:inherit; font-weight:800; text-decoration:none; cursor:pointer; }
.lightbox-button:hover { background:rgba(255,255,255,.12); }
.lightbox-stage { position:relative; flex:1; min-height:0; display:flex; align-items:center; justify-content:center; padding:0 64px 24px; }
.lightbox-content { position:relative; display:grid; place-items:center; width:100%; height:100%; min-height:0; }
/* Высота — от окна: процент от ячейки сетки без заданной высоты не работал,
   и большой снимок вылезал за экран. */
.lightbox-content img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100vh - 104px); max-height:calc(100dvh - 104px); object-fit:contain; border-radius:10px; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.lightbox-content iframe { width:min(900px, 100%); height:calc(100vh - 104px); height:calc(100dvh - 104px); border:0; border-radius:10px; background:#fff; }
.lightbox-nav { position:absolute; top:50%; transform:translateY(-50%); width:46px; height:64px; border:1px solid var(--line-strong); border-radius:14px; background:rgba(255,255,255,.06); color:var(--text); font-size:30px; }
.lightbox-nav:hover { background:rgba(255,255,255,.14); }
.lightbox-nav.prev { left:12px; }
.lightbox-nav.next { right:12px; }
@media (max-width: 620px) {
  .att-thumb { width:132px; height:96px; }
  .lightbox-stage { padding:0 8px 12px; }
  .lightbox-nav { top:auto; bottom:18px; transform:none; }
}

/* Адреса от пользователей и быстрая нумерация домов */
.suggestion-list { display:grid; gap:8px; }
.suggestion-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.02); }
.suggestion-copy { display:grid; gap:3px; min-width:0; }
.suggestion-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.suggestion-copy span { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.quick-grid { display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); gap:18px; }
.quick-form .field { margin:10px 0; }
.quick-hint { margin:4px 0 10px; line-height:1.45; font-size:13px; }
.quick-list { display:flex; flex-wrap:wrap; gap:6px; max-height:180px; overflow-y:auto; margin-bottom:12px; }
.quick-chip { padding:5px 9px; border:1px solid var(--line); border-radius:9px; background:rgba(142,240,138,.06); font-size:12px; font-weight:750; }
.quick-actions { display:flex; gap:8px; flex-wrap:wrap; }
.quick-marker { min-width:28px; height:28px; padding:0 6px; display:grid; place-items:center; border:2px solid #fff; border-radius:9px; background:#1f7a3a; color:#fff; font-size:12px; font-weight:900; box-shadow:0 4px 12px rgba(0,0,0,.35); }
@media (max-width: 920px) { .quick-grid { grid-template-columns:1fr; } .suggestion-row { flex-direction:column; align-items:flex-start; } }

/* Главная личного кабинета */
.recent-rides { display:grid; gap:10px; }
.recent-ride { display:flex; justify-content:space-between; gap:14px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.02); }
.recent-ride > div:first-child { display:grid; gap:3px; min-width:0; }
.recent-ride strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.recent-ride span { color:var(--muted); font-size:12px; }
.recent-ride-side { display:grid; gap:3px; justify-items:end; text-align:right; font-variant-numeric:tabular-nums; }
.quick-buttons { display:grid; gap:10px; }
.quick-buttons button { width:100%; }

/* Переписка в отчёте об ошибке */
.bug-replies { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.bug-reply { max-width:78%; padding:9px 12px; border:1px solid var(--line); border-radius:14px 14px 14px 4px; background:rgba(255,255,255,.03); }
.bug-reply.mine { align-self:flex-end; border-radius:14px 14px 4px 14px; border-color:rgba(255,199,106,.3); background:rgba(255,199,106,.08); }
.bug-reply-author { color:var(--bug, #ffc76a); font-size:11.5px; font-weight:850; margin-bottom:3px; }
.bug-reply p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }
.bug-reply time { display:block; margin-top:3px; color:var(--muted); font-size:10.5px; text-align:right; }
.bug-reply-compose { display:flex; gap:10px; align-items:flex-end; }
.bug-reply-compose textarea { flex:1; min-height:46px; max-height:160px; resize:vertical; }

/* Отчёт об ошибке — один чат: статус кнопками сверху, поле ответа снизу */
.bug-status-bar { display:flex; flex-wrap:wrap; gap:6px; padding:10px 20px; border-bottom:1px solid var(--bug-line, rgba(255,199,106,.22)); }
.bug-detail-title small { color:var(--muted); font-size:12px; font-weight:600; }
.bug-chat { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:16px 20px; }
.bug-chat .bug-reply { max-width:min(78%, 640px); }
.bug-first { border-color:rgba(255,199,106,.35); }
.bug-device { margin-top:6px; color:var(--muted); font-size:11.5px; }
.bug-chat-hint { align-self:center; margin:10px 0; color:var(--muted); font-size:13px; }
.bug-compose { display:grid; gap:8px; padding:10px 20px 16px; border-top:1px solid var(--bug-line, rgba(255,199,106,.22)); }
.bug-compose textarea { min-height:44px; max-height:160px; resize:none; padding:11px 13px; line-height:1.45; }
.bug-quick { display:flex; flex-wrap:wrap; gap:6px; }
.bug-quick-reply { padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:rgba(255,199,106,.06); color:#e8d8b4; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.bug-quick-reply:hover { border-color:rgba(255,199,106,.45); }
@media (max-width: 620px) { .bug-status-bar, .bug-chat, .bug-compose { padding-left:12px; padding-right:12px; } .bug-chat .bug-reply { max-width:88%; } }

/* Быстрые фразы в поддержке */
.im-quick { display:flex; flex-wrap:wrap; gap:6px; }
.im-quick-reply { padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:rgba(142,240,138,.05); color:#cfe3d2; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.im-quick-reply:hover { border-color:var(--line-strong); }

/* ── Управление ─────────────────────────────────────────────────── */
.status-chip.warn { color:var(--warning); border-color:rgba(255,199,106,.3); background:rgba(255,199,106,.07); }
.status-chip.info { color:var(--info); border-color:rgba(121,200,255,.28); background:rgba(121,200,255,.07); }
.text-danger { color:#ffb0b7 !important; }
.segmented { display:inline-flex; flex-wrap:wrap; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:rgba(255,255,255,.02); }
.segmented button { border:0; background:transparent; color:#bdd0c0; padding:9px 13px; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.segmented button + button { border-left:1px solid var(--line); }
.segmented button.active { background:var(--green); color:#07100b; }
.segmented button:focus-visible, .control-tile:focus-visible, .attention-item:focus-visible, .clickable-row:focus-visible, .access-levels button:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
.tab-count { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:6px; padding:0 5px; border-radius:999px; background:var(--warning); color:#07100b; font-size:11px; }
.feed-tab.active .tab-count { background:#07100b; color:var(--warning); }
.clickable-row { cursor:pointer; }
.cell-sub { display:block; margin-top:3px; color:var(--muted); font-size:11px; font-weight:600; }
.plate-inline { font-family:ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing:.06em; }
.plate { display:inline-block; padding:3px 8px; border-radius:6px; border:1px solid rgba(245,255,246,.4); background:rgba(245,255,246,.06); font-family:ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing:.08em; font-weight:800; }
.empty-state.compact { padding:34px 18px; }
.attention-panel { margin-top:18px; }
.attention-list { display:grid; gap:8px; }
.attention-item { display:flex; align-items:center; gap:14px; width:100%; padding:12px 16px; border-radius:14px; border:1px solid rgba(255,199,106,.26); background:rgba(255,199,106,.05); color:var(--text); font:inherit; text-align:left; cursor:pointer; transition:.15s ease; }
.attention-item:hover { border-color:rgba(255,199,106,.5); background:rgba(255,199,106,.09); }
.attention-item b { min-width:36px; font-size:20px; color:var(--warning); font-variant-numeric:tabular-nums; }
.attention-item span { flex:1; font-weight:700; }
.attention-item i { font-style:normal; color:var(--muted); font-size:20px; }
.calm-note { margin:0; }
.control-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:14px; margin-top:18px; }
.control-tile { display:flex; flex-direction:column; gap:14px; padding:18px; border-radius:20px; border:1px solid var(--line); background:var(--panel); color:var(--text); font:inherit; text-align:left; cursor:pointer; transition:.15s ease; }
.control-tile:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.control-tile.alert { border-color:rgba(255,199,106,.38); }
.control-tile p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.control-tile-head { display:flex; align-items:center; gap:12px; }
.control-tile-head h3 { flex:1; margin:0; font-size:16px; }
.control-tile-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:rgba(142,240,138,.09); color:var(--green); font-size:17px; }
.control-tile .chevron { color:var(--muted); font-size:20px; }
.control-metrics { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.control-metrics strong { display:block; font-size:21px; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.control-metrics span { display:block; margin-top:3px; color:var(--muted); font-size:11px; line-height:1.3; }
.control-modal { width:min(640px, 100%); }
.wide-modal.control-modal { width:min(920px, 96vw); }
.detail-title { margin:20px 0 10px; color:var(--green); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.12em; }
.detail-columns { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:18px; }
.route-list { margin:18px 0 6px; padding:0 0 0 22px; display:grid; gap:8px; }
.route-list li { padding-left:4px; font-weight:700; line-height:1.4; }
.route-list li::marker { color:var(--green); }
.order-items { display:grid; gap:8px; }
.order-item { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:11px 13px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.02); }
.order-item small { display:block; margin-top:4px; color:var(--muted); font-size:12px; }
.order-item small.item-removed { color:var(--warning); font-weight:800; }
.order-item b { white-space:nowrap; font-variant-numeric:tabular-nums; }
.decision-box { margin-top:12px; padding:4px 16px 14px; border-radius:16px; border:1px solid rgba(255,122,131,.25); background:rgba(255,122,131,.05); }
.warn-callout { border-color:rgba(255,199,106,.35) !important; background:rgba(255,199,106,.07) !important; color:#ffe2ad !important; }
.history-list { margin:0; padding:0; list-style:none; display:grid; gap:8px; }
.history-list li { padding:10px 13px; border-left:2px solid var(--line-strong); background:rgba(255,255,255,.02); border-radius:0 12px 12px 0; }
.history-list li span { margin-left:10px; color:var(--muted); font-size:12px; }
.history-list li p { margin:6px 0 0; color:#c4d3c6; white-space:pre-wrap; }
.review-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.review-card { padding:15px 16px; border-radius:16px; border:1px solid var(--line); background:rgba(255,255,255,.02); }
.review-card.low { border-color:rgba(255,122,131,.3); }
.review-card p { margin:8px 0 10px; color:#d6e4d8; line-height:1.5; white-space:pre-wrap; }
.review-head { display:flex; justify-content:space-between; gap:10px; font-size:12px; }
.stars { color:var(--warning); letter-spacing:2px; font-size:14px; }
.menu-list { display:grid; gap:8px; }
.menu-row { padding:11px 13px; border:1px solid var(--line); border-radius:13px; }
.menu-row.muted-row { opacity:.6; }
.ingredient-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.ingredient-chip { padding:3px 9px; border-radius:999px; border:1px solid var(--line); color:#cfe3d2; font-size:11px; font-weight:700; }
.ingredient-chip.removable { border-style:dashed; border-color:rgba(255,199,106,.45); color:#ffe2ad; }
.module-list { display:grid; gap:10px; }
.module-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 18px; align-items:center; padding:14px 16px; border:1px solid var(--line); border-radius:16px; }
.module-main h4 { margin:0 0 4px; }
.module-main p { margin:0; color:var(--muted); font-size:12px; }
.module-controls { display:flex; align-items:center; gap:16px; flex-wrap:wrap; justify-content:flex-end; }
.module-controls select { width:auto; min-width:190px; }
.module-message { grid-column:1 / -1; }
.module-save { grid-column:1 / -1; display:flex; justify-content:flex-end; }
.system-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
.flag-list, .lab-list { display:grid; gap:4px; }
.flag-row { padding:9px 2px; border-bottom:1px solid var(--line); }
.flag-row:last-child { border-bottom:0; }
.lab-row { padding:12px 0; border-bottom:1px solid var(--line); }
.lab-row:last-child { border-bottom:0; }
.lab-row p { margin:6px 0 10px 50px; font-size:12px; }
.lab-controls { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-left:50px; }
.lab-controls select { width:auto; min-width:200px; }
.lab-percent { display:inline-flex; align-items:center; gap:6px; }
.lab-percent input { width:80px; }
.switch-row { display:flex; align-items:center; gap:10px; font-size:13px; font-weight:700; color:#d6e4d8; cursor:pointer; }
.switch { position:relative; display:inline-block; width:40px; height:22px; flex:none; }
.switch input { position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; }
.switch i { position:absolute; inset:0; border-radius:999px; background:rgba(255,255,255,.12); border:1px solid var(--line); transition:.15s ease; pointer-events:none; }
.switch i::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#d6e4d8; transition:.15s ease; }
.switch input:checked + i { background:var(--green-dark); border-color:var(--green); }
.switch input:checked + i::after { left:20px; background:var(--green); }
.switch input:focus-visible + i { outline:2px solid var(--green); outline-offset:2px; }
.switch input:disabled + i { opacity:.5; }
.access-quick { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:6px 0 12px; font-size:12px; }
.access-list { display:grid; gap:8px; max-height:58vh; overflow:auto; padding-right:4px; }
.access-row { border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.015); transition:border-color .15s ease; }
.access-row.on { border-color:var(--line-strong); background:rgba(142,240,138,.03); }
.access-main { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:11px 14px; }
.access-main h4 { margin:0 0 3px; font-size:14px; }
.access-main p { margin:0; color:var(--muted); font-size:12px; }
.access-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:rgba(142,240,138,.08); color:var(--green); }
.access-levels { display:inline-flex; border:1px solid var(--line); border-radius:11px; overflow:hidden; }
.access-levels button { border:0; background:transparent; color:#bdd0c0; padding:8px 12px; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.access-levels button + button { border-left:1px solid var(--line); }
.access-levels button.active { background:var(--green); color:#07100b; }
.access-levels button[data-level="none"].active { background:rgba(255,122,131,.16); color:#ffb0b7; }
.access-more { border:0; background:transparent; color:var(--green); font:inherit; font-size:12px; font-weight:800; cursor:pointer; white-space:nowrap; }
.access-count { color:var(--muted); font-weight:700; }
.access-detail { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:0 18px; padding:2px 14px 12px 60px; }
.access-detail .permission-item.locked { opacity:.55; }
.access-detail em { color:var(--muted); font-style:normal; }
.access-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; }
.access-chip { padding:3px 8px; border-radius:999px; border:1px solid var(--line); color:#cfe3d2; font-size:11px; font-weight:700; }
.access-chip.full { border-color:rgba(142,240,138,.4); color:var(--green); }
@media (max-width: 920px) {
  .detail-columns, .review-list, .system-grid { grid-template-columns:1fr; }
  .module-row { grid-template-columns:1fr; }
  .module-controls { justify-content:flex-start; }
}
@media (max-width: 760px) {
  .access-main { grid-template-columns:auto minmax(0,1fr); }
  .access-levels { grid-column:1 / -1; }
  .access-levels button { flex:1; }
  .access-more { grid-column:1 / -1; text-align:left; }
  .access-detail { grid-template-columns:1fr; padding-left:14px; }
  .lab-row p, .lab-controls { margin-left:0; }
  .toolbar .segmented { width:100%; }
  .toolbar .segmented button { flex:1; }
}
@media (prefers-reduced-motion: reduce) { .control-tile, .attention-item, .switch i, .switch i::after { transition:none; } .control-tile:hover { transform:none; } }
.modal .access-list { max-height:none; overflow:visible; padding-right:0; }

/* Меню и состав блюд */
.layer-backdrop { z-index:200; }
.dish-modal { width:min(780px, 96vw); }
.rest-menu:not(:empty) { margin-top:8px; }
.menu-group + .menu-group { margin-top:4px; }
.menu-legend { display:flex; align-items:center; gap:8px; margin:0 0 4px; font-size:11px; }
.menu-row-head { display:flex; justify-content:space-between; gap:12px; }
.menu-row-head b { white-space:nowrap; font-variant-numeric:tabular-nums; }
.menu-row.clickable-row:hover { border-color:var(--line-strong); }
.ingredients-editor { margin:6px 0 14px; padding:14px 16px 16px; border:1px solid var(--line-strong); border-radius:18px; background:rgba(142,240,138,.03); }
.ingredients-head h4 { margin:0 0 4px; font-size:15px; }
.ingredients-head p { margin:0 0 12px; font-size:12px; line-height:1.5; }
.ingredient-rows { display:grid; gap:6px; }
.ingredient-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:6px 6px 6px 13px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.02); }
.ingredient-row.removable { border-style:dashed; border-color:rgba(255,199,106,.45); }
.ingredient-name { font-weight:700; overflow-wrap:anywhere; }
.ingredient-row .switch-row { font-size:12px; color:var(--muted); }
.ingredient-row.removable .switch-row { color:#ffe2ad; }
.ingredient-empty { margin:0; padding:10px 0; }
.ingredient-add { display:flex; gap:8px; margin-top:10px; }
.ingredient-add input { flex:1; min-width:0; }
.dish-stock { display:flex; flex-wrap:wrap; align-items:center; gap:4px 22px; }
.dish-stock .field { margin:6px 0; min-width:160px; }
.form-error { margin:10px 0 0; color:#ffb0b7; font-weight:700; }
@media (max-width: 620px) {
  .ingredient-row { grid-template-columns:minmax(0,1fr) auto; }
  .ingredient-row .switch-row { grid-column:1; grid-row:2; }
  .ingredient-row .icon-button { grid-row:1 / span 2; grid-column:2; }
  .ingredient-add { flex-direction:column; }
}

.dish-kind { margin:2px 0 6px; }
.kind-mark { margin-right:6px; }
.menu-description { margin:6px 0 0; color:#c4d3c6; font-size:12px; line-height:1.45; }

/* Прокрутка меню, окон и списков не перетекает на страницу: докрутили
   меню до конца — страница справа остаётся на месте. */
.navigation, .modal, .access-list, .ticket-list, .thread-messages, .im-dialogs, .im-messages, .conversation-stream, .permissions-grid { overscroll-behavior:contain; }

/* ── Меню бизнеса ──────────────────────────────────────────────── */
.biz-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px, 360px); gap:24px; padding:26px 28px; border-radius:var(--radius-xl); border:1px solid var(--line-strong); background:linear-gradient(135deg, rgba(31,97,50,.35), rgba(15,28,19,.92) 60%); }
.biz-main h2 { margin:8px 0 6px; font-size:clamp(26px, 3vw, 38px); letter-spacing:-.04em; }
.biz-main p { margin:0 0 14px; color:#c3d4c6; }
.biz-controls { display:grid; gap:14px; align-content:start; padding:16px 18px; border-radius:20px; background:rgba(5,18,10,.5); border:1px solid var(--line); }
.biz-open { font-size:14px; }
.hours-edit { display:grid; gap:8px; }
.hours-edit-label { color:var(--muted); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.1em; }
.hours-inputs { display:flex; gap:10px; flex-wrap:wrap; }
.hours-inputs label { display:inline-flex; align-items:center; gap:8px; color:#cfddd1; font-weight:700; }
.hours-inputs input { width:118px; color-scheme:dark; font-variant-numeric:tabular-nums; }
.hours-inputs input:disabled { opacity:.45; }
.hours-pill { display:inline-flex; align-items:center; gap:8px; padding:7px 13px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.04); color:#d6e4d8; font-size:13px; font-weight:800; white-space:nowrap; }
.hours-pill i { width:8px; height:8px; border-radius:50%; background:currentColor; }
.hours-pill.open { color:var(--green); border-color:rgba(142,240,138,.35); background:rgba(142,240,138,.07); }
.hours-pill.closing { color:#ffb0b7; border-color:rgba(255,122,131,.6); background:rgba(255,122,131,.13); animation:closing-glow 1.6s ease-in-out infinite; }
.hours-pill.closed { color:#ff9aa2; border-color:rgba(255,122,131,.35); background:rgba(255,122,131,.08); }
.hours-pill.off { color:var(--muted); }
.data-table .hours-pill { font-size:11px; padding:5px 10px; }
@keyframes closing-glow { 0%, 100% { box-shadow:0 0 0 0 rgba(255,122,131,.5); } 50% { box-shadow:0 0 0 6px rgba(255,122,131,0); } }

.menu-summary { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:10px; margin-bottom:16px; }
.menu-stat { display:grid; gap:2px; padding:12px 14px; border-radius:16px; border:1px solid var(--line); background:rgba(255,255,255,.02); color:var(--text); font:inherit; text-align:left; cursor:pointer; transition:.15s ease; }
.menu-stat b { font-size:24px; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.menu-stat span { color:var(--muted); font-size:12px; font-weight:700; }
.menu-stat:hover { border-color:var(--line-strong); }
.menu-stat.active { border-color:var(--green); background:rgba(142,240,138,.08); }
.menu-stat.in b { color:var(--green); }
.menu-stat.out b { color:#ff9aa2; }
.menu-stat.hidden b { color:var(--muted); }
.menu-stat.nocomp b { color:var(--warning); }
.menu-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.menu-toolbar input { flex:1; min-width:200px; }
.menu-add { display:flex; gap:8px; flex-wrap:wrap; }
.menu-cats { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:6px; scrollbar-width:thin; }
.menu-cats:empty { display:none; }
.menu-cats button { display:inline-flex; align-items:center; gap:7px; flex:none; padding:8px 12px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.025); color:#cfddd1; font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.menu-cats button b { color:var(--muted); font-weight:800; }
.menu-cats button:disabled { opacity:.4; cursor:default; }
.menu-section { padding-top:14px; scroll-margin-top:16px; }
.menu-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 12px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.menu-section-head h4 { margin:0; font-size:18px; letter-spacing:-.02em; }
.menu-section-head span { color:var(--muted); font-size:12px; }
.dish-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:14px; }
.dish-card { display:flex; flex-direction:column; border-radius:20px; border:1px solid var(--line); background:var(--card); overflow:hidden; transition:border-color .15s ease; }
.dish-card:hover { border-color:var(--line-strong); }
.dish-card.is-hidden { border-style:dashed; opacity:.72; }
.dish-card.is-out .dish-photo img, .dish-card.is-out .dish-photo > span { filter:grayscale(1); opacity:.55; }
.dish-photo { position:relative; aspect-ratio:16 / 10; display:grid; place-items:center; background:radial-gradient(circle at 30% 20%, rgba(142,240,138,.14), transparent 60%), #0d1a12; overflow:hidden; }
.dish-photo img { width:100%; height:100%; object-fit:cover; }
.dish-photo > span { font-size:46px; }
.dish-badges { position:absolute; top:10px; left:10px; right:10px; display:flex; flex-wrap:wrap; gap:6px; }
.dish-badge { padding:4px 9px; border-radius:999px; font-size:11px; font-weight:900; background:rgba(7,16,11,.85); border:1px solid var(--line); color:#d6e4d8; }
.dish-badge.out { color:#ffd0d4; background:rgba(160,30,42,.85); border-color:rgba(255,122,131,.6); }
.dish-badge.warn { color:#07100b; background:var(--warning); border-color:var(--warning); }
.dish-body { display:flex; flex-direction:column; gap:6px; flex:1; padding:14px 15px 12px; }
.dish-title { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.dish-title h5 { margin:0; font-size:15px; line-height:1.3; }
.dish-title b { color:var(--green); white-space:nowrap; font-size:15px; font-variant-numeric:tabular-nums; }
.dish-meta { color:var(--muted); font-size:12px; font-weight:700; }
.dish-desc { margin:0; color:#c4d3c6; font-size:12px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.dish-body .ingredient-chips { margin-top:2px; }
.ingredient-chip.more { color:var(--muted); }
.dish-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; border-top:1px solid var(--line); background:rgba(0,0,0,.12); }
.dish-actions .spacer { flex:1; }
.dish-actions .secondary-button, .dish-actions .ghost-button { min-height:34px; padding:0 12px; border-radius:10px; font-size:12px; }
.ghost-button { background:transparent; color:#cfddd1; border:1px solid var(--line); }
.stock-switch { font-size:12px; color:var(--green); }
.stock-switch.out { color:#ff9aa2; }
.stock-stepper { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.stock-stepper button { width:32px; height:32px; border:0; background:rgba(255,255,255,.04); color:var(--text); font:inherit; font-size:16px; font-weight:900; cursor:pointer; }
.stock-stepper button:disabled { opacity:.35; cursor:default; }
.stock-stepper span { min-width:92px; padding:0 8px; text-align:center; font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; }
.stock-stepper.out { border-color:rgba(255,122,131,.5); }
.stock-stepper.out span { color:#ff9aa2; }
.dish-photo-edit { display:grid; grid-template-columns:150px minmax(0,1fr); gap:16px; align-items:center; margin:10px 0 4px; }
.dish-photo.big { aspect-ratio:1 / 1; border-radius:18px; border:1px solid var(--line); }
.dish-photo-controls { display:grid; gap:6px; justify-items:start; }
.dish-photo-controls p { margin:0; font-size:12px; }
.stock-mode { margin:6px 0 10px; padding:14px 16px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.015); }
.stock-mode-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.stock-mode-head h4 { margin:0; font-size:15px; }
.stock-mode p { margin:8px 0 6px; font-size:12px; line-height:1.5; }
.stock-mode .field { margin:8px 0 0; max-width:200px; }
@media (max-width: 920px) {
  .biz-hero { grid-template-columns:1fr; padding:22px 18px; }
}
@media (max-width: 620px) {
  .dish-grid { grid-template-columns:1fr; }
  .dish-photo-edit { grid-template-columns:96px minmax(0,1fr); }
  .menu-add { width:100%; }
  .menu-add button { flex:1; }
  .hours-pill { white-space:normal; }
}
@media (prefers-reduced-motion: reduce) { .hours-pill.closing { animation:none; } }
.dish-buttons { display:flex; gap:6px; margin-left:auto; }

/* ── Табло заказов заведения ───────────────────────────────────── */
.board-head { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) auto; gap:18px; align-items:center; padding:18px 20px; border-radius:var(--radius-xl); border:1px solid var(--line-strong); background:linear-gradient(135deg, rgba(31,97,50,.3), rgba(15,28,19,.92) 60%); }
.board-identity { display:flex; align-items:center; gap:14px; min-width:0; }
.board-identity h2 { margin:0 0 8px; font-size:22px; letter-spacing:-.03em; overflow-wrap:anywhere; }
.board-logo { width:58px; height:58px; flex:none; display:grid; place-items:center; border-radius:18px; background:rgba(142,240,138,.1); border:1px solid var(--line); overflow:hidden; color:var(--green); font-size:24px; }
.board-logo img { width:100%; height:100%; object-fit:cover; }
.board-stats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
.board-stats div, .biz-today div { padding:10px 12px; border-radius:14px; background:rgba(5,18,10,.45); border:1px solid var(--line); }
.board-stats b, .biz-today b { display:block; font-size:20px; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.board-stats span, .biz-today span { color:var(--muted); font-size:11px; font-weight:700; }
.board-controls { display:grid; gap:8px; justify-items:stretch; min-width:200px; }
.board-controls .ghost-button, .board-controls .primary-button { min-height:38px; }
.board-grid { display:grid; grid-template-columns:repeat(4, minmax(240px, 1fr)); gap:14px; margin-top:16px; align-items:start; overflow-x:auto; padding-bottom:6px; }
.board-column { border-radius:20px; border:1px solid var(--line); background:rgba(255,255,255,.015); min-height:180px; }
.board-column > header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); }
.board-column > header h3 { margin:0; font-size:14px; }
.board-column > header b { min-width:26px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.06); text-align:center; font-variant-numeric:tabular-nums; }
.board-column.new > header { background:rgba(255,199,106,.07); }
.board-column.new > header b { background:var(--warning); color:#07100b; }
.board-column.cooking > header b { background:rgba(121,200,255,.2); color:var(--info); }
.board-column.ready > header b { background:rgba(142,240,138,.18); color:var(--green); }
.board-list { display:grid; gap:10px; padding:10px; }
.board-empty { margin:18px 6px; color:var(--muted); font-size:12px; text-align:center; }
.order-card { display:grid; gap:9px; padding:13px 14px; border-radius:16px; border:1px solid var(--line); background:var(--card); }
.order-card.is-new { border-color:rgba(255,199,106,.55); animation:new-order 2s ease-in-out infinite; }
.order-card.done { opacity:.82; }
@keyframes new-order { 0%, 100% { box-shadow:0 0 0 0 rgba(255,199,106,.35); } 50% { box-shadow:0 0 0 5px rgba(255,199,106,0); } }
.order-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.order-no { font-size:18px; letter-spacing:.02em; font-variant-numeric:tabular-nums; }
.order-head span { color:var(--muted); font-size:12px; font-weight:700; text-align:right; }
.order-stage { padding:6px 10px; border-radius:10px; font-size:12px; font-weight:800; background:rgba(121,200,255,.08); color:var(--info); }
.order-stage.warn { background:rgba(255,199,106,.1); color:var(--warning); }
.order-stage.late { background:rgba(255,122,131,.12); color:#ffb0b7; }
.order-stage.ok { background:rgba(142,240,138,.09); color:var(--green); }
.order-lines { margin:0; padding:0; list-style:none; display:grid; gap:5px; }
.order-lines li { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; font-size:14px; line-height:1.35; }
.order-lines li b { color:var(--green); font-variant-numeric:tabular-nums; }
.order-lines small { display:block; }
.order-lines .item-removed { color:var(--warning); font-weight:800; font-size:12px; }
.order-comment { padding:8px 10px; border-radius:10px; background:rgba(255,255,255,.03); border-left:3px solid var(--info); font-size:13px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.order-comment span { display:block; margin-bottom:2px; color:var(--muted); font-size:11px; font-weight:800; }
.order-meta { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px; font-weight:700; }
.order-meta b { color:var(--text); font-size:15px; font-variant-numeric:tabular-nums; }
.order-code { padding:7px 10px; border-radius:10px; border:1px dashed var(--line-strong); font-size:12px; color:#cfddd1; }
.order-code b { color:var(--green); font-size:15px; letter-spacing:.12em; }
/* Выдача с двух сторон: чего ждём и от кого. */
.order-wait { padding:8px 10px; border-radius:10px; font-size:12px; font-weight:700; color:var(--muted); background:rgba(255,255,255,.04); }
.order-wait.ok { color:var(--green); background:rgba(128,215,125,.1); }
.order-wait.warn { color:#ffc65c; background:rgba(255,198,92,.12); }
.order-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.order-actions .primary-button { flex:1; min-width:110px; }
.order-actions button { min-height:38px; }
.order-panel { display:grid; gap:8px; padding:10px; border-radius:12px; background:rgba(255,255,255,.03); border:1px solid var(--line); }
.order-panel > span { font-size:12px; font-weight:800; color:#cfddd1; }
.order-panel input { min-height:38px; }
.order-panel.reject { border-color:rgba(255,122,131,.35); }
.prep-chips { display:flex; flex-wrap:wrap; gap:6px; }
.prep-chips button { padding:8px 11px; border-radius:10px; border:1px solid var(--line); background:rgba(255,255,255,.04); color:var(--text); font:inherit; font-size:13px; font-weight:800; cursor:pointer; }
.prep-chips button:hover { border-color:var(--line-strong); }
.prep-chips button.suggested { border-color:var(--green); background:rgba(142,240,138,.12); color:var(--green); }
.danger-link { color:#ff9aa2 !important; }

/* Моё заведение: логотип и «сегодня» */
.biz-identity { display:flex; align-items:center; gap:16px; }
.biz-identity h2 { margin:6px 0 4px; }
.biz-identity p { margin:0; }
.biz-logo { position:relative; width:84px; height:84px; flex:none; display:grid; place-items:center; align-content:center; gap:2px; padding:0; border-radius:22px; border:1px dashed var(--line-strong); background:rgba(142,240,138,.07); color:var(--green); font:inherit; font-size:26px; cursor:pointer; overflow:hidden; }
.biz-logo small { font-size:10px; color:var(--muted); font-weight:800; }
.biz-logo img { width:100%; height:100%; object-fit:cover; }
.biz-logo:hover { border-color:var(--green); }
.biz-main #biz-hours-pill { margin:14px 0 12px; }
.biz-today { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.biz-today:empty { display:none; }
.biz-today .primary-button { grid-column:1 / -1; }

/* Фото товара: поле и обрезка */
.image-field { display:grid; grid-template-columns:170px minmax(0,1fr); gap:16px; align-items:start; margin:10px 0 6px; }
.image-drop { position:relative; aspect-ratio:1 / 1; border-radius:20px; border:2px dashed var(--line-strong); background:#0d1a12; overflow:hidden; cursor:pointer; outline-offset:3px; }
.image-drop.over { border-color:var(--green); background:rgba(142,240,138,.08); }
.image-current { position:absolute; inset:0; display:grid; place-items:center; font-size:48px; }
.image-current img { width:100%; height:100%; object-fit:cover; }
.image-drop-text { position:absolute; left:0; right:0; bottom:0; display:grid; gap:2px; padding:10px; background:linear-gradient(transparent, rgba(0,0,0,.72)); text-align:center; font-size:11px; }
.image-drop-text b { font-size:12px; }
.image-drop-text span { color:#cfddd1; }
.image-field.has-image .image-drop-text { opacity:0; transition:opacity .15s ease; }
.image-field.has-image .image-drop:hover .image-drop-text, .image-field.has-image .image-drop:focus-visible .image-drop-text { opacity:1; }
.image-side { display:grid; gap:12px; }
.image-buttons { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.image-buttons button { min-height:38px; }
.app-preview { display:grid; gap:6px; }
.app-preview > span { color:var(--muted); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.app-preview-card { display:flex; align-items:center; gap:12px; max-width:320px; padding:10px; border-radius:18px; background:#181d1a; border:1px solid #29302b; }
.app-preview-img { width:58px; height:58px; flex:none; display:grid; place-items:center; border-radius:15px; background:#222824; overflow:hidden; font-size:28px; }
.app-preview-img img { width:100%; height:100%; object-fit:cover; }
.app-preview-text { display:grid; gap:3px; min-width:0; }
.app-preview-text b { font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-preview-text small { color:#80d77d; font-weight:800; }
.cropper-backdrop { z-index:260; }
.cropper-modal { width:min(900px, 96vw); }
.cropper-body { display:grid; grid-template-columns:minmax(0, 420px) minmax(0,1fr); gap:20px; align-items:start; }
.cropper-stage { position:relative; width:100%; aspect-ratio:1 / 1; border-radius:22px; overflow:hidden; border:1px solid var(--line-strong); background:#0d1a12; }
.cropper-stage canvas { width:100%; height:100%; display:block; cursor:grab; touch-action:none; }
.cropper-stage canvas.dragging { cursor:grabbing; }
.cropper-grid { position:absolute; inset:0; pointer-events:none; background-image:linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size:33.333% 33.333%; }
.cropper-side { display:grid; gap:12px; }
.cropper-side input[type="range"] { width:100%; accent-color:var(--green); }
.cropper-previews { display:flex; gap:16px; align-items:flex-end; }
.cropper-previews figure { margin:0; display:grid; gap:6px; justify-items:center; }
.cropper-previews canvas { width:96px; height:96px; border-radius:22px; border:1px solid #29302b; }
.cropper-previews canvas.small { width:52px; height:52px; border-radius:14px; }
.cropper-previews figcaption { color:var(--muted); font-size:11px; font-weight:700; }
.cropper-tip { margin:0; font-size:12px; line-height:1.5; }
.dish-delete { color:#ff9aa2; }
.dish-delete.armed { width:auto; padding:0 10px; color:#07100b; background:#ff9aa2; font-size:12px; font-weight:900; }
.dish-delete-button { margin-right:auto; }
.undo-bar { position:fixed; left:50%; bottom:22px; z-index:320; display:flex; align-items:center; gap:14px; padding:12px 14px 12px 18px; border-radius:16px; background:#162b1d; border:1px solid var(--line-strong); box-shadow:var(--shadow); transform:translate(-50%, 140%); opacity:0; transition:transform .2s ease, opacity .2s ease; font-weight:700; }
.undo-bar.show { transform:translate(-50%, 0); opacity:1; }
.undo-bar button { border:0; border-radius:10px; padding:8px 12px; background:var(--green); color:#07100b; font:inherit; font-weight:900; cursor:pointer; }
@media (max-width: 1180px) {
  .board-head { grid-template-columns:1fr; }
  .board-controls { grid-template-columns:repeat(3, auto); justify-content:start; }
}
/* Планшет (и касса на планшете): две колонки табло вместо четырёх с
   прокруткой вбок. */
@media (min-width: 761px) and (max-width: 1180px) {
  .board-grid { grid-template-columns:repeat(2, minmax(0,1fr)); overflow-x:visible; }
}
@media (max-width: 760px) {
  .board-grid { grid-template-columns:1fr; overflow-x:visible; }
  .board-stats { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .board-controls { grid-template-columns:1fr; }
  .image-field, .cropper-body { grid-template-columns:1fr; }
  .image-drop { max-width:220px; }
}
@media (prefers-reduced-motion: reduce) { .order-card.is-new { animation:none; } .undo-bar { transition:none; } }
@media (max-width: 520px) { .biz-today { grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* Заявка заведения: какие поля вернуть на исправление. */
.correction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 6px; }

/* ── Рабочее место кассы ─────────────────────────────────────────────── */
.pos-login-link { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:14px; padding:12px; border-radius:var(--radius-md); border:1px dashed var(--line-strong); background:transparent; color:var(--green); font:inherit; font-weight:800; cursor:pointer; }
.pos-login-link:hover, .pos-login-link:focus-visible { background:rgba(142,240,138,.06); outline:none; border-style:solid; }
.pos-screen { min-height:100vh; padding:18px clamp(12px, 2vw, 24px) 24px; background:var(--bg); }
.pos-screen .board-grid { margin-top:14px; }
.pos-station { display:inline-flex; margin:0 8px 6px 0; padding:4px 10px; border-radius:999px; background:rgba(121,200,255,.1); color:var(--info); font-size:12px; font-weight:800; letter-spacing:.02em; }
.pos-code-input { font-size:28px; letter-spacing:.18em; text-align:center; font-variant-numeric:tabular-nums; }
.pos-code-big { margin:14px 0 10px; padding:18px; border-radius:var(--radius-lg); background:var(--card); border:1px solid var(--line-strong); text-align:center; font-size:clamp(34px, 7vw, 48px); font-weight:900; letter-spacing:.14em; color:var(--green); font-variant-numeric:tabular-nums; }
.pos-steps { margin:4px 0 0; padding-left:20px; line-height:1.7; color:var(--muted); }
.pos-steps b { color:var(--text); overflow-wrap:anywhere; }
.pos-stock-list { display:grid; gap:8px; max-height:60vh; overflow-y:auto; padding-right:4px; }
.pos-stock-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:var(--radius-md); background:var(--card); border:1px solid var(--line); flex-wrap:wrap; }
.pos-stock-row.out { border-color:rgba(255,122,131,.35); }
.pos-stock-row.out .pos-stock-name span { color:var(--danger); }
.pos-stock-name { display:grid; gap:3px; min-width:0; }
.pos-stock-name span { color:var(--muted); font-size:13px; }
.pos-qty { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.pos-qty input { width:84px; font-variant-numeric:tabular-nums; }
.station-list { display:grid; gap:10px; }
.station-row { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto; gap:14px; align-items:center; padding:14px 16px; border-radius:var(--radius-md); background:var(--card); border:1px solid var(--line); }
.station-row.off { opacity:.7; }
.station-info { display:grid; gap:4px; min-width:0; }
.station-info b { overflow-wrap:anywhere; }
.station-state { color:var(--muted); font-size:13px; }
.station-state.online { color:var(--green); }
.station-state.online::before { content:''; display:inline-block; width:8px; height:8px; margin-right:6px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(142,240,138,.12); }
.station-state.wait { color:var(--warning); }
.station-state.off { color:var(--danger); }
.station-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
@media (max-width: 900px) {
  .station-row { grid-template-columns:1fr; }
  .station-actions { justify-content:flex-start; }
}
.courier-pill { margin-left:6px; }

/* ── Отзывы ─────────────────────────────────────────────────────────── */
.review-card.deleted { opacity:.72; border-style:dashed; }
.review-reply { margin:8px 0 4px; padding:10px 12px; border-radius:12px; background:rgba(142,240,138,.06); border-left:3px solid var(--green); line-height:1.45; }
.review-reply span { display:block; color:var(--green); font-size:12px; font-weight:800; margin-bottom:3px; }
.review-deleted { margin-top:8px; color:var(--danger); font-size:12.5px; font-weight:700; }
.review-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:8px; }
.reply-box { display:grid; gap:6px; margin-top:8px; }
.reply-box textarea { width:100%; }
.danger-text { color:var(--danger); }
.owner-rating { color:var(--green); font-size:16px; white-space:nowrap; }

/* ── Конструктор блюда ──────────────────────────────────────────────── */
.modifiers-editor { display:grid; gap:10px; margin-top:16px; padding:14px; border-radius:var(--radius-md); border:1px solid var(--line); background:rgba(255,255,255,.015); }
.modifier-groups { display:grid; gap:12px; }
.modifier-group { display:grid; gap:8px; padding:12px; border-radius:var(--radius-md); background:var(--card); border:1px solid var(--line); }
.modifier-group-head { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto auto; gap:8px; align-items:center; }
.modifier-group-head input[data-g-name] { font-weight:800; }
.modifier-group-buttons { display:flex; gap:4px; }
.modifier-limit { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; white-space:nowrap; }
.modifier-limit input { width:64px; }
.modifier-options { display:grid; gap:6px; }
.modifier-option { display:grid; grid-template-columns:minmax(0,1fr) 120px 130px auto auto; gap:8px; align-items:center; }
.modifier-option.off input[data-o-name] { text-decoration:line-through; color:var(--muted); }
.modifier-price { display:flex; align-items:center; gap:4px; color:var(--muted); font-weight:800; }
.modifier-price input { width:100%; }
.modifier-templates { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.dish-mods { display:block; margin-top:6px; color:var(--info); font-size:12px; font-weight:800; }
.item-mods { display:block; color:var(--info); font-weight:700; }
@media (max-width: 760px) {
  .modifier-group-head { grid-template-columns:1fr 1fr; }
  .modifier-option { grid-template-columns:1fr 1fr; }
  .modifier-option input[data-o-name] { grid-column:1 / -1; }
}

/* ── Смена ──────────────────────────────────────────────────────────── */
.shift-state { display:grid; gap:2px; padding:10px 12px; border-radius:14px; border:1px solid var(--line); background:rgba(5,18,10,.45); }
.shift-state b { font-size:14px; }
.shift-state span { color:var(--muted); font-size:12px; }
.shift-state.open { border-color:rgba(142,240,138,.4); }
.shift-state.open b { color:var(--green); }
.shift-state.closed b { color:var(--danger); }
.biz-shift { display:grid; gap:8px; }
.shift-list { display:grid; gap:8px; max-height:60vh; overflow-y:auto; }
.shift-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:12px 14px; border-radius:var(--radius-md); background:var(--card); border:1px solid var(--line); }
.shift-row > div:first-child { display:grid; gap:2px; }
.shift-row span { color:var(--muted); font-size:12.5px; }
.shift-row-sum { font-weight:800; white-space:nowrap; font-variant-numeric:tabular-nums; }

/* ── Колокольчик ────────────────────────────────────────────────────── */
.bell-wrap { position:relative; }
.bell-button { position:relative; }
.bell-badge { position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 5px; border-radius:999px; background:var(--danger); color:#fff; font-size:11px; font-weight:900; line-height:18px; text-align:center; }
.bell-panel { position:absolute; right:0; top:calc(100% + 8px); z-index:150; width:min(380px, calc(100vw - 24px)); max-height:70vh; display:flex; flex-direction:column; border-radius:var(--radius-lg); background:var(--panel-strong); border:1px solid var(--line-strong); box-shadow:var(--shadow); overflow:hidden; }
.bell-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); }
.bell-list { overflow-y:auto; display:grid; }
.bell-item { display:grid; gap:3px; text-align:left; padding:11px 14px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); font:inherit; cursor:pointer; }
.bell-item:hover, .bell-item:focus-visible { background:rgba(142,240,138,.06); outline:none; }
.bell-item.unread { background:rgba(142,240,138,.05); box-shadow:inset 3px 0 0 var(--green); }
.bell-item span { color:var(--muted); font-size:13px; line-height:1.4; }
.bell-item small { color:var(--muted); font-size:11px; }
.bell-empty { padding:24px 14px; text-align:center; }
@media (max-width: 620px) { .bell-panel { position:fixed; left:12px; right:12px; top:64px; width:auto; } }

/* Сбои приложения в разделе «Система» */
.audit-item.is-muted { opacity: .55; }
.crash-stack {
  margin: 8px 0 0;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  font: 12px/1.45 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Вход: ссылка на страницу скачивания приложения */
.app-download-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(142, 240, 138, .07);
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.app-download-link:hover { background: rgba(142, 240, 138, .13); border-color: var(--green); }
.app-download-link:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* Промокоды */
.promo-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 16px;
  align-items: end;
}
.promo-form .field { margin: 0; }
.promo-form select, .promo-form input[type="date"] { width: 100%; }
.promo-first { align-self: center; }
.promo-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; }
.promo-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; width: 100%; flex-wrap: wrap; }
.promo-row > div { min-width: 0; flex: 1 1 260px; }
.promo-code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(142, 240, 138, .1);
  color: var(--green);
}
.promo-payouts .num { text-align: right; font-variant-numeric: tabular-nums; }
.promo-payouts tfoot td { border-bottom: 0; color: var(--muted); }
