/* ══════════════════════════════════════════════════════
   FIZZA'S COLLECTION — ADMIN DASHBOARD STYLES
   ══════════════════════════════════════════════════════ */

.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: #F8F6F2;
    color: #1C1917;
    font-family: var(--font-body);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: #151311;
    color: #FAF7F2;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
}

.sidebar-brand {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.sidebar-brand .logo-main {
    color: #FAF7F2;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s ease;
}

.side-link:hover,
.side-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #FAF7F2;
}

.side-link.active {
    background: #4A3B2C;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #4A3B2C;
    color: #FFF;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.user-info strong {
    display: block;
    font-size: 13px;
    color: #FAF7F2;
}

.user-info span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-actions-row {
    display: flex;
    gap: 8px;
}

.side-btn {
    flex: 1;
    text-align: center;
    padding: 7px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.side-btn.logout {
    color: #E57373;
}

/* Main Area */
.admin-main {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-page-title {
    font-family: var(--font-heading);
    font-size: 30px;
    color: var(--brand-espresso);
    margin-bottom: 2px;
}

.admin-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #FFF;
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
    transition: transform 0.2s ease;
}

.topbar-wa-btn:hover {
    transform: translateY(-2px);
}

/* Stats Cards */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #FFF;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(74, 59, 44, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-espresso);
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--brand-espresso);
    margin-bottom: 6px;
}

.stat-trend {
    font-size: 11px;
}
.stat-trend.positive { color: #2E7D32; }
.stat-trend.neutral { color: var(--text-muted); }

/* Panels */
.admin-panel {
    background: #FFF;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--brand-espresso);
}

.panel-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Chart */
.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    height: 200px;
    padding: 20px 0 10px;
    border-bottom: 1px solid var(--border-light);
}

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

.bar {
    width: 100%;
    max-width: 44px;
    background: #4A3B2C;
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    cursor: pointer;
}

.bar.highlight {
    background: #8E283B;
}

.bar-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-light);
}

.admin-table td {
    padding: 14px 8px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    vertical-align: middle;
}

.product-col-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-thumb {
    width: 44px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 2px;
}

.badge-pill {
    background: var(--bg-warm);
    border: 1px solid var(--border-light);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--brand-espresso);
}

.size-dots span {
    border: 1px solid var(--border-light);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    margin-right: 2px;
}

