* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #f6f8fb;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color: #1b1b1f;
}
a { color: #2361cc; text-decoration: none; }
.page { max-width: 860px; margin: 0 auto; padding: 18px; }
.page.wide { max-width: 1120px; }
.card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #e4e8ef;
    box-shadow: 0 1px 2px rgba(20, 30, 55, 0.04);
}
.login-card { margin-top: 60px; }
h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 12px; }
.muted { color: #777; margin-top: 0; }
.small { font-size: 13px; }
label { display: block; margin: 16px 0 6px; font-weight: 600; }
input, select {
    width: 100%; height: 44px; border: 1px solid #ddd; border-radius: 12px;
    padding: 0 12px; font-size: 16px; background: #fff;
}
button {
    min-height: 46px; border: 0; border-radius: 999px; margin-top: 12px;
    font-size: 16px; font-weight: 700; background: #0b57d0; color: white; cursor: pointer;
    padding: 0 18px;
}
button.issue { background: #c23b3b; }
.error { background: #ffecec; color: #b00020; padding: 12px; border-radius: 12px; margin: 14px 0; }
.demo { background: #f2f2f2; border-radius: 12px; padding: 12px; margin-top: 18px; color: #555; }
.demo p { margin: 4px 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.logout { color: #555; text-decoration: none; white-space: nowrap; }
.notice {
    background: #e8f1ff;
    color: #174b86;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 600;
}
.snackbar {
    border-radius: 16px;
    background: #1f2937;
    color: #fff;
}
.simple-rule {
    line-height: 1.6;
    color: #333;
}
.eyebrow {
    color: #5f6f89;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}
.text-danger { color: #ba1a1a; }
.page-loading {
    position: fixed;
    left: 50%;
    top: 12px;
    z-index: 10000;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(20, 30, 55, 0.16);
}
.page-loading.loaded { display: none; }
.customer-summary {
    padding: 16px;
}
.customer-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.customer-main h2 {
    margin: 4px 0 2px;
    font-size: 24px;
}
.customer-main p { margin-bottom: 0; }
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.summary-cell {
    border-radius: 14px;
    background: #f6f8fb;
    padding: 10px;
    min-height: 68px;
}
.summary-cell span {
    display: block;
    color: #65748b;
    font-size: 12px;
    font-weight: 700;
}
.summary-cell b {
    display: block;
    margin-top: 6px;
    color: #1b1b1f;
    font-size: 16px;
    word-break: break-all;
}
.md-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0 10px;
    background: rgba(246,248,251,.96);
    backdrop-filter: blur(12px);
}
.md-tabs a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 54px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dbe3f0;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}
.md-tabs a b {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}
.md-tabs a.active {
    background: #d7e3ff;
    border-color: #abc7ff;
    color: #0b57d0;
}
.md-tabs a.active b { color: #0b57d0; }
.sort-bar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 4px 0 12px;
}
.sort-bar a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}
.sort-bar a.active {
    background: #0b57d0;
    color: #fff;
}
.order-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.order-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    background: #fff;
    border: 1px solid #e4e8ef;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(20, 30, 55, 0.04);
    scroll-margin-top: 96px;
}
.order-card.has-issue {
    border-color: #ffb4ab;
    background: #fffafa;
}
.order-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 150px;
    min-height: 150px;
    margin: 0;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e4e8ef;
    background: #f1f5f9;
    cursor: zoom-in;
}
.order-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.order-img.image-error::after {
    content: "图片加载失败";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}
.order-content {
    min-width: 0;
}
.order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.order-head h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    word-break: break-all;
}
.order-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    word-break: break-all;
}
.progress-line {
    margin-top: 10px;
    border-radius: 12px;
    background: #eef6ff;
    color: #174b86;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
}
.info-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.info-grid div,
.detail-grid div {
    min-width: 0;
}
.info-grid span,
.detail-grid span {
    display: block;
    color: #65748b;
    font-size: 12px;
    font-weight: 700;
}
.info-grid b,
.detail-grid b,
.detail-grid a {
    display: block;
    margin-top: 4px;
    color: #1b1b1f;
    font-size: 14px;
    word-break: break-all;
}
.detail-grid a { color: #0b57d0; font-weight: 800; }
.order-details {
    margin-top: 12px;
    border-top: 1px solid #edf1f7;
    padding-top: 10px;
}
.order-details summary {
    color: #0b57d0;
    cursor: pointer;
    font-weight: 800;
    min-height: 32px;
    line-height: 32px;
}
.order-actions {
    grid-template-columns: minmax(150px, .5fr) minmax(0, 1fr);
    align-items: end;
}
.order-actions .outlined-btn[disabled] {
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}
.order-actions .issue-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.order-actions .danger-btn,
.order-actions .outlined-btn {
    width: 100%;
    margin: 0;
    min-height: 42px;
}
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 10000;
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    background: #1f2937;
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 800;
    transition: opacity .18s ease, transform .18s ease;
}
.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.portal-card {
    display: block;
    min-height: 142px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e4e8ef;
    padding: 16px;
    color: #1b1b1f;
    box-shadow: 0 1px 2px rgba(20, 30, 55, 0.04);
}
.portal-card span {
    display: block;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}
.portal-card b {
    display: block;
    margin-top: 12px;
    color: #0b57d0;
    font-size: 30px;
    line-height: 1;
}
.portal-card p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}
.portal-card.attention {
    border-color: #ffb4ab;
    background: #fffafa;
}
.portal-card.attention b { color: #ba1a1a; }
.single-action {
    grid-template-columns: 1fr;
}

/* 客户商品页：顶部工具栏 */
.shop-page { padding-top: 14px; }
.shop-topbar h1 { font-size: 24px; }
.sticky-tools {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(245,245,247,0.96);
    backdrop-filter: blur(12px);
    padding: 8px 0 12px;
    margin-bottom: 12px;
}
.toolbar-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}
.tool-btn {
    width: auto;
    min-height: 38px;
    margin-top: 0;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #333;
    border: 1px solid #e1e1e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    font-size: 14px;
}
.filter-panel {
    display: none;
    background: #fff;
    border-radius: 16px;
    margin-top: 10px;
    padding: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.filter-panel.open { display: block; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filter-grid label { margin: 0; color: #555; font-size: 13px; }
.filter-grid select { margin-top: 6px; }
.apply-filter { width: 100%; background: #222; }
.empty-card { text-align: center; color: #666; }

/* 商品列表：默认双列小图模式 */
.products.grid-view {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.products.list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    scroll-margin-top: 96px;
}
.product-card.has-issue {
    outline: 2px solid #ffd0d0;
}
.product-img {
    width: 100%;
    height: 210px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: zoom-in;
    outline: none;
}
.product-img:focus-visible {
    box-shadow: 0 0 0 3px rgba(35, 97, 204, 0.28) inset;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.zoom-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.58);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    pointer-events: none;
}
body.modal-open {
    overflow: hidden;
}
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.image-modal.open {
    display: block;
}
.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
}
.image-modal-body {
    position: absolute;
    inset: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.image-modal-title {
    max-width: calc(100vw - 84px);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    word-break: break-all;
}
.image-modal-body img {
    max-width: 100%;
    max-height: calc(100vh - 92px);
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
}
.image-modal-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: #111;
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

.issue-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #c23b3b;
    color: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}
.product-main { padding: 12px; }
.product-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    word-break: break-all;
    min-height: 42px;
}
.product-meta {
    margin-top: 6px;
    color: #777;
    font-size: 13px;
    word-break: break-all;
}
.product-link { margin-top: 8px; font-size: 14px; }
.actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.actions form { margin: 0; }
.actions button { width: 100%; margin-top: 0; min-height: 42px; font-size: 14px; }
.issue-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
.issue-input {
    height: 40px;
    font-size: 14px;
    width: 100%;
}
.issue-note { background: #fff1f1; color: #9e2424; padding: 9px; border-radius: 10px; margin-top: 8px; font-size: 13px; }
.issue-note b,
.issue-note span,
.issue-note p {
    display: block;
}
.issue-note span {
    margin-top: 3px;
    color: #b94a48;
    font-size: 12px;
}
.issue-note p {
    margin: 6px 0 0;
    color: #7f1d1d;
    line-height: 1.55;
}

/* 宽版一行一个：接近淘宝列表样式 */
.products.list-view .product-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    padding: 12px;
    align-items: start;
}
.products.list-view .product-img {
    height: 150px;
    border-radius: 14px;
    overflow: hidden;
}
.products.list-view .product-main { padding: 0; }
.products.list-view .product-title {
    font-size: 18px;
    min-height: unset;
}
.products.list-view .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.products.list-view .issue-form {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    align-items: center;
}
.products.list-view .issue-input {
    height: 42px;
}

/* 后台表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { border-bottom: 1px solid #eee; padding: 10px; text-align: left; font-size: 14px; }
th { background: #f8fafc; color: #4b5563; font-weight: 700; }
.customer-account-table th:first-child,
.customer-account-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 104px;
    max-width: 148px;
    background: #fff;
    box-shadow: 8px 0 12px -12px rgba(20, 30, 55, 0.45);
    word-break: break-all;
}
.customer-account-table th:first-child {
    z-index: 3;
    background: #f8fafc;
}
.admin-upload label { margin-top: 12px; }
.header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.admin-header,
.section-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.admin-header h1,
.section-title-row h2 { margin-bottom: 4px; }
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.metric-card {
    min-height: 92px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e4e8ef;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(20, 30, 55, 0.04);
}
.metric-card span {
    display: block;
    color: #65748b;
    font-size: 12px;
    font-weight: 800;
}
.metric-card b {
    display: block;
    margin-top: 10px;
    font-size: 22px;
    color: #1b1b1f;
    word-break: break-all;
}
.metric-card.danger b { color: #ba1a1a; }
.admin-upload-card summary {
    cursor: pointer;
    color: #0b57d0;
    font-weight: 800;
}
.admin-filter {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr .8fr .8fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}
.admin-filter.card {
    grid-template-columns: 1.4fr 1fr auto;
}
.admin-filter label {
    margin: 0;
    color: #65748b;
    font-size: 12px;
    font-weight: 800;
}
.admin-filter input,
.admin-filter select {
    margin-top: 6px;
    height: 40px;
    font-size: 14px;
}
.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-actions .filled-btn,
.filter-actions .outlined-link {
    min-height: 40px;
    margin: 0;
}
.admin-empty {
    margin-top: 14px;
    padding: 18px;
}
.filled-btn { background: #0b57d0; }
.outlined-btn,
.danger-btn,
.text-btn,
.outlined-link {
    min-height: 38px;
    border-radius: 999px;
    padding: 0 14px;
    margin-top: 0;
    font-size: 14px;
    font-weight: 700;
}
.outlined-btn {
    background: #fff;
    color: #0b57d0;
    border: 1px solid #9bb7e8;
}
.danger-btn {
    background: #ba1a1a;
    color: #fff;
}
.text-btn,
.outlined-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0b57d0;
    background: transparent;
    border: 1px solid #c6d6f3;
    white-space: nowrap;
}
.small-btn {
    min-height: 32px;
    font-size: 12px;
    padding: 0 10px;
}
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.row-actions form { margin: 0; }
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: #eef2f7;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.chip-info {
    background: #e8f1ff;
    color: #174b86;
}
.chip-success {
    background: #e7f6ed;
    color: #146c3c;
}
.chip-error {
    background: #ffe8e8;
    color: #ba1a1a;
}
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #334155;
    background: #eef2f7;
    font-size: 13px;
    font-weight: 700;
}
.admin-tabs a.active {
    background: #d7e3ff;
    color: #0b57d0;
}
.issue-admin-list {
    display: grid;
    gap: 14px;
}
.issue-admin-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 0;
}
.issue-thumb {
    display: block;
    width: 100%;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e4e8ef;
}
.issue-thumb img,
.item-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.issue-admin-main {
    min-width: 0;
}
.admin-issue-note {
    margin: 10px 0 0;
}
.issue-row-actions {
    margin-top: 14px;
}
.assign-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}
.assign-form label {
    margin: 0;
    color: #65748b;
    font-size: 12px;
    font-weight: 800;
}
.assign-form input,
.assign-form select {
    margin-top: 6px;
    height: 40px;
    font-size: 14px;
}
.assign-form .filled-btn {
    min-height: 40px;
    margin: 0;
}
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 14px 0 4px;
    color: #65748b;
    font-size: 13px;
    font-weight: 800;
}
.pagination-bar .outlined-link {
    min-height: 34px;
}
.item-detail-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.item-photo-card {
    height: 420px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}
.detail-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-link {
    margin: 12px 0 0;
}
.detail-link a {
    font-weight: 800;
}
.detail-actions {
    margin-top: 16px;
}

@media (min-width: 900px) {
    .products.grid-view { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-img { height: 230px; }
    .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-card { grid-template-columns: 1fr; }
    .order-img { height: 230px; }
    .order-actions { grid-template-columns: 1fr; }
    .order-actions .issue-form { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .page { padding: 12px; }
    .login-card { margin-top: 24px; }
    .shop-topbar h1 { font-size: 22px; }
    .sticky-tools { padding-top: 6px; }
    .toolbar-row { justify-content: space-between; }
    .tool-btn { flex: 1; }
    .filter-grid { grid-template-columns: 1fr; }
    .admin-header,
    .section-title-row { display: block; }
    .header-actions { justify-content: flex-start; margin-top: 10px; }
    .admin-tabs { margin-top: 10px; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filter,
    .admin-filter.card { grid-template-columns: 1fr; }
    .filter-actions { align-items: stretch; }
    .filter-actions .filled-btn,
    .filter-actions .outlined-link { flex: 1; }
    .pagination-bar { flex-wrap: wrap; }
    .issue-admin-card { grid-template-columns: 1fr; }
    .issue-thumb { height: 240px; }
    .assign-form { grid-template-columns: 1fr; }
    .item-detail-layout { grid-template-columns: 1fr; }
    .item-photo-card { height: 320px; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-main h2 { font-size: 22px; }
    .md-tabs {
        gap: 6px;
        overflow-x: auto;
        grid-template-columns: repeat(4, minmax(92px, 1fr));
        padding-bottom: 8px;
    }
    .md-tabs a {
        min-height: 50px;
        border-radius: 14px;
        font-size: 12px;
    }
    .sort-bar { justify-content: stretch; }
    .sort-bar a {
        flex: 1;
        justify-content: center;
    }
    .portal-grid { grid-template-columns: 1fr; }
    .order-card {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 10px;
        border-radius: 16px;
        padding: 10px;
    }
    .order-img {
        height: 118px;
        min-height: 118px;
        border-radius: 12px;
    }
    .order-head {
        display: block;
    }
    .order-head .chip {
        margin-top: 8px;
    }
    .order-head h2 { font-size: 16px; }
    .info-grid,
    .detail-grid,
    .order-actions,
    .order-actions .issue-form {
        grid-template-columns: 1fr;
    }
    .products.grid-view { gap: 10px; }
    .product-card { border-radius: 16px; }
    .product-img { height: 178px; }
    .product-main { padding: 10px; }
    .product-title { font-size: 15px; min-height: 40px; }
    .actions button { min-height: 40px; font-size: 13px; }

    .products.list-view .product-card {
        grid-template-columns: 130px 1fr;
        gap: 10px;
        padding: 10px;
    }
    .products.list-view .product-img { height: 130px; }
    .products.list-view .product-title { font-size: 16px; }
    .products.list-view .issue-form { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .page { padding: 10px; }
    .order-card { grid-template-columns: 1fr; }
    .order-img { height: 210px; }
    .product-img { height: 160px; }
    .products.list-view .product-card { grid-template-columns: 112px 1fr; }
    .products.list-view .product-img { height: 112px; }
}

/* 客户端品牌皮肤：仅作用于客户入口，不影响后台管理页面 */
body.client-surface {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 6%, rgba(255, 210, 218, .45), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(255, 235, 205, .58), transparent 30%),
        linear-gradient(180deg, #fff8f6 0%, #fff3f1 42%, #fffaf7 100%);
    color: #3a241d;
}

.client-surface a { color: #ee6f78; }
.client-surface .page {
    max-width: 920px;
    padding: 20px 16px 30px;
}

.client-surface .shop-page {
    padding-top: 18px;
}

.client-hero {
    position: relative;
    min-height: 104px;
    margin-bottom: 12px;
    padding: 20px 4px 22px;
}

.client-hero::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231, 176, 142, .65), transparent);
}

