/* ===========================================================
   Seller Panel - shared styles
   Palette: deep teal + warm gold, on warm paper
   Type: Fraunces (display) + Work Sans (body/UI)
   =========================================================== */

:root {
    --panel: #123D22;
    --panel-text: #EFEAE0;
    --panel-text-muted: #B8D6C3;

    --bg: #FAF7F2;
    --card: #FFFFFF;
    --ink: #123D22;
    --ink-muted: #4B6B54;
    --border: #E0E0E0;

    --gold: #10A53F;
    --gold-dark: #0C7F31;

    --error: #B3261E;
    --error-bg: #FBEAE9;
    --success: #10A53F;
    --success-bg: #D9F2E1;

    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- Split auth layout (Register / Login) ---------- */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    flex: 0 0 42%;
    background: var(--panel);
    color: var(--panel-text);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand h1 {
    font-size: clamp(28px, 3.4vw, 40px);
    color: #FFFFFF;
    max-width: 380px;
}

.auth-brand p.lead {
    color: var(--panel-text-muted);
    font-size: 15px;
    max-width: 340px;
    margin-bottom: 32px;
}

.benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 340px;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(239, 234, 224, 0.14);
    font-size: 14.5px;
    color: var(--panel-text);
}

.benefit-list li:first-child { border-top: none; }

.benefit-list .mark {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(200, 134, 43, 0.18);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-top: 1px;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    font-size: 26px;
    color: var(--ink);
}

.auth-card p.sub {
    color: var(--ink-muted);
    font-size: 14.5px;
    margin-bottom: 28px;
}

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

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.field .hint {
    font-size: 12.5px;
    color: var(--ink-muted);
    font-weight: 400;
    margin-left: 6px;
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row .field { flex: 1; min-width: 0; }

.input-field {
    width: 100%;
    padding: 11px 13px;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.input-field:focus {
    border-color: var(--gold);
    outline: none;
}

.validation-msg {
    display: block;
    font-size: 12.5px;
    color: var(--error);
    margin-top: 5px;
}

.btn-primary {
    width: 100%;
    padding: 13px 18px;
    background: var(--panel);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 6px;
}

.btn-primary:hover { background: #0D2E2A; }

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.btn-logout:hover { border-color: var(--ink-muted); }

.form-message {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
}

.form-message.success-msg {
    background: var(--success-bg);
    color: var(--success);
}

.form-message.error-text {
    background: var(--error-bg);
    color: var(--error);
}

.form-message:empty { display: none; }

.auth-switch {
    margin-top: 22px;
    font-size: 14px;
    color: var(--ink-muted);
    text-align: center;
}

/* ---------- Dashboard shell: sidebar + main ---------- */

.nav-toggle-state { display: none; }

.dash-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    flex: 0 0 240px;
    background: var(--panel);
    color: var(--panel-text);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.brand-mark-light {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 19px;
    color: #FFFFFF;
}

.nav-close, .nav-open {
    display: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--panel-text);
    line-height: 1;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.side-nav a {
    color: var(--panel-text-muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 8px;
}

.side-nav a:hover {
    background: rgba(239, 234, 224, 0.08);
    color: var(--panel-text);
}

.side-nav a.active {
    background: rgba(200, 134, 43, 0.18);
    color: #FFFFFF;
}

.sidebar-bottom {
    border-top: 1px solid rgba(239, 234, 224, 0.14);
    padding-top: 16px;
    margin-top: 16px;
}

.sidebar-store {
    font-size: 13px;
    color: var(--panel-text-muted);
    margin-bottom: 10px;
}

.btn-logout-dark {
    border-color: rgba(239, 234, 224, 0.25);
    color: var(--panel-text);
    width: 100%;
}

.btn-logout-dark:hover { border-color: var(--panel-text-muted); }

.dash-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.topbar-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
}

.dash-main {
    flex: 1;
    padding: 40px 40px 60px;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
}

.page-header { margin-bottom: 28px; }

.page-header h1 {
    font-size: 26px;
    color: var(--ink);
}

.page-header p {
    color: var(--ink-muted);
    font-size: 14.5px;
    max-width: 520px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    color: var(--ink);
}

.checklist-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 28px 8px;
}

.checklist-card h2 { font-size: 19px; }

.checklist-card > p {
    color: var(--ink-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.checklist li:first-child { border-top: none; }

.checklist .step-num {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-muted);
}

.checklist .step-body strong {
    display: block;
    font-size: 14.5px;
    color: var(--ink);
    margin-bottom: 2px;
}

.checklist .step-body span {
    font-size: 13.5px;
    color: var(--ink-muted);
}

.checklist .step-cta {
    margin-left: auto;
    align-self: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gold-dark);
    white-space: nowrap;
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.status-pill-pending {
    background: #FBEEE3;
    color: #B85C1D;
}

.coming-soon-card {
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
}

.coming-soon-card h2 { font-size: 20px; }

.coming-soon-card p {
    color: var(--ink-muted);
    font-size: 14.5px;
    max-width: 380px;
    margin: 0 auto;
}

/* ---------- Page toolbar (title + primary action) ---------- */

.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 18px;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover { border-color: var(--ink-muted); text-decoration: none; }

.btn-primary-sm {
    display: inline-block;
    padding: 10px 18px;
    background: var(--panel);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary-sm:hover { background: #0D2E2A; text-decoration: none; }

/* ---------- Data table ---------- */

.table-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.data-table th {
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-muted);
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    vertical-align: middle;
}

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

.data-table .prod-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg);
    border: 1px solid var(--border);
    vertical-align: middle;
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 14.5px;
}

/* ---------- Badges ---------- */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.badge-green { background: var(--success-bg); color: var(--success); }
.badge-amber { background: #FBEEE3; color: #B85C1D; }
.badge-red   { background: var(--error-bg); color: var(--error); }
.badge-gray  { background: var(--bg); color: var(--ink-muted); border: 1px solid var(--border); }
.badge-gold  { background: var(--gold); color: #FFFFFF; margin-left: 4px; }

/* ---------- Inline action links / small selects in tables ---------- */

.row-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dark);
    text-decoration: none;
    margin-right: 14px;
}

.row-action:hover { text-decoration: underline; }

.row-action.danger { color: var(--error); }

.status-select {
    font-family: 'Work Sans', Arial, sans-serif;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);
}

/* ---------- Form card (product edit, profile, payouts) ---------- */

.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 640px;
}

