/* ============================================================
   AuditFinex — современный интерфейс в мятно-песочной палитре
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Мятная гамма */
  --mint-50:  #f0fcf7;
  --mint-100: #dcf7ec;
  --mint-200: #bcefd8;
  --mint-300: #8ee2c1;
  --mint-400: #56cfa4;
  --mint-500: #2fbb8f;
  --mint-600: #159b78;
  --mint-700: #0f766e;
  --mint-800: #0d5d57;

  /* Светло-коричневая (песочная) гамма */
  --sand-50:  #fdfaf6;
  --sand-100: #f8f1e7;
  --sand-200: #efe2d0;
  --sand-300: #e2ccb0;
  --sand-400: #cdac85;
  --sand-500: #b99268;
  --sand-600: #9c7550;
  --sand-700: #795839;

  /* Нейтральные */
  --ink:       #20322e;
  --ink-soft:  #4d605a;
  --muted:     #84938d;
  --line:      rgba(31, 74, 62, .09);
  --line-strong: rgba(31, 74, 62, .14);
  --white:     #fff;

  /* Эффекты */
  --glass: rgba(255,255,255,.74);
  --glass-strong: rgba(255,255,255,.9);
  --shadow-xs: 0 2px 6px rgba(28, 62, 52, .05);
  --shadow-sm: 0 8px 24px rgba(28, 62, 52, .07);
  --shadow-md: 0 18px 46px rgba(28, 62, 52, .11);
  --shadow-lg: 0 30px 80px rgba(20, 55, 46, .18);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --ease: cubic-bezier(.22,.75,.32,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 8% -6%, rgba(142,226,193,.34), transparent 62%),
    radial-gradient(760px 620px at 98% 4%, rgba(226,204,176,.42), transparent 60%),
    radial-gradient(700px 500px at 55% 100%, rgba(190,232,211,.22), transparent 65%),
    linear-gradient(145deg, #f7fbf8 0%, #faf6ef 52%, #f6faf7 100%);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: radial-gradient(rgba(15,118,110,.10) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  z-index: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
input.filled, textarea.filled, select.filled { font-weight: 700; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; }
::selection { background: var(--mint-200); color: var(--mint-800); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--mint-200); border: 3px solid transparent; border-radius: 99px; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Оболочка ---------- */
.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  width: 270px;
  flex: 0 0 270px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.68));
  backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid rgba(255,255,255,.9);
  box-shadow: 10px 0 40px rgba(36, 74, 62, .05);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 20px; }
.brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--sand-200);
  box-shadow: 0 8px 20px rgba(28, 62, 52, .10);
}
.brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.brand-text strong { display: block; font-size: 19px; letter-spacing: -.7px; line-height: 1.1; }
.brand-text strong span { color: var(--mint-600); }
.brand-text small { display: block; font-size: 10.5px; letter-spacing: .3px; color: var(--muted); margin-top: 2px; }
.sidebar-close { display: none; margin-left: auto; }

.sidebar-company {
  display: flex; align-items: center; gap: 10px;
  margin: 0 4px 22px; padding: 11px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--sand-100), rgba(255,255,255,.6));
  border: 1px solid var(--sand-200);
  box-shadow: var(--shadow-xs);
}
.company-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--sand-700);
  background: linear-gradient(145deg, #fff, var(--sand-200));
  border: 1px solid var(--sand-300);
}
.sidebar-company strong { display: block; font-size: 11.5px; line-height: 1.25; }
.sidebar-company span { display: block; font-size: 10.5px; color: var(--sand-600); margin-top: 2px; }

.nav { flex: 1; overflow-y: auto; padding-right: 4px; }
.nav-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--muted);
  padding: 14px 12px 7px;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: 12px; color: var(--ink-soft);
  font-size: 13px; font-weight: 600; text-align: left;
  transition: all .22s var(--ease);
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; color: var(--muted); transition: color .2s; }
.nav-item:hover { background: rgba(220,247,236,.75); color: var(--mint-800); transform: translateX(2px); }
.nav-item:hover svg { color: var(--mint-600); }
.nav-item.active {
  background: linear-gradient(100deg, var(--mint-100), rgba(220,247,236,.45));
  color: var(--mint-800);
  box-shadow: inset 0 0 0 1px rgba(86,207,164,.3), var(--shadow-xs);
}
.nav-item.active svg { color: var(--mint-600); }
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 4px 4px 0; background: var(--mint-500);
}
.nav-item em {
  margin-left: auto; font-style: normal; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px; color: var(--mint-700);
  background: rgba(255,255,255,.9);
}
.nav-item em.dot { width: 7px; height: 7px; padding: 0; background: var(--sand-400); }