.client-surface .shop-topbar {
    position: relative;
    z-index: 2;
    align-items: flex-start;
    margin-bottom: 0;
}

.client-surface .shop-topbar h1 {
    margin: 0 0 10px;
    color: #3b251f;
    font-size: clamp(30px, 7vw, 48px);
    line-height: 1.06;
    font-weight: 900;
}

.client-surface .shop-topbar .muted {
    color: #7c574b;
    font-size: 17px;
    font-weight: 600;
}

.client-surface .logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(245, 155, 147, .38);
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    color: #ff6f78;
    box-shadow: 0 8px 24px rgba(182, 94, 82, .08);
    font-size: 14px;
    font-weight: 800;
}

.client-surface .card,
.client-surface .customer-summary,
.client-surface .order-card,
.client-surface .portal-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(235, 197, 166, .58);
    box-shadow: 0 12px 30px rgba(157, 91, 75, .09);
}

.client-surface .customer-summary {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 24px;
}

.client-surface .customer-main {
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.client-surface .customer-main .chip {
    margin-left: auto;
}

.customer-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7b83, #ffa2a6);
    color: #fff;
    border: 5px solid #fff4ee;
    box-shadow: 0 0 0 1px rgba(239, 184, 149, .7), 0 12px 24px rgba(255, 125, 132, .22);
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
}

