:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e7eaf1;
  --dark: #111827;
  --dark-2: #182235;
  --accent: #2563eb;
  --accent-soft: #eef2ff;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #fff7d6;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --shadow: 0 18px 50px rgba(15, 23, 42, .06);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #eef0ff 0, #f4f6fb 360px);
  color: var(--text);
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: #0f172a;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8178ff, #22c55e);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand small {
  display: block;
  color: #aab4c8;
}

.user-box {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  padding: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex: 0 0 auto;
}

.user-box small,
.company-pill span,
.company-pill small {
  display: block;
  color: #aab4c8;
  font-size: 12px;
}

.company-pill {
  background: rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 12px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-nav a,
.logout {
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #dbe3f5;
  font-weight: 800;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.side-nav a:hover,
.logout:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.side-nav a.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.logout {
  margin-top: auto;
}

.main {
  padding: 30px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  overflow-x: hidden;
}

.page-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-top h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -.03em;
}

.page-top h1:empty {
  display: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}

.flash,
.alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
  font-weight: 800;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card,
.card,
.auth-card,
.empty-state {
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 108px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card b,
.metric-card strong {
  display: block;
  font-size: 32px;
  letter-spacing: -.04em;
  margin: 8px 0;
}

.metric-card small {
  color: var(--muted);
}

.metric-card a,
.metric-card {
  text-decoration: none;
}

.card {
  margin-bottom: 18px;
}

.card h2,
.auth-card h2 {
  margin-top: 0;
}

.no-pad {
  padding: 0;
  overflow: hidden;
}

.split-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.auth-card {
  max-width: 460px;
  margin: 52px auto;
}

.empty-state {
  text-align: center;
}

.warning {
  background: #fffaf0;
}

label {
  display: block;
  margin: 10px 0;
  color: #344054;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd5e1;
  border-radius: 14px;
  padding: 11px 12px;
  margin-top: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
}

button,
.button {
  border: 0;
  border-radius: 14px;
  padding: 11px 15px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 6px 6px 0;
  font-weight: 800;
}

button:hover,
.button:hover {
  filter: brightness(.96);
}

.secondary {
  background: #eef0ff;
  color: #25216b;
}

.danger,
button.danger {
  background: #dc2626;
  color: #fff;
}

.small {
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 13px;
}

.inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  flex-wrap: wrap;
}

.inline input {
  width: 180px;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid #eef0f5;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .06em;
  background: #fafbff;
}

.muted {
  color: var(--muted);
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 34px;
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef0ff;
  color: #25216b;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-active,
.badge-active {
  background: #dcfce7;
  color: #166534;
}

.status-pending,
.status-pending_admin_review,
.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-rejected,
.status-blocked,
.status-error,
.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.platform {
  text-transform: uppercase;
  font-weight: 900;
  font-size: 12px;
}

.filters,
.integration-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.field-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.review-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 16px;
}

.review-box span {
  float: right;
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 4px 8px;
}

.meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

.meta dt {
  color: var(--muted);
}

.event,
.message {
  border-top: 1px solid #eef0f5;
  padding: 12px 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkbox input {
  width: auto;
}

/* Platforms page fixes */
.platforms-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: start;
}

.settings-card label,
.platform-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  font-weight: 800;
}

.settings-card .row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.settings-card select,
.platform-form select,
.platform-form input {
  width: 100%;
}

.platform-field {
  display: none;
}

.platform-field.is-active {
  display: block;
}

.connection-card {
  border-left: 5px solid #f59e0b;
}

.connection-card.status-green {
  border-left-color: #22c55e;
}

.connection-card.status-red {
  border-left-color: #ef4444;
}

.connection-card.status-gray {
  border-left-color: #64748b;
}

.error {
  color: #dc2626;
  font-weight: 800;
}

.hint {
  color: #64748b;
  font-size: 14px;
  margin: 6px 0 12px;
}

