/* Subtle gray-green palette for Annica's Crafts. */
:root {
    --bg: #f1f3ee;            /* warm off-white with a green tint */
    --surface: #ffffff;
    --surface-alt: #e8ece4;   /* sidebar / cart panel background */
    --fg: #2c3a35;
    --muted: #6b7d77;
    --accent: #5b8475;        /* sage green */
    --accent-dark: #46695d;
    --border: #d5dccf;
    --error: #b42318;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.5;
}

a { color: var(--accent-dark); }
a:hover { color: var(--accent); }

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

.topbar {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar .brand a {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.topbar-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}
.topbar-nav a { color: var(--muted); text-decoration: none; }
.topbar-nav a:hover { color: var(--accent); }

.account-link { display: inline-flex; align-items: center; gap: 0.4rem; }
.password-reveal {
    background: #fff8e6;
    border: 1px solid #fbe2a0;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.password-reveal strong { display: block; margin-bottom: 0.25rem; color: #6b5400; }
.password-reveal p { margin: 0 0 0.5rem; color: #6b5400; }
.password-reveal code {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    background: var(--surface);
    border: 1px solid #e8c684;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.05rem;
    user-select: all;
    word-break: break-all;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.35rem;
    background: #d97706;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
}

.inline-form { display: inline; margin: 0; }
.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
}
.link-button:hover { color: var(--accent); }

main { padding: 2rem; max-width: 1200px; margin: 0 auto; }

/* Storefront pages want to feel full-bleed on big monitors. Activated
   by body.shop, which only the shop_base template sets. */
body.shop main {
    max-width: min(1800px, 96vw);
    padding: 1.75rem 2rem;
}
@media (min-width: 1500px) {
    body.shop main { padding: 2rem 2.5rem; }
}

.hero { text-align: center; padding: 4rem 1rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: 2rem; }

.auth-card {
    max-width: 360px;
    margin: 5rem auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.auth-card h1 { text-align: center; margin: 0 0 1.25rem; }
.auth-card form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.auth-card form input {
    display: block;
    width: 100%;
    padding: 0.55rem 0.7rem;
    margin-top: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--fg);
}
.auth-card form input:focus {
    outline: 0;
    border-color: var(--accent);
}
.auth-card form button {
    width: 100%;
    padding: 0.65rem;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.auth-card form button:hover { background: var(--accent-dark); }
.auth-card .error {
    background: #fef2f2;
    color: var(--error);
    padding: 0.55rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* --- Admin --- */
.admin-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.admin-nav a {
    padding: 0.4rem 0.85rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: 4px 4px 0 0;
    font-size: 0.9rem;
}
.admin-nav a:hover { color: var(--accent); }
.admin-nav a.active { color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-bottom-color: var(--surface); margin-bottom: -1px; }

.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; }
.admin-section.narrow { max-width: 640px; }
.admin-section h1 { margin-top: 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h1 { margin: 0; }
.section-divider { border: 0; border-top: 1px solid var(--border); margin: 2rem 0 1.5rem; }

.btn, .btn-secondary {
    display: inline-block;
    padding: 0.5rem 0.95rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}
.btn { background: var(--accent); color: white; border-color: var(--accent); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: white; }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.link-button.danger { color: var(--error); }
.link-button.danger:hover { color: #8a1a13; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { color: var(--muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table .row-actions { text-align: right; white-space: nowrap; }
.data-table .row-actions a { margin-right: 0.75rem; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; }
.badge.ok { background: #dceee5; color: var(--accent-dark); }
.badge.muted { background: var(--surface-alt); color: var(--muted); }
.badge.custom { background: #efe7d6; color: #6e5418; }
.badge.awaiting { background: #fde9c8; color: #8a4b00; }

.price-input {
    width: 6.5rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: right;
    background: var(--surface);
    color: var(--fg);
    font-family: inherit;
}
.price-input:focus { outline: 0; border-color: var(--accent); }

.pay-now-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #fff5e1 0%, #fde8c4 100%);
    border: 1px solid #e8c684;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.pay-now-banner h2 { margin: 0 0 0.25rem; font-size: 1.1rem; color: #6e4a00; }
.pay-now-banner p { margin: 0; color: #6e4a00; }
@media (max-width: 700px) {
    .pay-now-banner { flex-direction: column; align-items: stretch; text-align: center; }
}

.stacked-form label.radio {
    display: flex; align-items: flex-start; gap: 0.55rem;
    margin-bottom: 0.65rem; font-size: 0.95rem; color: var(--fg);
}
.stacked-form label.radio input { width: auto; margin: 0.2rem 0 0 0; }
.stacked-form label.radio span { display: block; line-height: 1.4; }
.stacked-form label.radio strong { display: block; color: var(--fg); }

.btn-secondary-fill {
    background: var(--surface);
    color: var(--accent-dark);
    border: 1px solid var(--accent-dark);
}
.btn-secondary-fill:hover { background: var(--accent-dark); color: white; }

.custom-brief {
    margin-top: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #f7f2e6;
    border-left: 3px solid #c5a85c;
    border-radius: 0 4px 4px 0;
}
.custom-brief p { margin: 0.35rem 0 0; white-space: pre-line; font-size: 0.9rem; }

.stacked-form label { display: block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--muted); }
.stacked-form label input,
.stacked-form label select,
.stacked-form label textarea {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--fg);
}
.stacked-form label input:focus,
.stacked-form label select:focus,
.stacked-form label textarea:focus { outline: 0; border-color: var(--accent); }
.stacked-form label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: var(--fg); }
.stacked-form label.checkbox input { width: auto; margin: 0; }
.stacked-form .hint { font-size: 0.8rem; color: var(--muted); margin: 0.25rem 0 0; }

.inline-fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; }
.inline-fieldset legend { padding: 0 0.4rem; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { display: block; padding: 1.25rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--fg); text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.4rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.photo-card { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem; text-align: center; }
.photo-card img { display: block; max-width: 100%; height: 120px; object-fit: cover; border-radius: 4px; margin-bottom: 0.4rem; }

.upload-form { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 1rem; background: var(--surface-alt); border-radius: 6px; }
.upload-form .hint { width: 100%; margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--muted); }

/* --- Shop / storefront --- */
.shop-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    gap: 1.75rem;
    align-items: start;
}
@media (min-width: 1500px) {
    .shop-layout { grid-template-columns: 260px minmax(0, 1fr) 340px; gap: 2rem; }
}
.shop-sidebar,
.shop-cart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    position: sticky;
    top: 1.5rem;
}
.shop-sidebar h2,
.shop-cart h2 {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}

.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin: 0; }
.category-list a {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 4px;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
}
.category-list a:hover { background: var(--surface-alt); color: var(--accent-dark); }
.category-list a.active {
    background: var(--accent);
    color: white;
}

.shop-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}
.shop-main h1 { margin-top: 0; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
@media (min-width: 1500px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
}
.product-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 0;
}
.product-card-link img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--surface);
}
.product-photo-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: var(--surface);
    font-size: 0.85rem;
}
.product-photo-placeholder.large { aspect-ratio: 4 / 3; font-size: 1rem; }
.product-card h3 { margin: 0.65rem 0.85rem 0.25rem; font-size: 1rem; }
.product-card .price { margin: 0 0.85rem; font-weight: 600; color: var(--fg); }
.product-card .small { margin: 0.25rem 0.85rem 0.75rem; font-size: 0.8rem; }
.add-to-cart-form { padding: 0 0.85rem 0.85rem; }
.btn-block { width: 100%; }

