/*
 * PointerE AI · shadcn/ui design tokens
 * 采用 shadcn 默认 neutral 主题：语义色、细边框、低阴影、12px 圆角体系。
 */

@font-face {
    font-family: "OPPO Sans";
    src: url("/fonts/oppo-sans.woff2") format("woff2");
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --popover: #ffffff;
    --popover-foreground: #0a0a0a;
    --primary: #171717;
    --primary-foreground: #fafafa;
    --secondary: #f5f5f5;
    --secondary-foreground: #171717;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #f5f5f5;
    --accent-foreground: #171717;
    --destructive: #e7000b;
    --destructive-foreground: #ffffff;
    --border: #e5e5e5;
    --input: #e5e5e5;
    --ring: #a1a1a1;
    --chart-1: #171717;
    --chart-2: #525252;
    --chart-3: #a3a3a3;
    --radius: 0.75rem;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-sans: "OPPO Sans", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
small { color: var(--muted-foreground); }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

::selection {
    background: var(--primary);
    color: var(--primary-foreground);
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.container-wide {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--border);
    background: rgb(255 255 255 / 0.95);
    backdrop-filter: blur(8px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--foreground);
}

.brand-mark {
    display: block;
    flex: none;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--background);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.brand small {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    color: var(--muted-foreground);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.site-nav > a:not(.btn) {
    color: var(--muted-foreground);
    transition: color 0.15s ease;
}

.site-nav > a:not(.btn):hover { color: var(--foreground); }

.nav-user {
    color: var(--muted-foreground);
    font-size: 13px;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 72px;
}

.notice {
    padding: 14px 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 14px;
    white-space: pre-wrap;
    box-shadow: var(--shadow-xs);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 24px;
    align-items: stretch;
    margin-bottom: 32px;
}

.hero-main {
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
}

.hero-kicker {
    margin-bottom: 16px;
}

.hero-main h1 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.hero-main p {
    max-width: 620px;
    color: var(--muted-foreground);
    font-size: 15px;
    line-height: 1.7;
}

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

.hero-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
}

.hero-side h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-foreground);
    letter-spacing: 0;
}

.hero-side .big-number {
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--foreground);
}

.hero-side ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 1.6;
}

.hero-side li + li { margin-top: 6px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
}

.stat-card span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-foreground);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.stat-card small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-foreground);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}

/* ------------------------------------------------------------------ */
/* Card / Panel                                                        */
/* ------------------------------------------------------------------ */

.panel {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-head h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.panel-head .head-note {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted-foreground);
    letter-spacing: 0;
}

.panel-body { padding: 24px; }
.panel-body.tight { padding: 0; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ */
/* Button                                                              */
/* ------------------------------------------------------------------ */

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { background: #262626; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(161 161 161 / 0.45); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn.secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-color: transparent;
}

.btn.secondary:hover { background: #e8e8e8; }

.btn.ghost {
    background: transparent;
    color: var(--foreground);
    box-shadow: none;
}

.btn.ghost:hover { background: var(--accent); }

.btn.danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn.danger:hover { background: #c90009; }

.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Form                                                                */
/* ------------------------------------------------------------------ */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field > span {
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    line-height: 1.4;
}

.field small {
    font-size: 12px;
    color: var(--muted-foreground);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    height: 36px;
    padding: 4px 12px;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--foreground);
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder { color: var(--muted-foreground); opacity: 0.8; }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgb(161 161 161 / 0.35);
}

textarea {
    height: auto;
    min-height: 96px;
    padding: 8px 12px;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: 13px;
}

select {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inline-form input { width: auto; min-width: 180px; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--foreground);
}

.checkbox-row small { color: var(--muted-foreground); }

.carnival-models {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    max-height: 240px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    overflow-y: auto;
}

.carnival-models .checkbox-row {
    font-size: 13px;
    font-family: var(--font-mono);
}

@media (max-width: 640px) {
    .carnival-models { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Table                                                               */
/* ------------------------------------------------------------------ */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    height: 40px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--muted-foreground);
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--foreground);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgb(245 245 245 / 0.6); }
td .row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.ellipsis {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mono {
    font-family: var(--font-mono);
    font-size: 12.5px;
}

/* ------------------------------------------------------------------ */
/* Badge                                                               */
/* ------------------------------------------------------------------ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 4px);
    background: var(--secondary);
    color: var(--secondary-foreground);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.badge.ok {
    background: var(--primary);
    color: var(--primary-foreground);
}

.badge.blue {
    background: var(--secondary);
    color: var(--foreground);
    border-color: var(--border);
}

.badge.warn {
    background: var(--muted);
    color: var(--muted-foreground);
    border-color: var(--border);
}

.badge.danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.badge.discount {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

/* ------------------------------------------------------------------ */
/* Feedback                                                            */
/* ------------------------------------------------------------------ */

.empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--muted-foreground);
    font-size: 14px;
}

.message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 14px;
    line-height: 1.5;
}

.message.error {
    border-color: color-mix(in oklab, var(--destructive) 35%, transparent);
    background: color-mix(in oklab, var(--destructive) 7%, var(--background));
    color: var(--destructive);
}