details summary {
  cursor: pointer;
  font-weight: 900;
  margin-top: 8px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 18px;
  }

  .field-grid,
  .detail-grid,
  .split-card {
    grid-template-columns: 1fr;
    display: block;
  }

  .page-top h1 {
    font-size: 28px;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
  }
}


/* Rating service patch */
.dashboard-metrics {
  align-items: stretch;
}

.complaint-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-warn,
.warn {
  background: #fef3c7;
  color: #92400e;
}

.filters {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.filters .button {
  margin-top: 6px;
}

.history-item p,
.complaint p {
  line-height: 1.45;
}

/* Hard fix: author CSS like .inline must not override HTML hidden */
[hidden]{display:none!important;}

/* Tickets */
.ticket-head,
.ticket-badges,
.ticket-message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ticket-head {
  justify-content: space-between;
}

.ticket-card a,
.ticket-thread a {
  text-decoration: none;
}

.ticket-status-waiting_admin,
.ticket-status-open {
  background: #fef3c7;
  color: #92400e;
}

.ticket-status-waiting_client {
  background: #eef2ff;
  color: #3730a3;
}

.ticket-status-resolved {
  background: #dcfce7;
  color: #166534;
}

.ticket-status-closed {
  background: #e5e7eb;
  color: #374151;
}

.ticket-message {
  border: 1px solid #eef0f5;
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
  background: #fff;
}

.ticket-message-client {
  border-left: 5px solid #2563eb;
}

.ticket-message-admin {
  border-left: 5px solid #16a34a;
}

.ticket-message-system {
  border-left: 5px solid #64748b;
}

.ticket-message-internal {
  border-left: 5px solid #f59e0b;
  background: #fffaf0;
}

.ticket-message-meta {
  color: var(--muted);
  font-size: 13px;
}

.ticket-message-meta b {
  color: var(--text);
}

.ticket-message p {
  white-space: pre-wrap;
  line-height: 1.5;
  margin-bottom: 0;
}

.ticket-form textarea,
.ticket-reply-form textarea {
  min-height: 140px;
}

.ticket-status-form select {
  width: 260px;
}
\n
.status-inactive_locked,
.status-manual_blocked,
.status-deletion_review_pending,
.status-deleted_cleaned {
  background: #fee2e2;
  color: #991b1b;
}

.status-idle_storage_fee {
  background: #fef3c7;
  color: #92400e;
}
\n

.brand-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 8px;
  flex: 0 0 auto;
}