/* Cart panel */
.cart-lines { list-style: none; padding: 0; margin: 0 0 1rem; }
.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "info qty" "info total";
    gap: 0.25rem 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-line-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.cart-line-info a { color: var(--fg); text-decoration: none; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; }
.cart-line-info a:hover { color: var(--accent); }
.cart-line-info .muted { font-size: 0.78rem; }
.cart-qty-form { grid-area: qty; margin: 0; }
.cart-qty-form input {
    width: 3.25rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    background: var(--surface);
    color: var(--fg);
}
.cart-line-total { grid-area: total; text-align: right; font-size: 0.85rem; color: var(--muted); }

.cart-totals { margin: 0.85rem 0; font-size: 0.92rem; }
.cart-totals div { display: flex; justify-content: space-between; padding: 0.25rem 0; }
.cart-totals .total { font-weight: 600; font-size: 1.05rem; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }

.cart-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; }
.cart-actions .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cart-shipping-note {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
}

.ships-only-note {
    background: #f1f6f3;
    border-left: 3px solid var(--accent);
    padding: 0.65rem 0.9rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--fg);
    line-height: 1.5;
}
.ships-only-note strong { display: block; color: var(--accent-dark); margin-bottom: 0.15rem; }
.ships-only-note.quote-block {
    background: #fff8e6;
    border-left-color: #d97706;
}
.ships-only-note.quote-block strong { color: #8a4b00; }

/* Product detail */
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
}
.product-detail-photos .main-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-alt);
}
/* Hover-to-zoom magnifier: the frame clips the image while it scales toward
   the cursor. */