.form-card .field-row .field { flex: 1; }

/* ---------- Summary cards row (payments/reports) ---------- */

.summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

/* ---------- Reviews ---------- */

.review-item {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.review-item:first-child { border-top: none; }

.review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.review-customer {
    font-weight: 600;
    font-size: 14.5px;
}

.review-stars { color: var(--gold); font-size: 13px; }

.review-comment {
    color: var(--ink);
    font-size: 14px;
    margin-bottom: 10px;
}

.review-reply {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--ink-muted);
    margin-top: 8px;
}

.review-reply strong { color: var(--ink); }

/* ---------- Product image gallery ---------- */

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.image-tile {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background: rgba(28, 27, 24, 0.65);
    color: #FFFFFF;
    font-size: 11px;
    text-decoration: none;
}

.image-remove:hover { background: rgba(28, 27, 24, 0.85); text-decoration: none; }

.image-primary-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 59, 54, 0.85);
    color: #FFFFFF;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
}

/* ---------- Pricing + payout calculator ---------- */

.pricing-input { font-variant-numeric: tabular-nums; }

.payout-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 4px 0 8px;
    max-width: 340px;
}

.payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13.5px;
    color: var(--ink-muted);
}

.payout-row strong {
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.payout-total {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
}

.payout-total strong {
    color: var(--gold-dark);
    font-size: 15px;
}

/* ---------- Publish-to-website product picker ---------- */

.publish-list {
    display: flex;
    flex-direction: column;
}

.publish-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.publish-row:first-child { border-top: none; }

.publish-info { flex: 1; min-width: 0; }

.publish-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}

