.top-bar--dashboard {
    padding-block: 10px;
    height: auto;
    min-height: var(--bar-h);
}

.top-bar-copy {
    display: grid;
    gap: 2px;
}

#page-home .page-content,
#page-orders .page-content,
#page-products .page-content,
#page-earnings .page-content {
    padding-inline: var(--pad);
    padding-top: var(--s4);
    display: grid;
    gap: var(--s4);
    align-content: start;
}

#page-orders #orderList.container {
    padding-inline: 0;
}

.seller-dashboard-page {
    align-content: start;
}

.seller-hero-card {
    display: grid;
    gap: var(--s4);
    padding: var(--s5);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 34%),
        linear-gradient(135deg, #1f4b6e, #2a6f97 55%, #4f9d69);
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.seller-hero-card--earnings {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(135deg, #0f4c5c, #177e89 52%, #57cc99);
}

.seller-hero-card__copy {
    display: grid;
    gap: 8px;
}

.seller-hero-card__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.seller-hero-card h1 {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.seller-hero-card p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(248, 250, 252, 0.84);
}

.seller-hero-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    flex-wrap: wrap;
}

.seller-hero-card__meta .status-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.seller-hero-card__meta .status-badge.new {
    background: rgba(191, 219, 254, 0.18);
}

.seller-hero-card__meta .status-badge.accepted {
    background: rgba(219, 234, 254, 0.2);
}

.seller-hero-card__meta .status-badge.packed {
    background: rgba(253, 230, 138, 0.18);
}

.seller-hero-card__meta .status-badge.delivered {
    background: rgba(255, 255, 255, 0.18);
}

.seller-hero-card__badge {
    display: inline-grid;
    gap: 2px;
    min-width: 112px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    text-align: left;
}

.seller-hero-card__badge strong {
    font-size: 20px;
    line-height: 1;
}

.seller-hero-card__badge span {
    font-size: 12px;
    color: rgba(248, 250, 252, 0.84);
}

.dashboard-card {
    padding: var(--s5);
    border-radius: 22px;
    border: 1px solid rgba(203, 213, 225, 0.85);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-card--compact {
    padding: var(--s4);
}

.dashboard-card__header,
.section-header--tight {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s3);
    margin-bottom: var(--s4);
}

.dashboard-card__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.dashboard-card__title {
    margin-top: 4px;
    font-size: 20px;
    line-height: 1.2;
    color: #0f172a;
}

.dashboard-card__meta,
.section-meta {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.dashboard-alert-strip {
    display: grid;
    gap: 10px;
}

.dashboard-alert-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
}

.dashboard-alert-item strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.dashboard-alert-item p {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
}

.dashboard-alert-item--info {
    background: #eff6ff;
    border-color: rgba(96, 165, 250, 0.28);
}

.dashboard-alert-item--warning {
    background: #fff7ed;
    border-color: rgba(251, 191, 36, 0.28);
}

.dashboard-alert-item--success {
    background: #f0fdf4;
    border-color: rgba(74, 222, 128, 0.24);
}

.dashboard-alert-item--error {
    background: #fef2f2;
    border-color: rgba(248, 113, 113, 0.28);
}

.dashboard-alert-item--calm {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-action-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
    text-align: left;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.quick-action-card .material-symbols-outlined {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 22px;
}

.quick-action-card strong {
    font-size: 15px;
    color: #0f172a;
}

.quick-action-card small {
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.quick-action-card:active {
    transform: translateY(1px);
}

.dashboard-order-list {
    display: grid;
    gap: 12px;
}

.order-card {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.order-card--priority {
    border-color: rgba(79, 70, 229, 0.24);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.72), #fff);
}

.order-card--active {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.74), #fff);
}

.order-card--handoff {
    border-color: rgba(245, 158, 11, 0.22);
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.78), #fff);
}

.order-card--complete {
    border-color: rgba(34, 197, 94, 0.18);
}

.order-card--issue {
    border-color: rgba(239, 68, 68, 0.18);
}

.order-card-subcopy {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff3e3;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
}

.detail-chip--soft {
    background: #f1f5f9;
    color: #475569;
}

.order-next-hint {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.order-card-actions {
    align-items: center;
    justify-content: space-between;
}

.order-card-actions .btn {
    min-width: 144px;
}

.order-card-actions--done {
    justify-content: space-between;
}

.status-badge.assigned,
.status-badge.out_for_delivery {
    background: #e0f2fe;
    color: #0369a1;
}

.status-badge.failed_delivery,
.status-badge.cancelled_by_buyer,
.status-badge.cancelled_by_seller,
.status-badge.cancelled_by_area_admin {
    background: #fef2f2;
    color: #b91c1c;
}

.order-detail-page {
    padding-top: var(--s4);
}

.order-detail-hero {
    display: grid;
    gap: 10px;
    margin-bottom: var(--s4);
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(191, 219, 254, 0.8);
}

.order-detail-hero__top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-detail-hero h2 {
    font-size: 24px;
    line-height: 1.15;
    color: #0f172a;
}

.order-detail-hero p {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.detail-card--next-step {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), #fff);
}

.detail-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.detail-card__copy {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.detail-inline-state {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px dashed rgba(203, 213, 225, 0.95);
    background: #fff;
}

.detail-inline-state strong,
.earnings-inline-state strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.detail-inline-state p,
.earnings-inline-state p {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
}

.seller-product-grid {
    display: grid;
    gap: 14px;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.product-card__media-status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}

.product-card__meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.inventory-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
}

.inventory-badge--live {
    background: #ecfdf5;
    color: #15803d;
}

.inventory-badge--low {
    background: #fff7ed;
    color: #c2410c;
}

.inventory-badge--out {
    background: #f8fafc;
    color: #64748b;
}

.inventory-badge--hidden {
    background: #fef2f2;
    color: #b91c1c;
}

.earnings-timeline {
    display: grid;
    gap: 12px;
}

.earnings-timeline-item,
.earnings-inline-state {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
}

.earnings-timeline-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.earnings-timeline-item__top strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.earnings-timeline-item__top p {
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.earnings-timeline-item__metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #334155;
}

.earnings-timeline-item small {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
}

.earnings-inline-state .btn {
    margin-top: 12px;
}

.seller-stat-grid .ops-stat-card,
.seller-stat-grid--compact .ops-stat-card {
    min-height: 110px;
}

@media (min-width: 640px) {
    .quick-actions-grid,
    .seller-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 600px) {
    body {
        max-width: min(860px, 100%);
        margin: 0 auto;
        box-shadow: 0 20px 56px rgba(15, 23, 42, 0.06);
    }

    .bottom-nav {
        max-width: min(860px, calc(100vw - 20px));
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 768px) {
    body {
        max-width: min(1120px, 100%);
        margin: 0 auto;
        box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
    }

    .bottom-nav {
        max-width: min(1120px, calc(100vw - 24px));
        left: 50%;
        transform: translateX(-50%);
        border-inline: 1px solid var(--outline-v);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .seller-hero-card {
        grid-template-columns: minmax(0, 1.4fr) auto;
        align-items: end;
    }

    .quick-actions-grid,
    .seller-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (min-width: 1024px) {
    #page-home .page-content,
    #page-orders .page-content,
    #page-products .page-content,
    #page-earnings .page-content {
        padding-inline: 24px;
    }

    .seller-dashboard-page {
        gap: 18px;
    }

    .dashboard-order-list,
    .earnings-timeline,
    .seller-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
