:root {
  --bg: #f0f3f9;
  --panel: #ffffff;
  --text: #1a1f2e;
  --muted: #5a6478;
  --accent: #2563eb;
  --accent-dim: #1d4ed8;
  --danger: #dc2626;
  --ok: #059669;
  --border: #d8dee9;
  font-family: "SF Pro Text", system-ui, -apple-system, Segoe UI, Roboto,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1000px 520px at 18% -8%, #e1eaff 0%, var(--bg) 52%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead code {
  font-size: 0.85em;
  background: var(--panel);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.label {
  font-weight: 600;
  font-size: 0.9rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

textarea {
  resize: vertical;
  min-height: 160px;
}

.generate {
  margin-top: 0.5rem;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 1.15rem 1.5rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dim) 100%);
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.22);
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.generate:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.generate:active:not(:disabled) {
  transform: translateY(0);
}

.generate:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  margin-top: 1.75rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.95rem;
}

.status[data-kind="error"] {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fef2f2;
  color: #991b1b;
}

.status[data-kind="error"] a {
  color: var(--accent-dim);
  font-weight: 600;
}

.status[data-kind="ok"] {
  border-color: rgba(5, 150, 105, 0.35);
  background: #ecfdf5;
  color: #065f46;
}

.status code {
  font-size: 0.88em;
  word-break: break-all;
}

.result-link {
  margin: 1rem 0 0;
}

.result-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.result-link a:hover {
  text-decoration: underline;
}