.brand-logo {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.help-nav a {
  text-decoration: none;
  background: var(--accent-soft);
  color: #25216b;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 900;
  font-size: 13px;
}

.article-card {
  line-height: 1.6;
}

.article-card ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.notice-soft {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #eef2ff;
  color: #25216b;
  font-weight: 800;
}

/* Sidebar compact navigation fix */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

.app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  width: 252px;
  padding: 16px 16px 14px;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.brand {
  min-height: 58px;
  gap: 10px;
  align-items: center;
}

.brand-logo-wrap {
  width: 92px;
  max-width: 92px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 92px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 92px;
  max-width: 92px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.brand b {
  display: block;
  font-size: 15px;
  line-height: 1.05;
}

.brand small {
  font-size: 12px;
  line-height: 1.1;
}

.user-box {
  padding: 10px;
  border-radius: 16px;
}

.user-box b {
  font-size: 14px;
  line-height: 1.15;
}

.user-box small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.company-pill {
  padding: 10px;
  border-radius: 14px;
}

.company-pill b {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.side-nav {
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group + .nav-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.side-nav a,
.logout {
  border-radius: 12px;
  text-decoration: none;
  color: #dbe3f5;
  transition: background .12s ease, color .12s ease;
  transform: none !important;
}

.side-nav a {
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.15;
}

.side-nav a.nav-main {
  padding: 11px 12px;
  font-size: 16px;
  font-weight: 900;
}

.nav-group-secondary a {
  font-size: 14px;
  font-weight: 800;
}

.nav-group-tertiary a {
  font-size: 13px;
  font-weight: 700;
  color: #aab4c8;
}

.nav-group-tertiary a.active {
  color: #111827;
}

.side-nav a.active {
  background: #ffffff;
  color: #111827;
  box-shadow: none;
}

.logout {
  flex: 0 0 auto;
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
}

.main {
  min-width: 0;
}

@media (max-height: 820px) {
  .sidebar {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .brand {
    min-height: 48px;
  }

  .brand-logo-wrap,
  .brand-logo {
    width: 78px;
    max-width: 78px;
    max-height: 44px;
    flex-basis: 78px;
  }

  .user-box,
  .company-pill {
    padding: 8px;
  }

  .side-nav a {
    padding: 8px 10px;
  }

  .side-nav a.nav-main {
    padding: 9px 10px;
    font-size: 15px;
  }

  .nav-group + .nav-group {
    margin-top: 8px;
    padding-top: 8px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .brand-logo-wrap,
  .brand-logo {
    width: 72px;
    max-width: 72px;
    max-height: 40px;
    flex-basis: 72px;
  }
}

/* Sidebar final polish: smaller logo and no nav flashing */
.brand {
  min-height: 44px;
  gap: 8px;
}

.brand-logo-wrap {
  width: 64px;
  max-width: 64px;
  height: 38px;
  flex: 0 0 64px;
}

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

.brand b {
  font-size: 14px;
  line-height: 1.05;
}

.brand small {
  font-size: 11px;
}

.side-nav a,
.logout {
  transition: none !important;
  animation: none !important;
}

.side-nav a:hover:not(.active) {
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
}

.side-nav a:active,
.side-nav a:focus,
.side-nav a:focus-visible {
  outline: none;
  box-shadow: none;
}

.side-nav a.active {
  background: #ffffff;
  color: #111827;
}

@media (max-height: 820px) {
  .brand-logo-wrap,
  .brand-logo {
    width: 56px;
    max-width: 56px;
    max-height: 34px;
    flex-basis: 56px;
  }

  .brand b {
    font-size: 13px;
  }

  .brand small {
    font-size: 10px;
  }
}

/* Sidebar: smaller logo + PJAX smooth content */
.brand {
  min-height: 38px !important;
  gap: 7px !important;
}

.brand-logo-wrap {
  width: 48px !important;
  max-width: 48px !important;
  height: 30px !important;
  flex: 0 0 48px !important;
}

.brand-logo {
  width: 48px !important;
  max-width: 48px !important;
  max-height: 30px !important;
}

.brand b {
  font-size: 13px !important;
  line-height: 1.05 !important;
}

.brand small {
  font-size: 10px !important;
  line-height: 1.05 !important;
}

body.is-pjax-loading .main {
  opacity: .985;
}

.side-nav,
.side-nav a,
.sidebar,
.brand,
.company-pill,
.user-box {
  backface-visibility: hidden;
  transform: translateZ(0);
}

.side-nav a {
  -webkit-tap-highlight-color: transparent;
}

@media (max-height: 820px) {
  .brand-logo-wrap,
  .brand-logo {
    width: 42px !important;
    max-width: 42px !important;
    max-height: 26px !important;
    flex-basis: 42px !important;
  }
}

.inline select {
  width: 180px;
  margin: 0;
}

.compact-grid {
  gap: 10px;
}

/* Billing page grouping */
.billing-section {
  padding: 0;
  overflow: hidden;
}

.billing-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-weight: 900;
}

.billing-section > summary::-webkit-details-marker,
.inner-details > summary::-webkit-details-marker {
  display: none;
}

.billing-section > summary::after {
  content: "＋";
  color: var(--muted);
  font-weight: 900;
  flex: 0 0 auto;
}

.billing-section[open] > summary::after {
  content: "−";
}

.billing-section > summary span {
  font-size: 18px;
}

.billing-section > summary small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.billing-section-body {
  border-top: 1px solid var(--line);
  padding: 18px 20px 20px;
}

.billing-actions-grid {
  align-items: start;
}

.inner-details {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  margin: 14px 0;
  background: #fbfcff;
}

.inner-details > summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
}

.saved-company-box,
.requisites-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
  background: #fff;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-line input {
  width: auto;
  margin: 0;
}

.saved-companies-list {
  display: grid;
  gap: 12px;
}

.saved-company-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
}

.table-scroll {
  overflow-x: auto;
}

.operations-count {
  margin: 10px 0 12px;
}

.pagination-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .saved-company-card,
  .billing-section > summary {
    display: block;
  }
}

#operations-region.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.requisites-form [hidden] {
  display: none !important;
}

