/**
 * Источник UI-стилей (спокойная светлая тема, сине-серые акценты). В layout: import + копия public/koral-ui.css.
 * Синхронизация: npm run sync:ui-css (predev, postbuild).
 */
:root {
  --brand-primary: #0b63d8;
  --brand-accent: #2d8cff;
  --brand-gold-dim: #0759c8;
  --koral-bg: #f3f6ff;
  --koral-surface: #ffffff;
  --koral-surface-elevated: #f8fbff;
  --koral-border: #dbe5f2;
  --admin-sidebar-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --admin-sidebar-width: 17rem;
  --radius-lg: 0.75rem;
  --radius-md: 0.5rem;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 35px rgba(15, 23, 42, 0.06);
  --admin-main-bg: linear-gradient(180deg, #fbfdff 0%, #f3f6ff 48%, #fbfdff 100%);
  --koral-hero-glow: radial-gradient(ellipse 85% 55% at 50% -15%, rgba(11, 99, 216, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 35% at 95% 10%, rgba(45, 140, 255, 0.08), transparent 48%),
    radial-gradient(ellipse 40% 30% at 8% 90%, rgba(11, 99, 216, 0.05), transparent 45%);
}

html {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 106.25%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--koral-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: inherit;
}

.btn-primary {
  display: inline-block;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: filter 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
  font-size: 0.9375rem;
  box-shadow: 0 8px 18px rgba(11, 99, 216, 0.24);
}
.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(11, 99, 216, 0.3);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-block;
  border-radius: 0.75rem;
  border: 1px solid var(--koral-border);
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  background: var(--koral-surface);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
}
.btn-ghost:hover {
  background-color: var(--koral-surface-elevated);
  border-color: #c5d0e0;
}
a.btn-ghost {
  text-decoration: none;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
}

.input {
  box-sizing: border-box;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--koral-border);
  background-color: #ffffff;
  padding: 0.55rem 0.85rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}
.input::placeholder {
  color: #94a3b8;
}
.input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.2);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  position: relative;
  background-color: var(--koral-bg);
  background-image: var(--koral-hero-glow);
  overflow-x: hidden;
}
.login-shell-inner {
  width: 100%;
  max-width: 28rem;
  position: relative;
  z-index: 1;
}
.login-gold-card {
  border: 1px solid var(--koral-border) !important;
  background: var(--koral-surface) !important;
  box-shadow: var(--shadow-card) !important;
}
.login-title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.login-hint {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.9375rem;
  color: #dc2626;
}

.form-stack > * + * {
  margin-top: 1rem;
}
.form-stack label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