.client-surface .eyebrow {
    color: #a56d5b;
    letter-spacing: 0;
}

.client-surface .customer-main h2 {
    color: #3a241d;
    font-size: 24px;
    font-weight: 900;
}

.client-surface .muted {
    color: #8a665b;
}

.client-surface .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(236, 204, 181, .75);
}

.client-surface .summary-cell {
    min-height: 62px;
    padding: 12px 10px 4px;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.client-surface .summary-cell + .summary-cell {
    border-left: 1px solid rgba(236, 204, 181, .75);
}

.client-surface .summary-cell span {
    color: #7d574d;
    font-size: 12px;
}

.client-surface .summary-cell b {
    color: #3a241d;
    font-size: 18px;
    font-weight: 900;
}

.client-surface .summary-cell .text-danger,
.client-surface .text-danger {
    color: #ff5f63;
}

.client-surface .md-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 16px 0 14px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(245, 202, 190, .78);
    border-radius: 20px;
    background: rgba(255, 255, 255, .68);
    box-shadow: 0 10px 24px rgba(164, 92, 77, .06);
}

.client-surface .md-tabs a {
    min-height: 58px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #4d3028;
    font-size: 14px;
    gap: 4px;
}

.client-surface .md-tabs a + a {
    border-left: 1px solid rgba(238, 205, 191, .7);
}