/* Onboarding hints */
.onboarding-hint {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 52px 18px 20px;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
  box-shadow: 0 16px 42px rgba(37, 99, 235, .08);
  color: var(--text);
}

.onboarding-hint h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.onboarding-hint p {
  margin: 0;
  color: #475569;
  font-weight: 750;
  line-height: 1.45;
}

.onboarding-hint .button {
  margin-top: 14px;
}

.onboarding-hint-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.onboarding-hint-close:hover {
  background: #bfdbfe;
}

.onboarding-hint.is-hidden {
  display: none !important;
}


/* Legal offer page */
.legal-offer {
  max-width: 980px;
}

.legal-offer h3 {
  margin: 24px 0 10px;
}

.legal-offer p {
  margin: 8px 0;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.checkbox-line input {
  width: auto;
  margin-top: 3px;
}

.auth-consent a {
  color: var(--accent);
  font-weight: 800;
}

.critical-alert {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 22px;
  padding: 22px;
  border-radius: 24px;
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 55%, #ef4444 100%);
  color: #fff;
  box-shadow: 0 18px 45px rgba(220, 38, 38, .30);
}

.critical-alert-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  font-weight: 1000;
}

.critical-alert-title {
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 1000;
  margin-bottom: 8px;
}

.critical-alert-text {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  max-width: 1100px;
}

.critical-alert-meta {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .18);
  color: rgba(255, 255, 255, .95);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.critical-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.critical-alert-actions button,
.critical-alert-actions .button {
  background: #fff;
  color: #7f1d1d;
  border-color: transparent;
  font-weight: 1000;
}

.critical-alert-actions button.secondary,
.critical-alert-actions .button.secondary {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}

/* Client audit logs and admin email form */
.stack-form { display: grid; gap: 14px; max-width: 900px; }
.stack-form label { display: grid; gap: 7px; font-weight: 700; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; box-sizing: border-box; }
.stack-form textarea { resize: vertical; min-height: 180px; }
.log-filter-form { align-items: center; gap: 10px; }
.log-filter-form input[name="q"] { min-width: 320px; }
.log-list { display: grid; gap: 14px; }
.log-entry { border: 1px solid #e4e8f2; border-radius: 16px; padding: 16px; background: #fff; }
.log-entry-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.log-entry-head > div:first-child { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.log-entry-grid { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(120px, .7fr) minmax(220px, 1.5fr); gap: 12px; margin-bottom: 12px; }
.log-user-agent { word-break: break-word; font-size: 12px; }
.log-payload { white-space: pre-wrap; word-break: break-word; max-height: 500px; overflow: auto; background: #f6f8fc; border-radius: 10px; padding: 12px; }
.log-entry summary { cursor: pointer; color: #2d63dd; font-weight: 700; }
@media (max-width: 1000px) {
  .log-entry-grid { grid-template-columns: 1fr 1fr; }
  .log-entry-head { flex-direction: column; }
  .log-filter-form input[name="q"] { min-width: 200px; }
}
