:root {
    --bg: #f7f4ef;
    --surface: #fff;
    --text: #282421;
    --muted: #6d655f;
    --accent: #8b4d5c;
    --accent-dark: #683643;
    --border: #ded6ce;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--border); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 750; }
.logo img { display: block; width: 64px; height: 64px; object-fit: contain; }
.hero { padding: 110px 0; background: linear-gradient(135deg, #f2e2e1, #f7f4ef 70%); }
.hero--accent { background: linear-gradient(135deg, #ead1d8, #f7f4ef); }
.hero__content { max-width: 780px; }
.section { padding: 80px 0; }
.content { max-width: 760px; }
h1, h2, h3 { line-height: 1.15; }
h1 { margin: 0 0 24px; font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -.04em; }
h2 { margin-top: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.eyebrow { color: var(--accent); font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.lead { max-width: 680px; color: var(--muted); font-size: 1.25rem; }
.button { display: inline-block; border: 0; border-radius: 8px; padding: 14px 22px; color: #fff; background: var(--accent); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--accent-dark); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 28px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.contact-form { display: grid; gap: 18px; margin-top: 28px; }
.contact-form label { display: grid; gap: 7px; font-weight: 650; }
input, textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.contact-form .consent-field { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .9rem; font-weight: 400; line-height: 1.45; }
.contact-form .consent-field input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.contact-form .consent-field a { color: var(--accent-dark); }
.contact-form .consent-field--optional { color: var(--muted); }
.form-trap { position: absolute; left: -10000px; }
.notice { margin: 20px 0; padding: 14px 18px; border-radius: 8px; }
.notice--success { background: #e1f1e6; color: #245732; }
.notice--error { background: #f8dddd; color: #752626; }
.site-footer { padding: 32px 0; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer__inner { display: grid; gap: 8px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: inherit; }
@media (max-width: 700px) {
    .nav { align-items: flex-start; flex-direction: column; padding-block: 18px; }
    .nav nav { flex-wrap: wrap; }
    .hero, .section { padding: 64px 0; }
    .cards { grid-template-columns: 1fr; }
}

/* Checkout and payment result */
.checkout-page, .payment-result-page { min-height: 70vh; padding: 64px 0 90px; }
.checkout-shell { max-width: 1040px; }
.checkout-back, .admin-back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; }
.checkout-back:hover, .admin-back-link:hover { color: var(--accent-dark); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr); gap: 28px; align-items: start; }
.checkout-card, .order-summary, .payment-result-shell { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 55px rgba(48, 42, 38, .07); }
.checkout-card { padding: clamp(28px, 5vw, 52px); }
.checkout-card h1 { margin-bottom: 12px; font-size: clamp(2.25rem, 5vw, 3.5rem); }
.checkout-intro { margin: 0 0 28px; color: var(--muted); }
.payment-test-banner { display: grid; gap: 2px; margin-bottom: 22px; padding: 14px 16px; border: 1px solid #d8b968; border-radius: 10px; background: #fff7d9; color: #644d16; }
.payment-test-banner span { font-size: .9rem; }
.checkout-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 7px; font-weight: 700; }
.form-field input { min-height: 50px; }
.form-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 11px; align-items: start; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.form-consent input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.form-consent a { color: var(--accent-dark); }
.form-alert { padding: 14px 16px; margin-bottom: 22px; border: 1px solid #e5b7b7; border-radius: 10px; background: #fff0f0; color: #7a2929; }
.checkout-submit { width: 100%; min-height: 52px; margin-top: 6px; }
.button-secondary { border: 1px solid var(--border); background: transparent; color: var(--text); }
.button-secondary:hover { border-color: var(--accent); background: #f4e9ec; }
.order-summary { position: sticky; top: 24px; padding: 30px; }
.order-summary h2 { font-size: 1.65rem; }
.order-summary ul { padding-left: 20px; color: var(--muted); }
.order-summary__total { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.order-summary__total strong { font-size: 1.45rem; }
.order-summary__note { margin: 18px 0 0; color: var(--muted); font-size: .88rem; }
.payment-result-shell { max-width: 680px; padding: clamp(32px, 7vw, 64px); text-align: center; }
.payment-result-shell h1 { margin-bottom: 14px; font-size: clamp(2.4rem, 6vw, 4rem); }
.payment-result-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 50%; background: #f2e8da; color: #7b5d34; font-size: 2rem; font-weight: 800; }
.payment-result-shell[data-status="paid"] .payment-result-icon { background: #dff1e5; color: #27603a; }
.payment-result-shell[data-status="canceled"] .payment-result-icon, .payment-result-shell[data-status="denied"] .payment-result-icon { background: #f8dddd; color: #7a2929; }
.payment-result-text { max-width: 520px; margin: 0 auto 28px; color: var(--muted); font-size: 1.08rem; }
.payment-result-order { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.payment-result-access { margin-top: 24px; padding: 22px; border: 1px solid #c9ddcd; border-radius: 14px; background: #edf7ef; }
.payment-result-access[hidden] { display: none; }
.payment-result-access p { max-width: 470px; margin: 0 auto 16px; color: #294d32; }
.payment-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* Admin */
.admin-body { min-height: 100vh; background: #f3f0eb; color: #26221f; }
.admin-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; min-height: 68px; padding: 10px max(20px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #ded6ce; background: rgba(255,255,255,.96); }
.admin-brand { margin-right: auto; font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.admin-brand span { margin-left: 7px; color: #857a72; font-size: .78rem; font-weight: 600; }
.admin-nav { display: flex; gap: 18px; }
.admin-nav a, .admin-link-button { border: 0; background: none; color: #5f5751; font: inherit; text-decoration: none; cursor: pointer; }
.admin-nav a:hover, .admin-link-button:hover { color: #8b4d5c; }
.admin-main { width: 100%; }
.admin-page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 80px; }
.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-page h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.admin-kicker { margin: 0 0 5px; color: #8b4d5c; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.admin-count { color: #7a716a; font-size: .9rem; }
.admin-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.admin-metric { display: grid; gap: 12px; min-height: 150px; padding: 24px; border: 1px solid #ded6ce; border-radius: 15px; background: #fff; color: inherit; text-decoration: none; }
.admin-metric span { color: #756c65; }
.admin-metric strong { align-self: end; font-size: 2.2rem; line-height: 1; }
.admin-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; gap: 10px; margin-bottom: 22px; }
.admin-filters input, .admin-filters select { min-height: 46px; border: 1px solid #d8d0c9; border-radius: 8px; padding: 10px 12px; background: #fff; font: inherit; }
.admin-filters button, .admin-form button { border: 0; border-radius: 8px; padding: 11px 22px; background: #6c3b47; color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.admin-list { display: grid; gap: 14px; }
.admin-message, .admin-panel { padding: 24px; border: 1px solid #ded6ce; border-radius: 14px; background: #fff; }
.admin-message.is-processed { opacity: .72; }
.admin-message-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-message-head > div { display: grid; gap: 3px; }
.admin-message-head > div:last-child { justify-items: end; }
.admin-message-head a, .admin-panel a { color: #75404c; }
.admin-message-head time { color: #80766e; font-size: .82rem; }
.admin-message-text { margin-bottom: 18px; color: #4f4944; }
.admin-secondary-button { border: 1px solid #d7cec6; border-radius: 8px; padding: 8px 13px; background: #fff; color: #514a45; font: inherit; cursor: pointer; }
.admin-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; background: #ece8e3; color: #5f5751; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.status-new, .status-pending { background: #fff0c9; color: #745713; }
.status-paid, .status-processed { background: #dff1e5; color: #27603a; }
.status-canceled, .status-denied { background: #f8dddd; color: #7a2929; }
.admin-table-wrap { overflow-x: auto; border: 1px solid #ded6ce; border-radius: 14px; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 15px 17px; border-bottom: 1px solid #e7e1db; text-align: left; vertical-align: top; }
.admin-table th { background: #faf8f5; color: #756c65; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td a { color: #75404c; text-decoration: none; }
.admin-table td small { display: block; margin-top: 3px; color: #80766e; line-height: 1.35; }
.admin-empty { padding: 36px; color: #7a716a; text-align: center; }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-panel h2 { font-size: 1.35rem; }
.admin-panel dl { display: grid; gap: 0; margin: 0; }
.admin-panel dl div { display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 20px; padding: 11px 0; border-bottom: 1px solid #ebe5df; }
.admin-panel dl div:last-child { border-bottom: 0; }
.admin-panel dt { color: #80766e; }
.admin-panel dd { margin: 0; overflow-wrap: anywhere; }
.admin-events { margin-top: 18px; }
.admin-events .admin-table-wrap { border-radius: 8px; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; }
.admin-login-card { width: min(440px, 100%); padding: 38px; border: 1px solid #ded6ce; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(38,34,31,.08); }
.admin-login-card h1 { margin-bottom: 24px; font-size: 2.5rem; }
.admin-form { display: grid; gap: 16px; }
.admin-form label { display: grid; gap: 6px; font-weight: 700; }
.admin-form button { min-height: 48px; margin-top: 4px; }
.admin-form button:disabled { opacity: .45; cursor: not-allowed; }
.admin-alert { margin-bottom: 18px; padding: 13px 15px; border-radius: 8px; background: #fff0d7; color: #6d4b18; }
.admin-login-card .admin-back-link { margin: 22px 0 0; }
.admin-test-intro { margin-bottom: 22px; padding: 20px 22px; border: 1px solid #e5d5ae; border-radius: 14px; background: #fff9e9; color: #5d4923; }
.admin-test-intro p { margin: 5px 0 0; }
.admin-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.admin-test-check { padding: 20px; border: 1px solid #ded6ce; border-radius: 14px; background: #fff; }
.admin-test-check__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.admin-test-check h2 { margin: 2px 0 0; font-size: 1.08rem; }
.admin-test-check p { margin: 9px 0 0; color: #756c65; font-size: .9rem; }
.admin-test-check__status { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.admin-test-check.is-ok { border-color: #bcd7c3; }
.admin-test-check.is-ok .admin-test-check__status { background: #dff1e5; color: #27603a; }
.admin-test-check.is-error { border-color: #e8c0c0; }
.admin-test-check.is-error .admin-test-check__status { background: #f8dddd; color: #7a2929; }
.admin-test-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: 34px; padding: clamp(24px, 4vw, 38px); border: 1px solid #ded6ce; border-radius: 16px; background: #fff; }
.admin-test-panel h2 { margin-bottom: 10px; }
.admin-test-panel p { color: #6d655f; }
.admin-test-form select { width: 100%; min-height: 50px; border: 1px solid #d8d0c9; border-radius: 8px; padding: 10px 12px; background: #fff; color: inherit; font: inherit; }
.admin-test-note { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid #e7e1db; font-size: .9rem; }

@media (max-width: 820px) {
    .checkout-grid, .admin-detail-grid, .admin-test-panel { grid-template-columns: 1fr; }
    .order-summary { position: static; }
    .admin-header { flex-wrap: wrap; gap: 10px 18px; padding-block: 14px; }
    .admin-brand { flex: 1 0 60%; }
    .admin-nav { order: 3; width: 100%; overflow-x: auto; }
    .admin-metrics { grid-template-columns: repeat(2, 1fr); }
    .admin-filters { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .checkout-page, .payment-result-page { padding-top: 38px; }
    .checkout-card, .order-summary, .payment-result-shell { border-radius: 12px; }
    .payment-result-order, .admin-message-head, .admin-page-head { align-items: flex-start; flex-direction: column; }
    .admin-message-head > div:last-child { justify-items: start; }
    .admin-metrics { grid-template-columns: 1fr; }
    .admin-test-grid { grid-template-columns: 1fr; }
    .admin-test-check__head { align-items: flex-start; flex-direction: column; }
    .admin-login-card { padding: 28px 22px; }
}
