:root {
    --bg-1: #ffffff;
    --bg-2: #ffffff;
    --card-bg: #ffffff;
    --accent: #002256;
    --accent-2: #ed1c24;
    --text: #002256;
    --muted: rgba(0, 34, 86, 0.75);
    --danger-bg: rgba(237, 28, 36, 0.1);
    --danger-text: #ed1c24;
    --line: rgba(0, 34, 86, 0.18);
    --shadow: 0 18px 42px rgba(0, 34, 86, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 34, 86, 0.08) 0%, transparent 34%),
        radial-gradient(circle at 88% 6%, rgba(237, 28, 36, 0.06) 0%, transparent 28%),
        linear-gradient(155deg, var(--bg-1), var(--bg-2));
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 8px 24px 20px;
}

.page-with-logo {
    width: min(100%, 860px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.page-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    animation: reveal 500ms ease-out;
    width: 100%;
}

.page-brand-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    transform: none;
    filter: drop-shadow(0 8px 18px rgba(0, 34, 86, 0.18));
}

.page-brand-name {
    margin: 0;
    position: relative;
    display: inline-block;
    font-family: "Playfair Display", serif;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(236, 242, 250, 0.94));
    border: 1px solid rgba(0, 34, 86, 0.26);
    color: #002256;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 20px rgba(0, 34, 86, 0.12);
    padding: 9px 22px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: normal;
    text-align: center;
    max-width: min(100%, 820px);
}

.page-brand-name::before,
.page-brand-name::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ed1c24;
    transform: translateY(-50%);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.15);
}

.page-brand-name::before {
    left: 10px;
}

.page-brand-name::after {
    right: 10px;
}

.card {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    animation: reveal 500ms ease-out;
}

.minimal-card {
    display: grid;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 124px;
    height: 124px;
    object-fit: contain;
    flex: 0 0 124px;
}

.company-name {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-size: clamp(1.1rem, 1.3vw + 0.8rem, 1.45rem);
    text-transform: uppercase;
    line-height: 1.2;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.minimal-topbar {
    align-items: center;
}
.payment-title {
    margin: 0;
    display: grid;
    gap: 2px;
    line-height: 1.12;
}
.payment-title-main {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.45rem, 1.05vw + 1rem, 1.78rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}
.payment-title-sub {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: clamp(0.92rem, 0.46vw + 0.76rem, 1.08rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 34, 86, 0.78);
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 34, 86, 0.28);
    background: rgba(0, 34, 86, 0.08);
    color: #002256;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.55rem, 1.8vw + 0.9rem, 2rem);
    line-height: 1.2;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 48ch;
}

.minimal-subtitle {
    font-size: 0.98rem;
}

.trust-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.trust-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    background: rgba(0, 34, 86, 0.03);
}

.trust-item strong {
    display: block;
    font-size: 0.92rem;
}

.trust-item span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
}

.alert {
    margin-bottom: 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(237, 28, 36, 0.35);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.payment-form {
    display: grid;
    gap: 12px;
}

.field-group {
    display: grid;
    gap: 6px;
}

label {
    font-weight: 600;
    font-size: 1rem;
}

input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.18);
}

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

button {
    border: none;
    border-radius: 10px;
    padding: 13px 16px;
    background: var(--accent-2);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

button:hover {
    background: #c9151c;
    transform: translateY(-1px);
}

.primary-btn {
    margin-top: 8px;
    width: 100%;
}

.result-card .summary-grid {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.summary-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 11px;
    background: rgba(0, 34, 86, 0.03);
}

.summary-item span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.summary-item strong {
    display: block;
    margin-top: 4px;
    font-size: 1.05rem;
}

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

.small-note {
    font-size: 0.9rem;
}

.liqpay-form {
    margin: 4px 0;
}

.redirect-form {
    min-height: 12px;
}

.pay-btn {
    width: 100%;
    background: var(--accent);
}

.pay-btn:hover {
    background: #00163a;
}

.ok-box {
    margin-bottom: 14px;
    background: rgba(0, 34, 86, 0.08);
    color: #002256;
    border: 1px solid rgba(0, 34, 86, 0.25);
    padding: 10px 12px;
    border-radius: 10px;
}

.json-title {
    margin: 18px 0 8px;
    font-size: 1.05rem;
}

.json-box {
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 34, 86, 0.03);
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.45;
}

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

.back-link:hover {
    text-decoration: underline;
}

.footer-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.page-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(0, 34, 86, 0.35);
    border-radius: 999px;
    background: #002256;
    box-shadow: 0 8px 16px rgba(0, 34, 86, 0.18);
}

.contact-link:hover {
    color: #ffd5d7;
    border-color: rgba(237, 28, 36, 0.55);
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(237, 28, 36, 0.22);
    border: 1px solid rgba(237, 28, 36, 0.5);
    color: #ffffff;
    flex: 0 0 auto;
}

.contact-icon {
    width: 14px;
    height: 14px;
    display: block;
}

.result-card {
    text-align: center;
    justify-items: center;
    gap: 12px;
}

.success-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(160deg, #16a34a, #15803d);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.3);
}

