:root {
  --bg: #eef0f8;
  --panel: #ffffff;
  --border: #e5e8f2;
  --border-strong: #d5daea;
  --text: #141a2e;
  --muted: #68718c;

  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --primary-light: #eef0ff;
  --primary-ring: rgba(99, 102, 241, .28);

  --teal: #0d9488;
  --teal-grad: linear-gradient(135deg, #0ea5a4 0%, #0891b2 100%);

  --danger: #e11d48;
  --danger-light: #ffe9ee;
  --success: #059669;
  --success-light: #dcfbef;
  --warn: #b45309;
  --warn-light: #fef0d2;

  --sidebar-bg: linear-gradient(185deg, #14172e 0%, #1d1445 70%, #241353 100%);
  --sidebar-text: #a8b0d0;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 55, .05), 0 4px 16px -6px rgba(20, 24, 55, .09);
  --shadow-md: 0 6px 24px -8px rgba(38, 24, 105, .18);
  --shadow-lg: 0 24px 60px -12px rgba(23, 15, 74, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 58, 237, .07), transparent 60%),
    radial-gradient(700px 450px at -10% 110%, rgba(8, 145, 178, .07), transparent 60%),
    var(--bg);
  color: var(--text); font-size: 14.5px; -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
small { font-size: 12.5px; }
a { color: var(--primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9cfe3; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aab2cf; }
::-webkit-scrollbar-track { background: transparent; }

/* --- Иконки --- */
.ico {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: none; border-radius: 10px; padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; text-decoration: none;
  color: var(--text); background: #e9ecf6;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, filter .15s;
}
.btn .ico { width: 16px; height: 16px; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary-grad); color: #fff;
  box-shadow: 0 4px 14px -4px rgba(99, 62, 235, .55), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 6px 20px -4px rgba(99, 62, 235, .65), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-ghost { background: var(--panel); border: 1px solid var(--border-strong); color: #3d465f; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); filter: none; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 12px 18px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: #eceff8; color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-light); color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }

/* --- Поля ввода --- */
input[type=text], input[type=password], input[type=email], textarea, select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 13px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text); outline: none;
  transition: border .15s, box-shadow .15s;
}
select { cursor: pointer; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
label { display: block; font-size: 12.5px; font-weight: 600; margin: 15px 0 6px; color: #3d465f; letter-spacing: .01em; }

.input-ico { position: relative; }
.input-ico > .ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #9aa3c0; pointer-events: none;
}
.input-ico input { padding-left: 40px; }

/* ============ ЭКРАН ВХОДА ============ */
.login-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #17123b 0%, #2b1a70 45%, #4c1d95 100%);
  overflow: hidden;
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: float 14s ease-in-out infinite; }
.orb-1 { width: 480px; height: 480px; background: #6d28d9; top: -140px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: #0891b2; bottom: -120px; right: -60px; animation-delay: -5s; }
.orb-3 { width: 260px; height: 260px; background: #db2777; top: 55%; left: 18%; opacity: .3; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate(0,0) } 50% { transform: translate(30px,-35px) } }

.login-card {
  position: relative; z-index: 1;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 22px; padding: 44px 42px; width: 420px; max-width: 92vw;
  box-shadow: var(--shadow-lg); text-align: center;
  animation: cardIn .45s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
  background: var(--primary-grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(99, 62, 235, .6), inset 0 1px 0 rgba(255,255,255,.25);
}
.login-logo .ico { width: 34px; height: 34px; color: #fff; }
.login-card h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 28px; line-height: 1.55; }
.login-card .input-ico { margin-bottom: 12px; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 14px; min-height: 18px; font-weight: 500; }

/* ============ КАРКАС ============ */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 256px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px; }
.brand-icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(99, 62, 235, .55), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-icon .ico { width: 22px; height: 22px; color: #fff; }
.brand b { color: #fff; font-size: 14.5px; display: block; letter-spacing: -.01em; }
.brand small { color: #7d86ad; font-size: 11.5px; }

.sidebar nav { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px;
  color: var(--sidebar-text); text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: .15s; position: relative;
}
.nav-item .ico { width: 19px; height: 19px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.28), rgba(124,58,237,.24));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(139, 122, 255, .35);
}
.nav-item.active .ico { opacity: 1; color: #b1a4ff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 22%; height: 56%; width: 3.5px;
  border-radius: 0 4px 4px 0; background: var(--primary-grad);
}

.sidebar-footer {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px;
}
.user-chip { display: flex; align-items: center; gap: 9px; color: #d5daf2; overflow: hidden; }
.user-chip .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-chip .avatar .ico { width: 16px; height: 16px; }
.user-chip-text { display: flex; flex-direction: column; overflow: hidden; line-height: 1.35; }
.user-chip-text span { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text small { color: #7d86ad; font-size: 11px; }
.sidebar-footer .icon-btn { color: #8790b3; }
.sidebar-footer .icon-btn:hover { background: rgba(255,255,255,.09); color: #fff; }

.main { flex: 1; overflow: hidden; }
.view { display: none; height: 100%; }
.view.active { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.two-col { display: flex; height: 100%; }
.list-panel {
  width: 296px; flex-shrink: 0; background: rgba(255,255,255,.72); backdrop-filter: blur(8px);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
}
.list-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px 12px;
}
.list-panel-head h2 { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; }
.item-list { overflow-y: auto; flex: 1; padding: 2px 10px 12px; }
.list-item {
  padding: 12px 13px; border-radius: 12px; cursor: pointer; margin-bottom: 5px;
  transition: .13s; border: 1px solid transparent; background: transparent;
}
.list-item:hover { background: #fff; border-color: var(--border); box-shadow: var(--shadow); }
.list-item.active {
  background: #fff; border-color: rgba(99,102,241,.4);
  box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow);
}
.list-item b { display: block; font-size: 13.5px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list-item small { color: var(--muted); font-size: 12px; }

.content-panel { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.single-col { padding: 32px 40px; overflow-y: auto; height: 100%; }
.single-col.narrow { max-width: 760px; }
.single-col h2 { margin-bottom: 6px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.view-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.view-head-row h2 { margin-bottom: 6px; }
.view-head-row p { max-width: 560px; }

/* --- Таблица менеджеров --- */
.table-wrap.no-pad { padding: 0; }
.managers-table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px;
  background: var(--panel); box-shadow: var(--shadow-md); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.managers-table th {
  text-align: left; padding: 12px 16px; background: linear-gradient(135deg, #1c2240, #2a1b58);
  color: #fff; font-size: 12px; font-weight: 600;
}
.managers-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.managers-table tr:last-child td { border-bottom: none; }
.managers-table tr:hover td { background: #fbfbff; }
.mgr-name { font-weight: 700; }
.mgr-login { color: var(--muted); font-size: 12.5px; }
.role-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
}
.role-badge .ico { width: 13px; height: 13px; }
.role-badge.admin { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; }
.role-badge.manager { background: var(--primary-light); color: var(--primary); }
.mgr-actions { display: flex; gap: 6px; justify-content: flex-end; }
.owner-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted);
  background: #eef0f8; border-radius: 20px; padding: 2px 9px; margin-top: 4px;
}
.owner-badge .ico { width: 11px; height: 11px; }

/* --- Пустые состояния --- */
.empty-state { margin: auto; text-align: center; max-width: 440px; padding: 40px 20px; }
.empty-icon {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
}
.empty-icon .ico { width: 36px; height: 36px; color: #fff; stroke-width: 1.8; }
.grad-violet { background: var(--primary-grad); box-shadow: 0 14px 30px -8px rgba(99, 62, 235, .5); }
.grad-teal { background: var(--teal-grad); box-shadow: 0 14px 30px -8px rgba(8, 145, 178, .5); }
.empty-state h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.015em; }
.empty-state p { color: var(--muted); line-height: 1.6; margin-bottom: 22px; font-size: 14px; }

/* ============ ЧАТ ПОИСКА ============ */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 24px; background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.chat-head h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.015em; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.region-wrap { max-width: 340px; }
.region-wrap .ico { width: 15px; height: 15px; }
.region-input { padding: 6px 10px 6px 36px !important; font-size: 12.5px !important; border-radius: 9px !important; }

.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 88%; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.user { align-self: flex-end; }
.msg.user .bubble {
  background: var(--primary-grad); color: #fff; border-radius: 16px 16px 5px 16px;
  padding: 12px 16px; white-space: pre-wrap; font-size: 14px;
  box-shadow: 0 6px 18px -6px rgba(99, 62, 235, .5);
}
.msg.assistant { align-self: flex-start; width: 88%; }
.msg.assistant .bubble {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px 16px 16px 5px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.msg .time { font-size: 11px; color: var(--muted); margin-top: 5px; }
.chat-input {
  display: flex; gap: 10px; padding: 16px 24px; background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px); border-top: 1px solid var(--border);
}
.chat-input textarea { resize: none; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }

/* --- Результат поиска --- */
.search-summary { margin-bottom: 14px; line-height: 1.55; font-size: 14px; }
.pos-block { margin-bottom: 16px; }
.pos-block h4 {
  font-size: 13.5px; margin-bottom: 9px; color: var(--primary);
  display: flex; align-items: center; gap: 7px; font-weight: 700;
}
.pos-block h4 .ico { width: 16px; height: 16px; }
.sup-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sup-table th {
  text-align: left; padding: 9px 11px; background: #f4f5fc; color: #555e7e;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.sup-table td { padding: 10px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sup-table tr:last-child td { border-bottom: none; }
.sup-table tr:hover td { background: #fafbff; }
.sup-table a { text-decoration: none; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.производитель { background: var(--success-light); color: var(--success); }
.tag.дилер { background: var(--primary-light); color: var(--primary); }
.tag.торговая { background: var(--warn-light); color: var(--warn); }

.emails-box {
  margin-top: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f1f0ff 0%, #edf7ff 100%);
  border: 1px solid #d9d6ff; border-radius: 14px; padding: 14px 16px;
}
.emails-box b { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.5px; }
.emails-box b .ico { width: 16px; height: 16px; color: var(--primary); }
.emails-box code { font-size: 12.5px; word-break: break-all; line-height: 1.8; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; color: #3b3277; }
.emails-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ============ ЗАЯВКА: ЗАГРУЗКА ============ */
.upload-zone {
  margin: 20px 24px 0; background: var(--panel); border: 2px dashed var(--border-strong);
  border-radius: var(--radius); padding: 18px 20px; transition: .18s;
}
.upload-zone.dragover {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 0 0 5px var(--primary-ring);
}
.upload-inner { display: flex; gap: 14px; align-items: center; }
.upload-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.upload-icon .ico { width: 22px; height: 22px; }
.upload-inner b { font-weight: 600; }
.upload-textrow { display: flex; gap: 10px; margin-top: 14px; }
.upload-textrow textarea { resize: vertical; }
.upload-status { margin-top: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.upload-status > div { display: flex; align-items: center; gap: 7px; }
.upload-status .ico { width: 15px; height: 15px; }
.upload-status .ok { color: var(--success); }
.upload-status .err { color: var(--danger); }
.upload-status .busy { color: var(--muted); }

/* ============ ТАБЛИЦА АНАЛИЗА ============ */
.table-wrap { padding: 20px 24px; overflow-x: auto; }
.analysis-table {
  border-collapse: separate; border-spacing: 0; font-size: 13px;
  background: var(--panel); box-shadow: var(--shadow-md); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.analysis-table th, .analysis-table td {
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 9px 13px; text-align: left; min-width: 175px; max-width: 310px; vertical-align: top;
}
.analysis-table th:last-child, .analysis-table td:last-child { border-right: none; }
.analysis-table tr:last-child td { border-bottom: none; }
.analysis-table th:first-child, .analysis-table td:first-child {
  position: sticky; left: 0; background: #f7f8fd; font-weight: 600; min-width: 215px; z-index: 1;
  color: #454e6b; font-size: 12.5px;
}
.analysis-table thead th {
  background: linear-gradient(135deg, #1c2240, #2a1b58); color: #fff; font-size: 12.5px;
  font-weight: 600; padding: 12px 13px; border-color: rgba(255,255,255,.09);
}
.analysis-table thead th:first-child { background: linear-gradient(135deg, #1c2240, #221b4d); color: #fff; }
.analysis-table tbody tr:hover td:not(:first-child) { background: #fbfbff; }
.analysis-table td.missing { background: var(--danger-light) !important; }
.analysis-table td.missing::after { content: "не заполнено"; color: var(--danger); font-size: 11px; font-style: italic; }
.upd-badge {
  display: inline-block; background: var(--warn-light); color: var(--warn);
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 7px;
  text-transform: uppercase; letter-spacing: .03em;
}
thead .upd-badge { background: rgba(251, 191, 36, .25); color: #fcd34d; }
.analysis-table td[contenteditable] { outline: none; cursor: text; }
.analysis-table td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--primary); border-radius: 4px; }
.section-row td {
  background: #eef0fb !important; font-weight: 700; color: #3b3f63 !important;
  font-size: 12px !important; text-transform: uppercase; letter-spacing: .05em;
}
.offer-del {
  display: inline-flex; vertical-align: middle; cursor: pointer; opacity: .55; margin-left: 8px;
  color: #ffb4c4; transition: .15s;
}
.offer-del .ico { width: 13px; height: 13px; }
.offer-del:hover { opacity: 1; color: #ff8fa8; }
.item-price { white-space: nowrap; font-weight: 700; color: #16223f; }
.item-cell small { display: block; color: var(--muted); margin-top: 2px; }

/* ============ ЖУРНАЛ ============ */
.journal-list { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.journal-list.big { max-width: 940px; }
.j-row {
  display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 11px; padding: 10px 14px; font-size: 13px; align-items: baseline;
  box-shadow: var(--shadow);
}
.j-row.error { border-color: #ffc9d4; background: #fff8f9; }
.j-time { color: var(--muted); white-space: nowrap; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.j-event { font-weight: 600; white-space: nowrap; }
.j-row.error .j-event { color: var(--danger); }
.j-details { color: var(--muted); word-break: break-word; }

.req-journal { margin: 4px 24px 28px; }
.req-journal summary {
  cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px 0; font-weight: 600;
  display: flex; align-items: center; gap: 7px; list-style: none;
}
.req-journal summary::-webkit-details-marker { display: none; }
.req-journal summary .ico { width: 15px; height: 15px; }
.req-journal summary:hover { color: var(--text); }

/* ============ КАРТОЧКИ НАСТРОЕК ============ */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 26px; margin-top: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 11px; letter-spacing: -.01em; }
.card-ico {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.card-ico .ico { width: 18px; height: 18px; color: #fff; }
.row-gap { display: flex; gap: 12px; align-items: center; margin-top: 18px; }

/* ============ МОДАЛЬНОЕ ОКНО ============ */
.modal {
  position: fixed; inset: 0; background: rgba(16, 14, 45, .55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-card {
  background: #fff; border-radius: 18px; padding: 28px 30px; width: 580px; max-width: 94vw;
  box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
  animation: cardIn .3s cubic-bezier(.2,.9,.3,1.15);
}
.modal-card h3 { margin-bottom: 4px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; }
  .sidebar nav { flex-direction: row; padding: 8px; overflow-x: auto; }
  .nav-item span { display: none; }
  .nav-item.active::before { display: none; }
  .brand small, .sidebar-footer .user-chip span:last-child { display: none; }
  .two-col { flex-direction: column; }
  .list-panel { width: 100%; max-height: 30vh; }
  .single-col { padding: 20px 16px; }
}