.status-indicator {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}
.status-indicator.active,
.status-indicator.delivered { background: #E8F5E9; color: #2E7D32; }
.status-indicator.processing { background: #FFF3E0; color: #E65100; }
.status-indicator.pending { background: #EDE7F6; color: #512DA8; }

.admin-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}
.admin-icon-btn.delete:hover { color: #C62828; }

/* Alerts */
.admin-alert {
    padding: 12px 18px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.admin-alert.success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.admin-alert.error { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }

/* 2FA & Login */
.admin-login-body {
    background: #1C1917;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card-wrap {
    background: #FFF;
    width: 100%;
    max-width: 440px;
    border-radius: 6px;
    padding: 40px 32px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.login-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-meta-row {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.two-fa-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(74, 59, 44, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.totp-input {
    letter-spacing: 0.3em;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.totp-helper-box {
    background: var(--bg-warm);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.login-footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.admin-item-box {
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 12px;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 11px;
}

.badge-2fa {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2E7D32;
    font-weight: 600;
}

.authenticator-info-box {
    background: rgba(142, 40, 59, 0.06);
    border: 1px solid rgba(142, 40, 59, 0.15);
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    color: var(--brand-accent);
    margin-top: 14px;
}

.size-checkboxes {
    display: flex;
    gap: 14px;
    margin-top: 6px;
    font-size: 13px;
}

/* ══════════════════════════════════════════════════════
   AUTHENTICATOR QR CODE SCAN BOX
   ══════════════════════════════════════════════════════ */
.qr-code-box {
    background: #FAF8F5;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    margin: 14px 0;
}

.qr-image {
    display: inline-block;
    border: 3px solid #FFFFFF;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.manual-secret-key {
    margin-top: 12px;
}

.manual-key-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.manual-code {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-espresso);
    letter-spacing: 0.08em;
    user-select: all;
}

/* ══════════════════════════════════════════════════════
   ORDER MODAL & CUSTOM EDIT STYLING
   ══════════════════════════════════════════════════════ */
.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    padding: 24px;
    overflow-y: auto;
}

.admin-modal-card {
    background: #FFF;
    max-width: 540px;
    margin: 60px auto;
    border-radius: 6px;
    padding: 32px;
    position: relative;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text-muted);
}

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

.email-dispatch-preview {
    background: #F4EFEB;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 14px;
    font-size: 12px;
}

.email-preview-link {
    background: #FFF;
    border: 1px solid var(--border-light);
    padding: 8px;
    border-radius: 3px;
    margin-top: 6px;
}

/* ══════════════════════════════════════════════════════
   ROLE-BASED BADGES & ACCESS STYLING
   ══════════════════════════════════════════════════════ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.role-badge.super-admin {
    background: #8E283B;
    color: #FFFFFF;
}

.role-badge.order-manager {
    background: #1E40AF;
    color: #FFFFFF;
}

.role-badge.catalog-manager {
    background: #B45309;
    color: #FFFFFF;
}

.role-badge.support-specialist {
    background: #047857;
    color: #FFFFFF;
}

/* ══════════════════════════════════════════════════════
   PROMO OFFERS & CAMPAIGNS STYLING
   ══════════════════════════════════════════════════════ */
.promo-code-pill {
    display: inline-block;
    background: #F4EFEB;
    border: 1px dashed var(--brand-espresso);
    color: var(--brand-espresso);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.announcement-preview-banner {
    background: #1C1917;
    color: #FFFFFF;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.status-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.status-btn.active {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #A5D6A7;
}

.status-btn.inactive {
    background: #F5F5F5;
    color: #757575;
    border-color: #E0E0E0;
}

.status-btn:hover {
    filter: brightness(0.95);
}

/* ══════════════════════════════════════════════════════
   AUDIT LOG & SUBSCRIBERS TABLE
   ══════════════════════════════════════════════════════ */
.audit-table td {
    font-size: 12px;
}

.audit-action-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    background: #EFEBE9;
    color: #4E342E;
    font-family: monospace;
    font-size: 11px;
    font-weight: 600;
}

.ip-pill {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 11px;
}

/* ══════════════════════════════════════════════════════
   ROLE PERMISSION MATRIX CARD
   ══════════════════════════════════════════════════════ */
.role-matrix-card {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 24px;
}

.role-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.role-matrix-item {
    padding: 14px;
    border-radius: 6px;
    background: #FDFBF8;
    border: 1px solid var(--border-light);
}

.role-matrix-item h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.role-matrix-item p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.role-perm-list {
    margin-top: 8px;
    list-style: none;
    font-size: 11px;
    color: var(--text-muted);
}

.role-perm-list li {
    padding: 2px 0;
}

.role-perm-list li.allowed {
    color: #2E7D32;
    font-weight: 500;
}

.role-perm-list li.denied {
    color: #C62828;
    text-decoration: line-through;
    opacity: 0.7;
}

/* ══════════════════════════════════════════════════════
   ORDER ITEMS DISPLAY & PACKING SLIP STYLING
   ══════════════════════════════════════════════════════ */
.order-items-column-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}

.order-item-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FAF8F5;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 6px 8px;
}

.order-item-chip-img {
    width: 38px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.order-item-chip-info {
    line-height: 1.35;
    flex: 1;
}

.order-item-chip-info strong {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
}

.order-item-chip-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-secondary);
}

.size-pill {
    background: #EFEBE6;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 10px;
    color: var(--brand-espresso);
}

.qty-pill {
    font-weight: 700;
    color: var(--brand-accent);
}

.price-pill {
    color: var(--text-muted);
}

.customer-instructions-pill {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #FFF9E6;
    border: 1px solid #FFE082;
    color: #8D6E63;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.35;
}

.customer-instructions-pill svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ══════════════════════════════════════════════════════
   TRANSFER OWNERSHIP CARD
   ══════════════════════════════════════════════════════ */
.transfer-ownership-card {
    background: #FFFDF9;
    border: 1px solid #E8DFD5;
    border-left: 4px solid var(--brand-accent);
    border-radius: 6px;
    padding: 20px;
    margin-top: 24px;
}

.auth-locked-box {
    background: #F3F8F2;
    border: 1px solid #C8E6C9;
    border-radius: 6px;
    padding: 24px;
    text-align: center;
    margin-top: 14px;
}

.auth-locked-box svg {
    margin-bottom: 8px;
}

.auth-locked-box h3 {
    font-size: 15px;
    color: #2E7D32;
    font-weight: 700;
}

.auth-locked-box p {
    font-size: 12px;
    color: #4E6B4F;
    margin-top: 4px;
    line-height: 1.5;
}


/* ══════════════════════════════════════════════════════
   EXECUTIVE OVERVIEW — STAT CARDS & ANALYTICS
   ══════════════════════════════════════════════════════ */

/* Primary KPI Cards Grid */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 22px 24px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary, #78716C);
}

.stat-icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF7F2;
    border-radius: 8px;
    color: var(--brand-espresso, #4A3B2C);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary, #1C1917);
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-delta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #A8A29E);
}

.stat-delta.positive {
    color: #2E7D32;
}

.stat-delta.warning {
    color: #E65100;
}

.stat-delta svg {
    flex-shrink: 0;
}

/* Secondary KPI Mini Cards */
.stat-cards-secondary {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    margin-top: 16px !important;
}

.stat-card-mini {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s ease;
}

.stat-card-mini:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-mini-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-mini-val {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary, #1C1917);
    line-height: 1.15;
}

.stat-mini-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary, #78716C);
    margin-top: 1px;
}

/* ══════════════════════════════════════════════════════
   REVENUE BAR CHART
   ══════════════════════════════════════════════════════ */
.analytics-chart {
    padding: 0;
}

.chart-bars-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    height: 200px;
    padding: 12px 0 0 0;
}

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