.client-surface .md-tabs a b {
    min-width: 24px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border-radius: 999px;
    background: #fff1ed;
    color: #d96861;
    font-size: 12px;
}

.client-surface .md-tabs a.active {
    background: linear-gradient(135deg, #ff7780, #ff9a9f);
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.28);
}

.client-surface .md-tabs a.active b {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.client-surface .sort-bar {
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 16px;
}

.client-surface .sort-bar a {
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid rgba(238, 202, 190, .86);
    background: rgba(255, 255, 255, .72);
    color: #5b3c33;
    box-shadow: 0 8px 20px rgba(160, 91, 75, .06);
}

.client-surface .sort-bar a.active {
    background: #fff;
    color: #ff6f78;
    border-color: rgba(255, 145, 150, .55);
}

.client-surface .order-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.client-surface .order-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    padding: 10px;
    border-radius: 22px;
    scroll-margin-top: 120px;
}

.client-surface .order-card.has-issue {
    border-color: rgba(255, 139, 114, .72);
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 248, 245, .92));
}

.client-surface .order-img {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.22 / 1;
    border-radius: 18px;
    border-color: rgba(237, 202, 176, .72);
    background: #fff7f3;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.client-surface .order-img img {
    object-fit: cover;
}

.client-surface .zoom-hint {
    right: 10px;
    bottom: 10px;
    background: rgba(78, 53, 42, .72);
    font-weight: 800;
}

