:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-strong: #fbfcfe;
  --text: #15202e;
  --muted: #617082;
  --line: #d9e1ea;
  --accent: #09ED82;
  --accent-dark: #08b864;
  --accent-soft: rgba(9, 237, 130, 0.12);
  --danger: #b3261e;
  --warning: #8a5a00;
  --ok: #1d7a4d;
  --sidebar-width: 236px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(19, 95, 116, 0.09), transparent 28%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body.login-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(34, 197, 94, 0.22), transparent 0 14%, rgba(34, 197, 94, 0.08) 15%, transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(34, 197, 94, 0.16), transparent 0 12%, rgba(34, 197, 94, 0.06) 13%, transparent 30%),
    radial-gradient(circle at 86% 84%, rgba(19, 95, 116, 0.14), transparent 0 12%, rgba(19, 95, 116, 0.05) 13%, transparent 28%),
    radial-gradient(circle at 14% 82%, rgba(34, 197, 94, 0.18), transparent 0 13%, rgba(34, 197, 94, 0.07) 14%, transparent 30%),
    linear-gradient(180deg, #f8fbfd 0%, #f3f6fb 100%);
}

a {
  color: #0a8f52;
  font-weight: 650;
  text-decoration: none;
}

.app-page {
  padding-left: var(--sidebar-width);
}

.sidebar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--line);
  bottom: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  left: 0;
  padding: 24px 18px;
  position: fixed;
  top: 0;
  width: var(--sidebar-width);
  z-index: 30;
}

.brand {
  align-items: flex-start;
  color: var(--text);
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  line-height: 1;
}

.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}

.brand-env {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  padding-left: 2px;
}

.side-nav {
  align-content: start;
  display: grid;
  gap: 6px;
}

.side-nav-link {
  align-items: center;
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 760;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
}

.side-nav-icon {
  fill: currentColor;
  flex: 0 0 auto;
  height: 18px;
  opacity: 0.86;
  width: 18px;
}

.side-nav-link:hover {
  background: rgba(9, 237, 130, 0.08);
  color: var(--text);
}

.side-nav-link.is-active {
  background: var(--accent-soft);
  color: #087c48;
}

.account-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  position: fixed;
  right: 28px;
  top: 18px;
  z-index: 40;
}

.user-menu {
  position: relative;
}

.user-menu[open] .user-avatar,
.user-avatar:hover {
  background: #0bc46d;
}

.user-avatar {
  align-items: center;
  background: linear-gradient(180deg, #11f08a 0%, var(--accent-dark) 100%);
  border: 1px solid rgba(8, 184, 100, 0.32);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(9, 237, 130, 0.2);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 850;
  height: 40px;
  justify-content: center;
  list-style: none;
  width: 40px;
}

.user-avatar::-webkit-details-marker {
  display: none;
}

.user-avatar::marker {
  content: "";
}

.user-menu-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(20, 30, 48, 0.16);
  display: grid;
  gap: 10px;
  min-width: 180px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
}

.user-menu-name {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  padding: 0 2px 10px;
}

.inline-form {
  margin: 0;
}

.ghost-link,
.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  min-height: 36px;
  align-items: center;
  padding: 0 14px;
}

.ghost-link {
  border-radius: 999px;
  text-decoration: none;
}

.ghost-button:hover,
.ghost-link:hover {
  background: rgba(9, 237, 130, 0.08);
}

.user-menu .ghost-button {
  justify-content: center;
  width: 100%;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 24px 56px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

p {
  color: var(--muted);
  margin-top: 8px;
}

.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(20, 30, 48, 0.05);
  margin-bottom: 18px;
  padding: 20px;
}