.result-card .topbar {
    width: 100%;
    justify-content: center;
}

.result-card .subtitle {
    max-width: 44ch;
}

.result-summary-item {
    width: min(100%, 520px);
    text-align: center;
}

.primary-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 16px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 700;
    background: #002256;
    color: #ffffff;
    width: min(100%, 520px);
    transition: background-color 160ms ease, transform 160ms ease;
}

.primary-link-btn:hover {
    background: #00163a;
    transform: translateY(-1px);
}

.admin-card {
    max-width: 920px;
}

.admin-dashboard-card {
    max-width: 1080px;
}

.admin-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-events-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    background: #ffffff;
}

.admin-events-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    font-size: 0.9rem;
}

.admin-events-table th,
.admin-events-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-events-table thead th {
    position: sticky;
    top: 0;
    background: rgba(0, 34, 86, 0.06);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .page {
        padding: 8px 18px 16px;
    }

    .card {
        max-width: 100%;
        padding: 22px;
    }

    .admin-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .page {
        padding: 6px 24px 20px;
    }

    .page-with-logo {
        width: min(100%, 880px);
        margin-inline: auto;
        gap: 10px;
    }

    .page-brand-logo {
        width: 164px;
        height: 164px;
    }

    .page-brand-name {
        font-size: 1.05rem;
        padding: 8px 22px;
        max-width: min(100%, 860px);
    }

    .card {
        max-width: 680px;
        padding: 25px;
    }

    h1 {
        font-size: clamp(2rem, 1.4vw + 1.25rem, 2.5rem);
    }

    .subtitle {
        font-size: 1.02rem;
    }
}

@media (max-width: 768px) {
    .page {
        place-items: start center;
        min-height: auto;
        padding-top: 8px;
    }

    .page-with-logo {
        justify-content: flex-start;
        width: 100%;
        max-width: 520px;
        gap: 12px;
    }

    .page-brand {
        justify-items: center;
        gap: 8px;
        padding: 6px 0 0;
    }

    .page-brand-logo {
        width: 172px;
        height: 172px;
        transform: none;
    }

    .page-brand-name {
        font-size: 0.94rem;
        letter-spacing: 0.1em;
        padding: 7px 18px;
        line-height: 1.2;
        max-width: min(100%, 460px);
    }

    .page-brand-name::before {
        left: 8px;
    }

    .page-brand-name::after {
        right: 8px;
    }

    h1 {
        font-size: 1.52rem;
        line-height: 1.15;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .admin-events-table {
        min-width: 620px;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 18px;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(0, 34, 86, 0.12);
    }

    .payment-title {
        gap: 1px;
    }

    .payment-title-main {
        font-size: clamp(1.3rem, 4.2vw, 1.6rem);
    }

    .payment-title-sub {
        font-size: clamp(0.82rem, 2.5vw, 0.95rem);
        letter-spacing: 0.07em;
    }

    .topbar {
        gap: 10px;
        align-items: flex-start;
    }

    .mode-badge {
        align-self: flex-start;
    }

    .page-with-logo {
        gap: 10px;
    }

    .page-brand-logo {
        width: 176px;
        height: 176px;
        transform: none;
    }

    .page-brand-name {
        font-size: 0.9rem;
        letter-spacing: 0.09em;
        padding: 7px 12px;
    }

    .trust-panel {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.42rem;
    }

    .payment-form {
        gap: 10px;
    }

    label {
        font-size: 0.94rem;
    }

    input {
        min-height: 46px;
        font-size: 0.98rem;
    }

    .primary-btn {
        min-height: 48px;
        border-radius: 11px;
        font-size: 1.02rem;
    }

    .admin-metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 10px;
        padding-top: 6px;
    }

    .card {
        padding: 14px;
        border-radius: 12px;
        border-color: rgba(0, 34, 86, 0.2);
    }

    .page-brand {
        gap: 6px;
        padding: 2px 2px 0;
    }

    .page-brand-logo {
        width: 154px;
        height: 154px;
    }

    .page-brand-name {
        font-size: 0.84rem;
        letter-spacing: 0.08em;
        padding: 6px 16px;
    }

    .page-brand-name::before,
    .page-brand-name::after {
        width: 5px;
        height: 5px;
    }

    .subtitle {
        font-size: 0.9rem;
        line-height: 1.35;
    }

    label {
        font-size: 0.92rem;
    }

    input {
        font-size: 0.96rem;
        min-height: 44px;
        padding: 10px 11px;
    }

    .mode-badge {
        font-size: 0.66rem;
        padding: 4px 8px;
    }

    .primary-btn {
        min-height: 46px;
        font-size: 1rem;
    }

    .admin-events-table {
        min-width: 560px;
    }

    .contact-link {
        font-size: 0.86rem;
        padding: 7px 9px;
    }

    .page-contact {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .contact-badge {
        width: 22px;
        height: 22px;
    }

    .contact-icon {
        width: 13px;
        height: 13px;
    }

    .success-icon {
        width: 48px;
        height: 48px;
        font-size: 1.45rem;
    }

    .result-summary-item,
    .primary-link-btn {
        width: 100%;
    }
}