/* Основное меню: три раздела */
.nav-item.primary { font-weight: 800; font-size: 13.5px; padding: 11px 12px; margin-bottom: 4px; }
.nav-item.primary .group-chevron { margin-left: auto; width: 13px; height: 13px; transition: transform .25s var(--ease); }
.nav-item.primary[data-group="audit"].open .group-chevron { transform: rotate(90deg); }
.nav-sub {
  max-height: 0; overflow: hidden; opacity: 0;
  margin-left: 18px; padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  transition: max-height .35s var(--ease), opacity .25s var(--ease);
}
.nav-sub.open { max-height: 720px; opacity: 1; padding-bottom: 4px; }
.nav-sub .nav-item { font-size: 12px; padding: 8px 10px; }
.nav-sub .nav-item.active::before { left: -11px; top: 8px; bottom: 8px; }

.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.compliance-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 10px; border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(240,252,247,.9), rgba(248,241,231,.85));
  border: 1px solid rgba(86,207,164,.22);
}
.compliance-icon {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--mint-100); color: var(--mint-700);
}
.compliance-icon svg { width: 15px; height: 15px; stroke-width: 2.4; }
.compliance-card strong { display: block; font-size: 11.5px; }
.compliance-card span { display: block; font-size: 10px; color: var(--muted); }
.user-chip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; transition: background .2s; }
.user-chip:hover { background: rgba(255,255,255,.8); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(145deg, var(--sand-400), var(--sand-600));
}
.user-chip strong { display: block; font-size: 11.5px; }
.user-chip span { display: block; font-size: 10px; color: var(--muted); }
.user-chip .chip-arrow { margin-left: auto; width: 14px; color: var(--muted); transform: rotate(90deg); }

/* ---------- Верхняя панель ---------- */
.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; display: flex; align-items: center; gap: 16px;
  padding: 0 30px;
  background: rgba(255,255,255,.66);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.85);
}
.menu-btn { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.breadcrumbs svg { width: 13px; height: 13px; }
.breadcrumbs strong { color: var(--ink); font-weight: 700; }
.topbar-search {
  margin-left: auto; width: min(360px, 32vw);
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 13px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s, border-color .2s;
}
.topbar-search:focus-within { border-color: var(--mint-300); box-shadow: 0 0 0 4px rgba(86,207,164,.14); }
.topbar-search svg { width: 16px; color: var(--muted); }
.topbar-search input { border: 0; outline: 0; background: none; width: 100%; font-size: 12.5px; }
.topbar-search input::placeholder { color: #a3b0aa; }
.topbar-search kbd {
  font-family: inherit; font-size: 10px; color: var(--muted);
  background: var(--sand-100); border: 1px solid var(--sand-200);
  border-radius: 6px; padding: 1px 5px;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.date-chip {
  display: flex; align-items: center; gap: 7px; padding: 7px 11px;
  border-radius: 11px; background: rgba(248,241,231,.8);
  border: 1px solid var(--sand-200); font-size: 11.5px; font-weight: 600; color: var(--sand-700);
  white-space: nowrap;
}
.date-chip svg { width: 14px; }
.icon-btn {
  width: 37px; height: 37px; display: grid; place-items: center;
  border-radius: 11px; background: rgba(255,255,255,.9);
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--mint-700); border-color: var(--mint-300); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.sidebar-close, .menu-btn { display: none; }
.notify-btn { position: relative; }
.notify-btn i {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--sand-400); border: 2px solid #fff;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  transition: all .22s var(--ease); white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--mint-500), var(--mint-700));
  box-shadow: 0 8px 20px rgba(21,155,120,.26), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(21,155,120,.34); }
.btn-ghost { background: rgba(255,255,255,.85); border: 1px solid var(--line-strong); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--mint-300); color: var(--mint-700); background: #fff; }
.btn-sand {
  background: linear-gradient(135deg, var(--sand-200), var(--sand-300));
  color: var(--sand-700);
}
.btn-sand:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-sm { padding: 7px 11px; font-size: 11.5px; border-radius: 10px; }
.btn-sm svg { width: 14px; height: 14px; }

/* ---------- Контент ---------- */
.content { padding: 28px 30px 60px; max-width: 1720px; margin: 0 auto; }
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--mint-700); margin-bottom: 7px;
}
.eyebrow::before { content: ''; width: 16px; height: 2px; border-radius: 2px; background: var(--mint-400); }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -1.1px; line-height: 1.2; font-weight: 800; }
.page-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; max-width: 620px; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* Hero-баннер */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 30px; margin-bottom: 22px; border-radius: var(--r-xl);
  background: linear-gradient(115deg, #e7f8ef 0%, #f4f8ee 45%, #f8eee0 100%);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow-sm);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -110px;
  width: 330px; height: 330px; border-radius: 50%;
  border: 46px solid rgba(86,207,164,.13);
}
.hero::before {
  content: ''; position: absolute; right: 130px; bottom: -150px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 36px solid rgba(205,172,133,.16);
}
.hero > * { position: relative; z-index: 1; }
.hero h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.8px; }
.hero p { margin: 0; max-width: 560px; color: var(--ink-soft); font-size: 13px; }
.hero-badges { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95);
  box-shadow: var(--shadow-xs); color: var(--mint-800);
}
.hero-badge svg { width: 13px; }
.hero-illustration { display: flex; align-items: center; gap: 12px; }
.hero-ring {
  width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--mint-400) 0 71%, var(--sand-200) 71% 100%);
  box-shadow: var(--shadow-md);
}
.hero-ring::before {
  content: '71%'; position: absolute; width: 78px; height: 78px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--mint-800);
}
.hero-ring-label { text-align: center; font-size: 10px; color: var(--muted); margin-top: 7px; }