.publish-meta {
    font-size: 13px;
    color: var(--ink-muted);
    margin-top: 2px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: none;
}

.switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.switch-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 999px;
    transition: background 0.15s;
}

.switch-track::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: transform 0.15s;
}

.switch input[type="checkbox"]:checked ~ .switch-track {
    background: var(--panel);
}

.switch input[type="checkbox"]:checked ~ .switch-track::before {
    transform: translateX(18px);
}

/* ---------- Boost plans ---------- */

.boost-plans {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.boost-plan {
    position: relative;
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    min-width: 130px;
}

.boost-plan input[type="radio"] {
    position: absolute;
    top: 12px;
    left: 12px;
    margin: 0;
}

.boost-plan-body { padding-left: 20px; }

.boost-plan-days {
    font-size: 14px;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.boost-plan-price {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    color: var(--ink);
}

.boost-plan:has(input:checked) {
    border-color: var(--gold);
    background: #FBF1E1;
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
    .auth-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .auth-brand {
        flex: none;
        padding: 32px 24px;
        text-align: left;
    }

    .auth-brand h1 { font-size: 24px; max-width: none; }
    .auth-brand p.lead { display: none; }

    .benefit-list {
        display: flex;
        gap: 18px;
        max-width: none;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .benefit-list li {
        border-top: none;
        white-space: nowrap;
        padding: 0;
        flex: none;
    }

    .auth-form-panel {
        padding: 32px 20px 48px;
    }

    .field-row {
        flex-direction: column;
        gap: 0;
    }

    .app-nav { padding: 14px 18px; }

    .topbar { display: flex; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 20;
    }

    .nav-close, .nav-open { display: block; }

    .nav-toggle-state:checked ~ .dash-shell .sidebar {
        transform: translateX(0);
    }

    .nav-toggle-state:checked ~ .dash-shell::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 10;
    }

    .dash-main { padding: 28px 18px 48px; }

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

    .checklist li {
        flex-wrap: wrap;
    }

    .checklist .step-cta {
        margin-left: 40px;
    }

    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
    .summary-row { grid-template-columns: 1fr; }
    .page-toolbar { flex-direction: column; }
    .form-card { padding: 22px 20px; }
}

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .auth-brand h1 { font-size: 21px; }
}

/* ---------- Orders dashboard (status tabs, filters, stacked cells) ---------- */

.status-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
}

.status-tabs a {
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.status-tabs a:hover { color: var(--ink); text-decoration: none; }

.status-tabs a.active {
    color: var(--panel);
    border-bottom-color: var(--gold);
}

.status-tabs a .count {
    display: inline-block;
    background: var(--bg);
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 6px;
}

.status-tabs a.active .count {
    background: var(--gold);
    color: #fff;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.filter-bar .field { margin-bottom: 0; }
.filter-bar .field label { margin-bottom: 4px; }
.filter-bar .input-field { padding: 8px 10px; font-size: 13px; }

.results-count {
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 10px;
}

.results-count strong { color: var(--ink); }

/* Stacked info inside a table cell (order#/date, name/address/phone) */
.cell-stack .primary {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--ink);
    margin-bottom: 2px;
}

.cell-stack .secondary {
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.5;
}

/* Pill-style action buttons inside table rows */
.btn-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin: 2px 4px 2px 0;
}

.btn-pill-green { background: var(--success-bg); color: var(--success); }
.btn-pill-green:hover { background: var(--success); color: #fff; text-decoration: none; }

.btn-pill-outline { background: #fff; color: var(--ink-muted); border: 1px solid var(--border); }
.btn-pill-outline:hover { border-color: var(--ink-muted); color: var(--ink); text-decoration: none; }

.btn-pill-red { background: var(--error-bg); color: var(--error); }
.btn-pill-red:hover { background: var(--error); color: #fff; text-decoration: none; }

.bulk-action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.bulk-action-bar .bulk-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
}