.bar-value {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary, #78716C);
    white-space: nowrap;
}

.bar-pill {
    width: 100%;
    max-width: 48px;
    border-radius: 6px 6px 2px 2px;
    background: #D4C5B0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.bar-pill.highlighted {
    background: #8E283B;
}

.bar-day {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #A8A29E);
}

/* ══════════════════════════════════════════════════════
   REVENUE BY CITY — HORIZONTAL BARS
   ══════════════════════════════════════════════════════ */
.city-revenue-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.city-revenue-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.city-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #FFFFFF;
    background: var(--brand-espresso, #4A3B2C);
    border-radius: 6px;
    flex-shrink: 0;
}

.city-info {
    min-width: 120px;
    flex-shrink: 0;
}

.city-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #1C1917);
}

.city-info .text-muted {
    font-size: 11px;
}

.city-bar-wrap {
    flex: 1;
    height: 10px;
    background: #F0ECE4;
    border-radius: 5px;
    overflow: hidden;
}

.city-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8E283B, #C0526A);
    border-radius: 5px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.city-revenue-amt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary, #1C1917);
    min-width: 100px;
    text-align: right;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════
   ACTIVITY FEED
   ══════════════════════════════════════════════════════ */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-feed-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.activity-feed-item:last-child {
    border-bottom: none;
}

.activity-feed-dot {
    width: 10px;
    height: 10px;
    background: #D4C5B0;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    position: relative;
}

.activity-feed-item:not(:last-child) .activity-feed-dot::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 14px);
    background: #EDE9E0;
}

.activity-feed-content {
    flex: 1;
    min-width: 0;
}