form.form-stack .btn-primary {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.admin-shell-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--koral-bg);
  background-image: radial-gradient(ellipse 80% 40% at 100% 0%, rgba(61, 143, 209, 0.04), transparent 50%);
}
.admin-shell-aside {
  flex-shrink: 0;
  border-bottom: 1px solid var(--koral-border);
  background: var(--admin-sidebar-bg);
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.admin-shell-brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 0.75rem;
}
.admin-shell-brand-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.admin-shell-brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.admin-shell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.admin-shell-nav-link {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  background-color: transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.admin-shell-nav-link:hover {
  background-color: rgba(61, 143, 209, 0.08);
  color: var(--text-primary);
  border-color: rgba(61, 143, 209, 0.12);
}
.admin-shell-nav-link:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
.admin-shell-nav-link--active {
  color: var(--brand-primary);
  background: rgba(61, 143, 209, 0.1);
  border-color: rgba(61, 143, 209, 0.28);
  box-shadow: 0 0 0 1px rgba(61, 143, 209, 0.12);
}
.admin-shell-footer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--koral-border);
}
.admin-shell-user {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-shell-signout-wrap :is(button, span) {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0.35rem 0;
  text-align: left;
  border-radius: var(--radius-md);
  transition: color 0.15s ease;
  font-family: inherit;
}
.admin-shell-signout-wrap button:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}
.admin-shell-main {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem 2.5rem;
  background: var(--admin-main-bg);
}
@media (min-width: 768px) {
  .admin-shell-root {
    flex-direction: row;
  }
  .admin-shell-aside {
    display: flex;
    flex-direction: column;
    width: var(--admin-sidebar-width);
    min-height: 100vh;
    border-bottom: none;
    border-right: 1px solid rgba(61, 143, 209, 0.12);
    padding: 1.35rem 0.875rem 1.25rem 1rem;
    box-sizing: border-box;
    box-shadow: 2px 0 24px rgba(15, 23, 42, 0.06);
  }
  .admin-shell-brand {
    margin-bottom: 1rem;
    flex-shrink: 0;
  }
  .admin-shell-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.2rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
    margin-right: -0.2rem;
  }
  .admin-shell-nav::-webkit-scrollbar {
    width: 5px;
  }
  .admin-shell-nav::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 5px;
  }
  .admin-shell-nav-link {
    display: block;
    padding: 0.55rem 0.8rem;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    background-color: transparent;
  }
  .admin-shell-nav-link:hover {
    background-color: rgba(61, 143, 209, 0.08);
    border-color: rgba(61, 143, 209, 0.1);
    color: var(--text-primary);
  }
  .admin-shell-nav-link--active {
    background: rgba(61, 143, 209, 0.08);
    border-color: rgba(61, 143, 209, 0.15);
    box-shadow: inset 3px 0 0 var(--brand-primary);
  }
  .admin-shell-footer {
    margin-top: auto;
    padding-top: 1rem;
    flex-shrink: 0;
  }
  .admin-shell-main {
    padding: 1.75rem 2rem 3rem;
  }
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1400px;
}
.dashboard-page-head {
  margin-bottom: 0.25rem;
}
.dashboard-muted {
  color: var(--text-muted);
}
.dashboard-assignee-name {
  font-weight: 600;
  color: var(--text-primary);
}
.dashboard-page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.dashboard-page-sub {
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 36rem;
  line-height: 1.45;
}
.dashboard-page-sub strong {
  color: var(--brand-primary);
  font-weight: 600;
}
.dashboard-stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  padding-top: 1.35rem;
}
.dashboard-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0b63d8, rgba(45, 140, 255, 0.65));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.dashboard-stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.dashboard-stat-value {
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dashboard-two-col {
  display: grid;
  gap: 1.125rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .dashboard-two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}
.dashboard-section-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.dashboard-section-title--accent {
  color: var(--brand-primary);
}
.dashboard-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.dashboard-list li + li {
  margin-top: 0.35rem;
}
.dashboard-card-danger {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(160deg, rgba(220, 38, 38, 0.06) 0%, var(--koral-surface) 50%);
}
.dashboard-card-danger .dashboard-section-title {
  color: #b91c1c;
}
.dashboard-funnel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  font-size: 0.875rem;
}
@media (min-width: 768px) {
  .dashboard-funnel {
    grid-template-columns: repeat(5, 1fr);
  }
}
.dashboard-funnel-item {
  border-radius: var(--radius-md);
  background: var(--koral-surface-elevated);
  border: 1px solid var(--koral-border);
  padding: 0.55rem 0.65rem;
}
.dashboard-funnel-item span {
  color: var(--text-muted);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.dashboard-funnel-item strong {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.dashboard-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.client-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #f6f8fb;
  color: #111827;
}
.client-shell-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid #e3e8ef;
  background: #ffffff;
  padding: 1.35rem 0.75rem;
}
.client-shell-main {
  min-width: 0;
  min-height: 100vh;
}
.client-shell-topbar {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e3e8ef;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 2rem;
}
.client-shell-welcome {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}
.client-shell-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.8125rem;
  color: #64748b;
}
.client-shell-topbar-icon {
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6deeb;
  color: #0b4f9f;
}
.client-shell-body {
  padding: 2rem;
  max-width: 76rem;
  margin: 0 auto;
}
.client-shell-brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  padding: 0 0.35rem;
}
.client-shell-logo-img {
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.client-shell-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.client-shell-org {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #111827;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.client-shell-sub {
  font-size: 0.7rem;
  font-weight: 650;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.client-shell-new-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.35rem;
  background: linear-gradient(180deg, #0969da, #0757b8);
  padding: 0.8rem 1rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(9, 105, 218, 0.24);
}
.client-shell-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.client-shell-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  padding: 0.62rem 0.7rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.client-shell-nav-link--active {
  border-color: #e3e8ef;
  background: #ffffff;
  color: #0b4f9f;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.client-shell-nav-link--muted {
  color: #64748b;
}
.client-shell-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid #e3e8ef;
  padding-top: 1rem;
}
.client-shell-signout button {
  margin: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
}
.client-shell-support {
  color: #0b4f9f;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.client-shell-support:hover {
  text-decoration: underline;
}
.client-shell-email {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-shell-mobile-footer {
  display: none;
}

.client-page-intro {
  margin-bottom: 1.1rem;
}
.client-page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.04em;
  line-height: 1.12;
}
.client-page-lead {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
  max-width: 38rem;
}
.client-dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}
.client-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.5rem, 1fr));
  gap: 0.65rem;
}
.client-dashboard-stats span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid #e3e8ef;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.7rem 0.8rem;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.client-dashboard-stats strong {
  color: #111827;
  font-size: 1.35rem;
  line-height: 1;
}

.client-prefs-card {
  padding: 1rem 1.15rem;
}
.client-prefs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.client-prefs-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.client-prefs-hint {
  margin-top: 0.65rem;
  line-height: 1.45;
}

.client-articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
}
.client-article-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 9.5rem;
  padding: 1.1rem;
  border-radius: 0.65rem;
  border: 1px solid #e1e7ef;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.client-article-card:hover {
  border-color: #b7c9df;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
  transform: translateY(-1px);
}
.client-article-card-text {
  min-width: 0;
  flex: 1;
}
.client-article-card-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b8794;
}
.client-article-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}
.client-article-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}
.client-article-card-journal {
  font-size: 0.8125rem;
  color: #64748b;
}
.client-article-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.client-article-card-time {
  font-size: 0.75rem;
  color: #64748b;
  text-align: right;
  max-width: 9rem;
  line-height: 1.3;
}
.client-article-card-chevron {
  font-size: 1.1rem;
  color: #0b4f9f;
  opacity: 0.85;
}
.client-article-progress {
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
  margin-top: 1rem;
}
.client-article-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d3f83, #0969da);
}
.client-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eef2ff;
  color: #123a76;
  border: 1px solid #dce5ff;
}
.client-status-pill--large {
  font-size: 0.8125rem;
  padding: 0.35rem 0.75rem;
}
.client-priority {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.client-priority--urgent {
  color: #dc2626;
}
.client-priority--high {
  color: #ca8a04;
}

.client-empty {
  text-align: center;
  padding: 2rem 1.25rem;
}
.client-empty-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.client-empty-text {
  font-size: 0.875rem;
  color: #71717a;
  line-height: 1.5;
  max-width: 22rem;
  margin: 0 auto;
}

.client-back-nav {
  margin-bottom: -0.25rem;
}
.client-back-link {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
}
.client-back-link:hover {
  color: var(--brand-primary);
}

.client-article-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7b8794;
  margin: 0 0 0.35rem;
}
.client-article-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}
.client-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}
.client-deadline-hint {
  font-size: 0.8125rem;
  color: #64748b;
}
.client-deadline-hint time {
  color: var(--text-primary);
  font-weight: 500;
}

