:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --border: #e4e7ec;
  --primary: #2563eb;
  --primary-2: #0ea5e9;
  --primary-soft: #eaf2ff;
  --green: #16a34a;
  --yellow: #f59e0b;
  --red: #dc2626;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(16, 24, 40, .08);
  --shadow-sm: 0 10px 30px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { font-size: 15px; min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 12% 0, rgba(37,99,235,.13), transparent 34rem), linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  font-family: "Segoe UI", Arial, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: #1d4ed8; }

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 300px;
  flex: 0 0 300px;
  min-height: 100vh;
  position: sticky;
  top: 0;
  padding: 22px 18px;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 20px 0 50px rgba(15, 23, 42, .12);
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.9), rgba(14,165,233,.8));
  box-shadow: 0 16px 36px rgba(37, 99, 235, .25);
}
.brand-box:hover { color: #fff; }
.brand-logo, .auth-logo {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 17px;
  color: #0f172a;
  background: #fde047;
  font-weight: 900;
  letter-spacing: -.04em;
}
.brand-name { display: block; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.brand-desc { display: block; color: rgba(255,255,255,.78); font-size: .84rem; margin-top: 3px; }
.version-badge {
  margin: 0 0 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37,99,235,.12);
  font-weight: 800;
  font-size: .78rem;
  text-align: center;
}
.menu-group { display: grid; gap: 6px; margin-bottom: 18px; }
.menu-title { color: #94a3b8; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 900; padding: 7px 11px; }
.menu-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 16px;
  color: #d1d5db;
  font-weight: 750;
  }
.menu-link:hover { color: #fff; background: rgba(255,255,255,.09); }
.menu-link-primary { color: #0f172a; background: #fde047; }
.menu-link-primary:hover { color: #0f172a; background: #facc15; }
.sidebar-note {
  margin-top: 22px;
  padding: 16px;
  border-radius: 20px;
  color: #cbd5e1;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}
.sidebar-note p { margin: 8px 0 0; color: #94a3b8; line-height: 1.5; }

.app-body { flex: 1; min-width: 0; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(248, 251, 255, .86);
  border-bottom: 1px solid rgba(228,231,236,.86);
  backdrop-filter: blur(16px);
}
.topbar-title strong { display: block; font-size: 1.05rem; font-weight: 900; }
.topbar-title span { display: block; color: var(--muted); font-size: .86rem; }
.page-container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 30px 34px 60px; }

.user-panel { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 38px; height: 38px; display:flex; align-items:center; justify-content:center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); font-weight: 900; }
.user-meta { display: grid; line-height: 1.1; }
.user-meta strong { max-width: 230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size: .9rem; }
.user-meta span { color: var(--muted); font-size: .75rem; }

.hero-card, .page-head, .simple-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid rgba(228,231,236,.92);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,246,255,.98));
  box-shadow: var(--shadow-sm);
}
.eyebrow, .page-kicker { display:inline-flex; margin-bottom: 8px; color: var(--primary); text-transform: uppercase; letter-spacing: .09em; font-size: .74rem; font-weight: 900; }
h1, .page-title { margin: 0; font-size: clamp(1.8rem, 2.6vw, 3rem); font-weight: 900; letter-spacing: -.055em; }
h2 { font-weight: 900; letter-spacing: -.035em; }
.hero-card p, .page-subtitle { margin: 9px 0 0; color: var(--muted); line-height: 1.62; max-width: 860px; }

.workspace-card, .card, .guide-card, .card-metric, .table-responsive.card, .resource-card, .ticket-card {
  border: 1px solid rgba(228,231,236,.92) !important;
  border-radius: var(--radius) !important;
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow-sm) !important;
}
.workspace-card { padding: 24px; }
.card-header { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0 !important; background: #fff !important; padding: 1.05rem 1.2rem; }
.card-body { padding: 1.2rem; }

.btn { border-radius: 14px; font-weight: 800; padding: .66rem 1.04rem; }
.btn-sm { border-radius: 11px; padding: .45rem .75rem; }
.btn-lg { border-radius: 16px; padding: .82rem 1.22rem; }
.btn-primary, .btn-success { border: 0; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 14px 28px rgba(37, 99, 235, .25); }
.btn-primary:hover, .btn-success:hover { filter: brightness(.96); }
.btn-light { background: #fff; border: 1px solid var(--border); }
.btn-outline-secondary, .btn-secondary { border-color: var(--border); }

.form-label { color: #344054; font-weight: 800; margin-bottom: .5rem; }
.form-control, .form-select {
  border-radius: 16px;
  border-color: #d0d5dd;
  padding: .76rem .95rem;
  color: var(--text);
  background-color: #fff;
}
.form-control-lg, .form-select-lg { min-height: 56px; font-size: 1.02rem; }
.form-control:focus, .form-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 .24rem rgba(37,99,235,.14); }
.form-text, .text-muted { color: var(--muted) !important; }
textarea.form-control { line-height: 1.58; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.notice-box { display: grid; gap: 3px; padding: 15px 17px; border-radius: 20px; background: #f8fafc; border: 1px solid var(--border); }
.notice-box span { color: var(--muted); }
.notice-info { background: var(--primary-soft); border-color: #bfdbfe; }
.service-panel { padding: 18px; border-radius: 20px; background: #f8fafc; border: 1px dashed #cbd5e1; }
.upload-box { padding: 14px; border-radius: 20px; border: 1px dashed #94a3b8; background: #f8fafc; }
.upload-hint { margin-top: 8px; color: var(--muted); font-size: .9rem; }

.table { --bs-table-bg: transparent; }
.table thead th { color: #667085; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); background: #f8fafc; }
.table > :not(caption) > * > * { padding: .98rem 1rem; border-color: var(--border); }
.table-hover tbody tr:hover { background: #f8fbff; }

.badge, .status-pill, .status-chip { display:inline-flex; align-items:center; gap:.35rem; border-radius:999px; padding:.43rem .78rem; font-size:.86rem; font-weight:900; }
.status-pill, .status-chip { background: var(--primary-soft); color:#1d4ed8; }
.status-chip.success { background:#dcfce7; color:#166534; }
.status-chip.warning { background:#fef3c7; color:#92400e; }
.status-chip.danger { background:#fee2e2; color:#991b1b; }
.status-chip.muted { background:#f1f5f9; color:#475569; }

.card-metric { overflow:hidden; position:relative; }
.card-metric::after { content:""; position:absolute; width:120px; height:120px; right:-45px; top:-50px; border-radius:999px; background:rgba(37,99,235,.1); }
.metric-value { font-size:2.35rem; line-height:1; font-weight:900; letter-spacing:-.05em; }
.metric-label { color:var(--muted); font-weight:800; }

.quick-actions { display:flex; flex-wrap:wrap; gap:.65rem; }
.quick-action { display:inline-flex; align-items:center; gap:.45rem; padding:.7rem 1rem; border-radius:999px; background:#fff; border:1px solid var(--border); color:#344054; font-weight:850; box-shadow:0 7px 18px rgba(16,24,40,.06); }
.quick-action:hover { background:var(--primary-soft); border-color:#bfdbfe; color:#1d4ed8; }

.ticket-card-list, .resource-grid { display:grid; gap: .9rem; }
.resource-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ticket-card, .resource-card { display:block; padding:1.18rem 1.25rem; color:var(--text); transition:.16s ease; }
.ticket-card:hover, .resource-card:hover { color:var(--text); border-color:#bfdbfe !important; box-shadow:0 20px 42px rgba(37,99,235,.12) !important; }
.ticket-card-title { font-weight:900; font-size:1.08rem; letter-spacing:-.025em; }

.info-line { display:flex; justify-content:space-between; gap:1rem; padding:.66rem 0; border-bottom:1px solid #eef2f7; }
.info-line:last-child { border-bottom:0; }
.info-line span { color:var(--muted); }
.info-line strong { text-align:right; font-weight:850; }

.message-bubble { padding:.95rem 1rem; border-radius:20px; background:#f8fafc; border:1px solid #eef2f7; }
.message-bubble.internal { background:#fff7ed; border-color:#fed7aa; }
.message-meta { color:var(--muted); font-size:.83rem; margin-bottom:.35rem; }

.auth-layout { min-height: calc(100vh - 140px); display:grid; grid-template-columns: 1fr 470px; gap: 26px; align-items:center; }
.auth-welcome { padding: 40px; border-radius: 34px; color:#fff; background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0ea5e9); box-shadow: var(--shadow); }
.auth-welcome h1 { color:#fff; }
.auth-welcome p { color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.7; }
.auth-points { display:grid; gap: 10px; margin-top: 26px; }
.auth-points span { display:inline-flex; width:max-content; max-width:100%; padding:9px 12px; border-radius:999px; color:#dbeafe; background:rgba(255,255,255,.11); }
.auth-card { padding: 32px; border: 1px solid var(--border); border-radius: 30px; background:#fff; box-shadow: var(--shadow); }
.auth-card h2 { margin: 18px 0 4px; }
.auth-link { text-align:center; font-weight:800; }

@media (max-width: 992px) {
  .app-shell { display:block; }
  .app-sidebar { position:relative; width:100%; min-height:auto; display:block; }
  .app-topbar { position:relative; padding:16px 18px; }
  .page-container { padding:20px 16px 40px; }
  .hero-card, .page-head, .simple-hero { flex-direction:column; padding:22px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-welcome { display:none; }
}

@media (max-width: 640px) {
  .user-meta { display:none; }
  .workspace-card { padding:16px; }
  h1, .page-title { font-size:1.72rem; }
}

/* V11: отдельная страница авторизации без рабочих вкладок */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, .16), transparent 30rem),
    radial-gradient(circle at 82% 10%, rgba(14, 165, 233, .14), transparent 26rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.auth-only-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.auth-brand:hover { color: var(--text); }
.auth-brand strong { display: block; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.auth-brand small { display: block; color: var(--muted); font-weight: 700; }

.auth-only-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .06);
}

.auth-only-nav a {
  padding: .58rem 1rem;
  border-radius: 999px;
  color: #344054;
  font-weight: 900;
}

.auth-only-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.auth-only-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.auth-body .auth-layout {
  min-height: calc(100vh - 165px);
  grid-template-columns: minmax(0, 1.08fr) 460px;
  gap: 34px;
}

.auth-body .auth-welcome {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-body .auth-card {
  align-self: center;
}

.auth-body .validation-summary-errors,
.auth-body .text-danger {
  font-size: .9rem;
  font-weight: 700;
}

@media (max-width: 992px) {
  .auth-only-header {
    width: min(100% - 28px, 900px);
    flex-direction: column;
    align-items: stretch;
  }
  .auth-only-nav { justify-content: center; }
  .auth-only-main { width: min(100% - 28px, 900px); padding-top: 12px; }
  .auth-body .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .auth-body .auth-welcome { display: none; }
  .auth-body .auth-card { max-width: 520px; width: 100%; margin: 0 auto; }
}

/* V13: вложения добавляются по одному без затирания списка */
.attachments-panel .card-header { background: #fff; }
.attachment-list { display: grid; gap: 12px; }
.attachment-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.attachment-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  border: 1px solid #dbe7ff;
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: none;
}
.attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.attachment-title {
  font-weight: 900;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-meta {
  color: var(--muted);
  font-size: .86rem;
  margin: 2px 0 10px;
}
.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.empty-attachments {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  margin-bottom: 16px;
}
.empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  font-size: 1.35rem;
}
.single-upload-form {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
@media (max-width: 520px) {
  .attachment-card { grid-template-columns: 1fr; }
  .attachment-preview { width: 100%; height: 140px; }
}


.attachment-builder {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  background: #f8fafc;
}
.paste-upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1.5px dashed #b9c8dc;
  border-radius: 20px;
  background: #ffffff;
  cursor: text;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.paste-upload-zone:hover,
.paste-upload-zone:focus,
.paste-upload-zone.is-dragover {
  outline: none;
  border-color: #2563eb;
  background: #f2f7ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .09);
}
.paste-upload-zone.compact {
  padding: 12px;
  border-radius: 16px;
}
.paste-upload-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.selected-attachments-list {
  display: grid;
  gap: 10px;
}
.selected-attachment-empty {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px dashed #d7dee9;
}
.selected-attachment-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}
.selected-attachment-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: .8rem;
}
.selected-attachment-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.selected-attachment-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-attachment-info span {
  color: var(--muted);
  font-size: .86rem;
}
@media (max-width: 520px) {
  .selected-attachment-item { grid-template-columns: 44px 1fr; }
  .selected-attachment-item .btn { grid-column: 1 / -1; }
}


.credential-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.credential-box > div {
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(13, 110, 253, .16);
    border-radius: 16px;
    padding: 14px 16px;
}

.credential-box span {
    display: block;
    color: #667085;
    font-size: .85rem;
    margin-bottom: 4px;
}

.credential-box strong {
    display: block;
    font-size: 1.2rem;
    letter-spacing: .02em;
}


/* V16: профиль пользователя */
.user-avatar:hover { color: #fff; }
.user-meta:hover strong { color: var(--primary); }
.profile-header { display: flex; align-items: center; gap: 18px; }
.profile-avatar {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(37,99,235,.23);
}
.profile-card h2 { font-weight: 900; letter-spacing: -.04em; }


/* V23: руководительская вычитка, серверные проверки справочников, ролей и финальная приемка проекта */
.organization-list-card { overflow: hidden; }
.organization-list td, .organization-list th { vertical-align: middle; }
.organization-list tbody tr { transition: background .15s ease; }
.organization-list tbody tr:hover { background: #f8fbff; }

.status-actions { align-items: center; }
.status-action {
  background: #fff;
  border: 1.5px solid var(--border);
  box-shadow: none;
  font-weight: 900;
}
.status-action-blue { color: #2563eb; border-color: #93c5fd; }
.status-action-purple { color: #7c3aed; border-color: #c4b5fd; }
.status-action-orange { color: #b45309; border-color: #fbbf24; }
.status-action-green { color: #15803d; border-color: #86efac; }
.status-action-red { color: #dc2626; border-color: #fecaca; }
.status-action-gray { color: #475569; border-color: #cbd5e1; }
.status-action:hover { background: #f8fafc; filter: none; }
.status-action-blue.is-active { color: #fff; background: #2563eb; border-color: #2563eb; }
.status-action-purple.is-active { color: #fff; background: #7c3aed; border-color: #7c3aed; }
.status-action-orange.is-active { color: #111827; background: #fbbf24; border-color: #f59e0b; }
.status-action-green.is-active { color: #fff; background: #16a34a; border-color: #16a34a; }
.status-action-red.is-active { color: #fff; background: #dc2626; border-color: #dc2626; }

button.attachment-preview {
  appearance: none;
  padding: 0;
  cursor: pointer;
}
.attachment-preview-modal .modal-body { min-height: 420px; background: #f8fafc; }
.attachment-modal-image { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow-sm); background: #fff; }
.attachment-modal-frame { width: 100%; height: 72vh; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.attachment-preview-empty { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px dashed #cbd5e1; border-radius: 20px; background: #fff; }

/* Служебные элементы отчетов */
.command-hero {
  background:
    radial-gradient(circle at 82% 15%, rgba(253, 224, 71, .24), transparent 22rem),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(235,245,255,.98));
}
.command-score-card {
  width: min(100%, 300px);
  padding: 22px;
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(228,231,236,.9);
  box-shadow: var(--shadow-sm);
}
.command-score { font-size: 3.2rem; line-height: 1; font-weight: 950; letter-spacing: -.08em; color: #0f172a; }
.command-progress { height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.command-progress .progress-bar, .risk-meter .progress-bar, .workload-row .progress-bar { background: linear-gradient(90deg, var(--primary), var(--primary-2)); }
.command-filter { border-radius: 24px; box-shadow: var(--shadow-sm); }
.command-panel { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-sm); }
.danger-metric { border-color: rgba(220,38,38,.18); background: linear-gradient(180deg, #fff, #fff5f5); }
.warning-metric { border-color: rgba(245,158,11,.2); background: linear-gradient(180deg, #fff, #fffbeb); }
.success-metric { border-color: rgba(22,163,74,.16); background: linear-gradient(180deg, #fff, #f0fdf4); }
.sla-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding: .42rem .72rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: .78rem;
  border: 1px solid transparent;
}
.sla-ok { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.sla-risk { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.sla-overdue { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.sla-done { color: #334155; background: #e2e8f0; border-color: #cbd5e1; }
.sla-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; display: inline-block; margin-top: 4px; }
.sla-dot.sla-ok { background: #22c55e; }
.sla-dot.sla-risk { background: #f59e0b; }
.sla-dot.sla-overdue { background: #ef4444; }
.sla-dot.sla-done { background: #94a3b8; }
.risk-meter strong { display: block; font-size: 1.35rem; font-weight: 950; letter-spacing: -.04em; }
.risk-meter .progress, .workload-row .progress { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.recommendation-card {
  padding: 15px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.recommendation-card p { margin: .35rem 0 .65rem; color: var(--muted); line-height: 1.45; }
.recommendation-danger { background: #fff1f2; border-color: #fecdd3; }
.recommendation-warning { background: #fffbeb; border-color: #fde68a; }
.recommendation-success { background: #f0fdf4; border-color: #bbf7d0; }
.mini-insight { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding: 14px 15px; border-radius: 18px; background: #0f172a; color: #e5e7eb; }
.mini-insight span { color: #cbd5e1; }
.mini-insight strong { color: #fff; }
.kanban-board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.kanban-column { min-width: 210px; padding: 12px; border-radius: 20px; background: #f8fafc; border: 1px solid #e2e8f0; }
.kanban-title { display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom: 10px; font-weight: 950; font-size: .9rem; color: #0f172a; }
.kanban-title span { display:inline-flex; align-items:center; justify-content:center; min-width: 28px; height: 28px; border-radius: 999px; background:#fff; border:1px solid #e2e8f0; color:#475569; }
.kanban-card { display:grid; grid-template-columns: 15px 1fr; gap: 0 7px; padding: 10px; border-radius: 16px; background:#fff; border:1px solid #e2e8f0; color:var(--text); margin-bottom:8px; transition:.16s ease; }
.kanban-card:hover { color:var(--text); box-shadow:0 12px 26px rgba(16,24,40,.08); }
.kanban-card strong, .kanban-card small, .kanban-card em { grid-column: 2; }
.kanban-card strong { font-size:.86rem; line-height:1.25; }
.kanban-card small { color:var(--muted); margin-top:2px; }
.kanban-card em { color:#475569; font-style:normal; font-size:.78rem; margin-top:4px; }
.kanban-empty { padding:12px; color:#94a3b8; background:#fff; border-radius:14px; border:1px dashed #cbd5e1; text-align:center; }
.workload-row { padding: 12px 0; border-bottom: 1px solid #eef2f7; }
.workload-row:last-child { border-bottom: 0; }
@media (max-width: 1280px) { .kanban-board { grid-template-columns: repeat(5, 220px); } }
@media print {
  .app-sidebar, .app-topbar, .command-filter, .btn { display:none !important; }
  .app-shell, .app-body, .page-container { display:block; padding:0; margin:0; max-width:100%; }
  .card, .page-head { box-shadow:none !important; break-inside: avoid; }
}

/* V25: быстрый демо-вход и исправление стабильности авторизации */
.demo-login {
  padding: 14px 15px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}
.demo-login-title {
  font-weight: 900;
  color: #1e3a8a;
  margin-bottom: 4px;
}
.demo-login-password {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 10px;
}
.demo-login-password code {
  padding: 2px 7px;
  border-radius: 999px;
  color: #0f172a;
  background: #fde047;
  font-weight: 900;
}
.demo-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Упрощенный деловой интерфейс */
.page-kicker, .page-subtitle, .form-text, .sidebar-note, .version-badge { display: none !important; }
.compact-head { padding-top: 20px; padding-bottom: 20px; }
.menu-link span:empty { display: none; }
.status-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.status-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.attachment-create-preview {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
}


/* Active searchable comboboxes */
.lookup-combobox {
  position: relative;
}
.lookup-combobox .lookup-input {
  padding-right: 3.4rem;
}
.lookup-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.lookup-toggle:hover,
.lookup-toggle:focus {
  background: #eef4ff;
  color: var(--primary);
  outline: none;
}
.lookup-menu {
  display: none;
  position: absolute;
  z-index: 1300;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 260px;
  overflow: auto;
  padding: .45rem;
  border: 1px solid #d0d5dd;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 24, 40, .16);
}
.lookup-combobox.is-open .lookup-menu {
  display: block;
}
.lookup-option,
.lookup-empty {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 13px;
  padding: .75rem .85rem;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.lookup-option:hover,
.lookup-option:focus {
  background: var(--primary-soft);
  color: #1d4ed8;
  outline: none;
}
.lookup-option strong {
  display: block;
  font-weight: 850;
}
.lookup-option span {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .84rem;
}
.lookup-empty {
  color: var(--muted);
  cursor: default;
}
.lookup-create-hint {
  margin-top: .35rem;
  color: var(--muted);
  font-size: .86rem;
}


/* UI cleanup: hide explanatory helper text */
.page-subtitle,
.form-text,
.lookup-create-hint,
.upload-hint,
.hero-card p,
.paste-upload-zone p,
.auth-panel p,
.auth-points,
.auth-link,
.notice-box > span {
    display: none !important;
}


/* Короткие конкретные подсказки */
.specific-note {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}
.specific-note-inline {
  display: inline-block;
  margin-left: .5rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
}

/* V30: более современный премиальный интерфейс */
:root {
  --bg: #eef4ff;
  --surface: rgba(255,255,255,.86);
  --surface-soft: rgba(248,250,252,.84);
  --text: #0b1220;
  --muted: #64748b;
  --border: rgba(148,163,184,.28);
  --primary: #245cff;
  --primary-2: #00a7ff;
  --primary-3: #7c3aed;
  --primary-soft: #eaf2ff;
  --radius: 26px;
  --shadow: 0 28px 80px rgba(15,23,42,.12);
  --shadow-sm: 0 18px 46px rgba(15,23,42,.08);
}

html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(36,92,255,.16), transparent 30rem),
    radial-gradient(circle at 84% 2%, rgba(0,167,255,.17), transparent 30rem),
    radial-gradient(circle at 64% 78%, rgba(124,58,237,.10), transparent 32rem),
    linear-gradient(180deg, #f9fbff 0%, #eef4ff 48%, #f7faff 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.10));
}

.app-sidebar {
  width: 308px;
  flex-basis: 308px;
  padding: 20px 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(37,99,235,.42), transparent 18rem),
    radial-gradient(circle at 85% 22%, rgba(14,165,233,.26), transparent 17rem),
    linear-gradient(180deg, #08111f 0%, #111827 52%, #07111f 100%);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 24px 0 70px rgba(15,23,42,.18);
}
.app-sidebar::before,
.app-sidebar::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}
.app-sidebar::before {
  left: -92px;
  top: 92px;
  background: rgba(37,99,235,.24);
}
.app-sidebar::after {
  right: -110px;
  bottom: 34px;
  background: rgba(14,165,233,.18);
}
.brand-box {
  position: relative;
  isolation: isolate;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.06)),
    linear-gradient(135deg, rgba(36,92,255,.95), rgba(0,167,255,.72));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 22px 52px rgba(37,99,235,.27);
}
.brand-box::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -54px;
  top: -60px;
  border-radius: 999px;
  background: rgba(253,224,71,.42);
  z-index: -1;
}
.brand-logo, .auth-logo {
  color: #07111f;
  background: linear-gradient(135deg, #fff7ad, #fde047 60%, #facc15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 12px 28px rgba(250,204,21,.22);
}
.brand-name { font-size: 1.02rem; }
.brand-desc { color: rgba(255,255,255,.76); }

.menu-group { gap: 8px; }
.menu-title {
  margin-top: 4px;
  color: #8ea4c4;
  padding: 10px 12px 6px;
}
.menu-link {
  position: relative;
  min-height: 48px;
  padding: 11px 12px;
  color: #d7e2f3;
  border: 1px solid transparent;
  background: rgba(255,255,255,.035);
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.menu-link:hover,
.menu-link.is-active {
  color: #fff;
  transform: translateX(3px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}
.menu-link-primary {
  color: #07111f;
  background: linear-gradient(135deg, #fff176, #fde047 42%, #7dd3fc);
  box-shadow: 0 18px 34px rgba(250,204,21,.23);
}
.menu-link-primary:hover,
.menu-link-primary.is-active {
  color: #07111f;
  background: linear-gradient(135deg, #fff59d, #fde047 44%, #38bdf8);
}
.menu-icon,
.menu-link > span:first-child {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  font-size: .96rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.menu-link-primary .menu-icon,
.menu-link-primary > span:first-child {
  color: #07111f;
  background: rgba(255,255,255,.52);
  border-color: rgba(255,255,255,.42);
}

.app-topbar {
  min-height: 78px;
  padding: 14px 34px;
  background: rgba(255,255,255,.74);
  border-bottom: 1px solid rgba(148,163,184,.22);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.topbar-title strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  letter-spacing: -.02em;
}
.topbar-title strong::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 6px rgba(37,99,235,.10);
}
.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(37,99,235,.20);
}
.user-panel .btn-light {
  border-color: rgba(148,163,184,.32);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
}

.page-container {
  max-width: 1520px;
  padding: 34px 38px 70px;
  animation: pageIn .28s ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-card, .page-head, .simple-hero {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.72) !important;
  background:
    radial-gradient(circle at 86% 12%, rgba(0,167,255,.22), transparent 22rem),
    radial-gradient(circle at 2% 90%, rgba(124,58,237,.10), transparent 20rem),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,246,255,.86));
  box-shadow: var(--shadow);
}
.hero-card::before, .page-head::before, .simple-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.36), transparent 42%, rgba(255,255,255,.22));
}
.hero-card > *, .page-head > *, .simple-hero > * { position: relative; }
.eyebrow, .page-kicker {
  padding: .38rem .68rem;
  border-radius: 999px;
  background: rgba(37,99,235,.09);
  border: 1px solid rgba(37,99,235,.14);
}
h1, .page-title {
  letter-spacing: -.065em;
  color: #08111f;
  text-wrap: balance;
}
h2 { color: #101828; }

.workspace-card, .card, .guide-card, .card-metric, .table-responsive.card, .resource-card, .ticket-card, .command-panel, .command-filter, .command-score-card {
  border: 1px solid rgba(255,255,255,.78) !important;
  background: rgba(255,255,255,.82) !important;
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm) !important;
}
.workspace-card { padding: 26px; }
.card-header {
  background: rgba(255,255,255,.65) !important;
  border-color: rgba(148,163,184,.22);
}
.card, .workspace-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover, .workspace-card:hover, .card-metric:hover, .resource-card:hover, .ticket-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96,165,250,.44) !important;
  box-shadow: 0 26px 60px rgba(37,99,235,.12) !important;
}

.btn {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  letter-spacing: -.01em;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-success {
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 72%, #38bdf8) !important;
  box-shadow: 0 18px 34px rgba(37,99,235,.24) !important;
}
.btn-outline-secondary,
.btn-secondary,
.btn-light {
  border-color: rgba(148,163,184,.32) !important;
}
.btn-outline-secondary:hover {
  color: #fff;
  background: #0f172a;
  border-color: #0f172a !important;
}

.form-label { color: #1e293b; }
.form-control, .form-select {
  min-height: 48px;
  border: 1px solid rgba(148,163,184,.35);
  background-color: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control:hover, .form-select:hover { border-color: rgba(37,99,235,.34); background-color: #fff; }
.form-control:focus, .form-select:focus {
  background-color: #fff;
  border-color: rgba(37,99,235,.62);
  box-shadow: 0 0 0 .26rem rgba(37,99,235,.13), 0 14px 28px rgba(37,99,235,.08);
}
.input-group .btn { border-radius: 0 16px 16px 0; }
.input-group .form-control { border-radius: 16px 0 0 16px; }
.specific-note {
  margin-top: .42rem;
  color: #64748b;
  font-size: .86rem;
  font-weight: 650;
}

.notice-box, .notice-info, .service-panel, .attachment-builder, .upload-box {
  border: 1px solid rgba(148,163,184,.26);
  background: rgba(248,250,252,.76);
  backdrop-filter: blur(12px);
}
.notice-info {
  background: linear-gradient(135deg, rgba(234,242,255,.96), rgba(240,249,255,.82));
  border-color: rgba(96,165,250,.32);
}
.paste-upload-zone {
  border-color: rgba(96,165,250,.32);
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.paste-upload-zone:hover,
.paste-upload-zone:focus,
.paste-upload-zone.is-dragover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(37,99,235,.10), 0 18px 38px rgba(37,99,235,.10);
}
.paste-upload-icon, .selected-attachment-icon, .attachment-preview {
  background: linear-gradient(135deg, #eaf2ff, #f0f9ff);
}

.table-responsive.card { overflow: hidden; }
.table thead th {
  color: #475569;
  background: rgba(241,245,249,.84);
  border-bottom-color: rgba(148,163,184,.24);
}
.table tbody tr { transition: background .14s ease, transform .14s ease; }
.table-hover tbody tr:hover { background: rgba(239,246,255,.82); }
.table > :not(caption) > * > * { border-color: rgba(148,163,184,.20); }
.status-pill, .status-chip {
  border: 1px solid rgba(37,99,235,.12);
  background: linear-gradient(135deg, #eaf2ff, #f0f9ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.quick-action {
  background: rgba(255,255,255,.80);
  border-color: rgba(148,163,184,.26);
  backdrop-filter: blur(12px);
}
.quick-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37,99,235,.12);
}

.auth-body {
  background:
    radial-gradient(circle at 12% 16%, rgba(37,99,235,.22), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(14,165,233,.24), transparent 30rem),
    linear-gradient(180deg, #f8fbff, #eef4ff);
}
.auth-only-header {
  margin-top: 18px;
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(18px) saturate(150%);
}
.auth-welcome {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 15%, rgba(253,224,71,.34), transparent 18rem),
    radial-gradient(circle at 20% 90%, rgba(14,165,233,.30), transparent 20rem),
    linear-gradient(135deg, #07111f 0%, #172554 52%, #075985 100%) !important;
}
.auth-welcome::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  bottom: -95px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}
.auth-card {
  border: 1px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow);
}
.demo-login {
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(248,250,252,.78);
  border-radius: 22px;
  padding: 14px;
}
.demo-login-title { font-weight: 900; letter-spacing: -.02em; }
.demo-login-password { color: var(--muted); margin-top: 3px; }
.demo-login-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.lookup-combobox { position: relative; }
.lookup-menu {
  border: 1px solid rgba(148,163,184,.28) !important;
  background: rgba(255,255,255,.94) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(15,23,42,.16) !important;
}
.lookup-option:hover, [data-lookup-option]:hover {
  background: #eef6ff !important;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: rgba(226,232,240,.6); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #93c5fd, #38bdf8);
  border: 3px solid rgba(226,232,240,.95);
  border-radius: 999px;
}

@media (max-width: 1100px) {
  .app-shell { display: block; }
  .app-sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 14px;
  }
  .menu-group { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .menu-title { grid-column: 1 / -1; }
  .app-topbar { position: sticky; padding: 12px 18px; }
  .page-container { padding: 22px 16px 48px; }
  .hero-card, .page-head, .simple-hero { border-radius: 26px; padding: 24px; }
}

@media (max-width: 640px) {
  .app-topbar { align-items: flex-start; flex-direction: column; }
  .user-panel { width: 100%; justify-content: space-between; }
  .hero-card, .page-head, .simple-hero { flex-direction: column; }
  h1, .page-title { font-size: 2rem; }
}

/* V30 extras */
.paste-upload-icon::before { content: "+"; font-weight: 950; }
.empty-icon::before { content: "↥"; }
.status-checkbox-item { background: rgba(255,255,255,.78); border-color: rgba(148,163,184,.25); }
.status-checkbox-item:hover { border-color: rgba(37,99,235,.36); box-shadow: 0 12px 26px rgba(37,99,235,.08); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.text-danger { font-weight: 750; }
.alert { border-radius: 20px; }
.modal-content { border-radius: 28px; border: 1px solid rgba(255,255,255,.78); box-shadow: var(--shadow); }

/* V31: упрощенный дизайн + нормальная мобильная версия */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #667085;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-2: #2563eb;
  --primary-soft: #eff6ff;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(15, 23, 42, .07);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .055);
}

body {
  background: #f4f7fb;
}

.app-sidebar {
  width: 270px;
  flex-basis: 270px;
  padding: 18px 14px;
  background: #111827;
  box-shadow: none;
}

.brand-box {
  border-radius: 18px;
  background: #2563eb;
  box-shadow: none;
}

.brand-logo,
.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.menu-link {
  border-radius: 13px;
  padding: 10px 12px;
}

.menu-link-primary {
  background: #eaf2ff;
  color: #174ea6;
}

.menu-link-primary:hover {
  background: #dbeafe;
  color: #174ea6;
}

.menu-link.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

.page-container {
  padding: 26px 24px 48px;
}

.hero-card,
.page-head,
.simple-hero,
.card,
.workspace-card,
.guide-card,
.card-metric,
.table-responsive.card,
.resource-card,
.ticket-card,
.command-panel,
.command-filter,
.command-score-card,
.notice-box,
.notice-info,
.service-panel,
.attachment-builder,
.upload-box,
.auth-card,
.demo-login {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  backdrop-filter: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.card:hover,
.workspace-card:hover,
.card-metric:hover,
.resource-card:hover,
.ticket-card:hover,
.quick-action:hover,
.paste-upload-zone:hover,
.paste-upload-zone:focus,
.paste-upload-zone.is-dragover {
  transform: none;
}

.btn {
  border-radius: 13px;
  box-shadow: none !important;
}

.btn-primary,
.btn-success {
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: none !important;
}

.form-control,
.form-select {
  min-height: 46px;
  background: #fff;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.13);
}

.page-head.compact-head,
.profile-edit-card {
  max-width: 1120px;
}

.profile-edit-actions .btn {
  min-width: 150px;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
    min-height: auto;
    padding: 10px 12px;
    background: #111827;
  }

  .brand-box {
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .brand-desc {
    display: none;
  }

  .menu-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 0;
    scrollbar-width: none;
  }

  .menu-group::-webkit-scrollbar {
    display: none;
  }

  .menu-title {
    display: none;
  }

  .menu-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 12px;
    font-size: .94rem;
    background: rgba(255,255,255,.07);
  }

  .menu-link-primary {
    background: #eaf2ff;
  }

  .app-topbar {
    position: sticky;
    top: 104px;
    z-index: 800;
    min-height: auto;
    padding: 10px 14px;
  }

  .page-container {
    padding: 16px 12px 38px;
  }

  .hero-card,
  .page-head,
  .simple-hero {
    border-radius: 20px;
    padding: 18px;
  }

  .quick-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .quick-actions .btn {
    flex: 1 1 180px;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  .app-sidebar {
    padding: 8px;
  }

  .brand-box {
    margin-bottom: 8px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: .98rem;
  }

  .menu-link {
    padding: 8px 10px;
    font-size: .9rem;
  }

  .app-topbar {
    top: 94px;
    align-items: stretch;
    gap: 8px;
  }

  .topbar-title {
    width: 100%;
  }

  .user-panel {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .user-avatar {
    width: 38px;
    height: 38px;
  }

  .user-panel form .btn {
    padding: .42rem .68rem;
  }

  .page-container {
    padding: 12px 10px 32px;
  }

  h1,
  .page-title {
    font-size: 1.72rem;
    letter-spacing: -.045em;
  }

  .page-kicker {
    font-size: .74rem;
  }

  .card-body,
  .workspace-card {
    padding: 16px !important;
  }

  .btn-lg,
  .form-control-lg,
  .form-select-lg {
    font-size: 1rem;
  }

  .profile-header {
    align-items: flex-start;
  }

  .info-line {
    display: block;
  }

  .info-line strong {
    display: block;
    margin-top: 3px;
    text-align: left;
    word-break: break-word;
  }

  .profile-edit-actions .btn,
  .d-flex.gap-2.flex-wrap.mt-4 .btn {
    flex: 1 1 100%;
  }

  .table th,
  .table td {
    min-width: 130px;
  }

  .table th:first-child,
  .table td:first-child {
    min-width: 80px;
  }
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 3px solid #f1f5f9;
}

.hero-card::before,
.page-head::before,
.simple-hero::before {
  content: none !important;
}

.page-container {
  animation: none;
}

/* V32: аккуратная форма входа, выравнивание и мобильная версия */
.auth-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, .12), transparent 24rem),
    radial-gradient(circle at 88% 6%, rgba(14, 165, 233, .14), transparent 24rem),
    #f4f7fb;
}

.auth-only-header {
  width: min(1080px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.auth-only-nav {
  background: #f8fafc;
  box-shadow: none;
}

.auth-only-main {
  width: min(1080px, calc(100% - 32px));
  padding: 42px 0 52px;
}

.auth-body .login-layout {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
}

.auth-body .login-welcome {
  min-height: auto;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: 42px 38px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 20%, rgba(253, 224, 71, .28), transparent 15rem),
    radial-gradient(circle at 12% 100%, rgba(14, 165, 233, .22), transparent 18rem),
    linear-gradient(135deg, #0f172a 0%, #16346d 58%, #075985 100%) !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .12);
}

.login-welcome .eyebrow {
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .25);
}

.login-welcome h1 {
  max-width: 620px;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: .95;
}

.login-welcome p {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.80);
  font-size: 1.05rem;
  line-height: 1.55;
}

.login-welcome .auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.login-welcome .auth-points span {
  width: auto;
  padding: 9px 13px;
  color: #e0f2fe;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.10);
}

.auth-body .login-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px !important;
  border-radius: 28px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08) !important;
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-card-head h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.1;
}

.login-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form .mb-3,
.login-form .mb-4 {
  margin-bottom: 0 !important;
}

.login-card .form-label {
  color: #1f2937;
  font-size: .92rem;
  font-weight: 850;
}

.login-card .form-control,
.login-card .input-group > .form-control {
  min-height: 50px;
  border-color: #d7dde8;
  border-radius: 15px;
  font-size: 1rem;
}

.login-card .input-group > .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login-card .input-group .btn {
  min-width: 104px;
  border-color: #d7dde8;
  border-left: 0;
  border-radius: 0 15px 15px 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 850;
}

.login-card .input-group .btn:hover {
  background: #eef4ff;
  color: #1d4ed8;
}

.login-card .specific-note {
  margin-top: 6px;
  color: #64748b;
  font-size: .84rem;
  font-weight: 650;
}

.login-card .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-card .form-check-input {
  margin: 0;
}

.login-card .btn-primary {
  min-height: 50px;
  border-radius: 15px;
  font-weight: 900;
}

.login-card .demo-login {
  margin-top: 20px;
  padding: 15px;
  border-radius: 20px;
  background: #f8fafc !important;
}

.login-card .demo-login-title {
  color: #1e3a8a;
}

.login-card .demo-login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.login-card .demo-login-actions .btn {
  width: 100%;
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .auth-only-header {
    width: min(100% - 24px, 720px);
    align-items: center;
  }

  .auth-only-main {
    width: min(100% - 24px, 720px);
    padding: 24px 0 42px;
  }

  .auth-body .login-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .auth-body .login-welcome {
    min-height: 220px;
    padding: 28px;
  }

  .login-welcome h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .auth-body .login-card {
    max-width: none;
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 560px) {
  .auth-only-header {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 18px;
  }

  .auth-brand {
    gap: 10px;
  }

  .auth-brand .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .auth-brand strong {
    font-size: .98rem;
  }

  .auth-brand small {
    font-size: .74rem;
  }

  .auth-only-nav {
    display: none;
  }

  .auth-only-main {
    width: calc(100% - 20px);
    padding: 14px 0 28px;
  }

  .auth-body .login-welcome {
    padding: 22px;
    border-radius: 22px;
    gap: 18px;
  }

  .login-welcome .eyebrow {
    margin-bottom: 10px;
  }

  .login-welcome h1 {
    font-size: 2.05rem;
  }

  .login-welcome p {
    margin-top: 10px;
    font-size: .95rem;
  }

  .login-welcome .auth-points {
    display: none;
  }

  .auth-body .login-card {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  .login-card-head {
    margin-bottom: 18px;
  }

  .login-card-head .auth-logo {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .login-card-head h2 {
    font-size: 1.45rem;
  }

  .login-card-head p {
    font-size: .88rem;
  }

  .login-card .input-group .btn {
    min-width: 88px;
    padding-left: .7rem;
    padding-right: .7rem;
  }

  .login-card .demo-login-actions {
    grid-template-columns: 1fr;
  }
}
