/* ========== Base ========== */
* { box-sizing: border-box; }

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e6e8ee;
  --border-strong: #d6dae3;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #4f46e5;

  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --yellow: #f5b800;
  --yellow-bg: #fff8db;
  --yellow-border: #f5e08a;
  --blue-soft: #dbeafe;
  --purple-soft: #ede9fe;
  --gray-soft: #eef0f5;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.10);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Header ========== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--text-muted);
}
.nav a:hover { color: var(--text); }

.back-link {
  font-size: 14px;
  color: var(--text-muted);
}
.back-link:hover { color: var(--text); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease, border 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover { background: rgba(15, 23, 42, 0.04); }

/* ========== Hero ========== */
.hero {
  padding: 64px 0 48px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.badge-soft {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.accent {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta strong {
  font-size: 22px;
  font-weight: 700;
}
.hero-meta span {
  font-size: 13px;
  color: var(--text-muted);
}

/* Hero visual mock */
.hero-visual {
  display: flex;
  justify-content: center;
}
.mock-window {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.mock-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.mock-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #e5e7eb;
}
.mock-bar span:nth-child(1) { background: #ff5f57; }
.mock-bar span:nth-child(2) { background: #febc2e; }
.mock-bar span:nth-child(3) { background: #28c840; }

.mock-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mock-task {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mock-task .check {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--green);
  position: relative;
  flex-shrink: 0;
}
.mock-task .check::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.mock-task .check.empty {
  background: transparent;
  border: 2px solid var(--border-strong);
}
.mock-task .check.empty::after { content: none; }

.mock-task .line {
  height: 10px;
  background: #eef0f5;
  border-radius: 5px;
  flex: 1;
}
.mock-task.done .line { background: #f1f5f9; opacity: 0.7; }
.mock-task .line.short { width: 50%; flex: none; }
.mock-task .line.medium { width: 75%; flex: none; }

.mock-ai {
  margin-top: 8px;
  background: var(--blue-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.18);
}

/* ========== Sections ========== */
.section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 17px;
}

/* ========== Features ========== */
.features {
  padding: 56px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.feature-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
  font-weight: 700;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14.5px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.icon-blue { background: var(--blue-soft); color: var(--primary); }
.icon-green { background: var(--green-soft); color: var(--green); }
.icon-purple { background: var(--purple-soft); color: #7c3aed; }
.icon-yellow { background: var(--yellow-bg); color: #b45309; }

/* ========== Pricing ========== */
.pricing {
  padding: 72px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.plan-card.popular {
  border-color: var(--primary);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.16);
  transform: translateY(-6px);
}
.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.plan-price .price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.plan-price .period {
  color: var(--text-muted);
  font-size: 15px;
}
.plan-desc {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 14.5px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan-features li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: #1f2937;
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}

/* ========== FAQ ========== */
.faq {
  padding: 56px 0 72px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 400;
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin-top: 10px;
  color: var(--text-muted);
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a:hover { color: var(--text); }

/* ========== Payment page ========== */
.payment-page {
  background: var(--bg);
}
.payment-main {
  padding: 28px 0 64px;
}
.payment-container {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.awaiting-banner {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.awaiting-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  color: #4a3500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.awaiting-text h2 {
  font-size: 20px;
  font-weight: 800;
  color: #6b4a00;
  margin-bottom: 2px;
}
.awaiting-text p {
  color: #8a6700;
  font-size: 14px;
}
.awaiting-text code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  color: #5c3f00;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.card-header h3 {
  font-size: 19px;
  font-weight: 700;
}
.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-green-soft { background: var(--green-soft); color: var(--green); }
.icon-blue-soft { background: var(--blue-soft); color: var(--primary); }
.icon-purple-soft { background: var(--purple-soft); color: #7c3aed; }
.icon-gray-soft { background: var(--gray-soft); color: var(--text-muted); }

.details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.details-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.details-label {
  color: var(--text-muted);
  font-size: 15px;
}
.details-value {
  font-weight: 700;
  font-size: 15px;
  text-align: right;
}
.details-value-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.details-value .strong { font-weight: 700; }
.details-value .muted { color: var(--text-soft); font-weight: 500; font-size: 14px; }
.details-value.pill {
  background: var(--gray-soft);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.details-total {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.total-label {
  font-weight: 700;
  font-size: 17px;
}
.total-value {
  color: var(--red);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.card-field-label {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}
.card-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.card-field input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 16px;
  letter-spacing: 0.04em;
  font-weight: 600;
  background: transparent;
  color: var(--text);
}
.copy-btn {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  padding: 0 16px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn:hover { background: var(--gray-soft); color: var(--text); }
.copy-btn.copied { color: var(--green); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.steps {
  list-style: none;
  margin: 0 0 22px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}
.step-text {
  color: var(--text-muted);
  font-size: 14.5px;
}

.payment-status {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-status[hidden] {
  display: none !important;
}

.payment-status.ok {
  background: #ecfdf5;
  border-color: #86efac;
}

.payment-status.error {
  background: #fef2f2;
  border-color: #fca5a5;
}

.payment-status-loader {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #bfdbfe;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.payment-status.ok .payment-status-loader,
.payment-status.error .payment-status-loader {
  animation: none;
  border: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.payment-status.ok .payment-status-loader::before {
  content: "✓";
  color: #15803d;
  font-weight: 800;
}

.payment-status.error .payment-status-loader::before {
  content: "!";
  color: #dc2626;
  font-weight: 800;
}

.payment-status-text {
  font-size: 14px;
  color: #334155;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .hero { padding: 40px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-card.popular { transform: none; }
  .nav { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .hero-meta { gap: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .features, .pricing, .faq { padding: 44px 0; }

  .awaiting-banner { gap: 14px; padding: 16px; }
  .awaiting-icon { width: 44px; height: 44px; }
  .awaiting-text h2 { font-size: 18px; }
  .awaiting-text p { font-size: 13px; word-break: break-all; }

  .card { padding: 18px; }
  .card-header h3 { font-size: 17px; }
  .total-value { font-size: 20px; }
  .details-row { gap: 8px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ========== Admin ========== */
.admin-wrap {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-note {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.admin-row {
  margin-bottom: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

.admin-input,
.admin-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.admin-textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-input:focus,
.admin-textarea:focus {
  border-color: var(--primary);
  outline: none;
}

@media (max-width: 700px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