.client-files-card {
  padding: 1.1rem 1.15rem;
}
.client-files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.client-file-row {
  border-radius: 0.65rem;
  background: var(--koral-surface-elevated);
  border: 1px solid var(--koral-border);
}
.client-file-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}
.client-file-link:hover {
  text-decoration: underline;
}
.client-file-icon {
  font-size: 0.85rem;
  opacity: 0.75;
}

.client-timeline-card {
  padding: 1.15rem 1.15rem 1.25rem;
}

.client-article-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.client-article-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 1rem;
  align-items: start;
}
.client-article-main,
.client-article-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.client-project-card,
.client-materials-card,
.client-side-card,
.client-journal-checklist {
  border-radius: 0.6rem;
  border-color: #dfe6ee;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}
.client-journal-checklist h2 {
  margin: -0.1rem 0 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827 !important;
}
.client-journal-checklist > p {
  border-bottom: 1px solid #e3e8ef;
  margin-bottom: 0;
  padding-bottom: 0.9rem;
  color: #64748b;
}
.client-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.client-section-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 750;
  color: #6b7280;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.client-pipeline {
  margin-top: 1.6rem;
}
.client-pipeline-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: 1rem 1.4rem;
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}
.client-pipeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  text-align: center;
  color: #b6beca;
  font-size: 0.68rem;
  font-weight: 700;
}
.client-pipeline-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 0.48rem;
  right: -0.95rem;
  color: #b7c4d6;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}
.client-pipeline-step.is-done:not(:last-child)::after,
.client-pipeline-step.is-current:not(:last-child)::after {
  color: #0b4f9f;
}
.client-pipeline-icon {
  display: flex;
  height: 2.05rem;
  width: 2.05rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: #f1f5f9;
  color: #b6beca;
  box-shadow: inset 0 0 0 1px #e3e8ef;
}
.client-pipeline-step.is-done,
.client-pipeline-step.is-current {
  color: #0f2f63;
}
.client-pipeline-step.is-done .client-pipeline-icon {
  background: #0d2f66;
  color: #ffffff;
}
.client-pipeline-step.is-current .client-pipeline-icon {
  background: #0969da;
  color: #ffffff;
  box-shadow: 0 0 0 0.35rem rgba(9, 105, 218, 0.12);
}
.client-pipeline-label {
  line-height: 1.18;
}
.client-next-card {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.35rem;
  border-radius: 0.35rem;
  background: #f2f4f8;
  padding: 1rem;
}
.client-next-icon {
  display: flex;
  height: 2rem;
  width: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #0b4f9f;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}
.client-next-card h2 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
}
.client-next-card p {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}
.client-next-card .client-next-deadline {
  margin-top: 0.35rem;
  color: #0f2f63;
  font-weight: 650;
}
.client-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e3e8ef;
  margin: -1.25rem -1.35rem 1rem;
  padding: 1rem 1.35rem;
}
.client-card-title-row h2,
.client-side-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 800;
}
.client-card-title-action {
  color: #0b4f9f;
  font-size: 0.85rem;
  font-weight: 700;
}
.client-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.client-material-tile {
  border-radius: 0.35rem;
  border: 1px solid #edf1f6;
  background: #fbfcfe;
  padding: 0.85rem;
}
.client-material-link {
  display: flex;
  min-height: 5.2rem;
  flex-direction: column;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}
.client-material-icon {
  color: #0969da;
  font-size: 1.25rem;
}
.client-material-name {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}
.client-material-meta {
  margin-top: auto;
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
}
.client-empty-material {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.9rem;
}
.client-side-card {
  padding: 1rem;
}
.client-side-card h2 {
  font-size: 1.05rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e3e8ef;
}
.client-activity-list {
  position: relative;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0 0 0 1.2rem;
}
.client-activity-list::before {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.2rem;
  bottom: 0.3rem;
  width: 1px;
  background: #e3e8ef;
}
.client-activity-item {
  position: relative;
  padding-bottom: 1rem;
}
.client-activity-dot {
  position: absolute;
  left: -1.15rem;
  top: 0.15rem;
  height: 1rem;
  width: 1rem;
  border-radius: 999px;
  background: #dbeafe;
  box-shadow: inset 0 0 0 4px #f8fbff;
}
.client-activity-item--status .client-activity-dot {
  background: #0d2f66;
}
.client-activity-item h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
}
.client-activity-item p {
  margin: 0.2rem 0 0;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.45;
}
.client-activity-item time {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.68rem;
}
.journal-checklist-list {
  margin-top: 1rem;
}
.journal-checklist-list::before {
  background: #dbe5f2;
}
.journal-checklist-item {
  padding-bottom: 1.05rem;
}
.journal-checklist-item:last-child {
  padding-bottom: 0;
}
.journal-checklist-dot {
  background: #0d2f66;
}
.journal-checklist-item h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #111827;
}
.journal-checklist-item p {
  margin: 0.25rem 0 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}
