@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #be123c;
  --primary-dark: #9f1239;
  --primary-soft: #fff1f2;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ecfdf5;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 12px 32px -8px rgba(15, 23, 42, 0.1);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.hero {
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 50%, #e11d48 100%);
  color: #fff;
  padding: 1.75rem 1.25rem 2.75rem;
  text-align: center;
  position: relative;
}

.hero--teal {
  background: linear-gradient(120deg, #065f46 0%, var(--teal-dark) 50%, var(--teal) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
}

.hero__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  opacity: 0.92;
  font-weight: 500;
}

.hero__meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Main */
.main {
  flex: 1;
  padding: 0 1rem 2rem;
  margin-top: -0.5rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.main--wide {
  max-width: 920px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-soft);
}

/* Form */
.field { margin-bottom: 1.15rem; }

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1);
}

.captcha-box {
  background: var(--primary-soft);
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.65rem;
}

.captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.captcha-row img {
  border-radius: 8px;
  height: 46px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ghost:hover {
  background: var(--primary-soft);
}

.hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:active { transform: scale(0.98); }

.btn-block {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48, var(--primary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(190, 18, 60, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.4);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-dark {
  background: linear-gradient(135deg, #334155, #1e293b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.btn-outline {
  background: #fff;
  color: var(--teal-dark);
  border: 2px solid var(--teal);
}

.btn-outline:hover {
  background: var(--teal-soft);
}

/* Alerts & loader */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

.alert-success {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border-left: 4px solid var(--teal);
  margin-bottom: 1rem;
  font-weight: 600;
}

.loader {
  display: none;
  text-align: center;
  padding: 1rem;
  background: var(--primary-soft);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
  font-size: 0.875rem;
  font-weight: 600;
}

.loader.active { display: block; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #fecdd3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 0.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.footer-note a {
  color: #0f766e;
  font-weight: 600;
}

/* Report page */
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.report-preview-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-frame {
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.report-frame iframe {
  width: 100%;
  height: 80vh;
  min-height: 560px;
  border: none;
  display: block;
  background: #fff;
}

.report-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.report-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.report-footer a:hover { text-decoration: underline; }

.report-footer small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Full screen */
.fullscreen-body {
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.fullscreen-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.fullscreen-toolbar {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.fs-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.fs-btn svg {
  width: 16px;
  height: 16px;
}

.fs-btn--print {
  background: var(--primary);
  color: #fff;
}

.fs-btn--print:hover { background: var(--primary-dark); }

.fs-btn--close {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.fs-btn--close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  max-width: 92%;
  padding: 0.85rem 1.2rem;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  box-shadow: var(--shadow);
  transition: transform 0.25s, opacity 0.25s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (min-width: 600px) {
  .main { padding: 0 1.5rem 2.5rem; }
  .card { padding: 1.75rem; }
}

@media print {
  .ad-wrap,
  .adsbygoogle {
    display: none !important;
  }
}
