:root {
    --ink: #1d1830;
    --muted: #6f6880;
    --bg: #fffafd;
    --surface: #ffffff;
    --line: #eadfea;
    --plum: #6e3cbc;
    --plum-dark: #4d248f;
    --rose: #ef6b9f;
    --teal: #45b8ae;
    --gold: #e5ae52;
    --danger: #b83255;
    --shadow: 0 18px 50px rgba(53, 34, 73, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(239, 107, 159, .10), transparent 30rem),
        radial-gradient(circle at 86% 16%, rgba(69, 184, 174, .10), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

.site-header {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    font-weight: 850;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 28px;
}

.brand-mark span {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 5px;
}

.brand-mark span:nth-child(1) {
    left: 0;
    color: var(--plum);
}

.brand-mark span:nth-child(2) {
    left: 8px;
    color: var(--rose);
}

.brand-mark span:nth-child(3) {
    left: 16px;
    color: var(--teal);
}

.top-nav {
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: .95rem;
}

.top-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 650;
}

.top-nav .nav-cta {
    color: white;
    background: var(--ink);
    padding: 10px 16px;
    border-radius: 999px;
}

.hero {
    width: min(1180px, calc(100% - 36px));
    margin: 56px auto 30px;
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    gap: 48px;
    align-items: center;
    min-height: 580px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .83rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--plum);
    background: #f1eafa;
    padding: 7px 11px;
    border-radius: 999px;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(3rem, 7vw, 6.7rem);
    line-height: .94;
    letter-spacing: -0.065em;
    max-width: 800px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--plum), var(--rose), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    color: var(--muted);
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--ink);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--ink);
    border: 1px solid var(--line);
}

.hero-card {
    background: rgba(255,255,255,.86);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -70px;
    top: -90px;
    background: radial-gradient(circle, rgba(239,107,159,.24), transparent 68%);
}

.match-stack {
    display: grid;
    gap: 16px;
    position: relative;
}

.person-card {
    border: 1px solid var(--line);
    background: white;
    padding: 20px;
    border-radius: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.avatar {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(110,60,188,.22), rgba(239,107,159,.26), rgba(69,184,174,.24));
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.15rem;
}

.person-card strong {
    display: block;
    font-size: 1.05rem;
}

.person-card p {
    margin: 4px 0 0;
    font-size: .93rem;
}

.match-line {
    text-align: center;
    font-weight: 850;
    color: var(--plum);
    font-size: .92rem;
}

.section {
    width: min(1100px, calc(100% - 36px));
    margin: 90px auto;
}

.section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.section-heading h2 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.section-heading p {
    color: var(--muted);
    font-size: 1.08rem;
}

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

.info-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 8px 28px rgba(53,34,73,.06);
}

.info-card .num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: white;
    background: var(--plum);
    margin-bottom: 18px;
}

.info-card:nth-child(2) .num { background: var(--rose); }
.info-card:nth-child(3) .num { background: var(--teal); }

.info-card h3 {
    margin: 0 0 8px;
}

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

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

.value {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.75);
}

.value strong {
    display: block;
    margin-bottom: 6px;
}

.value p {
    margin: 0;
    color: var(--muted);
}

.cta-panel {
    width: min(1050px, calc(100% - 36px));
    margin: 90px auto;
    border-radius: 32px;
    padding: clamp(32px, 6vw, 64px);
    background: var(--ink);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-panel::before,
.cta-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.cta-panel::before {
    width: 260px;
    height: 260px;
    left: -110px;
    top: -130px;
    background: rgba(239,107,159,.22);
}

.cta-panel::after {
    width: 260px;
    height: 260px;
    right: -110px;
    bottom: -150px;
    background: rgba(69,184,174,.18);
}

.cta-panel h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.05em;
    margin: 0 0 12px;
}

.cta-panel p {
    color: #d8d2e2;
    max-width: 680px;
    margin: 0 auto 24px;
}

.cta-panel .btn {
    background: white;
    color: var(--ink);
}

.page-shell {
    width: min(900px, calc(100% - 36px));
    margin: 48px auto 80px;
}

.form-card,
.content-card,
.admin-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 44px);
}

.form-card h1,
.content-card h1 {
    margin: 0 0 10px;
    letter-spacing: -0.04em;
    font-size: clamp(2.2rem, 5vw, 3.7rem);
}

.lead {
    color: var(--muted);
    font-size: 1.07rem;
    margin-bottom: 30px;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 750;
    font-size: .94rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8cedc;
    background: white;
    color: var(--ink);
    border-radius: 13px;
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--plum);
    box-shadow: 0 0 0 4px rgba(110,60,188,.10);
}

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

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: .92rem;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 18px;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.small-note {
    color: var(--muted);
    font-size: .86rem;
}

.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin: 0 0 20px;
    font-weight: 650;
}

.alert-success {
    background: #eaf8f4;
    color: #176a59;
    border: 1px solid #c9ebe1;
}

.alert-error {
    background: #fff0f4;
    color: #96304d;
    border: 1px solid #f4cad6;
}

.error-list {
    margin: 0;
    padding-left: 20px;
}

.content-card h2 {
    margin-top: 30px;
}

.content-card p,
.content-card li {
    color: var(--muted);
}

.site-footer {
    width: min(1180px, calc(100% - 36px));
    margin: 70px auto 24px;
    padding: 30px 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
    color: var(--muted);
}

.brand-small {
    font-size: 1rem;
    color: var(--ink);
}

.site-footer p {
    margin: 8px 0 0;
    max-width: 560px;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a {
    text-decoration: none;
}

.footer-note {
    grid-column: 1 / -1;
    font-size: .85rem;
}

.admin-shell {
    width: min(1280px, calc(100% - 30px));
    margin: 30px auto 70px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-top h1 {
    margin: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.stat {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
}

.stat span {
    color: var(--muted);
    font-size: .85rem;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: .9rem;
    vertical-align: top;
}

th {
    background: #faf7fb;
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
}

.badge-ok { background: #eaf8f4; color: #176a59; }
.badge-warn { background: #fff4df; color: #8b5d0c; }
.badge-off { background: #f3eef5; color: #6f6880; }

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.pagination a,
.pagination span {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 7px 10px;
    text-decoration: none;
    background: white;
}

.pagination .current {
    background: var(--ink);
    color: white;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        margin-top: 30px;
    }

    .cards-3,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 680px) {
    .top-nav a:not(.nav-cta) {
        display: none;
    }

    .site-header {
        min-height: 68px;
    }

    .hero {
        margin-top: 20px;
        gap: 30px;
    }

    .hero h1 {
        font-size: clamp(3.2rem, 16vw, 5rem);
    }

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

    .field.full {
        grid-column: auto;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-note {
        grid-column: auto;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

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