.client-activity-empty,
.client-team-empty {
  color: #64748b;
  font-size: 0.85rem;
}
.client-team-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.client-team-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}
.client-team-avatar {
  display: flex;
  height: 2.35rem;
  width: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  border: 1px solid #e3e8ef;
  background: linear-gradient(180deg, #ffffff, #eef3f8);
  color: #0b4f9f;
  font-weight: 800;
}
.client-team-member strong,
.client-team-member small {
  display: block;
}
.client-team-member strong {
  color: #111827;
  font-size: 0.85rem;
  line-height: 1.15;
}
.client-team-member small {
  color: #64748b;
  font-size: 0.72rem;
}
.client-team-member a {
  color: #0b4f9f;
  text-decoration: none;
}
.client-journal-promo {
  min-height: 7.5rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.74)),
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.45), transparent 35%),
    linear-gradient(135deg, #dbeafe, #0f2f63);
  padding: 1rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}
.client-journal-promo p {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  opacity: 0.9;
}
.client-journal-promo strong {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.client-journal-checklist,
.client-timeline-card,
.client-files-card {
  max-width: calc(76rem - 2rem);
}

@media (max-width: 520px) {
  .client-article-card {
    flex-direction: column;
    align-items: stretch;
  }
  .client-article-card-aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .client-article-card-time {
    text-align: left;
    max-width: none;
  }
  .client-shell-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  .client-shell {
    display: block;
  }
  .client-shell-sidebar {
    display: none;
  }
  .client-shell-topbar {
    padding: 0.75rem 1rem;
  }
  .client-shell-body {
    padding: 1rem;
  }
  .client-shell-mobile-footer {
    position: fixed;
    z-index: 30;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0.35rem;
    border: 1px solid #dfe6ee;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.45rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  }
  .client-dashboard-hero,
  .client-project-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .client-article-dashboard {
    grid-template-columns: 1fr;
  }
  .client-article-aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
}

/* Публичная главная */
.landing-root {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f6ff 48%, #fbfdff 100%);
  overflow-x: hidden;
}
.landing-root::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 52% 32% at 8% 5%, rgba(45, 125, 210, 0.09), transparent 60%),
    radial-gradient(ellipse 48% 28% at 96% 12%, rgba(74, 154, 232, 0.1), transparent 58%);
  pointer-events: none;
}
.landing-header {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.82rem clamp(1rem, 3vw, 1.6rem);
  border-bottom: 1px solid rgba(216, 224, 235, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}
.landing-brand {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0b63d8;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.landing-nav {
  display: none;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin-left: auto;
}
.landing-nav a {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.landing-nav a:hover {
  color: #0b63d8;
}
.landing-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(45, 125, 210, 0.25);
  border-radius: 0.55rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  box-shadow: 0 8px 18px rgba(11, 99, 216, 0.24);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.landing-header-cta:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.landing-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 7vw, 5rem);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 5.5rem) clamp(1rem, 3vw, 1.6rem) 3rem;
  box-sizing: border-box;
}
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}
.landing-hero-copy {
  max-width: 36rem;
}
.landing-kicker {
  display: inline-flex;
  margin: 0 0 1rem;
  border: 1px solid rgba(11, 99, 216, 0.16);
  border-radius: 999px;
  background: rgba(11, 99, 216, 0.055);
  padding: 0.28rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0b63d8;
}
.landing-title {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 7vw, 4.35rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.07em;
  color: var(--text-primary);
}
.landing-title-gold {
  display: inline;
  background: linear-gradient(105deg, #0759c8, #1685ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.landing-lead {
  margin: 0 0 1.6rem;
  font-size: clamp(0.96rem, 2vw, 1.08rem);
  line-height: 1.65;
  color: #475569;
  max-width: 31rem;
}
.landing-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.landing-proof strong {
  color: var(--text-primary);
}
.landing-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: -0.55rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}
.landing-avatar-blue {
  background: #dbeafe;
  color: #1d4ed8;
}
.landing-avatar-dark {
  margin-right: 0.4rem;
  background: #111827;
  color: #ffffff;
}
.landing-login-card {
  width: 100%;
  max-width: 34.5rem;
  box-sizing: border-box;
  border: 1px solid var(--koral-border);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  padding: clamp(1.35rem, 3vw, 2.1rem);
}
.landing-login-card h2 {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: clamp(1.22rem, 3vw, 1.55rem);
  color: var(--text-primary);
  letter-spacing: -0.035em;
}
.landing-login-copy {
  margin: 0 0 1.25rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}