/* Карточки */
.card {
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 12px; }
.card-head h3 { margin: 0; font-size: 14px; letter-spacing: -.3px; }
.card-head .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 0 22px 22px; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }

/* KPI */
.kpi { position: relative; overflow: hidden; padding: 20px 22px; border-radius: var(--r-lg); background: var(--glass-strong); border: 1px solid #fff; box-shadow: var(--shadow-sm); }
.kpi::after {
  content: ''; position: absolute; right: -24px; top: -24px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(86,207,164,.16), transparent 70%);
}
.kpi.sand::after { background: radial-gradient(circle, rgba(205,172,133,.2), transparent 70%); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--mint-100); color: var(--mint-700); }
.kpi.sand .kpi-icon { background: var(--sand-100); color: var(--sand-600); }
.kpi-icon svg { width: 18px; }
.kpi-trend { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--mint-100); color: var(--mint-700); }
.kpi-trend.down { background: #fdeeee; color: #b26060; }
.kpi-value { font-size: 29px; font-weight: 800; letter-spacing: -1.4px; margin-top: 14px; line-height: 1; }
.kpi-label { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.kpi-foot { font-size: 10.5px; color: var(--mint-700); margin-top: 12px; display: flex; align-items: center; gap: 5px; }
.kpi-foot svg { width: 12px; }

/* Прогресс, графики */
.progress { height: 7px; border-radius: 99px; background: var(--mint-50); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint-400), var(--mint-600)); transition: width .6s var(--ease); }
.progress.sand > i { background: linear-gradient(90deg, var(--sand-300), var(--sand-500)); }
.bar-row { display: grid; grid-template-columns: 116px 1fr 40px; align-items: center; gap: 12px; margin-bottom: 13px; font-size: 11.5px; }
.bar-row span:first-child { color: var(--ink-soft); font-weight: 600; }
.bar-row b { text-align: right; font-size: 11px; color: var(--muted); }
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut {
  width: 138px; height: 138px; flex: 0 0 138px; border-radius: 50%;
  background: conic-gradient(var(--mint-500) 0 42%, var(--mint-300) 42% 66%, var(--sand-300) 66% 86%, var(--sand-200) 86% 100%);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.donut::before { content: ''; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: #fff; }
.donut span { position: relative; z-index: 1; text-align: center; font-size: 21px; font-weight: 800; line-height: 1; }
.donut small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.legend { display: grid; gap: 9px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend b { margin-left: auto; font-size: 11px; }

/* Списки / таймлайн */
.tl-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--mint-400); box-shadow: 0 0 0 4px var(--mint-50); flex: 0 0 9px; }
.tl-dot.sand { background: var(--sand-400); box-shadow: 0 0 0 4px var(--sand-100); }
.tl-dot.alert { background: #e08d7d; box-shadow: 0 0 0 4px #fdeeee; }
.tl-item strong { display: block; font-size: 12px; }
.tl-item span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tl-item time { margin-left: auto; font-size: 10px; color: var(--muted); white-space: nowrap; }

/* Фильтры */
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search-field {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-width: 240px;
  border-radius: 11px; background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow-xs);
}
.search-field svg { width: 15px; color: var(--muted); }
.search-field input { border: 0; outline: 0; background: none; width: 100%; font-size: 12px; }
.search-clear { flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 2px; cursor: pointer; }
.search-clear:hover { color: var(--mint-700); }
.topbar-search .search-clear { margin-left: auto; }
input[type=search]::-webkit-search-cancel-button { display: none; }
select, input[type=date], input[type=text], textarea {
  padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 12px; outline: none; transition: border-color .2s, box-shadow .2s;
}
select:focus, input:focus, textarea:focus { border-color: var(--mint-300); box-shadow: 0 0 0 4px rgba(86,207,164,.13); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chip {
  padding: 7px 12px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.85); border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--mint-300); color: var(--mint-700); }