.client-surface .issue-badge {
    top: 10px;
    left: 10px;
    background: #ff7b72;
    box-shadow: 0 6px 16px rgba(255, 102, 98, .22);
}

.client-surface .order-content {
    padding: 12px 4px 2px;
}

.client-surface .order-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.client-surface .order-head h2 {
    color: #2f1e19;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.client-surface .order-head p {
    color: #5f4037;
    font-size: 14px;
    font-weight: 800;
}

.client-surface .chip {
    width: fit-content;
    min-height: 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
}

.client-surface .chip-info {
    background: #eaf4ff;
    color: #34618d;
    border-color: #d6e9ff;
}

.client-surface .chip-success {
    background: #eaf8df;
    color: #3d7a35;
    border-color: #d7edc8;
}

.client-surface .chip-error {
    background: #fff0e4;
    color: #ef5f4c;
    border-color: #ffd5bd;
}

.client-surface .progress-line {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(242, 204, 185, .7);
    border-radius: 14px;
    background: #fff8f4;
    color: #7c5146;
    font-size: 13px;
    line-height: 1.45;
}

.client-surface .info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.client-surface .info-grid div {
    padding: 8px 10px;
    border: 1px solid rgba(242, 210, 196, .72);
    border-radius: 14px;
    background: rgba(255, 255, 255, .74);
}

.client-surface .info-grid span {
    color: #9a6b60;
    letter-spacing: 0;
}

.client-surface .info-grid b {
    color: #3c2822;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.client-surface .issue-note {
    border: 1px solid #ffd4ca;
    border-radius: 14px;
    background: #fff1ed;
    color: #9c392f;
}

.client-surface .actions {
    gap: 10px;
    margin-top: 12px;
}

.client-surface .order-actions {
    grid-template-columns: 1fr;
}

.client-surface .order-actions .issue-form {
    grid-template-columns: 1fr;
    gap: 8px;
}