.download-link {
  margin: 0.75rem 0 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: #f0f5ff;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.download-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.download-btn.alt {
  cursor: pointer;
  border-color: rgba(5, 150, 105, 0.4);
  background: #ecfdf5;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(26, 31, 46, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -0.15em;
  margin-right: 0.35em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-links .sep {
  margin: 0 0.4rem;
  opacity: 0.7;
}

.footer-note {
  margin-top: 0.5rem;
}

.legal h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.legal-card {
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.legal-card ul {
  margin: 0.5rem 0 0.75rem 1.2rem;
  padding: 0;
}

.legal-card-emphasis {
  border-color: rgba(37, 99, 235, 0.35);
  background: #f8fafc;
}

.legal-lead-strong {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.legal-nav-bundle {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
}

.legal-nav-bundle a {
  color: var(--accent);
  text-decoration: none;
}

.legal-nav-bundle a:hover {
  text-decoration: underline;
}

.legal-nav-bundle .sep {
  margin: 0 0.4rem;
  opacity: 0.65;
  color: var(--muted);
  font-weight: 400;
}

.site-footer-legal {
  max-width: 640px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.25rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer-legal-links {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
}

.site-footer-legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer-legal-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer-legal-links .sep {
  margin: 0 0.4rem;
  opacity: 0.6;
  font-weight: 400;
}

.site-footer-legal-note {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #9ca3af;
}

.legal-back {
  margin: 1.25rem 0 0;
}

.legal-back a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.legal-back a:hover {
  text-decoration: underline;
}

.site-nav-outer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  font-size: 0.88rem;
}

.site-nav a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.nav-user {
  color: var(--muted);
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(200px, 50vw);
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.nav-btn:hover {
  border-color: var(--accent);
}

.auth-page .field-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-page .form-actions {
  margin-top: 0.75rem;
}

.auth-page .msg {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.9rem;
}

.auth-page .msg[data-kind="error"] {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fef2f2;
  color: #991b1b;
}

.auth-page .msg[data-kind="ok"] {
  border-color: rgba(5, 150, 105, 0.35);
  background: #ecfdf5;
  color: #065f46;
}

.cabinet-table-wrap {
  margin-top: 1.25rem;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.cabinet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cabinet-table th,
.cabinet-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cabinet-table th {
  color: var(--muted);
  font-weight: 600;
}

.cabinet-table tr:last-child td {
  border-bottom: none;
}

.cabinet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cabinet-actions a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cabinet-actions a:hover {
  text-decoration: underline;
}

.cabinet-actions .cabinet-edit-site {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cabinet-actions .cabinet-edit-site:hover {
  text-decoration: underline;
}

.cabinet-actions .cabinet-leads-open {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: var(--ok);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cabinet-actions .cabinet-leads-open:hover:not(:disabled) {
  text-decoration: underline;
}

.cabinet-actions .cabinet-leads-open:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cabinet-actions .cabinet-delete-project {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.cabinet-actions .cabinet-delete-project:hover:not(:disabled) {
  text-decoration: underline;
}

.cabinet-actions .cabinet-delete-project:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cabinet-empty {
  margin-top: 1rem;
  color: var(--muted);
}

.cabinet-main .cabinet-section {
  margin-top: 2rem;
}

.cabinet-main .cabinet-section:first-of-type {
  margin-top: 1.25rem;
}

.cabinet-main.shell {
  max-width: 52rem;
}

.cabinet-billing .billing-balance {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0;
}

.cabinet-billing .billing-pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.cabinet-billing .billing-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cabinet-billing .billing-pay-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
}

.cabinet-billing .billing-pay-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cabinet-billing .billing-pay-btn.primary {
  background: var(--accent);
  border-color: var(--accent-dim);
  color: #fff;
}

.cabinet-billing .billing-pay-btn.primary:hover:not(:disabled) {
  background: var(--accent-dim);
}

.cabinet-billing .billing-custom {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.cabinet-billing .billing-custom .field {
  flex: 1 1 12rem;
  margin: 0;
}

.cabinet-billing .billing-custom .field input {
  max-width: 14rem;
}

.billing-amount-plus {
  color: var(--ok);
  font-weight: 600;
  white-space: nowrap;
}

.billing-amount-minus {
  color: var(--danger);
  font-weight: 600;
  white-space: nowrap;
}

.cabinet-stats .subsection-title {
  margin: 1.75rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-lead {
  margin-bottom: 0;
}

.cabinet-form {
  margin-top: 1rem;
}

.landing-cta {
  margin-top: 2rem;
  text-align: center;
}

.landing-cta p {
  margin: 0.75rem 0 0;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.35rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(
    160deg,
    var(--accent) 0%,
    var(--accent-dim) 100%
  );
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.landing-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.landing-btn.alt {
  background: var(--panel);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.35);
  box-shadow: none;
}

.landing-note {
  text-align: center;
}

/* ========== Главная (лендинг в духе Tilda) ========== */
body.page-landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: #fafbfd;
  color: #111827;
  position: relative;
  overflow-x: hidden;
}

body.page-landing .landing-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.page-landing .landing-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
}

body.page-landing .landing-blob--1 {
  width: min(62vw, 520px);
  height: min(62vw, 520px);
  background: linear-gradient(135deg, #c4d4ff 0%, #e8ecff 100%);
  top: -12%;
  right: -8%;
}

body.page-landing .landing-blob--2 {
  width: min(48vw, 400px);
  height: min(48vw, 400px);
  background: linear-gradient(145deg, #ffe8cc 0%, #ffd6e8 100%);
  bottom: 5%;
  left: -10%;
}

body.page-landing .landing-blob--3 {
  width: min(36vw, 320px);
  height: min(36vw, 320px);
  background: linear-gradient(160deg, #d4f4e8 0%, #c8e7ff 100%);
  top: 42%;
  left: 50%;
  transform: translateX(-30%);
  opacity: 0.4;
}

body.page-landing .landing-top {
  position: relative;
  z-index: 1;
  padding: 1.1rem 1.5rem;
}

body.page-landing .landing-top-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.page-landing .landing-logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.06em;
  color: #111827;
  text-decoration: none;
}

body.page-landing .landing-logo:hover {
  color: var(--accent);
}

body.page-landing .landing-top-nav.site-nav {
  margin: 0;
  padding: 0;
  max-width: none;
  justify-content: flex-end;
}

body.page-landing .landing-top-nav .nav-user {
  color: #6b7280;
  max-width: min(200px, 38vw);
}

body.page-landing .landing-top-nav .nav-btn {
  border-color: #e5e7eb;
  color: #374151;
}

body.page-landing .landing-top-nav a {
  color: #111827;
  font-weight: 600;
}

body.page-landing .landing-top-nav a:hover {
  color: var(--accent);
}

body.page-landing .landing-hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

body.page-landing .landing-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(2rem, 5vh, 4rem);
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

body.page-landing .landing-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

body.page-landing .landing-title {
  margin: 0;
  font-size: clamp(2rem, 6.5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: #111827;
}

body.page-landing .landing-title br {
  display: none;
}

@media (min-width: 540px) {
  body.page-landing .landing-title br {
    display: inline;
  }
}

body.page-landing .landing-title-accent {
  background: linear-gradient(105deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.page-landing .landing-lead {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.65;
  color: #4b5563;
  max-width: 560px;
}

body.page-landing .landing-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

body.page-landing .landing-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  color: #fff;
  background: #111827;
  border: 2px solid #111827;
  box-shadow: 0 14px 40px rgba(17, 24, 39, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.page-landing .landing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.26);
  background: #000;
}

body.page-landing .landing-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  color: #111827;
  background: #fff;
  border: 2px solid #e5e7eb;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.page-landing .landing-btn-secondary:hover {
  transform: translateY(-2px);
  border-color: #111827;
  background: #fafafa;
}

body.page-landing .landing-hint {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  color: #6b7280;
}

body.page-landing .landing-hint a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

body.page-landing .landing-hint a:hover {
  text-decoration: underline;
}

body.page-landing .landing-foot {
  flex-shrink: 0;
  padding: 1.25rem 0 1.5rem;
  text-align: center;
}

body.page-landing .landing-foot-links {
  font-size: 0.8125rem;
  font-weight: 600;
}

body.page-landing .landing-foot-links a {
  color: #6b7280;
  text-decoration: none;
}

body.page-landing .landing-foot-links a:hover {
  color: #111827;
  text-decoration: underline;
}

body.page-landing .landing-foot-dot {
  margin: 0 0.45rem;
  opacity: 0.5;
}

body.page-landing .landing-foot-note {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.45;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.18);
}

.modal-dialog--wide {
  max-width: min(36rem, 100vw - 2rem);
}

.leads-modal-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(50vh, 420px);
  overflow-y: auto;
}

.leads-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.leads-row-main {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.88rem;
}

.leads-row-when {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.leads-row-data {
  color: var(--text);
  word-break: break-word;
}

.leads-row-ip {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.leads-row-delete {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: #fef2f2;
  color: var(--danger);
  cursor: pointer;
}

.leads-row-delete:hover:not(:disabled) {
  background: #fee2e2;
}

.leads-row-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.leads-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.leads-dev-note {
  margin: 1.1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.leads-dev-note del {
  color: var(--muted);
}

.modal-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-field {
  margin-bottom: 0;
}

.modal-field textarea {
  min-height: 140px;
}

.modal-msg {
  margin-top: 1rem;
}

.modal-msg[data-kind="error"] {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fef2f2;
  color: #991b1b;
}

.modal-msg[data-kind="ok"] {
  border-color: rgba(5, 150, 105, 0.35);
  background: #ecfdf5;
  color: #065f46;
}

.modal-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.modal-btn.secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

.modal-btn.secondary:hover {
  border-color: var(--muted);
}

.modal-btn.primary {
  background: #111827;
  color: #fff;
  border: 2px solid #111827;
}

.modal-btn.primary:hover:not(:disabled) {
  background: #000;
}

.modal-btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