.landing-section {
  scroll-margin-top: 5rem;
}
.landing-section-kicker {
  margin: 0 0 0.45rem;
  text-align: center;
  color: #0b63d8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.landing-section-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-primary);
  letter-spacing: -0.055em;
}
.landing-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.landing-feature-card {
  min-height: 11rem;
  border: 1px solid var(--koral-border);
  border-radius: 0.72rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
  padding: 1.45rem;
}
.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1.15rem;
  border-radius: 0.42rem;
  background: #eef4ff;
  color: #0b63d8;
  font-size: 1.1rem;
  font-weight: 800;
}
.landing-feature-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  color: var(--text-primary);
}
.landing-feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}
.landing-trust {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  border-radius: 1rem;
  background: #0c1628;
  color: #ffffff;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  scroll-margin-top: 5rem;
}
.landing-trust-copy h2 {
  margin: 0 0 1rem;
  max-width: 28rem;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}
.landing-trust-copy p {
  margin: 0 0 1.4rem;
  max-width: 32rem;
  color: #cbd5e1;
  line-height: 1.65;
}
.landing-trust-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
}
.landing-trust-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #e5e7eb;
  font-size: 0.92rem;
}
.landing-trust-list li::before {
  content: "✓";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(45, 125, 210, 0.18);
  color: #bfdbfe;
  font-size: 0.78rem;
}
.landing-trust-visual {
  min-height: 17.5rem;
  border-radius: 0.8rem;
  background: radial-gradient(circle at 28% 6%, rgba(255, 255, 255, 0.55), transparent 8%),
    radial-gradient(circle at 35% 16%, rgba(255, 255, 255, 0.18), transparent 15%),
    linear-gradient(145deg, #334155, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0.9;
}
.landing-monitor {
  width: min(72%, 22rem);
  aspect-ratio: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.7rem;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.28);
  padding: 1rem;
  transform: rotate(-2deg);
}
.landing-monitor-glow {
  width: 4.8rem;
  height: 4.8rem;
  margin: -0.3rem 0 0.7rem 0.25rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(226, 232, 240, 0.38), transparent 62%);
  filter: blur(1px);
}
.landing-monitor span {
  display: block;
  height: 0.72rem;
  margin-bottom: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.95), rgba(148, 163, 184, 0.18));
}
.landing-monitor span:nth-child(2) {
  width: 72%;
}
.landing-monitor span:nth-child(3) {
  width: 48%;
}
.landing-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.45rem;
  border-top: 1px solid var(--koral-border);
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
}
.landing-footer strong {
  color: var(--text-primary);
  font-size: 0.82rem;
  letter-spacing: -0.03em;
}
.landing-footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (min-width: 720px) {
  .landing-nav {
    display: flex;
  }
  .landing-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr) minmax(29rem, 36rem);
  }
  .landing-trust {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 32rem);
  }
}

@media (max-width: 520px) {
  .landing-header {
    align-items: center;
  }
  .landing-header-cta {
    padding-inline: 0.75rem;
  }
  .landing-proof {
    align-items: flex-start;
  }
  .landing-login-card {
    border-radius: 0.9rem;
  }
  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Контент админки: ширина и вертикальный ритм без Tailwind */
.admin-page {
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.admin-page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.admin-page-lead {
  margin: 0.5rem 0 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.admin-page-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Аналитика: структура и типографика */
.analytics-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 1200px;
}
.analytics-page__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.analytics-page__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.analytics-page__lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.analytics-alert {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: rgba(251, 191, 36, 0.12);
  font-size: 0.9375rem;
  color: #92400e;
}
.analytics-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.analytics-toolbar__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.analytics-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.analytics-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  color: var(--text-secondary);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.analytics-chip:hover {
  border-color: rgba(61, 143, 209, 0.35);
  color: var(--text-primary);
  background: rgba(61, 143, 209, 0.06);
}
.analytics-chip--active {
  border-color: var(--brand-primary);
  background: rgba(61, 143, 209, 0.12);
  color: var(--brand-gold-dim);
  font-weight: 600;
}
.analytics-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
}
.analytics-quick-links__a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}
.analytics-quick-links__a:hover {
  text-decoration: underline;
}
.analytics-quick-links__sep {
  color: var(--text-muted);
  user-select: none;
}
.analytics-kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.analytics-kpi {
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
}
.analytics-kpi__label {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.analytics-kpi__value {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.analytics-kpi__hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.analytics-section {
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  padding: 1.35rem 1.4rem 1.45rem;
  box-shadow: var(--shadow-card);
}
.analytics-section__title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.analytics-section__desc {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 48rem;
}
.analytics-funnel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .analytics-funnel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.65rem;
  }
}
.analytics-funnel__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface-elevated);
}
.analytics-funnel__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}
.analytics-funnel__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.analytics-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface-elevated);
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.analytics-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--koral-border);
  background: var(--koral-surface);
  white-space: nowrap;
}
.analytics-table td {
  padding: 0.75rem 1rem;
  vertical-align: top;
  color: var(--text-primary);
  border-bottom: 1px solid var(--koral-border);
}
.analytics-table tbody tr:last-child td {
  border-bottom: none;
}
.analytics-table tbody tr:hover {
  background: rgba(61, 143, 209, 0.04);
}
.analytics-table .analytics-table__muted {
  color: var(--text-muted);
}
.analytics-deadlines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.analytics-deadlines li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--koral-border);
  font-size: 1rem;
  color: var(--text-primary);
}
.analytics-deadlines li:last-child {
  border-bottom: none;
}
.analytics-deadlines__week {
  font-weight: 500;
  color: var(--text-secondary);
}
.analytics-deadlines__count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-gold-dim);
}
.analytics-scroll {
  max-height: 22rem;
  overflow-y: auto;
}
.analytics-empty-note {
  margin: 0;
  padding: 1rem 1.15rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Финансы: сетки и секции целиком в CSS (клиентский компонент) */
.finance-panel-root {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.finance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.finance-toolbar__periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.finance-period-btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.finance-period-btn:hover:not(:disabled) {
  border-color: rgba(61, 143, 209, 0.35);
  color: var(--text-primary);
}
.finance-period-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.finance-period-btn--active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}
.finance-toolbar__status {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.finance-section {
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.finance-section__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--koral-border);
}
.finance-kpi-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
.finance-kpi-grid--below {
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .finance-kpi-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .finance-kpi-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .finance-kpi-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .finance-kpi-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .finance-kpi-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
.finance-metric.card {
  position: relative;
  overflow: hidden;
  padding-top: 1.15rem;
  margin: 0;
}
.finance-metric.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), rgba(130, 190, 235, 0.55));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.finance-metric__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.finance-metric__value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.finance-metric__value--accent {
  color: var(--brand-primary);
}
.finance-metric__hint {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.finance-card--tax {
  border-color: rgba(61, 143, 209, 0.25);
  background: linear-gradient(165deg, rgba(61, 143, 209, 0.06) 0%, var(--koral-surface) 55%);
}
.finance-form-grid label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.finance-form-grid .input {
  margin-top: 0.25rem;
}
.finance-form-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .finance-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .finance-form-grid--wide {
    grid-template-columns: repeat(3, 1fr);
  }
}
.finance-form-grid__actions {
  display: flex;
  align-items: flex-end;
}
.finance-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.finance-table-shell {
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface-elevated);
  overflow-x: auto;
}
.finance-table-shell table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.finance-table-shell th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: var(--koral-surface-elevated);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.finance-table-shell td {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--koral-border);
  color: var(--text-primary);
  vertical-align: top;
}
.finance-table-shell tbody tr:hover {
  background: rgba(61, 143, 209, 0.05);
}
.finance-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.finance-inline-form label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.finance-inline-form .input {
  margin-top: 0.25rem;
}
.finance-empty {
  margin: 0;
  padding: 1rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.finance-analytics-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.finance-analytics-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--koral-border);
}
.finance-analytics-list li:last-child {
  border-bottom: none;
}