.client-surface .issue-input,
.client-surface input,
.client-surface select {
    border-color: rgba(235, 198, 179, .92);
    background: rgba(255, 255, 255, .9);
    color: #3a241d;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.client-surface .issue-input::placeholder,
.client-surface input::placeholder {
    color: #b48a7e;
}

.client-surface button,
.client-surface .danger-btn,
.client-surface .filled-btn {
    background: linear-gradient(135deg, #ff747d, #ff9a9e);
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 118, 125, .22);
}

.client-surface .outlined-btn {
    border-color: rgba(255, 127, 134, .55);
    background: #fffafa;
    color: #ff6f78;
}

.client-surface .order-actions .outlined-btn[disabled] {
    border-color: rgba(229, 205, 193, .8);
    background: #fff8f4;
    color: #b39388;
    box-shadow: none;
}

.client-surface .empty-card {
    position: relative;
    overflow: hidden;
    padding: 28px 18px;
    border-radius: 24px;
}

.client-surface .copy-toast,
.client-surface .snackbar {
    background: #4c3029;
    color: #fff;
    box-shadow: 0 12px 24px rgba(76, 48, 41, .18);
}

.client-surface .image-modal-close {
    background: rgba(255,255,255,0.94);
    color: #3a241d;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.login-surface .login-page {
    min-height: 100vh;
    display: grid;
    align-items: center;
}

.client-surface .login-card {
    position: relative;
    overflow: hidden;
    max-width: 440px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 28px;
}

.client-surface .login-card h1 {
    color: #3b251f;
    font-size: 34px;
    font-weight: 900;
}

.client-surface .login-card label {
    color: #6f4a40;
}

.client-surface .login-card button {
    width: 100%;
}

.client-surface .remember-box {
    margin: 14px 0 4px;
}

.client-surface .remember-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: #6f4a40;
    font-weight: 800;
}

.client-surface .remember-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    padding: 0;
    border-radius: 4px;
    box-shadow: none;
    accent-color: #ff747d;
}

.client-surface .remember-help {
    margin: 4px 0 0 26px;
    color: #9a7569;
    font-size: 12px;
    line-height: 1.45;
}

.client-surface .clear-saved-btn {
    width: auto;
    min-height: 0;
    margin: 6px 0 0 26px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9a7569;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}

.client-surface .login-status {
    margin: 8px 0 0;
    font-size: 13px;
}

.client-surface .portal-grid {
    gap: 14px;
}

.client-surface .portal-card {
    min-height: 138px;
    border-radius: 24px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.client-surface .portal-card span {
    color: #5a3a31;
}

.client-surface .portal-card b {
    color: #ff6f78;
}

.client-surface .portal-card p {
    color: #8a665b;
}

.client-surface .portal-card.attention {
    border-color: rgba(255, 139, 114, .72);
    background: rgba(255, 248, 245, .92);
}

.client-surface .portal-card.attention b {
    color: #ff5f63;
}

@media (min-width: 760px) {
    .client-surface .order-img {
        aspect-ratio: 1.14 / 1;
    }

    .client-surface .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .client-surface .page {
        padding: 14px 12px 24px;
    }

    .client-hero {
        min-height: 96px;
        padding: 16px 0 18px;
    }

    .client-surface .shop-topbar h1 {
        font-size: 34px;
    }

    .client-surface .shop-topbar .muted {
        font-size: 16px;
    }

    .client-surface .customer-summary {
        padding: 14px;
    }

    .customer-avatar {
        width: 58px;
        height: 58px;
        font-size: 24px;
    }

    .client-surface .md-tabs {
        overflow-x: auto;
        grid-template-columns: repeat(4, minmax(92px, 1fr));
    }

    .client-surface .sort-bar {
        justify-content: stretch;
    }

    .client-surface .sort-bar a {
        flex: 1;
        justify-content: center;
        padding: 0 10px;
    }

    .client-surface .order-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .client-surface .order-card {
        padding: 9px;
        border-radius: 20px;
    }

    .client-surface .order-img {
        aspect-ratio: 1 / .86;
        border-radius: 16px;
    }
}

@media (max-width: 430px) {
    .client-surface .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        border-top: 0;
    }

    .client-surface .summary-cell {
        border: 1px solid rgba(236, 204, 181, .75);
        border-radius: 16px;
        background: rgba(255, 250, 247, .7);
    }

    .client-surface .summary-cell + .summary-cell {
        border-left: 1px solid rgba(236, 204, 181, .75);
    }

    .client-surface .order-list {
        grid-template-columns: 1fr;
    }

    .client-surface .order-img {
        aspect-ratio: 1.22 / 1;
    }

    .client-surface .shop-topbar h1 {
        font-size: 30px;
    }

    .client-surface .logout {
        min-height: 34px;
        padding: 0 12px;
        font-size: 13px;
    }

}

/* ===== 无单号商品认领 ===== */
.client-surface .claim-message {
    margin-bottom: 14px;
    border: 1px solid rgba(255, 144, 120, .65);
    background: #fff5ef;
    color: #8d4b3e;
    font-weight: 700;
}