.flash {
  border-radius: 12px;
  font-weight: 750;
  margin: -8px 0 18px;
  opacity: 1;
  padding: 12px 14px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.flash.is-dismissing {
  opacity: 0;
  transform: translateY(-4px);
}

.flash-success {
  background: #e7f6ee;
  border: 1px solid rgba(29, 122, 77, 0.2);
  color: var(--ok);
}

.flash-error {
  background: #fdecea;
  border: 1px solid rgba(179, 38, 30, 0.2);
  color: var(--danger);
}

.placeholder-panel {
  min-height: 220px;
}

.section-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-row span {
  color: var(--muted);
  font-size: 14px;
}

.sync-icon-button {
  align-items: center;
  background: #eef9f5;
  border: 1px solid rgba(31, 132, 99, 0.24);
  border-radius: 999px;
  color: #0b7a44;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.sync-icon-button:hover {
  background: #e2f4ec;
}

.sync-icon-button svg {
  fill: currentColor;
  height: 17px;
  width: 17px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 1.2fr 0.8fr auto;
  margin-top: 16px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
}

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

.field-icon {
  fill: currentColor;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

input {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
}

textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 8px 34px 8px 10px;
}

button {
  align-self: end;
  background: linear-gradient(180deg, #11f08a 0%, var(--accent-dark) 100%);
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 42px;
  padding: 0 16px;
}

button:hover {
  background: linear-gradient(180deg, #09ed82 0%, #08a95b 100%);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button:disabled:hover {
  background: linear-gradient(180deg, #11f08a 0%, var(--accent-dark) 100%);
}

.danger button {
  background: var(--danger);
  margin-top: 14px;
  width: 100%;
}

.primary-action {
  flex: 0 0 auto;
}

.filters {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) 220px;
  margin: 0 0 16px;
}

.dashboard-head {
  align-items: center;
}

.range-tabs {
  background: #e9eef5;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.range-tab {
  align-items: center;
  border-radius: 9px;
  color: var(--muted);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.range-tab.is-active {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(20, 30, 48, 0.08);
  color: var(--text);
}

.metrics-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(20, 30, 48, 0.05);
  display: grid;
  gap: 8px;
  min-height: 134px;
  padding: 17px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  background: #9aa7b5;
  border-radius: 999px;
  content: "";
  height: 8px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 760;
}

.metric-card strong {
  color: var(--text);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 0;
  line-height: 1;
  margin-top: 4px;
}

.metric-card-accent::before {
  background: var(--accent);
}

.metric-card-ok::before {
  background: #24a064;
}

.metric-card-info::before {
  background: #4c7fc4;
}

.metric-card-warning::before {
  background: #d69016;
}

.metric-card-danger::before {
  background: #d94840;
}

.dashboard-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
}

.dashboard-layout-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-panel .section-row {
  align-items: flex-start;
}

.dashboard-panel .section-row p {
  font-size: 13px;
  margin-top: 4px;
}

.status-stack,
.compact-list,
.source-list {
  display: grid;
  gap: 10px;
}

.status-stack-row,
.compact-list a,
.source-list div {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 14px;
}

.compact-list span,
.source-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.compact-list a {
  color: var(--text);
  font-weight: 750;
}

.compact-list strong,
.source-list strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.dashboard-bottom-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.payments-head {
  align-items: flex-start;
  gap: 18px;
}

.report-filter {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-filter .range-tabs {
  align-self: end;
}

.report-filter .range-tab {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 32px;
  padding: 0 10px;
}

.report-filter .range-tab:hover,
.report-filter .range-tab.is-active {
  background: #ffffff;
  color: var(--text);
}

.report-filter label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
}

.report-filter input {
  border-radius: 9px;
  font-size: 13px;
  min-height: 34px;
  padding: 6px 9px;
  width: 128px;
}

.report-filter > button:not(.range-tab) {
  border-radius: 9px;
  font-size: 14px;
  min-height: 34px;
  padding: 0 13px;
}

.payments-period {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  margin: -2px 0 18px;
  padding: 12px 14px;
}

.payments-period span,
.payments-period em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.payments-period strong {
  color: var(--text);
  margin-right: auto;
}

.payments-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  margin-bottom: 18px;
}

.payments-panel .section-row {
  align-items: flex-start;
}

.payments-panel .section-row p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.payments-panel .section-row > span {
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  white-space: nowrap;
}

.payments-chart {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(34px, 1fr);
  height: 220px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 8px 4px 0;
}

.payments-bar {
  align-items: center;
  display: grid;
  gap: 8px;
  height: 100%;
  justify-items: center;
  min-width: 34px;
}

.payments-bar span {
  align-self: end;
  background: linear-gradient(180deg, #23d186 0%, #2477b9 100%);
  border-radius: 8px 8px 0 0;
  display: block;
  min-height: 6px;
  width: 100%;
}

.payments-bar em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  min-height: 26px;
  text-align: center;
}

.payments-mini-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.payments-mini-kpis div {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.payments-mini-kpis span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.payments-mini-kpis strong {
  color: var(--text);
  font-size: 18px;
}

.payments-recent a {
  align-items: flex-start;
}

.payments-recent small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.payments-table th,
.payments-table td {
  white-space: nowrap;
}

.payments-table td:first-child,
.payments-table th:first-child {
  min-width: 220px;
  white-space: normal;
}

.source-panel {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.source-panel h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.server-summary {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin-bottom: 18px;
}

.server-hero {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 138px;
}

.server-hero span,
.server-check-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.server-hero strong {
  display: block;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 1;
  margin-top: 8px;
}

.server-state-list {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.server-check-panel {
  align-content: center;
  display: grid;
  gap: 8px;
}

.server-check-panel strong {
  font-size: 24px;
  line-height: 1.1;
}

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

.server-panel .section-row {
  align-items: flex-start;
}

.server-panel .section-row p {
  font-size: 13px;
  margin-top: 4px;
}

.server-data-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.server-data-list div {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  min-height: 68px;
  padding: 12px 14px;
}

.server-data-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.server-data-list dd {
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
  margin: 0;
  overflow-wrap: anywhere;
}

.modal {
  background: transparent;
  border: 0;
  margin: auto;
  max-width: min(940px, calc(100vw - 32px));
  padding: 0;
  width: 100%;
}

.modal::backdrop {
  background: rgba(21, 32, 46, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #ffffff;
  border: 1px solid rgba(217, 225, 234, 0.96);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(20, 30, 48, 0.24);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.modal-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.modal-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions button,
.modal-actions .ghost-button {
  justify-content: center;
  min-width: 148px;
}

.modal-actions .ghost-button {
  background: transparent;
  color: var(--text);
}

.icon-button {
  align-items: center;
  align-self: start;
  background: #eef3f8;
  border: 1px solid #dce4ec;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.icon-button:hover {
  background: #e3ebf3;
}

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

.checkbox input {
  min-height: auto;
}

.modal-checkbox {
  align-self: end;
  min-height: 42px;
}

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

.login-layout {
  min-height: calc(100vh - 120px);
  padding: 24px 0 40px;
}

.login-page .shell {
  display: grid;
  min-height: calc(100vh - 64px);
  padding: 0 24px 24px;
}

.login-page .login-layout {
  align-items: center;
  display: grid;
  min-height: auto;
  padding: 0;
  width: 100%;
}

.login-shell {
  margin: auto;
  max-width: 1120px;
  padding: 0 18px;
  width: 100%;
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(217, 225, 234, 0.92);
  border-radius: 30px;
  box-shadow: 0 24px 80px rgba(14, 28, 46, 0.14);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  overflow: hidden;
}

.login-form-panel,
.login-visual-panel {
  min-height: 560px;
}

.login-form-panel {
  background: #ffffff;
  display: grid;
  gap: 12px;
  padding: 38px 36px 34px;
}

.login-visual-panel {
  background:
    linear-gradient(135deg, rgba(4, 58, 31, 0.58) 0%, rgba(9, 237, 130, 0.24) 100%),
    url("/static/login-hero-bg-v2.png") center center / cover no-repeat;
  color: #ffffff;
  display: grid;
  align-items: center;
  justify-items: start;
  padding: 42px;
  position: relative;
}

.login-visual-panel::before {
  background:
    radial-gradient(circle at 50% 40%, rgba(9, 237, 130, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(5, 40, 21, 0.12) 0%, rgba(5, 40, 21, 0.3) 100%);
  content: "";
  inset: 0;
  position: absolute;
  pointer-events: none;
}

.login-visual-glow {
  background: radial-gradient(circle, rgba(9, 237, 130, 0.34) 0%, rgba(9, 237, 130, 0) 68%);
  bottom: -110px;
  height: 240px;
  opacity: 0.55;
  position: absolute;
  right: -100px;
  width: 240px;
}

.login-brand-row,
.login-card-head,
.login-form,
.login-hint,
.login-visual-content,
.login-points {
  position: relative;
  z-index: 1;
}

.login-brand-row {
  align-items: center;
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.login-logo {
  display: block;
  width: 100%;
}

.login-logo--corner {
  filter: none;
  mix-blend-mode: normal;
  opacity: 1;
  position: absolute;
  right: 28px;
  top: 24px;
  width: clamp(120px, 14vw, 180px);
  height: auto;
  z-index: 2;
}

.login-welcome {
  color: var(--text);
  font-size: 26px;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.login-card-head {
  display: grid;
  gap: 4px;
  margin-top: 0;
  text-align: center;
  justify-items: center;
}

.login-card-head h1 {
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 200;
  letter-spacing: -0.03em;
}

.login-card-head p {
  max-width: 36ch;
}

.eyebrow,
.login-visual-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  color: #0a8f52 !important;
}

.login-visual-content {
  align-content: start;
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: 4px 8px;
  text-align: left;
}

.login-visual-content--hero {
  align-self: center;
  max-width: 560px;
  padding-top: 0;
}

.login-visual-slogan {
  display: grid;
  gap: 2px;
  color: #ffffff;
  font-size: clamp(28px, 3.5vw, 58px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.login-visual-slogan .is-accent {
  color: #09ed82;
}

.login-visual-mark {
  background: linear-gradient(90deg, #09ed82 0%, rgba(9, 237, 130, 0) 100%);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(9, 237, 130, 0.45);
  height: 5px;
  margin-top: 20px;
  width: 52px;
}

.login-points {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 8px 0 0;
  max-width: 360px;
  padding: 0;
}

.login-points li {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  padding: 14px 16px;
}

.login-form {
  align-content: start;
  display: grid;
  gap: 15px;
}

.login-form label {
  text-align: left;
}

.login-form button {
  margin-top: 8px;
  min-height: 48px;
  width: 100%;
  border-radius: 20px;
  background: #09ED82;
}

.login-form input {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-radius: 12px;
  padding: 10px 12px;
}

.login-form input::placeholder {
  color: #94a0ad;
}

.login-form input:focus {
  border-color: rgba(9, 237, 130, 0.82);
  box-shadow: 0 0 0 4px rgba(9, 237, 130, 0.2);
  outline: none;
}

.form-alert {
  background: linear-gradient(180deg, #fff2f1 0%, #fdecea 100%);
  border: 1px solid #f3c7c2;
  border-radius: 14px;
  color: var(--danger);
  font-weight: 650;
  padding: 12px 14px;
}

.form-note {
  background: linear-gradient(180deg, #eef8ff 0%, #e7f2fb 100%);
  border: 1px solid #cfe1ef;
  border-radius: 14px;
  color: #1d5f89;
  font-weight: 650;
  padding: 12px 14px;
}

.login-footer-links,
.auth-links {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.login-footer-links a,
.auth-links a {
  color: #0a8f52;
  font-size: 14px;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
  padding: 24px 0 40px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 225, 234, 0.92);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(14, 28, 46, 0.12);
  max-width: 560px;
  padding: 34px 30px 30px;
  width: min(100%, 560px);
}

.auth-eyebrow {
  color: #0a8f52;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.auth-card h1 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 200;
  letter-spacing: -0.03em;
}

.auth-copy {
  margin-top: 10px;
  max-width: 48ch;
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}

.auth-form button {
  margin-top: 8px;
  width: 100%;
}

.login-hint,
.login-note {
  color: var(--muted);
  font-size: 13px;
}

.login-hint {
  margin-top: -2px;
}

.login-note {
  line-height: 1.5;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 9px;
}

.status-active {
  background: #e7f6ee;
  color: var(--ok);
}

.status-trial {
  background: #eaf2ff;
  color: #315f9e;
}

.status-provisioning,
.status-payment_pending,
.status-pending_deletion {
  background: #fff3d8;
  color: var(--warning);
}

.status-suspended {
  background: #eef3f8;
  color: var(--muted);
}

.status-deleted,
.status-error {
  background: #fdecea;
  color: var(--danger);
}

.status-user-active {
  background: #e7f6ee;
  color: var(--ok);
}

.status-user-pending_deactivation {
  background: #fff3d8;
  color: var(--warning);
}

.status-user-inactive {
  background: #eef3f8;
  color: var(--muted);
}

.user-billing-state {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.user-access-until {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.company-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.company-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 30, 48, 0.04);
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
}

.company-kpi > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.company-kpi strong {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 26px;
  line-height: 1.1;
  min-width: 0;
}

.company-kpi small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.lifecycle-alert {
  align-items: center;
  background: #fff3d8;
  border: 1px solid rgba(146, 94, 0, 0.2);
  border-radius: 12px;
  color: var(--warning);
  display: flex;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 13px 15px;
}

.lifecycle-alert strong {
  color: var(--text);
  flex: 0 0 auto;
}

.lifecycle-alert span {
  color: var(--warning);
  font-weight: 750;
}

.company-tabs {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.company-tab {
  align-self: center;
  background: #eef3f8;
  border: 1px solid #dce4ec;
  border-radius: 999px;
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
}

.company-tab:hover {
  background: #e3ebf3;
}

.company-tab.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

.company-tab-panel[hidden] {
  display: none;
}

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

.detail-form input,
.detail-form select,
.detail-form textarea {
  width: 100%;
}

.company-info-panel {
  display: grid;
  gap: 18px;
}

.company-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.company-section-first {
  border-top: 0;
  padding-top: 0;
}

.company-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.company-section h3 {
  font-size: 15px;
  margin: 0;
}

.section-edit-button {
  align-items: center;
  align-self: center;
  background: #eef3f8;
  border: 1px solid #dce4ec;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.section-edit-button:hover {
  background: #e3ebf3;
}

.section-edit-button svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

dl {
  display: grid;
  gap: 10px;
  grid-template-columns: 140px 1fr;
  margin: 0;
}

dt {
  color: var(--muted);
  font-weight: 650;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-note {
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.detail-checkbox {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.detail-textarea {
  min-height: 116px;
}

.section-edit-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-edit-form[hidden],
[data-read-view][hidden] {
  display: none;
}

.section-edit-field-full,
.section-edit-actions {
  grid-column: 1 / -1;
}

.section-edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.section-edit-actions button,
.section-edit-actions .ghost-button {
  min-width: 120px;
}

.plans-layout {
  display: grid;
  gap: 18px;
}

.alerts-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.alert-summary-card {
  display: grid;
  gap: 8px;
}

.alert-summary-card span,
.alert-type,
.alert-message-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alert-summary-card strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.alerts-list {
  display: grid;
  gap: 18px;
}

.alert-card {
  border-left: 4px solid #ef6666;
  display: grid;
  gap: 18px;
}

.alert-card-success {
  border-left-color: var(--accent-dark);
}

.alert-card-head {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.alert-card-head h2 {
  font-size: 18px;
  margin: 5px 0 6px;
}

.alert-card-head p {
  color: var(--muted);
  margin: 0;
}

.alert-state {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  padding: 7px 11px;
}

.alert-state.is-active {
  background: var(--accent-soft);
  color: #087c48;
}

.alert-state.is-inactive {
  background: #eef1f5;
  color: var(--muted);
}

.alert-message-preview {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.alert-message-preview > div {
  display: grid;
  gap: 7px;
}

.alert-message-preview strong {
  overflow-wrap: anywhere;
}

.alert-message-preview pre {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 14px;
  white-space: pre-wrap;
}

@media (max-width: 800px) {
  .alerts-summary {
    grid-template-columns: 1fr;
  }

  .alert-card-head {
    display: grid;
    gap: 12px;
  }

  .alert-state {
    justify-self: start;
  }
}

.plan-create-toggle {
  display: grid;
  justify-items: start;
}

.plan-create-toggle summary {
  background: linear-gradient(180deg, #11f08a 0%, var(--accent-dark) 100%);
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  line-height: 42px;
  list-style: none;
  min-height: 42px;
  padding: 0 16px;
}

.plan-create-toggle summary::-webkit-details-marker {
  display: none;
}

.plan-create-toggle[open] summary {
  margin-bottom: 12px;
}

.plan-create-panel {
  border-left: 3px solid var(--accent);
  margin-bottom: 0;
  width: 100%;
}

.plan-create-panel .form-actions {
  margin-top: 18px;
}

.plan-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 0.9fr 0.55fr 0.75fr auto;
}

.plan-active-field {
  align-self: end;
  min-height: 42px;
}

.plans-list {
  display: grid;
  gap: 14px;
}

.plan-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.plan-row-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.plan-row-head form {
  margin: 0;
}

.plan-row-head strong,
.plan-row-head span {
  display: block;
}

.plan-row-head strong {
  font-size: 16px;
}

.plan-row-head span:not(.status) {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.plan-row-tools {
  display: inline-flex;
  gap: 8px;
}

.plan-edit-form {
  display: grid;
  gap: 12px;
}

.plan-edit-form:not(.is-editing) input[readonly] {
  background: #f8fbfd;
  border-color: transparent;
  color: var(--text);
  cursor: default;
}

.plan-edit-form:not(.is-editing) .checkbox {
  color: var(--text);
}

.plan-edit-form:not(.is-editing) .checkbox input:disabled {
  cursor: default;
  opacity: 1;
}

.plan-edit-grid {
  grid-template-columns: 1.2fr 0.55fr 0.75fr auto;
}

.plan-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.plan-stripe-status {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  gap: 2px;
  margin-right: auto;
}

.plan-stripe-status span {
  color: #8a5d00;
  font-size: 13px;
  font-weight: 750;
}

.plan-stripe-status.is-synced span {
  color: #0b7a44;
}

.plan-icon-button,
.danger-icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(36, 88, 122, 0.22);
  color: var(--accent-dark);
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

.plan-icon-button:hover,
.plan-icon-button[aria-pressed="true"] {
  background: #eef9f5;
}

.danger-icon-button {
  border: 1px solid rgba(179, 38, 30, 0.28);
  color: var(--danger);
}

.danger-icon-button:hover {
  background: #fff5f4;
}

.plan-icon-button svg,
.danger-icon-button svg {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.danger-outline-button {
  background: #ffffff;
  border: 1px solid rgba(179, 38, 30, 0.28);
  color: var(--danger);
}

.danger-outline-button:hover {
  background: #fff5f4;
}

.back {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin-bottom: 10px;
}

.back-icon {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

@media (max-width: 1100px) {
  .company-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-page {
    padding-left: 0;
    padding-top: 86px;
  }

  .sidebar {
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    bottom: auto;
    display: flex;
    gap: 14px;
    min-height: 86px;
    overflow-x: auto;
    padding: 12px 16px;
    right: 0;
    width: auto;
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand-logo {
    height: 24px;
  }

  .side-nav {
    align-items: center;
    display: flex;
    flex: 1 0 auto;
    gap: 4px;
  }

  .side-nav-link {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 10px;
  }

  .account-actions {
    flex: 0 0 auto;
    right: 16px;
    top: 23px;
  }

  .user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
  }

  .shell {
    padding-top: 24px;
  }

  .form-grid,
  .company-kpi-grid,
  .detail-grid,
  .section-edit-form,
  .plan-form-grid,
  .plan-edit-grid,
  .metrics-grid,
  .dashboard-layout,
  .dashboard-layout-secondary,
  .dashboard-bottom-grid,
  .payments-layout,
  .payments-mini-kpis,
  .server-summary,
  .server-grid,
  .login-points {
    grid-template-columns: 1fr;
  }

  .lifecycle-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-head {
    align-items: flex-start;
  }

  .report-filter {
    justify-content: stretch;
    width: 100%;
  }

  .report-filter label,
  .report-filter > button:not(.range-tab) {
    width: 100%;
  }

  .report-filter input {
    width: 100%;
  }

  .payments-period {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-state-list {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .range-tabs {
    width: 100%;
  }

  .range-tab {
    flex: 1;
    justify-content: center;
  }

  .source-panel {
    order: -1;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button,
  .modal-actions .ghost-button,
  .primary-action {
    width: 100%;
  }

  .login-shell {
    padding: 0 12px;
  }

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

  .login-form-panel,
  .login-visual-panel {
    min-height: auto;
    padding: 26px 22px;
  }

  .login-brand-row {
    justify-items: center;
  }

  .login-visual-content--hero {
    max-width: none;
    padding-top: 12px;
  }

  .login-visual-slogan {
    max-width: none;
    font-size: clamp(24px, 8vw, 40px);
  }

  .login-logo--corner {
    right: 20px;
    top: 20px;
    width: 116px;
  }

  .auth-card {
    padding: 26px 20px 22px;
  }
}

.email-editor-panel {
  overflow: hidden;
}

.email-editor-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(300px, 420px);
  min-height: 760px;
}

.email-sidebar,
.email-preview-shell,
.email-editor-shell {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(20, 30, 48, 0.05);
}

.email-sidebar {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.email-sidebar-head {
  margin-bottom: 0;
}

.email-sidebar-head h2,
.email-preview-head h2,
.email-editor-panel-head h2 {
  font-size: 18px;
}

.email-sidebar-note {
  background: #f5faf7;
  border: 1px solid rgba(9, 237, 130, 0.12);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: auto;
  padding: 12px 14px;
}

.email-sidebar-note code {
  background: rgba(9, 237, 130, 0.12);
  border-radius: 999px;
  color: #0a8f52;
  font-weight: 700;
  padding: 2px 8px;
}

.email-template-list {
  display: grid;
  gap: 8px;
}

.email-template-row {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 14px;
  text-align: left;
}

.email-template-row strong,
.email-template-row span {
  display: block;
}

.email-template-row strong {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.email-template-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.email-template-row.is-selected {
  background: linear-gradient(180deg, rgba(9, 237, 130, 0.14) 0%, rgba(9, 237, 130, 0.08) 100%);
  border-color: rgba(9, 237, 130, 0.32);
  box-shadow: 0 10px 24px rgba(9, 237, 130, 0.1);
}

.email-template-row-mark {
  align-self: start;
  margin-top: 4px;
  color: #0a8f52;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 18px;
  justify-content: center;
  line-height: 1;
  width: 1em;
}

.email-preview-shell,
.email-editor-shell {
  padding: 18px;
}

.email-preview-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.email-preview-head,
.email-editor-panel-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.email-preview-head p,
.email-editor-panel-head p {
  margin-top: 6px;
}

.email-preview-stage {
  display: grid;
  gap: 12px;
}

.email-preview-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.email-device-switch {
  background: #eef3f8;
  border-radius: 999px;
  display: inline-flex;
  padding: 4px;
}

.email-device-switch button {
  background: transparent;
  color: var(--muted);
  min-height: 34px;
}

.email-device-switch button.is-active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(20, 30, 48, 0.08);
}

.email-preview-frame-wrap {
  background: linear-gradient(180deg, #f8fbfd 0%, #eef3f8 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 620px;
  overflow: hidden;
  padding: 18px;
}

.email-preview-frame-wrap.is-mobile {
  display: flex;
  justify-content: center;
}

.email-preview-frame-wrap iframe {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 30, 48, 0.16);
  height: 100%;
  min-height: 580px;
  width: 100%;
}

.email-preview-frame-wrap.is-mobile iframe {
  max-width: 390px;
}

.email-editor-shell {
  display: grid;
  gap: 14px;
}

.email-editor-panel-head {
  align-items: center;
}

.email-editor-actions {
  display: flex;
  gap: 10px;
}

.email-editor-actions .ghost-button,
.email-editor-actions .account-save {
  justify-content: center;
  min-width: 132px;
}

.email-field {
  display: grid;
  gap: 6px;
}

.email-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.email-field input {
  min-height: 44px;
}

.email-variables-card {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.email-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.email-variable-chip {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
}

.email-variable-chip strong {
  font-size: 13px;
  font-weight: 800;
}

.email-variable-chip span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.email-toolbar {
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.email-toolbar .ql-formats {
  margin-right: 12px;
}

.email-toolbar .ql-picker-label,
.email-toolbar button {
  color: var(--text);
}

.email-editor {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 360px;
}

.email-editor .ql-container {
  border: 0;
  font-size: 16px;
  min-height: 360px;
}

.email-editor .ql-editor {
  min-height: 360px;
  padding: 20px 22px;
}

.email-html-fallback {
  min-height: 360px;
}

.email-mode-switch {
  align-items: center;
  align-self: start;
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
}

.email-mode-switch input {
  min-height: auto;
}

.email-mode-switch-ui {
  background: #d9e1ea;
  border-radius: 999px;
  display: inline-flex;
  height: 20px;
  padding: 2px;
  position: relative;
  width: 40px;
}

.email-mode-switch-ui::before {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(20, 30, 48, 0.16);
  content: "";
  height: 16px;
  transform: translateX(0);
  transition: transform 180ms ease;
  width: 16px;
}

.email-mode-switch input:checked + .email-mode-switch-ui {
  background: rgba(9, 237, 130, 0.35);
}

.email-mode-switch input:checked + .email-mode-switch-ui::before {
  transform: translateX(20px);
}

.email-editor-shell .account-feedback {
  margin: 0;
}

.support-unread-pill {
  align-self: center;
  background: rgba(9, 237, 130, 0.16);
  border: 1px solid rgba(9, 237, 130, 0.28);
  border-radius: 999px;
  color: #0f6d48;
  font-weight: 800;
  padding: 10px 14px;
}

.support-shell {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  min-height: 680px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.support-list-panel {
  background: #f7fafc;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
}

.support-filters {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.support-filters label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.support-filters input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
}

.support-filters button,
.support-reply button,
.support-status-actions button {
  background: var(--text);
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
}

.support-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 14px;
}

.support-tabs a {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  padding: 8px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.support-tabs a.is-active {
  background: rgba(9, 237, 130, 0.14);
  border-color: rgba(9, 237, 130, 0.34);
  color: #0f6d48;
}

.support-conversation-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
  padding: 0 14px 16px;
}

.support-conversation-link {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  display: grid;
  gap: 7px;
  min-height: 130px;
  padding: 14px;
  text-decoration: none;
}

.support-conversation-link:hover,
.support-conversation-link.is-active {
  border-color: rgba(9, 237, 130, 0.42);
  box-shadow: 0 12px 30px rgba(20, 30, 48, 0.08);
}

.support-conversation-top,
.support-conversation-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.support-conversation-top strong,
.support-conversation-subject,
.support-conversation-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-conversation-top strong {
  color: var(--text);
}

.support-conversation-top small,
.support-conversation-meta small {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.support-conversation-user {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 7px;
}

.support-conversation-user i {
  background: #09ed82;
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.support-conversation-subject {
  color: var(--text);
  font-size: 14px;
}

.support-conversation-meta em {
  color: #0f6d48;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.support-empty-list,
.support-empty-detail {
  color: var(--muted);
  padding: 24px;
}

.support-empty-list strong,
.support-empty-detail h2 {
  color: var(--text);
}

.support-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.support-detail-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px;
}

.support-detail-head p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 6px;
}

.support-detail-head h2 {
  color: var(--text);
  font-size: 24px;
  margin: 0 0 6px;
}

.support-detail-head span {
  color: var(--muted);
  font-weight: 700;
}

.support-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-status-actions button {
  background: #edf2f7;
  color: var(--text);
}

.support-status-actions button.is-active {
  background: rgba(9, 237, 130, 0.18);
  color: #0f6d48;
}

.support-thread {
  align-content: start;
  background: #fbfdff;
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 22px;
}

.support-message {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  max-width: min(760px, 86%);
  padding: 14px 16px;
}

.support-message.is-agent {
  background: #effbf5;
  border-color: rgba(9, 237, 130, 0.28);
  justify-self: end;
}

.support-message div {
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
}

.support-message strong {
  color: var(--text);
}

.support-message p {
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
}

.support-reply {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 18px 22px 22px;
}

.support-reply label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.support-reply textarea {
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font: inherit;
  min-height: 110px;
  padding: 13px 14px;
  resize: vertical;
}

.support-reply > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.support-reply span {
  color: var(--muted);
  font-weight: 800;
}

.support-empty-detail {
  align-content: center;
  display: grid;
  justify-items: center;
  min-height: 600px;
  text-align: center;
}

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

  .support-list-panel {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .support-conversation-list {
    max-height: 360px;
  }

  .support-detail-head,
  .support-reply > div {
    align-items: stretch;
    flex-direction: column;
  }

  .support-status-actions {
    width: 100%;
  }

  .support-message {
    max-width: 100%;
  }

  .email-editor-layout {
    grid-template-columns: 1fr;
  }

  .email-preview-frame-wrap {
    min-height: 520px;
  }
}

@media (max-width: 820px) {
  .email-preview-head,
  .email-editor-panel-head {
    flex-direction: column;
  }

  .email-editor-actions {
    width: 100%;
  }

  .email-editor-actions .ghost-button,
  .email-editor-actions .account-save {
    flex: 1 1 auto;
    min-width: 0;
  }

  .email-preview-frame-wrap {
    min-height: 460px;
    padding: 12px;
  }

  .email-preview-frame-wrap iframe {
    min-height: 420px;
  }
}