.product-photo-zoom {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
    line-height: 0;
}
.product-photo-zoom .main-photo {
    display: block;
    transition: transform 0.12s ease-out;
    will-change: transform;
}
.product-photo-zoom.zooming { cursor: crosshair; }
.product-photo-zoom.zooming .main-photo { transition: none; }
.photo-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.photo-thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; }
.product-detail-info h1 { margin-top: 0; }
.price-large { font-size: 1.5rem; font-weight: 600; margin: 0.25rem 0 1rem; color: var(--fg); }
.qty-label { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; font-size: 0.9rem; color: var(--muted); }
.qty-label input {
    width: 4rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    background: var(--surface);
    color: var(--fg);
}
.product-description { margin-top: 1.5rem; white-space: pre-line; line-height: 1.6; }

/* Responsive: stack panes on small screens */
@media (max-width: 1024px) {
    .shop-layout { grid-template-columns: 200px 1fr; }
    .shop-cart { grid-column: 1 / -1; position: static; }
}
@media (max-width: 720px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar, .shop-cart { position: static; }
    .product-detail { grid-template-columns: 1fr; }
}

/* --- Account / register --- */
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--accent); }
.small { font-size: 0.8rem; }
.center { text-align: center; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0 0 1rem; }
.kv dt { color: var(--muted); font-size: 0.85rem; }
.kv dd { margin: 0; }

.help-list { padding-left: 1.25rem; margin: 1rem 0; }
.help-list li { margin-bottom: 0.6rem; line-height: 1.5; }

/* --- Guide flow timelines --- */
.guide-hero { margin-bottom: 1.5rem; }
.guide-hero h1 { margin: 0 0 0.4rem; }
.guide-hero p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 700px; line-height: 1.55; }

.block-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 600;
    margin: 1.75rem 0 0.85rem;
}
.block-heading:first-of-type { margin-top: 1rem; }

.flow-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}
.flow-section > h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.flow-section > h2 .scope-tag {
    font-size: 0.65rem;
    background: var(--surface-alt);
    color: var(--muted);
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.flow-section > p.intro {
    margin: 0 0 1.25rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 700px;
}

.flow {
    margin: 0;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--border);
    list-style: none;
}
.flow-step {
    position: relative;
    padding: 0 0 1.5rem 2rem;
}
.flow-step:last-child { padding-bottom: 0; }
.flow-num {
    position: absolute;
    left: -2.25rem;
    top: -0.1rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}
.flow-step h4 {
    margin: 0 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    font-size: 1rem;
}
.flow-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.flow-actor {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
/* Role badges derive from the theme so each site stays on-palette:
   the maker is a solid accent chip, the customer a light themed tint. */
.flow-actor-you { background: var(--surface-alt); color: var(--accent-dark); }
.flow-actor-annica { background: var(--accent-dark); color: #fff; }
.flow-actor-system { background: var(--surface-alt); color: var(--muted); }

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 0.5rem 0 0;
}
.status-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
}
.status-card .badge { margin-bottom: 0.4rem; display: inline-block; }
.status-card p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.tip {
    border-left: 3px solid var(--accent);
    background: #f1f6f3;
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    margin: 0.85rem 0 0;
}
.tip strong { color: var(--accent-dark); }

/* --- Welcome hero overlay (first-time guests on /) ---
   We DON'T filter the page content directly — applying `filter` to an
   ancestor would create a new containing block and trap the fixed overlay
   inside it (also blurring the card text). Instead, the overlay itself
   carries the backdrop-filter, so everything visible behind it (including
   the topbar) gets blurred while the card stays sharp. */
body.has-hero {
    overflow: hidden;
}

.hero-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(44, 58, 53, 0.5);
    backdrop-filter: blur(6px) saturate(0.9);
    -webkit-backdrop-filter: blur(6px) saturate(0.9);
    animation: heroFadeIn 0.3s ease;
}
@keyframes heroFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.hero-overlay.hero-leaving {
    opacity: 0;
    transition: opacity 0.22s ease;
}

