/*
 * htdocs/css/core.css
 * Minimal, no-framework.
 * Objetivos: legible, rápido (< 10 KB), fuentes del sistema solamente.
 */

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Light theme (default) */
    --bg:        #ffffff;
    --fg:        #111111;
    --bg2:       #f4f4f4;
    --border:    #d8d8d8;
    --muted:     #5a5a5a;
    --accent:    #111111;
    --link:      #0055cc;
    --card-bg:   #ffffff;
    --input-bg:  #ffffff;
}

/* ── Dark theme: Evangelion palette ─────────────────────────────────────────
 * Inspired by NGE: deep violet-black backgrounds, matte orange (Eva-01),
 * soft purple, muted amber and crimson. No neon. Soft contrast.
 * ─────────────────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
    /* ── Evangelion palette ────────────────────────────────────────
     * BG: deep violet-black  FG: warm off-white  ACC: matte orange
     * Inputs: dark but readable — never white, never invisible
     * ──────────────────────────────────────────────────────────── */
    --bg:           #0f0d16;   /* near-black, violet tint */
    --fg:           #ddd8f0;   /* warm off-white, readable */
    --text:         #ddd8f0;
    --bg2:          #1c1828;   /* card/panel surface */
    --border:       #38334f;   /* visible but subtle border */
    --muted:        #9990b8;   /* secondary text — enough contrast */
    --accent:       #d4843a;   /* matte orange — Eva-01 */
    --accent-soft:  rgba(212,132,58,.18);
    --link:         #a892e0;   /* muted violet */
    --card-bg:      #1c1828;
    --input-bg:     #251f38;   /* inputs: dark purple, NOT black */
    --surface:      #1c1828;
    --surface2:     #2a2440;
    --eva-orange:   #d4843a;
    --eva-violet:   #7b5ea7;
    --eva-red:      #9b2828;
    --eva-amber:    #c4982e;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 1.5rem;
}

.site-header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: auto;
}

.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none;
         letter-spacing: -0.02em; }

.nav-links {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 0.9rem;
    flex-wrap: wrap;       /* allow wrapping on narrow screens */
}
.nav-links a { text-decoration: none; white-space: nowrap; }
.nav-links a:hover { text-decoration: underline; }
.nav-username-badge { white-space: nowrap; }

