/* Reseller Mini-Site – Modern UI
   Use with layout includes for consistent look. */

:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: #eef2ff;
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
}

/* Reseller index: modern background */
body.page-reseller-index {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 35%, #334155 70%, #475569 100%);
    background-attachment: fixed;
    position: relative;
}
body.page-reseller-index::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(139, 92, 246, 0.1), transparent);
    pointer-events: none;
    z-index: 0;
}
body.page-reseller-index .site-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.page-reseller-index .site-header .site-title,
body.page-reseller-index .site-header .site-brand { color: #f1f5f9; }
body.page-reseller-index .site-header .site-nav a { color: #94a3b8; }
body.page-reseller-index .site-header .site-nav a.nav-wallet { color: #c7d2fe; font-weight: 700; }
body.page-reseller-index .site-header .site-nav a:hover { color: #c7d2fe; background: rgba(79, 70, 229, 0.2); }
body.page-reseller-index .site-nav-toggle { background: rgba(30, 41, 59, 0.8); border-color: rgba(255,255,255,0.15); }
body.page-reseller-index .site-nav-toggle__bar { background: #e2e8f0; }
body.page-reseller-index .site-nav-toggle:hover { background: rgba(79, 70, 229, 0.3); border-color: rgba(255,255,255,0.2); }
body.page-reseller-index .site-nav { border-top-color: rgba(255,255,255,0.1); }
body.page-reseller-index .site-wrap { position: relative; z-index: 1; }
body.page-reseller-index .page-title,
body.page-reseller-index h1, body.page-reseller-index h2 { color: #f1f5f9; }
body.page-reseller-index .reseller-category-heading { border-bottom-color: rgba(148, 163, 184, 0.3); }
body.page-reseller-index .card,
body.page-reseller-index .reseller-product-grid,
body.page-reseller-index .reseller-product-card { background: rgba(30, 41, 59, 0.6); border-color: rgba(255, 255, 255, 0.08); }
body.page-reseller-index .reseller-product-card__body,
body.page-reseller-index .reseller-product-card__title { color: #e2e8f0; }
body.page-reseller-index .reseller-product-card__pill { background: #0f172a; color: #e2e8f0; }
body.page-reseller-index .reseller-product-card__pill--stock { background: #1e293b; color: #94a3b8; }
body.page-reseller-index .reseller-product-card__amount { color: #c7d2fe; }
body.page-reseller-index .reseller-product-card__stock,
body.page-reseller-index .text-muted { color: #94a3b8; }
body.page-reseller-index .reseller-product-card__login-btn { background: rgba(30, 41, 59, 0.9); color: #94a3b8; }
body.page-reseller-index .reseller-product-card__login-btn:hover { background: #334155; color: #c7d2fe; }
body.page-reseller-index .reseller-toolbar .reseller-search,
body.page-reseller-index .reseller-toolbar .reseller-category-select { background: rgba(30, 41, 59, 0.8); border-color: rgba(255, 255, 255, 0.1); color: #f1f5f9; }
body.page-reseller-index .reseller-toolbar .reseller-category-label { color: #94a3b8; }
body.page-reseller-index .reseller-view-more-wrap { background: rgba(30, 41, 59, 0.4); border-top-color: rgba(255, 255, 255, 0.06); }
body.page-reseller-index .reseller-auth-prompt { background: rgba(79, 70, 229, 0.2); border-color: rgba(79, 70, 229, 0.4); color: #e2e8f0; }
body.page-reseller-index .reseller-auth-prompt a { color: #c7d2fe; }
body.page-reseller-index .site-footer { border-top-color: rgba(255, 255, 255, 0.08); color: #94a3b8; }
body.page-reseller-index .site-footer a { color: #c7d2fe; }
body.page-reseller-index .reseller-product-card__login-hint { color: #94a3b8; margin: 0; }
body.page-reseller-index .reseller-product-card__login-hint a { color: #818cf8; font-weight: 600; }
.order-replaced { color: var(--color-success); font-weight: 600; }

/* My Orders table */
.orders-empty-card {
    text-align: center;
    padding: 32px 24px;
}

.orders-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orders-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.orders-table th,
.orders-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.orders-table th {
    background: var(--color-bg);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

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

.orders-table tbody tr:hover td {
    background: rgba(79, 70, 229, 0.04);
}

.orders-table .orders-table-date {
    white-space: nowrap;
    width: 1%;
}

.orders-table .orders-table-product {
    min-width: 140px;
    max-width: 280px;
}
.order-product-link { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.order-product-link:hover { text-decoration: underline; }

.orders-table .orders-table-qty {
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.orders-table .orders-table-total {
    white-space: nowrap;
    font-weight: 600;
    text-align: right;
    width: 1%;
}

.orders-table .orders-table-status {
    white-space: nowrap;
}

.orders-table .orders-table-report {
    min-width: 180px;
}

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

.order-report-reason {
    width: 120px;
    min-width: 80px;
    padding: 6px 10px;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
}

.order-report-reason:focus {
    outline: none;
    border-color: var(--color-primary);
}

.order-replacement-note {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge.status-replaced {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-badge.status-reported {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.status-ok {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

/* Order details page */
.breadcrumb { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.order-details-card { padding: 24px; margin-bottom: 24px; }
.order-details-table { width: 100%; border-collapse: collapse; }
.order-details-table th, .order-details-table td { padding: 10px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.order-details-table th { font-weight: 600; color: var(--color-text-muted); width: 120px; }
.order-details-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.order-details-section-title { font-size: 1rem; margin: 0 0 12px; }
.order-details-copy-wrap { display: flex; flex-direction: column; gap: 12px; }
.order-details-copy-table { margin-bottom: 0; }
.order-details-copy-table th, .order-details-copy-table td { vertical-align: middle; }
.order-details-copy-table .copy-input { width: 100%; padding: 8px 12px; font-size: 0.8125rem; }
.copy-btn .fa-copy,
.copy-btn .copy-icon-visible { color: #212529 !important; opacity: 1; }
.order-details-items { display: flex; flex-direction: column; gap: 16px; }
.order-details-item-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.order-details-item-row .order-details-item-input { margin: 0; min-height: 60px; }
.order-details-item-row .copy-details-btn { align-self: flex-start; }
.order-details-textarea { width: 100%; padding: 12px; font-family: inherit; font-size: 0.875rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); resize: vertical; }
.order-details-copy-wrap .copy-details-btn { align-self: flex-start; }
.order-details-report-section .btn { margin-top: 4px; }

/* Report modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow-md); max-width: 440px; width: 100%; max-height: 90vh; overflow: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.modal-header h3 { margin: 0; font-size: 1.125rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--color-text-muted); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--color-text); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--color-border); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { background: var(--color-bg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .orders-table th,
    .orders-table td {
        padding: 16px 24px;
        font-size: 1rem;
    }
    .orders-table .orders-table-product {
        min-width: 200px;
        max-width: 320px;
    }
    .order-report-reason {
        width: 140px;
    }
}
body.page-reseller-index .alert { border-color: rgba(255,255,255,0.1); }
body.page-reseller-index .alert-success { background: rgba(5, 150, 105, 0.25); color: #6ee7b7; }
body.page-reseller-index .alert-error { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
body.page-reseller-index .reseller-product-card__form .qty-input { background: rgba(30, 41, 59, 0.8); border-color: rgba(255,255,255,0.15); color: #f1f5f9; }

/* Layout */
.site-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.site-wrap.narrow {
    max-width: 440px;
    margin: 48px auto 64px;
}

.site-wrap.wide {
    max-width: 1100px;
    margin: 32px auto 64px;
}

/* Header / Nav */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--color-text);
}

.site-brand:hover {
    color: var(--color-primary);
}

.site-logo {
    max-height: 44px;
    max-width: 140px;
    object-fit: contain;
}

.site-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.site-nav-toggle:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}
.site-nav-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    margin: 0 auto;
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(2) {
    opacity: 0;
}
.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
}

.site-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color .15s, background .15s;
}

.site-nav a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.site-nav a.active {
    font-weight: 600;
    color: var(--color-primary);
}

.site-nav a.nav-wallet {
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 4px;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Typography */
h1, .page-title {
    margin: 0 0 24px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

h2 {
    margin: 28px 0 16px;
    font-size: 1.25rem;
    font-weight: 600;
}

.section-title {
    margin: 32px 0 12px;
    font-size: 1.125rem;
    font-weight: 600;
}

.text-muted {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

/* Messages */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

.alert-success {
    background: var(--color-success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--color-error-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error p,
.alert p {
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
}

input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

input::placeholder {
    color: var(--color-text-muted);
}

/* Product table */
.products-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.products-table th,
.products-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.products-table th {
    background: var(--color-bg);
    font-weight: 600;
    color: var(--color-text);
}

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

.products-table tr:hover td {
    background: rgba(79, 70, 229, 0.03);
}

.products-table .qty-input {
    width: 72px;
    padding: 8px 10px;
    text-align: center;
    margin-right: 8px;
}

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

/* Wallet transactions table */
.table-card {
    overflow: hidden;
}

.wallet-transactions-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wallet-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.wallet-table th,
.wallet-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.wallet-table th {
    background: var(--color-bg);
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

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

.wallet-table tbody tr:hover td {
    background: rgba(79, 70, 229, 0.04);
}

.wallet-table .wallet-table-date {
    white-space: nowrap;
    width: 1%;
}

.wallet-table .wallet-table-desc {
    min-width: 140px;
}

.wallet-table .wallet-table-ref {
    min-width: 120px;
}

.wallet-table .amount-col {
    white-space: nowrap;
    font-weight: 600;
    text-align: right;
    width: 1%;
}

.wallet-table .amount-col.credit {
    color: var(--color-success);
}

.wallet-table .amount-col.debit {
    color: var(--color-error);
}

.wallet-table .ref-code {
    font-size: 0.8125rem;
    background: var(--color-bg);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
}

.wallet-table .wallet-table-status {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .wallet-table th,
    .wallet-table td {
        padding: 16px 24px;
        font-size: 1rem;
    }
    .wallet-table .wallet-table-desc {
        min-width: 200px;
    }
    .wallet-table .wallet-table-ref .ref-code {
        font-size: 0.875rem;
        padding: 5px 12px;
    }
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-badge.status-confirmed {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #b45309;
}

/* Pagination */
.pagination-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.pagination-info {
    margin: 0;
    font-size: 0.875rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: color .15s, background .15s, border-color .15s;
}

.pagination-link:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-link.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    pointer-events: none;
}

/* Wallet balance */
.balance-big {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

/* Footer */
.site-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.site-footer a {
    color: var(--color-primary);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Auth pages: centered card */
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.auth-links {
    margin-top: 24px;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links span {
    margin: 0 8px;
    color: var(--color-border);
}

/* Profile list */
.profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.profile-list li:last-child {
    border-bottom: none;
}

.profile-list strong {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Reseller index: toolbar, search, shop by category */
.reseller-toolbar {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.reseller-search-wrap {
    flex: 1;
    min-width: 200px;
}
.reseller-search {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
}
.reseller-search:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.reseller-category-dropdown-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.reseller-category-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.reseller-category-select {
    padding: 10px 36px 10px 14px;
    font-family: var(--font);
    font-size: 0.9375rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    min-width: 180px;
}
.reseller-category-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Reseller index: category section + product list (line by line) */
.reseller-category-section {
    margin-bottom: 32px;
}
.reseller-category-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-text);
}
.reseller-product-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow);
}
.reseller-product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.reseller-product-card:last-child {
    border-bottom: none;
}
.reseller-product-card__img-wrap {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: var(--color-bg);
    overflow: hidden;
    border-radius: var(--radius-sm);
    position: relative;
}
.reseller-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.reseller-product-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
}
.reseller-product-card__img-placeholder--fallback {
    display: none;
    position: absolute;
    inset: 0;
}
.reseller-product-card__img-placeholder--fallback.reseller-product-card__img-placeholder--show {
    display: flex;
}
.reseller-product-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.reseller-product-card__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    min-width: 120px;
}
.reseller-product-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.card__pill,
.reseller-product-card__pill {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    background: #0f172a;
    color: #e2e8f0;
}
.reseller-product-card__pill--stock,
.card__pill.reseller-product-card__pill--stock {
    background: #1e293b;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.65rem;
}
.reseller-product-card__pill--amount,
.card__pill.reseller-product-card__pill--amount {
    font-size: 0.7rem;
}
.reseller-product-card__amount {
    margin: 0;
    font-size: 0.9375rem;
}
.reseller-product-card__amount strong {
    white-space: nowrap;
}
.reseller-product-card__stock {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}
.reseller-product-card__login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.reseller-product-card__login-btn:hover {
    background: #334155;
    color: #c7d2fe;
}
.reseller-product-card__form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.reseller-product-card__form .qty-input {
    width: 52px;
    padding: 6px 8px;
    text-align: center;
    font-size: 0.9375rem;
}
/* Auth prompt when not logged in */
.reseller-auth-prompt {
    padding: 10px 16px;
    margin-bottom: 20px;
    background: var(--color-primary-light);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--color-text);
}
.reseller-auth-prompt a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}
.reseller-auth-prompt a:hover {
    text-decoration: underline;
}
/* Cart icon button */
.btn-cart {
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-cart .btn-cart-icon {
    display: block;
    color: inherit;
}
.btn-cart .btn-cart-icon svg {
    display: block;
    vertical-align: middle;
}
.reseller-view-more-wrap {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}
.reseller-view-more-wrap .reseller-view-more {
    margin: 0;
}

/* Support float: Telegram & WhatsApp with bounce */
.support-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}
.support-float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    color: #fff;
    text-decoration: none;
    animation: support-bounce 2s ease-in-out infinite;
}
.support-float-btn:hover {
    color: #fff;
    transform: scale(1.08);
}
.support-float-telegram {
    background: #0088cc;
}
.support-float-telegram:hover {
    background: #007ab8;
}
.support-float-whatsapp {
    background: #25d366;
}
.support-float-whatsapp:hover {
    background: #20bd5a;
}
.support-float-btn:nth-child(2) {
    animation-delay: .2s;
}
@keyframes support-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Utility */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 640px) {
    .site-header-inner {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    .site-brand {
        flex: 1;
        min-width: 0;
    }
    .site-title {
        font-size: 1.1rem;
    }
    .site-nav-toggle {
        display: flex;
        flex-shrink: 0;
    }
    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 4px;
        border-top: 1px solid var(--color-border);
        margin-top: 4px;
    }
    .site-nav.site-nav--open {
        display: flex;
    }
    .site-nav a {
        padding: 12px 14px;
        font-size: 0.95rem;
        border-radius: var(--radius-sm);
        margin: 2px 0;
    }
    .site-nav a.nav-wallet {
        margin-right: 0;
        margin-bottom: 4px;
        padding: 12px 14px;
        font-size: 1rem;
    }

    .products-table th,
    .products-table td {
        padding: 12px 14px;
        font-size: 0.875rem;
    }

    .order-form-cell {
        flex-direction: column;
        align-items: flex-start;
    }

    .reseller-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .reseller-search-wrap {
        min-width: 0;
        width: 100%;
    }
    .reseller-search {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    .reseller-category-dropdown-wrap {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .reseller-category-label {
        font-size: 0.8rem;
    }
    .reseller-category-select {
        width: 100%;
        min-width: 0;
        font-size: 0.9rem;
        padding: 10px 36px 10px 12px;
    }
    .reseller-product-card__body {
        gap: 10px;
    }
    .reseller-product-card__form {
        margin-left: 0;
        width: 100%;
    }
}