.message.ok {
    border-color: var(--border);
    background: var(--muted);
    color: var(--foreground);
}

.message.info {
    border-color: var(--border);
    background: var(--muted);
    color: var(--muted-foreground);
}

.auth-guest {
    padding: 40px 24px;
    margin-bottom: 24px;
    border: 1px dashed var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: transparent;
    text-align: center;
}

.auth-guest h2 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.auth-guest p {
    max-width: 560px;
    margin: 0 auto 20px;
    color: var(--muted-foreground);
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Chart                                                               */
/* ------------------------------------------------------------------ */

.chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 150px;
    padding-top: 8px;
}

.chart .bar-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
}

.chart .bar {
    width: 100%;
    max-width: 40px;
    min-height: 3px;
    border-radius: 4px 4px 2px 2px;
    background: var(--chart-1);
    transition: height 0.25s ease;
}

.chart .bar-label {
    color: var(--muted-foreground);
    font-size: 11px;
    white-space: nowrap;
}

.chart .bar-value {
    color: var(--muted-foreground);
    font-size: 11px;
}

.price-note {
    color: var(--muted-foreground);
    font-size: 12.5px;
}

/* ------------------------------------------------------------------ */
/* Marketing                                                           */
/* ------------------------------------------------------------------ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.feature {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
}

.feature h3 {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.feature p {
    color: var(--muted-foreground);
    font-size: 13.5px;
    line-height: 1.6;
}

.code-block {
    position: relative;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid #27272a;
    border-radius: var(--radius);
    background: #09090b;
    color: #fafafa;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre;
}

.code-block .copy-code {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border: 1px solid #3f3f46;
    border-radius: calc(var(--radius) - 4px);
    background: #18181b;
    color: #fafafa;
    font-size: 11px;
    cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--popover);
    color: var(--popover-foreground);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.toast.error {
    border-color: color-mix(in oklab, var(--destructive) 35%, transparent);
    color: var(--destructive);
}

/* ------------------------------------------------------------------ */
/* Dialog                                                              */
/* ------------------------------------------------------------------ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 18px 30px;
    overflow-y: auto;
    background: rgb(0 0 0 / 0.5);
}

.modal {
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: var(--card);
    box-shadow: var(--shadow-lg);
}

.modal.wide { max-width: 760px; }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-head h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-body { padding: 24px; }

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    color: var(--muted-foreground);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--foreground);
}

.key-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    word-break: break-all;
}

/* ------------------------------------------------------------------ */
/* Admin                                                               */
/* ------------------------------------------------------------------ */

.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--border);
    background: rgb(255 255 255 / 0.95);
    backdrop-filter: blur(8px);
}

.admin-header .header-row { min-height: 64px; }

.admin-tabs {
    position: sticky;
    top: 64px;
    z-index: 25;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    overflow-x: auto;
}

.tabs-list {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: calc(var(--radius) + 2px);
    background: var(--muted);
}

.admin-tabs button {
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    color: var(--muted-foreground);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.admin-tabs button:hover { color: var(--foreground); }

.admin-tabs button.active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow-xs);
}

.admin-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.kv-list { display: grid; gap: 0; }

.kv-list .kv {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}

.kv-list .kv:last-child { border-bottom: none; }
.kv-list .kv span { color: var(--muted-foreground); }
.kv-list .kv strong { font-weight: 500; text-align: right; word-break: break-all; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
    width: auto;
    min-width: 140px;
}

.login-shell {
    max-width: 420px;
    margin: 12vh auto;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    background: var(--card);
    box-shadow: var(--shadow-xs);
    text-align: center;
}

.login-shell h1 {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.login-shell p {
    margin-bottom: 24px;
    color: var(--muted-foreground);
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 48px;
    color: var(--muted-foreground);
    font-size: 12.5px;
}

.site-footer .footer-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ------------------------------------------------------------------ */
/* 支付                                                                */
/* ------------------------------------------------------------------ */

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.payment-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.payment-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.payment-price {
    font-size: 18px;
    font-weight: 600;
}

.payment-total {
    font-size: 20px;
    font-weight: 600;
}

.payment-card .row-actions {
    margin-top: auto;
}

.table-wrap input[type="number"] {
    width: 110px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container,
    .container-wide,
    .page,
    .admin-page { padding-left: 16px; padding-right: 16px; }

    .header-row {
        min-height: 56px;
        flex-wrap: wrap;
        gap: 8px 12px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .site-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 12px;
        font-size: 13px;
    }
    .site-nav > a { white-space: nowrap; }
    .nav-user {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .btn.small { padding: 0 10px; font-size: 12px; }
    .brand small { display: none; }
    .site-nav > a:not(.btn):first-child,
    .site-nav > a[href="/docs"] { display: none; }
    .card-grid { grid-template-columns: 1fr; }
    .payment-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .page { padding-top: 24px; }
    .hero-main { border-radius: calc(var(--radius) + 2px); }
    .admin-tabs { top: 56px; padding-left: 16px; padding-right: 16px; }
    .toast { right: 16px; bottom: 16px; }
    .modal-backdrop { padding-left: 12px; padding-right: 12px; }
}