.client-surface .claim-guide {
    margin-bottom: 16px;
}

.client-surface .claim-guide h2,
.client-surface .claim-history h2 {
    margin: 0 0 8px;
}

.client-surface .claim-guide p {
    margin: 6px 0;
    color: #7f5f55;
}

.client-surface .claim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.client-surface .claim-card {
    padding: 12px;
    border-radius: 24px;
}

.client-surface .claim-image {
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #f8eee9;
    box-shadow: none;
    aspect-ratio: 1.15 / 1;
}

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

.client-surface .claim-card-body {
    padding: 12px 4px 2px;
}

.client-surface .claim-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.client-surface .claim-card-head h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: .02em;
}

.client-surface .claim-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.client-surface .claim-form label {
    display: grid;
    gap: 6px;
    color: #6f4d43;
    font-size: 13px;
    font-weight: 700;
}

.client-surface .claim-form select,
.client-surface .claim-form input {
    width: 100%;
    min-height: 44px;
    border-radius: 13px;
    padding: 0 12px;
}

.client-surface .primary-btn {
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.client-surface .claim-history {
    margin-top: 18px;
}

.client-surface .claim-history-list {
    display: grid;
    gap: 8px;
}

.client-surface .claim-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(236, 204, 181, .7);
    border-radius: 14px;
    background: rgba(255, 250, 247, .72);
}

.client-surface .claim-history-row div {
    display: grid;
    gap: 3px;
}