.chip.active { background: linear-gradient(120deg, var(--mint-500), var(--mint-700)); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(21,155,120,.22); }

/* Таблица */
.table-card { border-radius: var(--r-lg); overflow: hidden; background: rgba(255,255,255,.82); border: 1px solid #fff; box-shadow: var(--shadow-sm); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
tr.group-row { background: linear-gradient(90deg, var(--mint-100), rgba(248,241,231,.7)); }
tr.group-row td { padding: 9px 12px; font-size: 11.5px; color: var(--mint-800); border-top: 1px solid var(--line-strong); }
tr.dismissed { background: #fdeeee; color: #9a4a4a; }
tr.dismissed .cell-main, tr.dismissed td { color: #9a4a4a; }
.th-sort {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; font-size: inherit; font-weight: inherit; letter-spacing: inherit;
  text-transform: inherit; color: inherit; background: none;
}
.th-sort:hover { color: var(--mint-700); }
.draggable-col { cursor: grab; position: relative; }
.draggable-col:active { cursor: grabbing; }
.draggable-col.drag-over { box-shadow: inset 3px 0 0 var(--mint-500); background: rgba(220,247,236,.9); }
.draggable-col.dragging { opacity: .45; }
.wide-search { min-width: 360px; width: 360px; }
.template-head { display: flex; align-items: center; gap: 10px; }
.template-num {
  font-size: 12px; font-weight: 800; color: var(--mint-700);
  background: var(--mint-100); border: 1px solid var(--mint-200);
  padding: 3px 9px; border-radius: 99px;
}

/* Табло проверок */
.board-row {
  display: grid;
  grid-template-columns: 130px minmax(180px,1fr) 110px 120px 110px minmax(120px,1fr);
  gap: 14px; align-items: center;
  padding: 12px 16px; margin-bottom: 8px;
  border-radius: 14px; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--mint-400);
  box-shadow: var(--shadow-xs); cursor: pointer;
  animation: boardIn .5s var(--ease) both;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.board-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.board-row.status-progress {
  border-left-color: var(--mint-500);
  animation: boardIn .5s var(--ease) both, boardPulse 2.6s ease-in-out infinite .5s;
}
.board-row.status-planned {
  border-left-color: var(--sand-400);
  animation: boardIn .5s var(--ease) both, boardFloat 3.6s ease-in-out infinite .5s;
}
.board-row .cell-main { font-size: 12px; }
@keyframes boardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes boardPulse {
  0%, 100% { background: #fff; }
  50% { background: rgba(240,252,247,.95); }
}
@keyframes boardFloat {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@media (max-width: 900px) {
  .board-row { grid-template-columns: 1fr 1fr; }
}
.sort-arrow { font-size: 9px; color: var(--mint-600); }
thead th {
  text-align: left; padding: 13px 16px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
  background: linear-gradient(180deg, rgba(248,241,231,.65), rgba(248,241,231,.2));
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 13px 16px; font-size: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .18s; cursor: pointer; }
tbody tr:hover { background: rgba(240,252,247,.8); }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 700; color: var(--ink); }
.cell-sub { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.cell-right { text-align: right; }
.cell-strong { font-weight: 800; letter-spacing: -.2px; }
.link-like { color: var(--mint-700); font-weight: 700; }

/* Бейджи */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 700;
  white-space: nowrap;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.mint { background: var(--mint-100); color: var(--mint-700); }
.badge.sand { background: var(--sand-100); color: var(--sand-700); }
.badge.gray { background: #f1f4f2; color: var(--ink-soft); }
.badge.red { background: #fdeeee; color: #b26060; }
.badge.amber { background: #fdf3e3; color: #a5762b; }
.badge.violet { background: #f0edfa; color: #6d5bab; }
.tag {
  display: inline-block; padding: 3px 8px; border-radius: 7px; font-size: 10px; font-weight: 700;
  background: var(--mint-50); color: var(--mint-700); border: 1px solid var(--mint-100);
}
.tag.sand { background: var(--sand-50); color: var(--sand-700); border-color: var(--sand-200); }

/* Пустое состояние */
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--mint-300); margin-bottom: 12px; }
.empty strong { display: block; color: var(--ink); font-size: 14px; }

/* Детали / дровер */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(19,43,37,.32);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(520px, 94vw); overflow-y: auto;
  background: linear-gradient(180deg, #fff, #fbf8f3);
  box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform .42s var(--ease);
  padding: 28px 28px 50px;
}
.drawer.show { transform: none; }
.drawer.full { width: 100vw; max-width: 100vw; padding: 32px 6vw 60px; }
.drawer.full > #drawerBody { max-width: 1180px; margin: 0 auto; }
.drawer.full .drawer-close { top: 26px; right: 3vw; }
.drawer-close { position: absolute; top: 20px; right: 20px; }
.drawer-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mint-700); }
.drawer h2 { margin: 8px 0 6px; font-size: 22px; letter-spacing: -.8px; padding-right: 40px; }
.drawer-sub { color: var(--muted); font-size: 12px; }
.drawer-section { margin-top: 24px; }
.drawer-section h4 { margin: 0 0 11px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-cell { padding: 12px 14px; border-radius: 13px; background: rgba(248,241,231,.6); border: 1px solid var(--sand-200); }
.info-cell span { display: block; font-size: 10px; color: var(--muted); }
.info-cell strong { display: block; font-size: 12px; margin-top: 3px; }
.info-grid.compact { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.info-grid.compact .info-cell { padding: 7px 10px; }
.info-grid.compact .info-cell strong { font-size: 11.5px; margin-top: 2px; }
.mini-row select[data-team], .mini-row select[name] { width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(255,255,255,.82); font-size: 11.5px; }
.mini-row select[data-team].empty-team { background: #fdeeee; border-color: #f2c4c4; color: #9a4a4a; font-weight: 700; }
.empty-team { background: #fdeeee !important; border-color: #f2c4c4 !important; color: #9a4a4a; font-weight: 700; }
.stage-track { display: flex; gap: 6px; margin-top: 8px; }
.stage-track i { flex: 1; height: 6px; border-radius: 99px; background: var(--sand-200); }
.stage-track i.done { background: linear-gradient(90deg, var(--mint-400), var(--mint-600)); }
.stage-track i.current { background: linear-gradient(90deg, var(--mint-200), var(--mint-400)); }
.mini-list { display: grid; gap: 8px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.mini-row svg { width: 15px; color: var(--mint-600); }
.mini-row strong { font-size: 11.5px; }
.mini-row small { display: block; color: var(--muted); font-size: 10px; }
.mini-row .badge { margin-left: auto; }

/* Модалка */
.modal-wrap {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .3s;
  background: rgba(19,43,37,.34); backdrop-filter: blur(4px);
}
.modal-wrap.show { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: min(560px, 96vw); max-height: 90vh; overflow-y: auto;
  background: linear-gradient(160deg, #fff, #fbf8f3);
  border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98); transition: transform .35s var(--ease);
  border: 1px solid #fff;
}
.modal-wrap.show .modal { transform: none; }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.7px; }
.modal p.sub { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.form-field input, .form-field select, .form-field textarea { width: 100%; }
.form-field textarea { min-height: 84px; resize: vertical; }
.form-warning {
  margin-top: 16px; padding: 14px 16px; border-radius: 14px;
  background: #fdeeee; border: 1px solid #f2c4c4; color: #9a4a4a; font-size: 12px; line-height: 1.6;
}
.form-warning strong { display: block; color: #b23c3c; margin-bottom: 6px; font-size: 12.5px; }
.act-warning {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--sand-400); background: var(--sand-50);
  color: var(--sand-700); font-size: 12px; line-height: 1.6;
}
.act-warning svg { flex: 0 0 18px; color: var(--sand-600); width: 18px; height: 18px; }
.act-locked {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; padding: 14px 16px;
  border-radius: 14px; background: #fdeeee; border: 2px solid #e7a6a6;
  color: #8f3f3f; font-size: 12.5px; line-height: 1.6; font-weight: 600;
}
.act-locked svg { flex: 0 0 18px; width: 18px; height: 18px; }
.act-client-link {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  margin: 8px 0 4px; padding: 16px 18px; border-radius: 16px;
  border: 2px solid var(--mint-300); background: linear-gradient(110deg, var(--mint-50), #fff);
  box-shadow: 0 0 0 4px rgba(86,207,164,.10); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.act-client-link:hover { border-color: var(--mint-500); transform: translateY(-1px); box-shadow: 0 0 0 5px rgba(86,207,164,.16); }
.act-client-link span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--mint-700); }
.act-client-link strong { font-size: 16px; letter-spacing: -.3px; color: var(--ink); flex: 1; }
.act-client-link svg { width: 18px; height: 18px; color: var(--mint-600); }
.contract-link-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contract-link-row select { flex: 1; min-width: 220px; }
.contract-link-row .link-like { border: 0; background: none; padding: 0; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.contract-link-row .link-like svg { width: 13px; height: 13px; }
.bank-details { border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; background: rgba(248,241,231,.45); }
.bank-details summary { cursor: pointer; font-weight: 800; font-size: 12.5px; color: var(--mint-800); }
.bank-details[open] summary { margin-bottom: 8px; }
#printArea { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; position: static !important; left: auto !important; width: auto !important; padding: 20px; font-family: 'Times New Roman', serif; font-size: 13px; }
}

/* Сообщение о SSL-шифровании в кабинете клиента */
.ssl-note {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  border: 2px solid var(--mint-400);
  background: linear-gradient(100deg, rgba(240,252,247,.95), rgba(255,255,255,.8));
  box-shadow: 0 0 0 4px rgba(86,207,164,.12), var(--shadow-xs);
  color: var(--mint-800); font-size: 12.5px; font-weight: 800;
}
.ssl-note svg { width: 18px; height: 18px; color: var(--mint-600); flex: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Тосты */
.toasts { position: fixed; bottom: 24px; right: 26px; z-index: 80; display: grid; gap: 9px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px;
  padding: 12px 16px; border-radius: 14px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.96); border: 1px solid var(--mint-200);
  box-shadow: var(--shadow-md); animation: toastIn .35s var(--ease) both;
}
.toast svg { color: var(--mint-600); width: 16px; }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* Специфичные блоки */
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stage-card { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }
.stage-card .num { font-size: 10px; font-weight: 800; color: var(--mint-600); }
.stage-card strong { display: block; font-size: 12px; margin: 5px 0 3px; }
.stage-card span { font-size: 10px; color: var(--muted); }
.risk-matrix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.risk-cell { padding: 12px; border-radius: 12px; text-align: center; font-size: 11px; font-weight: 700; }
.risk-cell.low { background: var(--mint-100); color: var(--mint-700); }
.risk-cell.mid { background: var(--sand-100); color: var(--sand-700); }
.risk-cell.high { background: #fdeeee; color: #b26060; }
.isa-group-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--sand-600); margin: 20px 0 10px; }
.isa-item { display: flex; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-bottom: 8px; transition: all .2s var(--ease); cursor: pointer; }
.isa-item:hover { border-color: var(--mint-300); transform: translateX(3px); box-shadow: var(--shadow-xs); }
.isa-code { flex: 0 0 76px; font-size: 11px; font-weight: 800; color: var(--mint-700); }
.isa-item strong { display: block; font-size: 12px; }
.isa-docs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.report-card { padding: 20px; border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: all .25s var(--ease); }
.report-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.report-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--mint-100); color: var(--mint-700); }
.report-card.sand .report-icon { background: var(--sand-100); color: var(--sand-600); }
.report-card strong { display: block; margin: 13px 0 5px; font-size: 13px; }
.report-card p { margin: 0; font-size: 11px; color: var(--muted); }
.report-card .go { display: flex; align-items: center; gap: 5px; margin-top: 14px; font-size: 10.5px; font-weight: 800; color: var(--mint-700); }
.report-card .go svg { width: 13px; }
.hint {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(248,241,231,.8), rgba(255,255,255,.6));
  border: 1px solid var(--sand-200); font-size: 11.5px; color: var(--ink-soft);
}
.hint svg { flex: 0 0 16px; color: var(--sand-500); }
.hint b { color: var(--sand-700); }

/* Баннер отсутствия данных */
.data-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 20px; border-radius: var(--r-lg);
  background: linear-gradient(110deg, rgba(220,247,236,.78), rgba(248,241,231,.8));
  border: 1px solid rgba(86,207,164,.25); box-shadow: var(--shadow-sm);
}
.data-banner .banner-icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff; color: var(--mint-700); box-shadow: var(--shadow-xs);
}
.data-banner .banner-text { flex: 1; min-width: 240px; }
.data-banner strong { display: block; font-size: 13px; }
.data-banner span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.data-banner code { background: rgba(255,255,255,.75); padding: 1px 5px; border-radius: 6px; font-size: 10.5px; color: var(--sand-700); }
.data-banner .banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.count-line { font-size: 11px; color: var(--muted); margin-top: 10px; }

.paper-docs { display: grid; gap: 7px; }
.paper-doc { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 10px; background: rgba(248,241,231,.55); border: 1px solid var(--sand-200); font-size: 11.5px; cursor: pointer; }
.paper-doc:hover { background: rgba(220,247,236,.45); }
.paper-doc input { width: 15px; height: 15px; accent-color: var(--mint-600); }

.team-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.team-col { min-width: 0; }
@media (max-width: 1000px) { .team-columns { grid-template-columns: 1fr; } }

/* Закладки в карточке проверки */
.drawer-tabs { padding: 16px 20px; }
.drawer-tabs .tab-bar { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line-strong); padding-bottom: 10px; margin-bottom: 12px; }
.drawer-tabs .tab-btn { border: 1px solid transparent; background: transparent; padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer; }
.drawer-tabs .tab-btn:hover { color: var(--mint-700); background: rgba(220,247,236,.5); }
.drawer-tabs .tab-btn.active { background: var(--mint-100); color: var(--mint-800); border-color: rgba(86,207,164,.28); }
.drawer-tabs .tab-pane { display: none; }
.drawer-tabs .tab-pane.active { display: block; }

/* Экран входа */
.login-screen { position: fixed; inset: 0; z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(140deg, #e8f7f1, #f8f1e7); }
.login-screen.show { display: flex; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid #fff; border-radius: 22px; padding: 32px; box-shadow: var(--shadow-lg); }
.login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-logo { width: 44px; height: 44px; object-fit: contain; flex: 0 0 44px; }
.login-card h1 { margin: 0; font-size: 23px; letter-spacing: -.4px; }
.login-sub { margin: 6px 0 22px; color: var(--muted); font-size: 12px; }
.login-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line-strong); padding-bottom: 8px; }
.login-tab { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 800; color: var(--muted); cursor: pointer; }
.login-tab.active { background: var(--mint-100); color: var(--mint-800); }
.login-card .form-field { margin-bottom: 14px; }
.login-btn { width: 100%; margin-top: 6px; justify-content: center; }
.login-hint { margin: 18px 0 0; font-size: 11px; color: var(--muted); text-align: center; }

/* Адаптив */
@media (max-width: 1240px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar-search { width: 250px; }
}
@media (max-width: 1000px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-close, .menu-btn { display: grid; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 18px 50px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .date-chip { display: none; }
}
@media (max-width: 700px) {
  .topbar-search { display: none; }
  .breadcrumbs { display: none; }
  .topbar-actions { margin-left: auto; }
  #newDocBtn span, #load1cBtn span { display: none; }
  .grid-4, .stage-grid { grid-template-columns: 1fr; }
  .info-grid, .form-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 23px; }
  .donut-wrap { flex-direction: column; }
  .risk-matrix { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