main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.site-footer {
    border-top: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lang-switch { display: flex; gap: 0.5rem; }
.lang-switch a { color: #666; text-decoration: none; }
.lang-switch a:hover { text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn, a.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    padding: 0 1.1rem;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    font-size: 0.9rem;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
    font-family: inherit;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}
.btn:hover { background: #111; color: #fff; text-decoration: none; }

.btn-primary  { background: #111; color: #fff; }
.btn-primary:hover  { background: #333; }

.btn-upgrade  { background: #1a1a8c; color: #fff; border-color: #1a1a8c; }
.btn-upgrade:hover  { background: #12126b; }

.btn-danger { color: #c00; border: none; background: none;
              cursor: pointer; padding: 0; font: inherit; }
.btn-danger:hover { text-decoration: underline; }

.btn-link { border: none; background: none; cursor: pointer;
            padding: 0; font: inherit; color: inherit; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.auth-box       { max-width: 400px; margin: 3rem auto; }
.auth-box--wide { max-width: 520px; }

.auth-box h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.subtitle { color: #555; margin-bottom: 1.5rem; font-size: 0.95rem; }

form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form textarea,
form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fafafa;
    color: #111;
}
form input:focus,
form textarea:focus,
form select:focus {
    outline: 2px solid #111;
    background: #fff;
}

form button[type="submit"]:not(.abtn) {
    margin-top: 1.25rem;
    width: 100%;
    padding: 0.65rem;
    font-size: 1rem;
}

form small { color: #666; font-size: 0.8rem;
             margin-top: 0.2rem; display: block; }

.checkbox-label { display: flex; align-items: center; gap: 0.5rem;
                  margin-top: 1rem; font-weight: normal; }
.checkbox-label input { width: auto; }

.switch-link { margin-top: 1.25rem; font-size: 0.9rem; color: #555; }

.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.price-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }

/* ── Birthdate fieldset ───────────────────────────────────────────────────── */
.birthdate-fieldset {
    border: 1px solid #ccc;
    padding: 0.75rem 1rem 1rem;
    margin-top: 1rem;
}
.birthdate-fieldset legend {
    font-size: 0.85rem; font-weight: 600; padding: 0 0.25rem;
}
.birthdate-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.birthdate-col label {
    display: block; font-size: 0.8rem; font-weight: 600;
    margin-bottom: 0.25rem; margin-top: 0;
}
.birthdate-col select { width: 100%; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert { padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.alert:empty { display: none; }
.alert-error   { border: 1px solid #c00; background: #fff0f0; color: #900; }
.alert-warning { border: 1px solid #b80; background: #fffbe0; color: #760; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dash-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 1.5rem;
}

.plan-badge {
    font-size: 0.75rem; font-weight: 700;
    padding: 0.25rem 0.6rem; border-radius: 2px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.plan-0 { background: #e0e0e0; color: #555; }   /* FREE */
.plan-1 { background: #d0e8ff; color: #0050b3; } /* PRO  */
.plan-2 { background: #111;    color: #fff; }    /* MAX  */

.usage-bar { margin-bottom: 1.5rem; font-size: 0.9rem; }
.usage-bar progress { width: 100%; height: 6px; margin-top: 0.35rem; }
.usage-text { color: #444; }

.upgrade-cta:empty { display: none; }
.upgrade-cta { margin-bottom: 1.5rem; }

.product-list-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 1rem;
}

.product-table-wrap { position: relative; }
#product-tbody:empty ~ .product-table { display: none; }
#product-tbody:empty ~ .empty-state   { display: block; }
#empty-state { display: none; }

.product-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.product-table th, .product-table td {
    padding: 0.6rem 0.75rem; border-bottom: 1px solid #eee; text-align: left;
}
.product-table th {
    font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.04em; color: #555;
}
.actions { display: flex; gap: 0.75rem; }
.empty-state { color: #888; font-style: italic; }
.storefront-link { margin-top: 2rem; font-size: 0.9rem; }
.storefront-link a { text-decoration: underline; }

/* ── Storefront / Landing ─────────────────────────────────────────────────── */
.artist-header { text-align: center; margin-bottom: 2.5rem; }
.avatar { width: 80px; height: 80px; border-radius: 50%;
          object-fit: cover; margin: 0 auto 1rem; }
.artist-header h1 { font-size: 1.8rem; }
.bio { color: #555; max-width: 480px; margin: 0.5rem auto 0; }
.bio:empty { display: none; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

#product-grid:not(:empty) ~ #empty-msg { display: none; }
#empty-msg { display: block; color: #888; font-style: italic; margin-top: 2rem; }

.product-card { border: 1px solid #e0e0e0; display: flex; flex-direction: column; }
.product-image { width: 100%; height: 200px; object-fit: cover; }
.product-info { padding: 1rem; flex: 1; }
.product-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.product-desc { font-size: 0.875rem; color: #555; margin-bottom: 0.5rem; }
.product-price { font-weight: 700; }
.product-actions {
    padding: 0.75rem 1rem; border-top: 1px solid #eee;
    display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.btn-buy { font-size: 0.85rem; }
.no-payment { font-size: 0.8rem; color: #999; }

/* ── Error pages ──────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.error-page p { color: #555; margin-bottom: 1.5rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Nav: stack brand above links on very small screens */
    .site-header nav {
        flex-wrap: wrap;
        gap: .5rem;
        padding: .5rem 1rem;
    }
    .nav-links {
        gap: .5rem;
        font-size: .82rem;
    }
    .product-grid { grid-template-columns: 1fr; }
    .price-row { grid-template-columns: 1fr; }
    .birthdate-row { grid-template-columns: 1fr; }
    .dash-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; text-align: center; }
}

/* ── Product form ─────────────────────────────────────────────────────────── */
.product-form-wrap { max-width: 560px; margin: 2rem auto; }
.product-form-wrap h1 { margin-bottom: 1.5rem; }

/* Photo upload */
.photo-upload { margin-top: 0.25rem; }
.photo-upload input[type="file"] {
    width: 100%;
    padding: 0.5rem 0;
    font-family: inherit;
    font-size: 0.9rem;
}
.photo-preview { margin-top: 0.75rem; min-height: 0; }
.photo-thumb {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid #ddd;
    display: block;
}
.photo-error { color: #c00; font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Photos fieldset (product form) ──────────────────────────────────────── */
.photos-fieldset {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-top: 1.25rem;
}
.photos-fieldset legend {
    font-size: 0.85rem; font-weight: 600; padding: 0 0.25rem;
}
.photo-slot { margin-top: 1rem; }
.photo-slot label {
    display: block; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 0.25rem;
}
.photo-slot input[type="file"] { font-family: inherit; font-size: 0.9rem; }

/* Product card image wrapper */
.product-img-wrap { overflow: hidden; }
.product-img-wrap .product-image {
    width: 100%; height: 200px; object-fit: cover; display: block;
}

/* ── Settings page ────────────────────────────────────────────────────────── */
.settings-wrap { max-width: 680px; margin: 2rem auto; }
.settings-wrap h1 { margin-bottom: 1.5rem; }
.settings-section {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.settings-section h2 {
    font-size: 1rem; font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Media upload (logo/banner) */
.media-upload-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.media-current { flex: 0 0 auto; }
.media-upload { flex: 1; }
.current-logo-img {
    max-width: 80px; max-height: 80px;
    object-fit: cover; border: 1px solid #ddd;
}
.current-banner-img {
    max-width: 100%; max-height: 80px;
    object-fit: cover; border: 1px solid #ddd; display: block;
}
.banner-current { margin-bottom: 0.75rem; }
.no-media { font-size: 0.8rem; color: #888; }

/* Colors grid */
.colors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.color-field label { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; }
.color-field input[type="color"] {
    width: 100%; height: 40px; padding: 2px; border: 1px solid #ccc;
    border-radius: 4px; cursor: pointer;
}
.color-preview-bar {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

/* ── Landing page (store view) ────────────────────────────────────────────── */
.store-banner-wrap { width: 100%; overflow: hidden; }
.store-banner { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.store-header {
    padding: 1.25rem 2rem;
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.store-identity { display: flex; align-items: center; gap: 1rem; }
.store-logo-wrap { flex: 0 0 auto; }
.store-logo { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.store-name { font-size: 1.5rem; margin: 0 0 0.25rem; }
.store-bio { margin: 0; font-size: 0.9rem; opacity: 0.8; }
.store-social { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.social-link {
    font-size: 0.875rem; text-decoration: none;
    padding: 0.2rem 0.5rem; border-radius: 3px;
    border: 1px solid currentColor; opacity: 0.75;
}
.social-link:hover { opacity: 1; }

/* ── Product grid on landing ──────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.product-info { padding: 1rem; flex: 1; }
.product-name { font-size: 1rem; margin: 0 0 0.4rem; }
.product-desc { font-size: 0.875rem; opacity: 0.75; margin: 0 0 0.5rem; }
.product-price { font-weight: 700; margin: 0; }
.product-actions { padding: 0.75rem 1rem; border-top: 1px solid #eee; }
.btn-buy {
    display: inline-block; padding: 0.4rem 1rem;
    color: #fff; border-radius: 4px; text-decoration: none;
    font-size: 0.875rem;
}
.no-payment { font-size: 0.8rem; opacity: 0.6; }

/* ── Product table (dashboard) ────────────────────────────────────────────── */
.product-table { width: 100%; border-collapse: collapse; }
.product-table th, .product-table td {
    text-align: left; padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
}
.product-table th { font-size: 0.8rem; text-transform: uppercase; color: #888; }
.btn-danger { background: #c00; color: #fff; border-color: #c00; }
.btn-sm { padding: 0.2rem 0.5rem; font-size: 0.8rem; }

/* ── Nav logo ─────────────────────────────────────────────────────────────── */
.nav-logo { height: 28px; width: 28px; object-fit: cover; border-radius: 3px; }

/* ── Settings page ────────────────────────────────────────────────────────── */
.settings-wrap  { max-width: 640px; margin: 2rem auto; }
.settings-wrap h1 { margin-bottom: 1.5rem; }
.settings-wrap fieldset {
    border: 1px solid #ccc; padding: 1rem 1.25rem;
    margin-bottom: 1.5rem; border-radius: 4px;
}
.settings-wrap legend {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; padding: 0 .25rem; color: #555;
}
.field-row { display: flex; gap: 1rem; align-items: baseline; }
.field-row label { min-width: 90px; font-size: 0.85rem; color: #666; }
.readonly { color: #333; font-size: 0.9rem; }

/* Colors 2×2 grid */
.color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: .75rem;
}
.color-field { display: flex; flex-direction: column; gap: .25rem; }
.color-field label { font-size: 0.85rem; }
.color-field input[type="color"] {
    width: 100%; height: 44px; border: 1px solid #ccc;
    border-radius: 4px; cursor: pointer; padding: 2px;
}

/* Social inputs */
.social-input { display: flex; align-items: center; }
.social-prefix {
    background: #f0f0f0; border: 1px solid #ccc; border-right: none;
    padding: .45rem .6rem; font-size: .85rem; border-radius: 4px 0 0 4px;
    white-space: nowrap; color: #666;
}
.social-input input { border-radius: 0 4px 4px 0; flex: 1; }

/* Media upload */
.media-field { margin-top: 1rem; }
.media-field label { display: block; font-weight: 600; margin-bottom: .2rem; }
.media-field small { display: block; color: #666; margin-bottom: .5rem; }
.logo-preview  { max-width: 96px;  max-height: 96px;  object-fit: contain; display: block; border: 1px solid #ddd; }
.banner-preview { width: 100%; max-height: 120px; object-fit: cover; display: block; border: 1px solid #ddd; }
.current-media { margin-bottom: .5rem; }

/* ── Landing / storefront ─────────────────────────────────────────────────── */
.store-banner-wrap { width: 100%; overflow: hidden; max-height: 220px; }
.store-banner { width: 100%; height: 220px; object-fit: cover; display: block; }
.store-header {
    padding: 1.25rem 1.5rem;
    display: flex; flex-direction: column; gap: .5rem;
    border-bottom: 1px solid #eee;
}
.store-identity { display: flex; align-items: center; gap: 1rem; }
.store-logo { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.store-name { font-size: 1.6rem; font-weight: 700; margin: 0; }
.store-bio { font-size: 0.95rem; max-width: 60ch; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.store-footer {
    padding: 1.5rem; border-top: 1px solid #eee;
    display: flex; align-items: center; justify-content: space-between;
}
.social-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.social-link { font-size: 0.85rem; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard-wrap { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.dashboard-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 1.5rem;
}
.user-meta { color: #555; font-size: .9rem; margin-top: .25rem; }
.product-table-wrap { overflow-x: auto; }
.product-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.product-table th, .product-table td {
    padding: .5rem .75rem; text-align: left;
    border-bottom: 1px solid #eee;
}
.product-table th { font-weight: 600; background: #f8f8f8; }
.product-table td:last-child { white-space: nowrap; width: 1%; }
.btn-sm {
    height: 1.75rem;
    padding: 0 .5rem;
    font-size: .8rem;
}
.btn-danger { background: #c00; color: #fff; border-color: #c00; }
.btn-danger:hover { background: #900; }
.plan-limit { font-size: .85rem; color: #666; }

/* ── Default store logo (SVG when no image uploaded) ─────────────────────── */
.store-logo-svg {
    width: 64px; height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
}
.store-logo {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── Default store banner (gradient when no image) ───────────────────────── */
.store-banner-default {
    width: 100%; height: 220px;
    display: block;
}

/* ── Social link boxes — only rendered server-side when non-empty ─────────── */
.social-link {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .7rem;
    border: 1px solid #ccc; border-radius: 4px;
    font-size: .85rem; text-decoration: none; color: inherit;
    transition: border-color .15s;
}
.social-link:hover { border-color: #888; }

/* ── Social URL input: taller to match other inputs ─────────────────────── */
.social-url-input {
    min-height: 2.4rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* ── Crop canvas (shown while cropping) ─────────────────────────────────── */
.crop-canvas { max-width: 100%; display: block; margin-top: .5rem; }
.logo-crop-canvas  { max-width: 200px; max-height: 200px; border-radius: 50%; }
.banner-crop-canvas { max-height: 80px; border-radius: 4px; }

/* ── Product view page ────────────────────────────────────────────────────── */
.product-view-wrap {
    max-width: 960px; margin: 2rem auto; padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 640px) {
    .product-view-wrap { grid-template-columns: 1fr; }
}

.product-view-gallery { display: flex; flex-direction: column; gap: .75rem; }
.product-view-main img {
    width: 100%; aspect-ratio: 1/1;
    object-fit: cover; border-radius: 6px; display: block;
}
.product-view-thumbs {
    display: flex; gap: .5rem; flex-wrap: wrap;
}
.pv-thumb {
    width: 72px; height: 72px; object-fit: cover;
    border-radius: 4px; cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s;
}
.pv-thumb-active { border-color: #0066cc; }
.pv-thumb:hover   { border-color: #aaa; }
.product-view-nophoto {
    background: #f4f4f4; aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    color: #888; border-radius: 6px;
}

.product-view-info { display: flex; flex-direction: column; gap: 1rem; }
.product-view-name  { font-size: 1.6rem; font-weight: 700; margin: 0; }
.product-view-price {
    font-size: 1.3rem; font-weight: 600; color: #0066cc; margin: 0;
}
.product-view-desc { font-size: .95rem; line-height: 1.6; color: #444; }

/* ── Product card: view details button ───────────────────────────────────── */
.btn-view {
    background: transparent; border: 1px solid #ccc;
    color: #333; font-size: .85rem; padding: .25rem .6rem;
}
.btn-view:hover { background: #f0f0f0; }

/* ── Better default store banner (pattern using CSS only) ────────────────── */
.store-banner-default {
    width: 100%; height: 220px; display: block;
    /* Subtle diagonal stripe pattern using CSS gradients */
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            rgba(255,255,255,.08) 12px,
            rgba(255,255,255,.08) 24px
        );
    /* Actual background color set via inline style from gen_banner_html */
}

/* ── Current photo in edit form ──────────────────────────────────────────── */
.current-photo { margin-bottom: .4rem; }
.current-photo img { max-width: 120px; max-height: 120px;
    object-fit: contain; border: 1px solid #ddd; }

/* ── Settings: plan section ────────────────────────────────────────────────── */
.plan-current {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .5rem 0 1rem;
}
.plan-badge {
    display: inline-block; padding: .2rem .6rem;
    border-radius: 999px; font-size: .75rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
}
.plan-badge-free  { background: #e8f5e9; color: #2e7d32; }
.plan-badge-pro   { background: #e3f2fd; color: #1565c0; }
.plan-badge-max   { background: #f3e5f5; color: #6a1b9a; }

[data-theme="dark"] .plan-badge-free { background: rgba(46,125,50,.2);  color: #80c080; }
[data-theme="dark"] .plan-badge-pro  { background: rgba(21,101,192,.2); color: #82b0e8; }
[data-theme="dark"] .plan-badge-max  { background: rgba(123,94,167,.25); color: #b89ad8; }

.plan-options {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .25rem;
}
@media (max-width: 480px) { .plan-options { grid-template-columns: 1fr; } }

.plan-card {
    border: 1px solid #ddd; border-radius: 6px; padding: 1rem;
    position: relative;
}
.plan-card-disabled {
    opacity: .55; pointer-events: none; user-select: none;
}
.plan-card-name  { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.plan-card-limit { font-size: .85rem; color: #555; margin-bottom: .25rem; }
.plan-card-price { font-size: .8rem; color: #888; }
.plan-card-badge {
    position: absolute; top: .5rem; right: .5rem;
    background: #f5f5f5; color: #888; border-radius: 4px;
    font-size: .7rem; padding: .15rem .4rem; font-weight: 600;
}
.plan-card-pro  { border-color: #90caf9; }
.plan-card-max  { border-color: #ce93d8; }

/* ── Plan cards (settings page) ─────────────────────────────────────────── */
.plan-current-label { margin: 0 0 1rem; font-size: .9rem; }

.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 560px) {
    .plan-cards { grid-template-columns: 1fr; }
}

.plan-card {
    border: 2px solid #111;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: center;
}

.plan-card-disabled {
    border-color: #ccc;
    opacity: .6;
}

.plan-card-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.plan-card-desc {
    font-size: .85rem;
    color: #555;
    flex: 1;
}

.plan-card button {
    width: 100%;
}

/* ── Dark theme ───────────────────────────────────────────────────────────── */



/* Dark theme toggle button */
/* Shared style: theme toggle + lang picker button */
.btn-theme-toggle,
.lang-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    min-width: 2.5rem;
    padding: 0 .4rem;
    background: none;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 4px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    color: var(--fg, #111);
    font-style: normal;
    transition: background .12s, border-color .12s;
    flex-shrink: 0;
}
.btn-theme-toggle:hover,
.lang-picker-btn:hover {
    background: var(--bg2, #f4f4f4);
    border-color: var(--muted, #888);
}

/* ── Home / Institutional pages ───────────────────────────────────────────── */
.page-home, .page-legal, .page-contact { background: var(--bg, #fff); color: var(--fg, #111); }

.site-header-home {
    padding: .75rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border, #eee);
}
.brand-large { font-size: 1.4rem; font-weight: 800; }

.home-hero {
    text-align: center; padding: 5rem 1rem 3rem;
    max-width: 680px; margin: 0 auto;
}
.home-hero-title { font-size: 2.4rem; font-weight: 800; margin-bottom: .75rem; }
.home-hero-sub   { font-size: 1.1rem; color: var(--muted, #666); margin-bottom: 2rem; }
.home-hero-cta   { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-lg          { height: 3rem; padding: 0 1.75rem; font-size: 1rem; }

.home-features {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem; max-width: 900px; margin: 3rem auto; padding: 0 1rem;
}
.home-feature { text-align: center; }
.home-feature-icon { font-size: 2rem; margin-bottom: .5rem; }
.home-feature h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.home-feature p  { font-size: .9rem; color: var(--muted, #666); }

.home-plans { max-width: 800px; margin: 3rem auto; padding: 0 1rem 4rem; }
.home-plans-title { text-align: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
.home-plans-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 560px) { .home-plans-grid { grid-template-columns: 1fr; } }
.home-plan {
    border: 2px solid var(--border, #111); border-radius: 8px;
    padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem;
}
.home-plan-free  { border-color: var(--fg, #111); }
.home-plan-soon  { opacity: .55; }
.home-plan-name  { font-size: 1.1rem; font-weight: 700; }
.home-plan-price { font-size: .9rem; color: var(--muted, #666); }
.home-plan-features { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.home-plan-features li::before { content: "✓ "; }
.home-plan button, .home-plan a { margin-top: auto; width: 100%; }

.site-footer-home {
    padding: 1.5rem; border-top: 1px solid var(--border, #eee);
    display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.site-footer-links { display: flex; gap: 1rem; }
.site-footer-links a { font-size: .85rem; }

/* ── Page content (legal, contact) ───────────────────────────────────────── */
.page-content-wrap { max-width: 640px; margin: 3rem auto; padding: 0 1rem; }
.page-content-wrap h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.legal-body h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.legal-body p  { color: var(--muted, #555); line-height: 1.6; }
.contact-email { margin: 1.5rem 0; }

/* ── Store slogan ─────────────────────────────────────────────────────────── */
.store-slogan {
    font-size: 1rem; font-style: italic;
    color: var(--muted, #666); margin: 0;
}

/* ── Nav username badge ───────────────────────────────────────────────────── */
.nav-username-badge {
    display: inline-flex; align-items: center;
    padding: .2rem .6rem; border-radius: 12px;
    font-size: .8rem; font-weight: 600;
    background: #f0f0f0; color: #333;
}
.nav-plan-Free  { background: #e8f4fd; color: #1a6fb8; }
.nav-plan-Pro   { background: #e8f8e8; color: #1a7b1a; }
.nav-plan-Max   { background: #fef3cd; color: #856404; }

/* ── Share button ─────────────────────────────────────────────────────────── */
.btn-share {
    border-color: #888; color: #555; font-size: .85rem;
}
.btn-share:hover { background: #f5f5f5; }

/* ── Store footer with lang switch ───────────────────────────────────────── */
.store-footer-bottom {
    margin-top: .5rem; padding-top: .5rem;
    border-top: 1px solid rgba(0,0,0,.1);
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem;
}
.store-lang-switch { display: flex; gap: .5rem; }
.store-lang-switch a {
    padding: .15rem .4rem; border: 1px solid currentColor;
    border-radius: 3px; font-size: .75rem; text-decoration: none;
}

/* ── Form actions alignment fix ───────────────────────────────────────────── */
.form-actions-aligned {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.form-actions-aligned .btn,
.form-actions-aligned button { align-self: center; }

/* ── Home page header nav — brand left, links right ─────────────────────── */
.site-nav-home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.site-header-home {
    padding: .75rem 1.5rem;
    border-bottom: 1px solid var(--border, #eee);
    display: flex;
    align-items: center;
    justify-content: center;   /* centers the nav within the header */
    width: 100%;
    box-sizing: border-box;
}

/* ── Admin panel ──────────────────────────────────────────────────────────── */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.admin-cards-small { max-width: 520px; }

.admin-card {
    display: flex; flex-direction: column; gap: .5rem;
    padding: 1.25rem; border: 2px solid var(--border, #ddd);
    border-radius: 6px; text-decoration: none; color: inherit;
    transition: border-color .15s, background .15s;
}
.admin-card:hover { border-color: var(--fg, #111); background: var(--bg2, #f8f8f8); }
.admin-card-icon  { font-size: 1.6rem; }
.admin-card-title { font-weight: 700; }
.admin-card-desc  { font-size: .85rem; color: var(--muted, #666); }

.admin-panel-section { margin-top: 2rem; }
.admin-panel-title   { font-size: 1.1rem; margin-bottom: 1rem; color: var(--muted, #666); }

.admin-lang-bar {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap; margin-bottom: 1.5rem;
    padding: .75rem; background: var(--bg2, #f8f8f8);
    border-radius: 4px;
}

.admin-hint {
    font-size: .85rem; color: var(--muted, #666);
    margin-bottom: 1.5rem;
}

.content-fields {
    display: flex; flex-direction: column; gap: 1.5rem;
}

.content-field {
    display: flex; flex-direction: column; gap: .4rem;
}
.content-field label {
    font-weight: 600; font-size: .9rem;
}
.content-field small { color: var(--muted, #888); }
.content-field input[type="text"],
.content-field textarea {
    width: 100%; max-width: 640px;
    font-size: .9rem;
    box-sizing: border-box;
}
.content-field textarea { resize: vertical; }
.content-field form {
    display: flex; flex-direction: column; gap: .4rem;
    max-width: 640px;
}
.content-field form button { align-self: flex-start; margin-top: .25rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN USERS TABLE
   Layout: table with 5 columns. Actions cell has a clean two-row layout.
   Mobile: stacks to cards via data-label + CSS ::before.
   ═══════════════════════════════════════════════════════════════════════════ */

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

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.admin-users-table th {
    text-align: left;
    padding: .5rem .75rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted, #888);
    border-bottom: 2px solid var(--border, #ddd);
    white-space: nowrap;
    background: var(--bg2, #f8f8f8);
}

.admin-users-table td {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border, #eee);
    vertical-align: middle;
    font-size: .85rem;
}

.admin-users-table tr:last-child td { border-bottom: none; }

.admin-users-table tr:hover td {
    background: var(--bg2, #f8f8f8);
}

/* Orders panel: status select stays compact, no horizontal scroll */
.admin-users-table select {
    font-size: .78rem;
    padding: .2rem .3rem;
    max-width: 9rem;
    width: 9rem;
    border-radius: 6px;
}
.admin-users-table td:last-child {
    white-space: nowrap;
    width: 9.5rem;
    padding: .3rem .4rem;
}
.admin-users-table td { overflow: hidden; }
.admin-table-wrap { overflow-x: auto; }

/* Inactive: dim row but keep actions readable */
.admin-user-inactive td:not(:last-child) { opacity: .45; }

/* ── Action cell ──────────────────────────────────────────────────────────── */
/* ── Admin action cell ──────────────────────────────────────────────────────
 * Buttons wrap to multiple rows if needed. No fixed width.
 */
.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    align-items: flex-start;
}

.aform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    align-items: flex-start;
}

.abtn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 44px;
    padding: 0 .45rem;
    margin: 0;
    font-size: .76rem;
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    border: 1px solid var(--border, #d0d0d0);
    border-radius: 4px;
    background: var(--bg, #fff);
    color: var(--fg, #111);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: background .1s, border-color .1s;
    -webkit-appearance: none;
    appearance: none;
    text-decoration: none;
}
.abtn:hover, .abtn:focus-visible {
    background: var(--bg2, #f0f0f0);
    border-color: var(--muted, #999);
    outline: none;
}
.abtn:disabled {
    opacity: .35;
    cursor: not-allowed;
    background: var(--bg2, #f0f0f0);
    font-weight: 700;
}
.abtn-danger {
    border-color: #e0aaaa;
    color: #b00;
}
.abtn-danger:hover { background: #fff0f0; border-color: #c00; }
[data-theme="dark"] .abtn-danger:hover { background: #3a1a1a; }

/* Delete details/summary popdown */
.adel {
    position: relative;
    display: inline-flex;
    align-items: center;
}
/* Remove marker from summary */
.adel > summary,
.adel summary::-webkit-details-marker { list-style: none; display: block; }

.adel-confirm {
    position: absolute;
    left: 0;
    top: calc(100% + 5px);
    z-index: 100;
    background: var(--bg, #fff);
    border: 1px solid #e0aaaa;
    border-radius: 5px;
    padding: .6rem .85rem .75rem;
    min-width: 170px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    white-space: nowrap;
}
[data-theme="dark"] .adel-confirm {
    background: var(--bg2);
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.adel-confirm p {
    margin: 0 0 .5rem;
    font-size: .82rem;
    color: var(--fg, #111);
}

/* Dark mode */
[data-theme="dark"] .admin-users-table th {
    background: var(--bg2);
}
[data-theme="dark"] .admin-users-table tr:hover td {
    background: var(--bg2);
}
[data-theme="dark"] .asel {
    background: var(--input-bg, #2a2a2a);
    border-color: var(--border);
}
[data-theme="dark"] .abtn {
    background: var(--bg2);
    border-color: var(--border);
}
[data-theme="dark"] .abtn:hover { background: var(--bg, #1a1a1a); }

/* Mobile: cards layout */
@media (max-width: 680px) {
    .admin-users-table thead { display: none; }
    .admin-users-table tr {
        display: block;
        border: 1px solid var(--border, #ddd);
        border-radius: 8px;
        margin-bottom: .75rem;
        padding: .5rem .75rem;
        background: var(--card-bg, #fff);
    }
    .admin-users-table td {
        display: flex;
        align-items: baseline;
        gap: .5rem;
        border: none;
        padding: .3rem 0;
        font-size: .85rem;
    }
    .admin-users-table td[data-label]::before {
        content: attr(data-label);
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--muted, #888);
        min-width: 60px;
        flex-shrink: 0;
    }
    .admin-user-actions { width: 100%; }
}



/* ── Store header: name left, about link right ───────────────────────────── */
.store-header {
    display: flex;
    flex-direction: row;         /* explicit — overrides earlier column */
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;           /* keep name and about on same line */
}
.store-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.store-header-right {
    display: flex;
    align-items: center;
}

/* About link in store header */
.store-about-link {
    font-size: .9rem;
    padding: .35rem .75rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    text-decoration: none;
    opacity: .7;
    transition: opacity .15s;
}
.store-about-link:hover { opacity: 1; }

/* About section */
.store-about-section {
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 1rem;
    scroll-margin-top: 1rem; /* so header doesn't overlap on scroll */
}
.store-about-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .75rem;
}
.store-about-body {
    line-height: 1.7;
    white-space: pre-wrap; /* preserve \n and \r\n from textarea */
    word-wrap: break-word;
    max-width: 65ch;
}

/* ── Plan card active state (settings page) ──────────────────────────────── */
.plan-card-active {
    border-color: var(--fg, #111);
    border-width: 2px;
}
.plan-card-active .plan-card-name {
    font-weight: 800;
}

/* ── Standalone mode: hide registration buttons when href is empty ───────── */
a.reg-cta-btn:not([href]) { display: none; }
a.reg-cta-btn[href=""]    { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME — Evangelion palette overrides.
   ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] body,
[data-theme="dark"] .page-home,
[data-theme="dark"] .page-legal,
[data-theme="dark"] .page-contact,
[data-theme="dark"] .page-admin,
[data-theme="dark"] .page-settings,
[data-theme="dark"] .page-dashboard,
[data-theme="dark"] .page-landing {
    background: var(--bg);
    color: var(--fg);
}

/* Navigation */
[data-theme="dark"] .site-header {
    background: var(--bg2);
    border-bottom-color: var(--border);
}
[data-theme="dark"] .site-header .brand {
    color: var(--eva-orange);
    letter-spacing: -.01em;
}
[data-theme="dark"] .site-header nav a {
    color: var(--fg);
}
[data-theme="dark"] .nav-link.active {
    background: rgba(200,118,42,.18);
    color: var(--eva-orange);
}
[data-theme="dark"] .nav-link:hover {
    background: var(--surface2, #231f32);
}
[data-theme="dark"] .nav-user-badge {
    background: var(--surface2, #231f32);
    color: var(--muted);
}
[data-theme="dark"] .nav-admin-badge {
    background: rgba(184,144,42,.2);
    color: var(--eva-amber);
}
[data-theme="dark"] .nav-username-badge {
    background: var(--bg2);
    color: var(--muted);
}

/* Forms */
/* ── Dark mode inputs ────────────────────────────────────────────────────── */
/* Specificity (0,2,2) beats form input[type=x] at (0,1,2) — no !important needed */
[data-theme="dark"] form input[type="text"],
[data-theme="dark"] form input[type="email"],
[data-theme="dark"] form input[type="password"],
[data-theme="dark"] form input[type="number"],
[data-theme="dark"] form input[type="search"],
[data-theme="dark"] form input[type="url"],
[data-theme="dark"] form input[type="tel"],
[data-theme="dark"] form textarea,
[data-theme="dark"] form select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #251f38;
    color: #ddd8f0;
    border-color: #38334f;
}
[data-theme="dark"] form input[type="text"]:focus,
[data-theme="dark"] form input[type="email"]:focus,
[data-theme="dark"] form input[type="password"]:focus,
[data-theme="dark"] form input[type="number"]:focus,
[data-theme="dark"] form textarea:focus,
[data-theme="dark"] form select:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
    background: #2a2440;
    border-color: #d4843a;
    outline-color: #d4843a;
    color: #ddd8f0;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #9990b8;
    opacity: 1;
}
[data-theme="dark"] fieldset {
    border-color: var(--border);
}
[data-theme="dark"] legend {
    color: var(--muted);
}
[data-theme="dark"] label {
    color: var(--fg);
}
[data-theme="dark"] small {
    color: var(--muted);
}

/* Buttons */
[data-theme="dark"] .btn,
[data-theme="dark"] a.btn,
[data-theme="dark"] button.btn {
    border-color: var(--border);
    color: var(--fg);
    background: transparent;
}
[data-theme="dark"] .btn:hover,
[data-theme="dark"] a.btn:hover {
    background: var(--bg2);
}
[data-theme="dark"] .btn-primary,
[data-theme="dark"] a.btn-primary {
    background: var(--eva-orange);
    color: #fff;
    border-color: var(--eva-orange);
}
[data-theme="dark"] .btn-primary:hover {
    background: #a85f20;
    border-color: #a85f20;
}
[data-theme="dark"] .btn-danger {
    color: #f88;
}


/* Cards and surfaces */
[data-theme="dark"] .plan-card,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .home-plan {
    border-color: var(--border);
    background: var(--card-bg);
}
[data-theme="dark"] .plan-card-active {
    border-color: var(--fg);
}
[data-theme="dark"] .plan-card-disabled {
    border-color: var(--border);
    opacity: .5;
}

/* Tables */
[data-theme="dark"] .product-table th {
    background: var(--bg2);
    color: var(--muted);
    border-color: var(--border);
}
[data-theme="dark"] .product-table td {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .product-table tr:hover td {
    background: var(--bg2);
}

/* Alerts */
[data-theme="dark"] .alert-error {
    background: rgba(139,32,32,.25);
    color: #d08080;
    border-color: rgba(139,32,32,.5);
}
[data-theme="dark"] .alert-warning {
    background: rgba(184,144,42,.18);
    color: var(--eva-amber);
    border-color: rgba(184,144,42,.4);
}
[data-theme="dark"] .alert-success {
    background: rgba(40,100,60,.25);
    color: #80c080;
    border-color: rgba(40,100,60,.5);
}

/* Home page */
[data-theme="dark"] .site-header-home {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .home-plan {
    background: var(--card-bg);
}
[data-theme="dark"] .site-footer-home {
    border-top-color: var(--border);
    color: var(--muted);
}
[data-theme="dark"] .site-footer-links a {
    color: var(--muted);
}

/* Settings */
[data-theme="dark"] .settings-wrap,
[data-theme="dark"] .page-content-wrap {
    color: var(--fg);
}
[data-theme="dark"] .admin-lang-bar {
    background: var(--bg2);
    color: var(--fg);
}
[data-theme="dark"] .content-field label {
    color: var(--fg);
}

/* Product grid cards */
[data-theme="dark"] .product-card {
    border-color: var(--border);
    background: var(--card-bg);
}
[data-theme="dark"] .product-card-name {
    color: var(--fg);
}
[data-theme="dark"] .product-card-price {
    color: var(--fg);
}

/* Store page */
[data-theme="dark"] .store-header {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .store-footer {
    border-top-color: var(--border);
}
[data-theme="dark"] .store-about-section {
    color: var(--fg);
}

/* Dashboard */
[data-theme="dark"] .dashboard-header {
    border-bottom-color: var(--border);
}
[data-theme="dark"] .plan-limit {
    color: var(--muted);
}

/* ── Floating theme toggle — appears on pages where it's injected before </body> ── */
/* Floating toggle: only show on pages without a footer bar.
 * Hidden when .site-footer-home is present (it has its own toggle). */
.site-footer-home ~ .btn-theme-toggle-float,
body:has(.site-footer-home) .btn-theme-toggle-float {
    display: none;
}
.btn-theme-toggle-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 999;
    border-radius: 50% !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    padding: 0 !important;
    background: var(--bg2, #f4f4f4) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    border: 1px solid var(--border, #d8d8d8) !important;
}
.btn-theme-toggle-float:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.25) !important;
}

/* ── Footer layout: left links, right controls ───────────────────────────── */
.site-footer-home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border, #eee);
}
.footer-left  { display: flex; align-items: center; gap: 1rem; }
.footer-right { display: flex; align-items: center; gap: .75rem; }
.footer-left a, .footer-right small { font-size: .85rem; color: var(--muted, #666); }
.footer-left a:hover { color: var(--fg, #111); }

/* ── Eva dark: extra polish ─────────────────────────────────────────────── */
[data-theme="dark"] .product-card {
    border-color: var(--border);
    background: var(--card-bg);
}
[data-theme="dark"] .admin-section {
    border-color: var(--border);
    background: var(--card-bg);
}
[data-theme="dark"] .order-card,
[data-theme="dark"] .order-result-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .store-header {
    border-bottom-color: var(--border);
}
[data-theme="dark"] fieldset {
    border-color: var(--border);
}
[data-theme="dark"] .abtn {
    background: var(--surface2, #2a2440);
    border-color: var(--border);
    color: var(--fg);
}
[data-theme="dark"] .abtn:hover {
    background: var(--bg2, #1c1828);
    border-color: var(--muted);
}
[data-theme="dark"] .nav-dropdown-menu {
    background: var(--bg2);
    border-color: var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
[data-theme="dark"] .nav-dropdown-item:hover {
    background: var(--surface2, #231f32);
}
[data-theme="dark"] .scroll-fab {
    background: var(--surface2, #231f32);
    color: var(--fg);
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
/* Plan active border in Eva dark */
[data-theme="dark"] .plan-card-active {
    border-color: var(--eva-orange);
    box-shadow: 0 0 0 1px var(--eva-orange);
}
/* Link color */
[data-theme="dark"] a { color: var(--link); }
[data-theme="dark"] a:hover { color: var(--fg); }

/* ── Dark: table, cards, misc fixes ─────────────────────────────────────── */
[data-theme="dark"] table { color: var(--fg); }
[data-theme="dark"] th { color: var(--muted); border-color: var(--border); }
[data-theme="dark"] td { border-color: var(--border); }
[data-theme="dark"] tr:hover td { background: rgba(255,255,255,.03); }
[data-theme="dark"] .card,
[data-theme="dark"] .plan-card {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--fg);
}
[data-theme="dark"] .asel {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--fg);
}
[data-theme="dark"] .admin-search-input {
    background: var(--input-bg) !important;
    border-color: var(--border) !important;
    color: var(--fg) !important;
}
[data-theme="dark"] .page-content-wrap,
[data-theme="dark"] .auth-card {
    background: var(--card-bg);
    border-color: var(--border);
}
[data-theme="dark"] .auth-card input {
    background: var(--input-bg) !important;
    color: var(--fg) !important;
    border-color: var(--border) !important;
}

/* ── Globe language picker ───────────────────────────────────────────────── */
.lang-picker {
    position: relative;
    display: inline-flex;
}


.lang-picker-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}
.lang-picker-menu a {
    display: block;
    padding: .5rem .85rem;
    font-size: .85rem;
    color: var(--fg, #111);
    text-decoration: none;
    transition: background .1s;
}
.lang-picker-menu a:hover,
.lang-picker-menu a.lang-active {
    background: var(--bg2, #f4f4f4);
    font-weight: 600;
}
.lang-picker.open .lang-picker-menu { display: block; }

/* Dark mode adjustments for picker */
[data-theme="dark"] .lang-picker-menu {
    background: var(--bg2);
    border-color: var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ── Store theme presets (settings page) ─────────────────────────────────── */
.theme-presets {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.theme-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    cursor: pointer;
    padding: .4rem;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color .15s;
    font-size: .75rem;
    color: var(--muted, #666);
    user-select: none;
}
.theme-preset:hover       { border-color: var(--border, #ddd); }
.theme-preset-active      { border-color: var(--fg, #111); color: var(--fg, #111); font-weight: 600; }

.theme-swatch {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.1);
}

/* ── Danger zone (delete account) ───────────────────────────────────────── */
.danger-zone {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e88;
    border-radius: 6px;
    background: #fff8f8;
}
[data-theme="dark"] .danger-zone {
    border-color: rgba(139,32,32,.5);
    background: rgba(139,32,32,.12);
}
.danger-zone-title {
    font-size: 1rem;
    font-weight: 700;
    color: #c00;
    margin: 0 0 .4rem;
}
.danger-zone-desc {
    font-size: .875rem;
    color: var(--muted, #666);
    margin: 0 0 1rem;
}
.danger-zone-confirm summary {
    cursor: pointer;
    display: inline-block;
    color: #c00;
    font-size: .875rem;
    font-weight: 600;
    padding: .3rem .6rem;
    border: 1px solid #e88;
    border-radius: 4px;
}
.danger-zone-confirm summary:hover { background: #fff0f0; }
[data-theme="dark"] .danger-zone-confirm summary:hover { background: #3a1a1a; }
.danger-zone-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 360px;
}
.danger-zone-form label { font-size: .875rem; font-weight: 600; }
.danger-zone-form small { color: var(--muted, #888); font-size: .8rem; }
.btn-danger {
    background: #c00;
    color: #fff;
    border-color: #c00;
}
.btn-danger:hover { background: #a00; border-color: #a00; }

/* ── Admin panel in settings: top section ────────────────────────────────── */
.admin-panel-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border, #e0e0e0);
}
.admin-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted, #666);
    margin: 0 0 .75rem;
}

/* ── Danger zone: proper spacing from form actions ────────────────────────── */
.danger-zone {
    margin-top: 2rem;
}

/* ── Admin users table: inactive row + action cell ───────────────────────── */
.admin-user-inactive td { opacity: .5; }
/* .admin-user-actions defined above */
.admin-user-actions form,
.admin-user-actions details { display: inline; }
.admin-user-actions details summary { list-style: none; }
.admin-user-actions details summary::-webkit-details-marker { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════════════════ */

/* Admin page layout */
.page-admin .page-content-wrap {
    max-width: 900px;
    padding: 1.5rem;
}
.page-admin h1 {
    font-size: 1.4rem;
    margin: 0 0 1.5rem;
    color: var(--fg);
}

/* Admin landing: two sections side by side */
.admin-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.admin-section {
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--card-bg, #fff);
    display: flex;
    flex-direction: column;
}
.admin-section .btn {
    margin-top: auto;
    align-self: flex-start;
}
.admin-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--fg);
}
.admin-section-desc {
    font-size: .875rem;
    color: var(--muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* Settings page: admin quick-links bar */
.admin-panel-section {
    border: 1px solid var(--border, #ddd);
    border-radius: 6px;
    padding: .75rem 1rem;
    background: var(--bg2, #f8f8f8);
    margin-bottom: 1.5rem;
}
.admin-panel-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.admin-quick-links {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.admin-quick-links .btn {
    font-size: .82rem;
    padding: .3rem .7rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   ORDER / PURCHASE FLOW
   ══════════════════════════════════════════════════════════════════════════ */

.page-order { background: var(--bg); }

.order-wrap {
    max-width: 640px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.order-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 10px;
    padding: 1.75rem;
}

.order-title {
    font-size: 1.3rem;
    margin: 0 0 1.25rem;
    color: var(--fg);
}

.order-product {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    padding: .75rem 1rem;
    background: var(--bg2, #f6f6f6);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}
.order-product-name { font-weight: 600; font-size: .95rem; color: var(--fg); }
.order-product-price { font-size: .9rem; color: var(--muted); white-space: nowrap; }

.order-section {
    border-top: 1px solid var(--border, #eee);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}
.order-section-title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 .4rem;
    color: var(--fg);
}
.order-hint {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 .75rem;
    line-height: 1.5;
}

.order-form label { display: block; font-size: .85rem; font-weight: 600; margin: .6rem 0 .2rem; color: var(--fg); }
.order-form input,
.order-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: .4rem .6rem;
    font-size: .9rem;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 4px;
    background: var(--input-bg, #fff);
    color: var(--fg);
    font-family: inherit;
}
.order-form textarea { resize: vertical; min-height: 80px; }
.order-form .btn { margin-top: 1rem; width: 100%; justify-content: center; }

.order-data-notice {
    font-size: .75rem;
    color: var(--muted);
    margin: .75rem 0 0;
    line-height: 1.5;
    border-left: 3px solid var(--border, #ddd);
    padding-left: .6rem;
}

/* Wallets */
.order-wallets { display: flex; flex-direction: column; gap: .5rem; }
.order-wallet {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    background: var(--bg2);
    border-radius: 5px;
    border: 1px solid var(--border);
}
.wallet-label { font-size: .78rem; font-weight: 700; color: var(--muted); min-width: 80px; }
.wallet-addr  { font-size: .75rem; word-break: break-all; color: var(--fg); font-family: monospace; }

/* External payment buttons */
.order-ext-btn { display: block; text-align: center; margin-top: .5rem; }

/* Result pages */
.order-result { text-align: center; }
.order-kawaii {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--fg);
    margin: 0 0 1rem;
    white-space: pre;
}
.order-result-fail .order-kawaii { color: var(--muted); }
.order-result-msg { font-size: 1rem; color: var(--fg); margin: 0 0 .4rem; }
.order-result-sub { font-size: .875rem; color: var(--muted); margin: 0 0 1.25rem; }
.order-result-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

[data-theme="dark"] .order-wallet { background: var(--bg2); }

/* ══════════════════════════════════════════════════════════════════════════
   ORDER / PURCHASE FLOW
   ══════════════════════════════════════════════════════════════════════════ */

.page-order .site-header { background: var(--header-bg, #fff); }

.order-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

/* Product card */
.order-product-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg, #fff);
}
.order-product-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.order-product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .3rem;
}
.order-product-desc {
    font-size: .875rem;
    color: var(--muted);
    margin: 0 0 .5rem;
}
.order-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent, #0066cc);
}

/* Notice bar */
.order-notice {
    font-size: .8rem;
    color: var(--muted);
    background: var(--bg2, #f5f5f5);
    border-left: 3px solid var(--accent, #0066cc);
    padding: .5rem .75rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.order-notice-icon { margin-right: .35rem; }

/* Payment method accordion */
.order-methods { display: flex; flex-direction: column; gap: .5rem; }

.order-method {
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg, #fff);
}

.order-method-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1rem;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--bg2, #f8f8f8);
}
.order-method-header::-webkit-details-marker { display: none; }
.order-method-header::after {
    content: '▸';
    margin-left: auto;
    font-size: .8rem;
    color: var(--muted);
    transition: transform .15s;
}
.order-method[open] .order-method-header::after { transform: rotate(90deg); }

.order-method-body {
    padding: 1rem;
    border-top: 1px solid var(--border, #eee);
}
.order-method-desc { font-size: .875rem; color: var(--muted); margin: 0 0 .75rem; }

/* COD form */
.order-cod-note {
    font-size: .8rem;
    color: var(--muted);
    margin: .5rem 0 1rem;
}
.order-submit { width: 100%; }

/* Required marker */
.req { color: #c00; }

/* Wallet addresses */
.order-wallet {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    background: var(--bg2, #f5f5f5);
    border: 1px solid var(--border, #ddd);
    border-radius: 6px;
    padding: .6rem .75rem;
    margin-bottom: .5rem;
}
.order-wallet-net { font-size: .75rem; font-weight: 600; color: var(--muted); }
.order-wallet-addr {
    font-size: .78rem;
    word-break: break-all;
    font-family: monospace;
    color: var(--fg);
}
.order-copy { align-self: flex-start; font-size: .75rem; }

.order-crypto-note {
    font-size: .8rem;
    color: var(--muted);
    margin: .75rem 0;
    border-left: 3px solid #f0a800;
    padding-left: .5rem;
}
.order-crypto-confirm { margin-top: 1rem; }

/* External payment buttons */
.order-ext-btn { display: inline-block; margin: .5rem 0; }
.order-ext-note { font-size: .78rem; color: var(--muted); margin-top: .75rem; }
.order-ext-note a { color: var(--muted); }

/* PayPal error */
.order-error {
    background: #fff0f0;
    border: 1px solid #e88;
    border-radius: 5px;
    padding: .6rem .8rem;
    font-size: .85rem;
    color: #b00;
    margin-top: .75rem;
}
[data-theme="dark"] .order-error { background: #3a1a1a; }

/* Success / Fail pages */
.page-order-result body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.order-result-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 1rem;
}
.order-result-card {
    max-width: 440px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border, #ddd);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    background: var(--card-bg, #fff);
}
.order-result-ok  { border-color: #5ab55a; }
.order-result-fail { border-color: #e88; }

.kawaii-art {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 0 auto .75rem;
    font-family: inherit;
    color: var(--fg);
}
.order-result-card h1 { font-size: 1.3rem; margin: 0 0 .5rem; }
.order-result-card p  { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.order-fail-contact   { font-size: .8rem; }

@media (max-width: 600px) {
    .order-product-card { flex-direction: column; }
    .order-product-card img { width: 100%; height: 160px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   ORDER / PAYMENT PAGES
   ══════════════════════════════════════════════════════════════════════════ */

.page-order .auth-wrap {
    padding: 1rem;
}

.order-card, .order-result-card {
    max-width: 540px;
    margin: 2rem auto;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 10px;
    padding: 1.75rem;
}

/* Product summary strip */
.order-product-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border, #eee);
}
.order-product-summary img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.order-product-name { font-size: 1rem; font-weight: 700; margin: 0 0 .2rem; }
.order-product-price { font-size: .9rem; color: var(--muted); margin: 0; }

/* Section */
.order-section { margin-top: 1rem; }
.order-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .75rem;
}

/* Notices */
.order-notice {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 .75rem;
    line-height: 1.5;
}
.order-data-notice {
    font-size: .8rem;
    background: var(--bg2, #f8f8f8);
    border-left: 3px solid var(--accent, #0066cc);
    padding: .5rem .75rem;
    border-radius: 0 4px 4px 0;
    margin-bottom: 1rem;
}

/* Form */
.order-form label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin: .75rem 0 .25rem;
}
.order-form input, .order-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: .45rem .6rem;
    font-size: .9rem;
    border: 1px solid var(--border, #d0d0d0);
    border-radius: 5px;
    background: var(--input-bg, #fff);
    color: var(--fg, #111);
}
.order-form textarea { resize: vertical; min-height: 80px; }
.order-form .btn { margin-top: 1rem; width: 100%; }
.required { color: #c00; }

/* Crypto wallets */
.crypto-wallets { display: flex; flex-direction: column; gap: .6rem; }
.crypto-wallet {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    background: var(--bg2, #f8f8f8);
    padding: .5rem .75rem;
    border-radius: 6px;
    border: 1px solid var(--border, #e0e0e0);
}
.crypto-name { font-size: .8rem; font-weight: 700; min-width: 120px; }
.crypto-addr {
    font-size: .72rem;
    word-break: break-all;
    flex: 1;
    color: var(--muted);
}

/* Result pages */
.order-result-card { text-align: center; }
.order-ascii {
    font-size: .9rem;
    line-height: 1.5;
    margin: 0 auto 1rem;
    display: inline-block;
    text-align: left;
}
.order-ascii-ok  { color: #2a9d2a; }
.order-ascii-fail { color: #c00; }
.order-result-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 .75rem;
}
.order-result-body {
    font-size: .9rem;
    color: var(--muted);
    margin: 0 0 .6rem;
    line-height: 1.6;
}
.order-result-notice {
    background: var(--bg2, #f8f8f8);
    padding: .4rem .75rem;
    border-radius: 4px;
    font-size: .82rem;
}
.order-result-card .btn { margin-top: 1.25rem; }
.order-contact-help {
    margin-top: 1.5rem;
    font-size: .82rem;
    color: var(--muted);
    text-align: center;
}

/* PayPal container */
#paypal-button-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Buy buttons on landing */
.btn-paypal { background: #0070ba; border-color: #0070ba; color: #fff; }
.btn-paypal:hover { background: #005ea6; border-color: #005ea6; color: #fff; }
.btn-stripe { background: #635bff; border-color: #635bff; color: #fff; }
.btn-stripe:hover { background: #4b44e0; border-color: #4b44e0; color: #fff; }
.btn-mp { background: #009ee3; border-color: #009ee3; color: #fff; }
.btn-mp:hover { background: #007bba; border-color: #007bba; color: #fff; }
.btn-crypto { background: #f7931a; border-color: #f7931a; color: #fff; }
.btn-crypto:hover { background: #d97a0f; border-color: #d97a0f; color: #fff; }

/* ── Payment settings section ────────────────────────────────────────────── */
.pay-block {
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--card-bg, #fff);
}
.pay-block-title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.pay-badge {
    font-size: .7rem;
    font-weight: 600;
    background: var(--accent, #0055cc);
    color: #fff;
    padding: .1rem .4rem;
    border-radius: 3px;
    letter-spacing: .02em;
}
.pay-block-desc {
    font-size: .82rem;
    color: var(--muted);
    margin: 0 0 .75rem;
    line-height: 1.5;
}
.pay-block-label {
    font-size: .82rem;
    font-weight: 600;
    margin: .5rem 0 .35rem;
}
.pay-checkboxes {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.chk-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    cursor: pointer;
}
.pay-field-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .4rem .75rem;
    align-items: center;
}
.pay-field-grid label {
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}
.pay-upgrade-notice {
    background: var(--bg2, #f5f5f5);
    border: 1px dashed var(--border, #ccc);
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* ── Plan upgrade page ────────────────────────────────────────────────────── */
.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.upgrade-card {
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 10px;
    padding: 1.5rem;
    background: var(--card-bg, #fff);
    position: relative;
}
.upgrade-card-featured {
    border-color: var(--accent, #0055cc);
    border-width: 2px;
}
.upgrade-plan-badge {
    position: absolute;
    top: -1px; right: 1rem;
    background: var(--accent, #0055cc);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 0 0 4px 4px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.upgrade-plan-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: .25rem;
}
.upgrade-plan-price {
    font-size: 1.1rem;
    color: var(--accent, #0055cc);
    font-weight: 700;
    margin-bottom: 1rem;
}
.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: .88rem;
    line-height: 2;
}
.upgrade-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.upgrade-notice {
    font-size: .82rem;
    color: var(--muted);
    background: var(--bg2, #f8f8f8);
    border-left: 3px solid var(--accent, #0055cc);
    padding: .6rem .9rem;
    border-radius: 0 4px 4px 0;
    line-height: 1.6;
}