.client-surface .claim-history-row span {
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .client-surface .claim-grid {
        grid-template-columns: 1fr;
    }

    .client-surface .claim-history-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===== 无单号认领：手机双列紧凑卡片 ===== */
.client-surface .claim-grid-pending {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.client-surface .claim-grid-pending .claim-image {
    aspect-ratio: 1 / 1;
}

.client-surface .claim-grid-pending .claim-form select {
    text-overflow: ellipsis;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-inline-actions form {
    margin: 0;
}

@media (max-width: 560px) {
    .client-surface .claim-grid-pending {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .client-surface .claim-grid-pending .claim-card {
        padding: 8px;
        border-radius: 18px;
        min-width: 0;
    }

    .client-surface .claim-grid-pending .claim-image {
        border-radius: 14px;
        aspect-ratio: 1 / 1;
    }

    .client-surface .claim-grid-pending .zoom-hint {
        right: 6px;
        bottom: 6px;
        padding: 3px 6px;
        font-size: 10px;
    }

    .client-surface .claim-grid-pending .claim-card-body {
        padding: 8px 1px 1px;
    }

    .client-surface .claim-grid-pending .claim-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .client-surface .claim-grid-pending .claim-card-head h2 {
        font-size: 15px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .client-surface .claim-grid-pending .claim-card-head .chip {
        min-height: 24px;
        padding: 3px 7px;
        font-size: 10px;
    }

    .client-surface .claim-grid-pending .claim-card-body > .muted {
        display: none;
    }

    .client-surface .claim-grid-pending .claim-form {
        gap: 7px;
        margin-top: 8px;
    }

    .client-surface .claim-grid-pending .claim-form label {
        gap: 4px;
        font-size: 11px;
        line-height: 1.3;
    }

    .client-surface .claim-grid-pending .claim-form select {
        min-height: 38px;
        padding: 0 8px;
        border-radius: 11px;
        font-size: 12px;
    }

    .client-surface .claim-grid-pending .primary-btn {
        min-height: 38px;
        padding: 0 8px;
        border-radius: 11px;
        font-size: 12px;
    }
}

/* 后台宽表与长商品名优化 */
.admin-page { max-width: 1680px; }
.product-management-card .table-wrap { overflow-x: auto; }
.product-management-card table { min-width: 1380px; table-layout: auto; }
.product-management-card th:nth-child(3),
.product-management-card td:nth-child(3),
.admin-product-name-cell { min-width: 360px; max-width: 620px; white-space: normal; word-break: normal; overflow-wrap: break-word; line-height: 1.45; }
.product-management-card th:nth-child(10), .product-management-card td:nth-child(10) { min-width: 220px; }
#surugaya-bulk .admin-upload { margin-top: 14px; }
#surugaya-bulk details, .admin-nt-recent { margin-top: 14px; }
@media (max-width: 760px) {
  .admin-product-name-cell { min-width: 240px; max-width: 360px; }
}


.admin-claim-correction {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #c6d6f3;
    border-radius: 16px;
    background: #f8fbff;
}
.admin-claim-correction h3 { margin: 0 0 6px; }
.admin-claim-correction .admin-filter { margin: 12px 0 0; }


/* ===== 后台模块化运营看板 ===== */
.admin-dashboard-section { margin-bottom: 16px; }
.dashboard-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 12px;
}
.dashboard-section-title h2 { margin: 0 0 4px; }
.dashboard-subsection-title { margin-top: 22px; }
.dashboard-primary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-action-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-card small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}
a.metric-card { color: inherit; text-decoration: none; }
a.metric-card:hover { border-color: #9bb7e8; background: #fbfdff; }
.metric-card-primary { min-height: 112px; }
.metric-card-primary b { font-size: 25px; }

.admin-module { padding: 0; overflow: hidden; }
.admin-module > summary { list-style: none; }
.admin-module > summary::-webkit-details-marker { display: none; }
.admin-module-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 16px 18px;
    cursor: pointer;
}
.admin-module-summary::after {
    content: "⌄";
    flex: 0 0 auto;
    color: #64748b;
    font-size: 20px;
    transition: transform .18s ease;
}
.admin-module[open] > .admin-module-summary::after { transform: rotate(180deg); }
.admin-module-summary > div:first-child { min-width: 0; flex: 1; }
.admin-module-summary h2 { margin: 0; font-size: 19px; }
.admin-module-summary p { margin: 4px 0 0; color: #64748b; font-size: 13px; line-height: 1.45; }
.admin-module-body { border-top: 1px solid #edf1f7; padding: 18px; }
.admin-module-muted { opacity: .8; }
.module-tabs { margin-bottom: 14px; }

.sales-month-filter { grid-template-columns: minmax(220px, 380px) auto; }
.operations-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.operations-metric {
    min-height: 96px;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    background: #fff;
    padding: 13px;
}
.operations-metric span { display: block; color: #65748b; font-size: 12px; font-weight: 800; }
.operations-metric b { display: block; margin-top: 8px; font-size: 21px; word-break: break-all; }
.operations-metric small { display: block; margin-top: 6px; color: #64748b; font-size: 12px; }
.operations-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.operations-layout-trend { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); }
.operations-panel {
    min-width: 0;
    border: 1px solid #e4e8ef;
    border-radius: 18px;
    background: #fff;
    padding: 16px;
}
.operations-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.operations-panel-title h3 { margin: 0; font-size: 17px; }
.operations-panel-title p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.sales-trend-chart { width: 100%; height: auto; display: block; }
.sales-trend-chart line { stroke: #e4e8ef; stroke-width: 1; }
.sales-trend-chart polygon { fill: #e8f1ff; }
.sales-trend-chart polyline { fill: none; stroke: #0b57d0; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sales-trend-chart text { fill: #64748b; font-size: 12px; }
.operations-comparison-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.operations-comparison-row > div,
.customer-structure-grid > div,
.data-health-grid > div {
    border-radius: 13px;
    background: #f6f8fb;
    padding: 10px;
}
.operations-comparison-row span,
.customer-structure-grid span,
.data-health-grid span { display: block; color: #65748b; font-size: 11px; font-weight: 700; }
.operations-comparison-row b,
.customer-structure-grid b,
.data-health-grid b { display: block; margin-top: 6px; font-size: 16px; }
.operations-comparison-row .positive b { color: #146c3c; }
.operations-comparison-row .negative b { color: #ba1a1a; }
.customer-structure-grid,
.data-health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.operations-rank-list { display: grid; gap: 13px; }
.operations-rank-row { min-width: 0; }
.operations-rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.operations-rank-head span { min-width: 0; overflow-wrap: anywhere; }
.operations-rank-head b { white-space: nowrap; }
.operations-rank-row small { display: block; margin-top: 5px; color: #64748b; font-size: 11px; }
.operations-bar { height: 10px; margin-top: 7px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.operations-bar i { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; background: #0b57d0; }
.compact-details { margin-top: 14px; border-top: 1px solid #edf1f7; padding-top: 12px; }
.compact-details > summary { cursor: pointer; color: #0b57d0; font-weight: 800; }
.compact-details .table-wrap { margin-top: 12px; }
.warning-details > summary { color: #ba1a1a; }
.data-health-panel { margin-top: 14px; }
.sales-daily-details { margin-bottom: 2px; }

@media (max-width: 1180px) {
    .dashboard-action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .operations-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .dashboard-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operations-layout,
    .operations-layout-trend { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .dashboard-section-title,
    .admin-module-summary,
    .operations-panel-title { align-items: flex-start; flex-direction: column; }
    .dashboard-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operations-comparison-row { grid-template-columns: 1fr; }
    .sales-month-filter { grid-template-columns: 1fr; }
    .admin-module-body { padding: 13px; }
}