.hero-card {
    position: relative;
    background: var(--surface);
    border-radius: 14px;
    padding: 2.5rem 2.25rem 2rem;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
}
.hero-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    color: var(--fg);
    letter-spacing: 0.01em;
}
.hero-tagline {
    margin: 0 0 1.5rem;
    color: var(--muted);
    line-height: 1.55;
    font-size: 1rem;
}
.hero-primary {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin-bottom: 1.1rem;
}
.hero-foot {
    margin: 0 0 0.4rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.hero-foot a { color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.hero-foot a:hover { color: var(--accent); }
.hero-sep { color: var(--border); margin: 0 0.4rem; }
.hero-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.hero-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.hero-close:hover { color: var(--fg); background: var(--surface-alt); }

/* --- Admin dashboard stats --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}
.stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.1;
}
.stat-value-suffix { font-size: 0.85rem; color: var(--muted); font-weight: 400; margin-left: 0.25rem; }
.stat-sub { margin-top: 0.3rem; color: var(--muted); font-size: 0.78rem; }
.stat-mini-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-alt);
    overflow: hidden;
    margin-top: 0.5rem;
}
.stat-mini-bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.chart-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.chart-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.chart-header h2 { margin: 0; font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.chart-wrap canvas { max-width: 100%; height: 260px !important; }

.two-col-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.two-col-grid h2 { font-size: 0.95rem; margin: 0 0 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.card-row-single { grid-template-columns: 1fr; }
@media (max-width: 900px) {
    .two-col-grid { grid-template-columns: 1fr; }
}

/* --- Checkout --- */
.checkout-page h1 { margin-top: 0; }
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.checkout-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}
.checkout-form h2 { font-size: 1rem; margin: 1.25rem 0 0.85rem; color: var(--fg); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.checkout-form h2:first-of-type { margin-top: 0; }
.checkout-form .no-label-text { color: transparent; font-size: 0; }
.checkout-form .no-label-text textarea { color: var(--fg); font-size: 1rem; }
.form-row-three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem; }

.checkout-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    position: sticky;
    top: 1.5rem;
}
.checkout-summary h2 { font-size: 0.95rem; margin: 0 0 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

.notice {
    background: #fff8e6;
    border: 1px solid #fbe2a0;
    color: #6b5400;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
    .form-row-three { grid-template-columns: 1fr; }
}

/* Order detail */
.order-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.order-detail-grid h2 { font-size: 0.95rem; margin: 1.5rem 0 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.order-detail-grid h2:first-of-type { margin-top: 0; }
.shipping-address { font-style: normal; line-height: 1.5; }
.order-notes { white-space: pre-line; background: var(--surface-alt); padding: 0.75rem 1rem; border-radius: 6px; }
@media (max-width: 900px) {
    .order-detail-grid { grid-template-columns: 1fr; }
}

/* Admin settings — feature toggles */
.settings-form { max-width: 640px; }
.settings-form .setting-row {
    display: flex; align-items: flex-start; gap: 0.65rem;
    margin-bottom: 1.15rem; font-size: 0.95rem; color: var(--fg);
    cursor: pointer;
}
.settings-form .setting-row input[type="checkbox"] {
    width: auto; margin: 0.25rem 0 0 0; flex: none;
}
.settings-form .setting-text { display: flex; flex-direction: column; gap: 0.15rem; }
.settings-form .setting-label { font-weight: 600; }
.settings-form .setting-desc { line-height: 1.4; }
.settings-form h2 { font-size: 1rem; margin: 1.6rem 0 0.4rem; }
.settings-form h2:first-child { margin-top: 0; }
.settings-form .setting-field { display: block; margin-bottom: 1.25rem; }
.settings-form .setting-field .setting-label,
.settings-form .setting-field .setting-desc { display: block; }
.settings-form .setting-field textarea { margin-top: 0.35rem; }

/* Admin messages (contact / password-help inbox) */
.message-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.85rem; }
.message-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; background: var(--surface); }
.message-card.is-new { border-left: 3px solid var(--accent); }
.message-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.message-from { font-weight: 600; color: var(--accent-dark); }
.message-body { margin: 0.5rem 0 0.75rem; white-space: pre-line; }
.message-card .row-actions { display: flex; gap: 1.1rem; align-items: center; }
.message-form { max-width: 480px; }