.activity-feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.activity-feed-header strong {
    font-size: 12px;
    color: var(--text-primary, #1C1917);
}

.activity-feed-detail {
    font-size: 12px;
    color: var(--text-secondary, #78716C);
    line-height: 1.4;
}

.activity-feed-time {
    display: block;
    font-size: 10px;
    color: var(--text-muted, #A8A29E);
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════
   ORDER STATUS DISTRIBUTION CARDS
   ══════════════════════════════════════════════════════ */
.order-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.order-status-card {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.order-status-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.os-card-num {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.pending-card .os-card-num { color: #7C3AED; }
.processing-card .os-card-num { color: #E65100; }
.delivered-card .os-card-num { color: #2E7D32; }
.cancelled-card .os-card-num { color: #8E283B; }

.os-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary, #78716C);
    margin-bottom: 12px;
}

.os-card-bar {
    height: 6px;
    background: #F0ECE4;
    border-radius: 3px;
    overflow: hidden;
}

.os-card-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.os-card-bar-fill.pending { background: #7C3AED; }
.os-card-bar-fill.processing { background: #E65100; }
.os-card-bar-fill.delivered { background: #2E7D32; }
.os-card-bar-fill.cancelled { background: #8E283B; }

/* ══════════════════════════════════════════════════════
   2-COLUMN ANALYTICS GRID
   ══════════════════════════════════════════════════════ */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ══════════════════════════════════════════════════════
   AUDIT ACTION PILL
   ══════════════════════════════════════════════════════ */
.audit-action-pill {
    display: inline-block;
    background: #F0ECE4;
    color: var(--brand-espresso, #4A3B2C);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE OVERVIEW
   ══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .stat-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-cards-secondary {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }
    .order-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .stat-cards-grid {
        grid-template-columns: 1fr;
    }
    .stat-cards-secondary {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .order-status-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════
   TOPBAR VIEW STORE BUTTON (HIGH-CONTRAST LUXURY BURGUNDY)
   ══════════════════════════════════════════════════════ */
.topbar-store-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 18px !important;
    background: #8E283B !important;
    color: #FFFFFF !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    border: 1px solid #751F2F !important;
    box-shadow: 0 2px 6px rgba(142, 40, 59, 0.25) !important;
    transition: all 0.2s ease !important;
}

.topbar-store-btn:hover {
    background: #6D1B2B !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(142, 40, 59, 0.35) !important;
}

.topbar-store-btn span {
    color: #FFFFFF !important;
}

.topbar-store-btn svg {
    stroke: #FFFFFF !important;
}

/* Admin dashboard refresh */
.admin-body {
    --admin-ink: #231b17;
    --admin-muted: #756b64;
    --admin-border: #e7ddd4;
    --admin-paper: #fffdfa;
    --admin-wash: #f5f1ec;
    background: var(--admin-wash);
    color: var(--admin-ink);
}

.admin-sidebar {
    background: #211a16;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 8px 0 28px rgba(42, 31, 24, .05);
}

.side-link {
    min-height: 44px;
    border-radius: 7px;
    letter-spacing: .01em;
}

.side-link.active {
    background: #8e283b;
    color: #fff;
}

.admin-main {
    min-width: 0;
    padding: 30px clamp(20px, 3vw, 48px);
    overflow-x: hidden;
}

.admin-topbar {
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-page-title {
    font-size: clamp(25px, 2vw, 32px);
    line-height: 1.2;
}

.admin-subtitle,
.panel-sub,
.stat-label {
    color: var(--admin-muted);
}

.admin-panel,
.stat-card {
    background: var(--admin-paper);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(53, 36, 26, .035);
}

.admin-panel {
    padding: clamp(18px, 2vw, 28px);
}

.stat-cards-grid {
    gap: 14px;
}

.offers-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    min-width: 0;
    padding: 18px;
}

.admin-main .btn {
    min-height: 44px;
    border-radius: 6px;
    letter-spacing: .08em;
}

.admin-main .btn-outline {
    color: #3f332a !important;
    background: #fffdfa !important;
    border-color: #b9a99d !important;
    backdrop-filter: none;
}

.admin-main .btn-outline:hover {
    color: #251d19 !important;
    background: #f3ece5 !important;
    border-color: #88776b !important;
}

.admin-main button:focus-visible,
.admin-main a:focus-visible,
.admin-sidebar a:focus-visible,
.admin-modal button:focus-visible,
.admin-modal input:focus-visible,
.admin-modal select:focus-visible,
.admin-modal textarea:focus-visible {
    outline: 3px solid rgba(142, 40, 59, .3);
    outline-offset: 2px;
}

.admin-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-paper);
}

.admin-table {
    min-width: 860px;
}

.admin-table th {
    background: #f8f4ef;
    color: #6c6057;
    white-space: nowrap;
}

.admin-table td {
    border-bottom-color: #eee7e0;
}

.admin-table tbody tr:hover {
    background: #fdfaf6;
}

.orders-table {
    min-width: 1180px;
}

.orders-table th:nth-child(3) { min-width: 220px; }
.orders-table th:nth-child(4) { min-width: 185px; }

.orders-table td {
    vertical-align: top;
    padding-top: 12px;
}

.shipping-offer-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.1fr);
    gap: 26px;
    align-items: center;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #e3d4c4;
    border-radius: 10px;
    background: linear-gradient(130deg, #fffdf9 0%, #f5eee7 100%);
}

.shipping-offer-copy h3 {
    margin: 5px 0 8px;
    color: #34271e;
    font-family: var(--font-heading);
    font-size: 22px;
}

.shipping-offer-copy p {
    max-width: 480px;
    margin: 0 0 12px;
    color: #6f645c;
    font-size: 13px;
    line-height: 1.55;
}

.section-eyebrow {
    color: #8e283b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.shipping-offer-state,
.partner-name-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}

.shipping-offer-state.is-active {
    color: #205b3e;
    background: #e8f3eb;
}

.shipping-offer-state.is-inactive {
    color: #65574d;
    background: #eee8e2;
}

.shipping-offer-form {
    display: grid;
    gap: 14px;
}

.shipping-offer-form .form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shipping-offer-form .form-field label,
.shipping-offer-auth label {
    display: block;
    margin-bottom: 6px;
    color: #51453c;
    font-size: 12px;
    font-weight: 650;
}

.shipping-offer-auth {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.auth-code-help,
.form-help {
    display: block;
    margin-top: 6px;
    color: #756b64;
    font-size: 11px;
    line-height: 1.45;
}

.partner-name-pill {
    color: #623046;
    background: #f6eaf0;
}

.redemption-total {
    display: block;
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 10px;
    white-space: nowrap;
}

.table-empty-state {
    padding: 32px 16px !important;
    color: var(--admin-muted);
    text-align: center;
}

.order-items-column-wrap {
    max-width: 290px;
    gap: 6px;
}

.order-item-chip {
    gap: 8px;
    padding: 5px 7px;
    border-color: #e8dfd6;
    border-radius: 7px;
    background: #fbf8f4;
}

.order-item-chip-img {
    width: 32px;
    height: 40px;
}

.order-item-chip-info strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px !important;
    line-height: 1.25;
}

.order-item-chip-meta {
    gap: 5px;
    margin-top: 2px;
    font-size: 10px;
}

.order-items-more {
    color: #55453a;
    font-size: 11px;
}

.order-items-more summary {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #e4d8cc;
    border-radius: 6px;
    background: #fffdfa;
    color: #6d352f;
    cursor: pointer;
    font-weight: 650;
    list-style-position: inside;
}

.order-items-more ul {
    display: grid;
    gap: 6px;
    margin: 7px 0 0;
    padding: 8px 10px;
    border-left: 2px solid #d8c4b2;
    background: #faf6f1;
    list-style: none;
}

.order-items-more li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #63584f;
    font-size: 10px;
    line-height: 1.4;
}

.order-items-more li strong {
    flex: 0 0 auto;
    color: #382e27;
}

.order-promo-tag,
.order-promo-discount {
    display: block;
    margin-top: 5px;
    font-size: 10px;
}

.order-promo-tag {
    width: fit-content;
    max-width: 180px;
    padding: 3px 7px;
    overflow-wrap: anywhere;
    border-radius: 5px;
    background: #f7eaf0;
    color: #71354a;
    font-weight: 650;
}

.order-promo-discount {
    color: #286447;
    white-space: nowrap;
}

.customer-instructions-pill {
    max-width: 290px;
    overflow-wrap: anywhere;
    border-color: #eedca8;
    border-radius: 6px;
}

.admin-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    border-radius: 6px;
}

.admin-icon-btn:hover {
    border-color: var(--admin-border);
    background: #f7f2ec;
}

.admin-modal-card {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(33, 24, 18, .22);
}

@media (max-width: 1000px) {
    .shipping-offer-card {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 24px 20px;
    }

    .offers-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .admin-body {
        display: block;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 12px 14px;
    }

    .sidebar-brand {
        margin-bottom: 10px;
        padding-bottom: 10px;
        text-align: left;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .side-link {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 8px 11px;
        white-space: nowrap;
    }

    .sidebar-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-top: 10px;
    }

    .admin-user-pill {
        min-width: 0;
        margin: 0;
    }

    .admin-main {
        padding: 20px 14px 32px;
    }

    .offers-overview-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar,
    .panel-header-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .shipping-offer-card {
        padding: 18px;
    }

    .shipping-offer-form .form-group-row {
        grid-template-columns: 1fr;
    }

    .admin-modal {
        padding: 12px;
    }

    .admin-modal-card {
        margin: 18px auto;
        padding: 26px 18px;
    }
}

/* Keep product photos as catalog thumbnails inside their table cells. */
.catalog-table {
    min-width: 980px;
    table-layout: fixed;
}

.catalog-table th:first-child,
.catalog-table td:first-child {
    width: 78px;
}

.catalog-table th:last-child,
.catalog-table td:last-child {
    width: 106px;
    white-space: nowrap;
}

.catalog-table td:nth-child(6) {
    white-space: normal;
    line-height: 1.45;
}

.catalog-table td:nth-child(6) .status-indicator {
    display: inline-flex;
    align-items: center;
    margin: 0 4px 5px 0;
}

.catalog-table td:nth-child(6) .product-offer-status {
    margin-top: 0;
}

.catalog-table .table-prod-thumb {
    display: block !important;
    width: 56px !important;
    height: 74px !important;
    max-width: 56px !important;
    object-fit: cover !important;
    object-position: center top;
    overflow: hidden;
    border: 1px solid #e7ddd4;
    border-radius: 6px;
    background: #f5f1ec;
}

.status-indicator.private {
    background: #efe9e2;
    color: #62544a;
}

.product-offer-status {
    display: block;
    margin-top: 5px;
    color: #8e283b;
    font-size: 10px;
    font-weight: 650;
}

.product-offer-status.is-neutral {
    color: #756b64;
    font-weight: 500;
}

.product-offer-edit-btn {
    color: #4a3b2c;
    background: #f7f2ec;
    margin-right: 4px;
}

.product-offer-edit-btn:hover {
    color: #8e283b;
    background: #f4e9eb;
}

.product-offer-modal-card {
    max-width: 640px;
}

.product-offer-modal-name {
    margin: 6px 0 20px;
    color: #746960;
    font-size: 13px;
}

.product-offer-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.product-offer-form .form-group-row {
    gap: 14px;
}

.product-offer-settings-row .form-field {
    min-width: 0;
}

.stat-currency-mark {
    color: var(--brand-espresso, #4a3b2c);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1;
}

.product-offer-form .form-field label,
.product-offer-auth label {
    display: block;
    margin-bottom: 6px;
    color: #51453c;
    font-size: 12px;
    font-weight: 650;
}

.product-visibility-note {
    padding: 11px 13px;
    border: 1px solid #e7ddd4;
    border-radius: 7px;
    background: #f8f4ef;
    color: #62574e;
    font-size: 11px;
    line-height: 1.5;
}

.product-offer-auth {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fffdfa;
}

.product-offer-save-btn {
    width: 100%;
}

@media (max-width: 700px) {
    .product-offer-modal-card {
        padding: 26px 18px;
    }

    .product-offer-form .form-group-row {
        grid-template-columns: 1fr;
    }
}

/* Shared customer support inbox */
.admin-chat-nav-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #8e283b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.admin-chat-nav-count[hidden] {
    display: none;
}

.admin-chat-panel {
    overflow: hidden;
    padding: 22px;
}

.admin-chat-panel-heading,
.admin-chat-inbox-heading,
.admin-chat-thread-heading,
.admin-chat-conversation-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-chat-panel-heading {
    margin-bottom: 18px;
}

.admin-chat-panel-heading .panel-title {
    margin: 0 0 5px;
}

.admin-chat-panel-heading .panel-sub {
    display: block;
    max-width: 620px;
    line-height: 1.5;
}

.admin-chat-secure-note {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #e3dbd2;
    border-radius: 999px;
    background: #faf7f2;
    color: #62574e;
    font-size: 10px;
    font-weight: 650;
}

.admin-chat-layout {
    display: grid;
    min-height: 560px;
    grid-template-columns: minmax(240px, 31%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--admin-border, #e8e1d9);
    border-radius: 9px;
    background: #fff;
}

.admin-chat-inbox-panel {
    min-width: 0;
    border-right: 1px solid var(--admin-border, #e8e1d9);
    background: #fcfaf7;
}

.admin-chat-inbox-heading {
    min-height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid var(--admin-border, #e8e1d9);
    color: var(--text-primary, #1c1917);
    font-size: 13px;
}

.admin-chat-inbox-heading span {
    color: var(--text-muted, #8f8a84);
    font-size: 10px;
}

.admin-chat-inbox {
    max-height: 640px;
    overflow-y: auto;
}

.admin-chat-conversation {
    display: block;
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--admin-border, #e8e1d9);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.admin-chat-conversation:hover,
.admin-chat-conversation.is-active {
    background: #f4efeb;
}

.admin-chat-conversation:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(142, 40, 59, .4);
    outline-offset: -3px;
}

.admin-chat-conversation-top {
    align-items: flex-start;
    color: var(--text-primary, #1c1917);
    font-size: 12px;
}

.admin-chat-conversation-email,
.admin-chat-conversation-preview,
.admin-chat-conversation-time {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-chat-conversation-email {
    margin-top: 3px;
    color: var(--text-secondary, #57534e);
    font-size: 10px;
}

.admin-chat-conversation-preview {
    margin-top: 7px;
    color: var(--text-secondary, #57534e);
    font-size: 11px;
}

.admin-chat-conversation-time {
    margin-top: 4px;
    color: var(--text-muted, #8f8a84);
    font-size: 9px;
}

.admin-chat-unread {
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #8e283b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

.admin-chat-thread-panel {
    display: flex;
    min-width: 0;
    min-height: 560px;
    flex-direction: column;
}

.admin-chat-thread-heading {
    min-height: 63px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--admin-border, #e8e1d9);
}

.admin-chat-thread-heading strong {
    color: var(--text-primary, #1c1917);
    font-size: 13px;
}

.admin-chat-thread-heading span {
    color: var(--text-muted, #8f8a84);
    font-size: 10px;
}

.admin-chat-messages {
    min-height: 0;
    max-height: none;
    flex: 1;
    padding: 18px;
}

.admin-chat-inline-status {
    padding-right: 18px;
    padding-left: 18px;
}

.admin-chat-compose {
    padding: 12px 18px 16px;
    border-top: 1px solid var(--admin-border, #e8e1d9);
}

.admin-chat-compose textarea:disabled {
    background: #f5f3f0;
    color: #8f8a84;
    cursor: not-allowed;
}

.admin-chat-compose button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .admin-chat-layout {
        grid-template-columns: minmax(210px, 36%) minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .admin-chat-panel {
        padding: 14px;
    }

    .admin-chat-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-chat-layout {
        min-height: 640px;
        grid-template-columns: 1fr;
    }

    .admin-chat-inbox-panel {
        border-right: 0;
        border-bottom: 1px solid var(--admin-border, #e8e1d9);
    }

    .admin-chat-inbox {
        display: flex;
        max-height: 210px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .admin-chat-conversation {
        min-width: 220px;
        min-height: 128px;
        border-right: 1px solid var(--admin-border, #e8e1d9);
        border-bottom: 0;
    }

    .admin-chat-thread-panel {
        min-height: 410px;
    }

    .admin-chat-messages {
        min-height: 220px;
    }

    .admin-chat-compose-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-chat-panel *,
    .admin-chat-panel *::before,
    .admin-chat-panel *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