/* Канбан (клиентский компонент) */
.kanban-page {
  max-width: 100%;
}
.kanban-board-scroll {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-gutter: stable;
}
.kanban-column {
  flex: 0 0 17rem;
  width: 17rem;
  max-width: 17rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface);
  box-shadow: var(--shadow-card);
  padding: 0.75rem;
  min-height: 11rem;
}
.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  padding: 0.3rem 0.35rem 0.55rem;
  border-bottom: 1px solid var(--koral-border);
}
.kanban-column-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kanban-column-count {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(61, 143, 209, 0.12);
  color: var(--brand-gold-dim);
  border: 1px solid rgba(61, 143, 209, 0.22);
}
.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 70vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.2rem;
}
.kanban-column-body::-webkit-scrollbar {
  width: 4px;
}
.kanban-column-body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 4px;
}
.kanban-card {
  cursor: grab;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--koral-border);
  background: var(--koral-surface-elevated);
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kanban-card:hover {
  border-color: rgba(61, 143, 209, 0.35);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card--dragging {
  opacity: 0.72;
}
.kanban-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  text-decoration: none;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
button.kanban-card-title {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
}
.kanban-card-title:hover {
  color: var(--brand-accent);
}
.kanban-card-meta {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.kanban-card-badges {
  min-width: 0;
  max-width: 100%;
}
.kanban-hint {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(61, 143, 209, 0.15);
  background: rgba(61, 143, 209, 0.06);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Admin redesign: светлая панель MEDLIFT в стиле лендинга */
:root {
  --brand-primary: #0b63d8;
  --brand-accent: #2d8cff;
  --brand-gold-dim: #0759c8;
  --koral-bg: #f3f6ff;
  --koral-surface: #ffffff;
  --koral-surface-elevated: #f8fbff;
  --koral-border: #dbe5f2;
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-width: 16.25rem;
  --admin-topbar-height: 4.25rem;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 35px rgba(15, 23, 42, 0.06);
  --admin-main-bg: linear-gradient(180deg, #fbfdff 0%, #f3f6ff 48%, #fbfdff 100%);
}

.admin-shell-root {
  min-height: 100vh;
  background: var(--admin-main-bg);
  color: var(--text-primary);
}
.admin-shell-aside {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--koral-border);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02), 12px 0 40px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(12px);
}
.admin-shell-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-primary);
  text-decoration: none;
  margin: 0;
}
.admin-shell-brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  overflow: hidden;
}
.admin-shell-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}
.admin-shell-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.admin-shell-brand-title {
  color: #0b63d8;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.admin-shell-brand-kicker {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.admin-shell-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(11, 99, 216, 0.18);
}
.admin-shell-nav {
  gap: 0.15rem;
}
.admin-shell-nav-row {
  display: contents;
}
.admin-shell-nav-group {
  margin: 1rem 0 0.35rem;
  padding: 0 0.45rem;
  color: #7c8da5;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.admin-shell-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.25rem;
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
  color: #475569;
  border: 1px solid transparent;
  font-weight: 650;
}
.admin-shell-nav-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #64748b;
  font-size: 0.9rem;
}
.admin-shell-nav-link:hover {
  background: rgba(11, 99, 216, 0.06);
  border-color: rgba(11, 99, 216, 0.12);
  color: #0f172a;
}
.admin-shell-nav-link--active {
  background: linear-gradient(180deg, rgba(13, 116, 238, 0.11), rgba(11, 99, 216, 0.07));
  border-color: rgba(11, 99, 216, 0.2);
  color: #0759c8;
  box-shadow: inset 3px 0 0 #0b63d8;
}
.admin-shell-nav-link--active .admin-shell-nav-icon {
  color: #0b63d8;
}
.admin-shell-footer {
  display: grid;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--koral-border);
}
.admin-shell-footer-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2rem;
  border-radius: 0.6rem;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.admin-shell-footer-link:hover {
  color: #0b63d8;
}
.admin-shell-signout-wrap :is(button, span) {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
  text-decoration: none;
}
.admin-shell-workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.admin-shell-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 32rem) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--admin-topbar-height);
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--koral-border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}
.admin-shell-topbar-title p {
  margin: 0;
  color: #0b63d8;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.admin-shell-topbar-title span {
  display: block;
  margin-top: 0.15rem;
  color: #6b7280;
  font-size: 0.75rem;
}
.admin-shell-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f8fbff;
  padding: 0 0.95rem;
  color: #9ca3af;
}
.admin-shell-search:focus-within {
  border-color: rgba(11, 99, 216, 0.28);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(11, 99, 216, 0.08);
}
.admin-shell-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 0.86rem;
}
.admin-shell-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.admin-shell-icon-button {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  color: #64748b;
  text-decoration: none;
  border: 1px solid transparent;
}
.admin-shell-icon-button:hover {
  background: rgba(11, 99, 216, 0.07);
  color: #0b63d8;
}
.admin-shell-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-left: 1rem;
  border-left: 1px solid var(--koral-border);
  min-width: 0;
}
.admin-shell-profile-avatar {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #0759c8;
  font-weight: 800;
}
.admin-shell-profile strong,
.admin-shell-profile small {
  display: block;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-shell-profile strong {
  font-size: 0.78rem;
  line-height: 1.2;
}
.admin-shell-profile small {
  color: #6b7280;
  font-size: 0.68rem;
}
.admin-shell-main {
  min-width: 0;
  flex: 1;
  padding: 1.35rem 1.5rem 2.5rem;
  background: var(--admin-main-bg);
}

.card {
  border: 1px solid var(--koral-border);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}
.btn-primary {
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(11, 99, 216, 0.18);
}
.btn-primary:hover {
  filter: brightness(1.04);
  background: linear-gradient(180deg, #1685ff 0%, #0b63d8 100%);
}
.btn-ghost {
  border-color: var(--koral-border);
  background: #ffffff;
  color: #374151;
  border-radius: 0.65rem;
}
.btn-ghost:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.input {
  border-radius: 0.65rem;
  border-color: #dfe3ea;
  background: #ffffff;
  color: #111827;
  font-size: 0.92rem;
}
.input:focus {
  border-color: rgba(11, 99, 216, 0.38);
  box-shadow: 0 0 0 4px rgba(11, 99, 216, 0.1);
}
.admin-shell-main :is(h1, h2, h3) {
  color: #111827;
}
.admin-shell-main :is(.text-gray-300, .text-gray-400, .text-gray-500) {
  color: #6b7280 !important;
}
.admin-shell-main :is(.text-slate-600, .text-slate-700, .text-slate-800) {
  color: #374151 !important;
}
.admin-shell-main :is(.border-koral-border) {
  border-color: var(--koral-border) !important;
}
.admin-shell-main :is(.bg-koral-surface, .bg-white\/80) {
  background-color: #ffffff !important;
}
.admin-shell-main :is(.bg-koral-bg, .bg-koral-surface\/40) {
  background-color: #f8fafc !important;
}
.admin-shell-main table {
  border-collapse: separate;
  border-spacing: 0;
}
.admin-shell-main th {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-shell-main td {
  color: #374151;
}
.admin-shell-main tr:hover td {
  background: #f9fafb;
}

@media (min-width: 768px) {
  .admin-shell-root {
    display: flex;
    flex-direction: row;
  }
  .admin-shell-aside {
    width: var(--admin-sidebar-width);
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    padding: 1rem 0.8rem;
    overflow: hidden;
  }
  .admin-shell-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  .admin-shell-footer {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.94);
    padding-bottom: 0.25rem;
  }
  .admin-shell-nav-link {
    display: flex;
  }
  .admin-shell-main {
    padding: 1.35rem 1.5rem 2.5rem;
  }
}

@media (max-width: 1024px) {
  .admin-shell-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 1rem;
  }
  .admin-shell-actions,
  .admin-shell-profile {
    display: none;
  }
}

@media (max-width: 767px) {
  .admin-shell-aside {
    position: relative;
    border-right: 0;
    border-bottom: 1px solid var(--koral-border);
  }
  .admin-shell-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  .admin-shell-nav-group {
    display: none;
  }
  .admin-shell-nav-row {
    display: block;
    flex: 0 0 auto;
  }
}

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.admin-page-kicker {
  margin: 0 0 0.25rem;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-page-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.04em;
}
.admin-page-subtitle {
  margin: 0.35rem 0 0;
  max-width: 46rem;
  color: #6b7280;
  font-size: 0.92rem;
}
.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid var(--koral-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
}
.admin-filter-label {
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 750;
  margin-left: 0.25rem;
}
.admin-filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.admin-filter-pill:hover,
.admin-filter-pill--active {
  border-color: rgba(11, 99, 216, 0.28);
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
  color: #ffffff;
}

.kanban-page {
  max-width: none;
}
.kanban-hint {
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #64748b;
}
.kanban-quick-create {
  padding: 1rem;
}
.kanban-quick-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.kanban-board-scroll {
  align-items: flex-start;
  gap: 1.05rem;
  padding: 0.25rem 0 1.25rem;
}
.kanban-column {
  flex: 0 0 19rem;
  width: 19rem;
  max-width: 19rem;
  min-width: 0;
  border: 0;
  border-radius: 1.15rem;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.kanban-column-head {
  border: 0;
  margin: 0 0 0.65rem;
  padding: 0 0.25rem;
}
.kanban-column-title {
  color: #111827;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.kanban-column-count {
  min-width: 1.55rem;
  border: 0;
  background: #eaf3ff;
  color: #0b63d8;
}
.kanban-column-body {
  gap: 0.7rem;
  max-height: calc(100vh - 15rem);
  min-width: 0;
  overflow-x: hidden;
  padding: 0.1rem 0.15rem 0.25rem;
}
.kanban-card {
  position: relative;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #dbe5f2;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px rgba(15, 23, 42, 0.045);
}
.kanban-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 1rem 0 0 1rem;
  background: linear-gradient(180deg, #0d74ee 0%, #0759c8 100%);
}
.kanban-card:hover {
  border-color: rgba(11, 99, 216, 0.26);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.kanban-card-title {
  color: #111827;
  font-size: 0.96rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.kanban-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  min-width: 0;
  max-width: 100%;
}
.kanban-priority,
.kanban-mini-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.kanban-priority--urgent,
.kanban-priority--high {
  background: #fee2e2;
  color: #b91c1c;
}
.kanban-priority--normal {
  background: #dbeafe;
  color: #1d4ed8;
}
.kanban-priority--low {
  background: #e0f2fe;
  color: #0369a1;
}
.kanban-mini-badge {
  background: #f3f4f6;
  color: #4b5563;
}
.kanban-card-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  color: #6b7280;
  font-size: 0.68rem;
}
.kanban-card-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  min-width: 0;
  color: #6b7280;
}
.kanban-card-client {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #0759c8;
  font-size: 0.58rem;
  font-weight: 850;
}
.kanban-card-meta {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #475569;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kanban-card-date {
  color: #9ca3af;
  font-size: 0.68rem;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .kanban-quick-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-page-header {
    flex-direction: column;
  }
  .admin-page-actions {
    justify-content: flex-start;
  }
  .kanban-quick-create-form {
    grid-template-columns: 1fr;
  }
}

/* Kanban-only admin view: ближе к референсу, без лишних разделов */
.admin-shell-nav-group {
  display: none;
}
.admin-shell-nav {
  margin-top: 0.1rem;
}
.admin-shell-footer {
  border-top-color: #eef0f3;
}
.admin-shell-topbar-title span {
  display: none;
}
.admin-shell-icon-button {
  border: 0;
  background: transparent;
  cursor: default;
  font: inherit;
}
.kanban-page {
  gap: 1.15rem;
}
.kanban-reference-toolbar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 3.35rem;
  padding: 0 0.2rem 1rem;
  border-bottom: 1px solid #dbe5f2;
}
.kanban-team-stack {
  display: flex;
  align-items: center;
  padding-left: 0.2rem;
}
.kanban-team-stack span {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  margin-left: -0.45rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #0759c8;
  font-size: 0.68rem;
  font-weight: 850;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}
.kanban-team-stack span:first-child {
  margin-left: 0;
}
.kanban-team-stack span:last-child {
  background: #f3f4f6;
  color: #64748b;
}
.kanban-showing {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
}
.kanban-showing strong {
  padding: 0.42rem 0.62rem;
  border-radius: 0.55rem;
  background: #eaf3ff;
  color: #0b63d8;
  font-size: 0.78rem;
}
.kanban-reference-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
}
.kanban-reference-field {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}
.kanban-reference-field span {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1;
}
.kanban-reference-select,
.kanban-reference-filter,
.kanban-view-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  border: 1px solid #dbe5f2;
  border-radius: 0.65rem;
  background: #ffffff;
  color: #374151;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.kanban-reference-select {
  min-width: 9rem;
}
.kanban-reference-filter {
  cursor: pointer;
}
.kanban-reference-select:hover,
.kanban-reference-filter:hover,
.kanban-view-toggle:hover {
  border-color: rgba(11, 99, 216, 0.28);
  color: #0b63d8;
}
.kanban-reference-filter {
  gap: 0.3rem;
}
.kanban-view-toggle {
  justify-content: center;
  width: 2.35rem;
  padding: 0;
  color: #64748b;
}
.admin-filter-bar--compact {
  display: none;
}
.kanban-hint,
.kanban-quick-create {
  display: none;
}
.kanban-board-scroll {
  padding-top: 0.15rem;
}

@media (max-width: 980px) {
  .kanban-reference-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .kanban-reference-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
