/* ===== 全局变量 ===== */
:root {
    --primary: #1ab394;
    --primary-dark: #18a689;
    --header-bg: #1ab394;
    --sidebar-bg: #2f4050;
    --sidebar-hover: #293846;
    --sidebar-active: #19aa8d;
    --text-dark: #333;
    --text-muted: #888;
    --border: #e7eaec;
    --bg-light: #f3f3f4;
    --danger: #ed5565;
    --warning: #f8ac59;
    --info: #23c6c8;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== 登录页 ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 0 24px;
    text-align: center;
}

.login-box h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #81c995;
    letter-spacing: 0.5px;
}

.login-box .subtitle {
    font-size: 14px;
    color: #9aa0a6;
    margin-bottom: 36px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.login-form input:focus {
    border-color: #81c995;
    box-shadow: 0 0 0 2px rgba(129, 201, 149, 0.2);
}

.login-form input::placeholder { color: #bdc1c6; }

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f6368;
    cursor: pointer;
    margin: 8px 0 24px;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #81c995;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: #81c995;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}

.btn-login:hover {
    background: #6ab87d;
}

.login-error {
    background: #fce8e6;
    border: 1px solid #f5c6c2;
    color: #c5221f;
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: left;
}

/* ===== 后台布局 ===== */
.admin-body { background: var(--bg-light); }

.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--header-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.system-title {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.logout-link {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    transition: all .2s;
}

.logout-link:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 220px;
    height: calc(100vh - 56px);
    min-height: calc(100vh - 56px);
    background: var(--sidebar-bg);
    overflow-y: auto;
    transition: transform .3s;
    z-index: 900;
}

.sidebar-nav { padding: 12px 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #a7b1c2;
    font-size: 14px;
    transition: all .2s;
    border-left: 3px solid transparent;
}

.nav-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nav-item-icon-wrap {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-dot {
    position: absolute;
    top: -3px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    border: 1.5px solid #2f4050;
    box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.35);
    pointer-events: none;
}

.nav-dot.is-hidden {
    display: none;
}

.nav-item.active .nav-dot,
.nav-item:hover .nav-dot {
    border-color: #293846;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

/* ===== 主内容区 ===== */
.main-content {
    margin-left: 220px;
    margin-top: 56px;
    padding: 20px;
    min-height: calc(100vh - 56px);
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 500;
}

.card-body { padding: 20px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.4;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #da4453; }
.btn-default { background: #fff; color: var(--text-dark); border: 1px solid var(--border); }
.btn-default:hover { background: var(--bg-light); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th {
    background: #f5f5f6;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .col-no { width: 115px; }
.data-table .col-check { width: 42px; }
.data-table th.col-check,
.data-table td.col-check {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
}
.data-table .col-action { width: 100px; }
.data-table .col-action-wide { width: 130px; }
.data-table .col-money { width: 105px; }
.data-table .col-date { width: 95px; }
.data-table .col-name { width: 100px; }
.data-table .col-remark { white-space: normal; word-break: break-word; }

/* 仓库管理表格列宽 */
.data-table-warehouses {
    table-layout: fixed;
}

.data-table-warehouses col.col-check { width: 4%; }
.data-table-warehouses col.col-name { width: 24%; }
.data-table-warehouses col.col-qty { width: 11%; }
.data-table-warehouses col.col-warn { width: 12%; }
.data-table-warehouses col.col-action { width: 14%; }

.data-table-warehouses th,
.data-table-warehouses td {
    padding: 12px 18px;
}

.data-table-warehouses th.col-qty,
.data-table-warehouses td.col-qty-cell,
.data-table-warehouses td.text-right {
    padding-right: 24px;
}

.data-table-warehouses th.col-warn,
.data-table-warehouses td.col-warn-cell {
    padding-left: 20px;
    padding-right: 20px;
}

.data-table-warehouses th.col-action,
.data-table-warehouses td.actions {
    padding-left: 16px;
    padding-right: 16px;
}

.data-table-warehouses .warn-check-select {
    width: 80px;
    margin: 0 auto;
    display: block;
}

/* 产品详情页 */
.page-breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--primary);
}

.page-breadcrumb .sep {
    margin: 0 8px;
}

.product-detail-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.product-detail-main {
    flex: 1;
    min-width: 0;
}

.product-detail-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.product-detail-noimg {
    width: 120px;
    height: 120px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.product-detail-title {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--text-dark);
}

.product-detail-code {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 32px;
}

.product-detail-grid .label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.product-detail-grid .value {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.product-detail-grid .detail-full {
    grid-column: 1 / -1;
}

.product-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.filter-bar-inline {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-top: none;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.product-detail-filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

a.btn-action {
    text-decoration: none;
}

@media (max-width: 1200px) {
    .product-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .product-detail-header {
        flex-direction: column;
    }
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn .form-control {
    flex: 1;
}

.product-info-box {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.product-info-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.product-info-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.product-info-noimg {
    width: 72px;
    height: 72px;
    background: #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 20px;
    flex: 1;
}

.product-info-grid .label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.product-info-grid .value {
    font-size: 14px;
    color: var(--text);
}

.product-info-grid .stock-highlight {
    color: var(--primary);
    font-weight: 600;
}

.product-autocomplete {
    position: relative;
}

.product-ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 280px;
    overflow-y: auto;
}

.product-ac-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}

.product-ac-item:last-child {
    border-bottom: none;
}

.product-ac-item:hover,
.product-ac-item.active {
    background: #f0f7ff;
}

.product-ac-code {
    font-weight: 600;
    color: var(--text);
}

.product-ac-name {
    color: var(--text);
}

.product-ac-meta {
    font-size: 12px;
    color: var(--text-muted);
    width: 100%;
}

.product-ac-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.stock-io-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stock-io-add-row {
    align-items: flex-end;
    margin-bottom: 16px;
}

.stock-io-add-row .form-group-btn {
    flex: 0 0 auto;
}

.stock-batch-empty {
    padding: 24px 0;
}

.stock-batch-table {
    margin-bottom: 16px;
}

.stock-batch-table-out {
    table-layout: fixed;
    width: 100%;
}

.stock-batch-table-out col.w-col {
    width: calc(100% / 11);
}

.stock-batch-table-in {
    table-layout: fixed;
    width: 100%;
}

.stock-batch-table-in col.w-col {
    width: calc(100% / 9);
}

.stock-batch-table .cell-editable {
    cursor: pointer;
}

.stock-batch-table .cell-editable:hover {
    background: #e8f5f1;
}

.stock-batch-table .cell-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 13px;
}

.stock-batch-table .cell-edit-input.text-right {
    text-align: right;
}

.stock-batch-foot .stock-batch-summary td {
    background: #f5f5f6;
    font-weight: 600;
    border-top: 2px solid var(--border);
    padding: 12px 8px;
}

.stock-warn-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.stock-warn-tip {
    font-size: 13px;
    white-space: nowrap;
}

.stock-warn-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.warn-check-select {
    width: 72px;
    min-height: 32px;
    padding: 4px 8px;
}

.form-control-inline {
    width: 96px;
    min-height: 32px;
    padding: 4px 8px;
}

.data-table-stock-history {
    table-layout: fixed;
}

.data-table-stock-history .cell-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

/* 历史结算列表 */
.table-wrap-settlement-history {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table-settlement-history {
    table-layout: fixed;
    width: 100%;
    min-width: 1120px;
    font-size: 12px;
}

.data-table-settlement-history col.w-check { width: 34px; }
.data-table-settlement-history col.w-batch { width: 168px; }
.data-table-settlement-history col.w-designer-no { width: 86px; }
.data-table-settlement-history col.w-user { width: 78px; }
.data-table-settlement-history col.w-nickname { width: 78px; }
.data-table-settlement-history col.w-count { width: 56px; }
.data-table-settlement-history col.w-money { width: 72px; }
.data-table-settlement-history col.w-operator { width: 88px; }
.data-table-settlement-history col.w-remark { width: 96px; }
.data-table-settlement-history col.w-time { width: 148px; }
.data-table-settlement-history col.w-action { width: 108px; }

.data-table-settlement-history th,
.data-table-settlement-history td {
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.data-table-settlement-history th {
    font-size: 12px;
    font-weight: 600;
    padding: 9px 6px;
}

.data-table-settlement-history .batch-no {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0;
    white-space: nowrap;
}

.data-table-settlement-history .batch-no.order-no-link {
    color: var(--primary);
}

.data-table-settlement-history .batch-no.order-no-link:hover {
    color: var(--primary);
}

.data-table-settlement-history .settlement-remark-cell {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
    text-align: left;
    font-size: 12px;
}

.data-table-settlement-history .settlement-actual-amount {
    color: var(--danger);
    font-weight: 600;
}

.data-table-settlement-history td.actions {
    white-space: nowrap;
    overflow: visible;
}

.data-table-settlement-history td.actions .btn-action {
    padding: 4px;
}

.data-table-settlement-history td.actions .btn-action + .btn-action {
    margin-left: 2px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-in {
    background: #e8f8ef;
    color: #27ae60;
}

.badge-out {
    background: #fdecea;
    color: #e74c3c;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

.status-badge-default {
    background: #f0f0f0;
    color: #666;
}

.status-badge-success {
    background: #e8f8ef;
    color: #27ae60;
}

.status-badge-danger {
    background: #fdecea;
    color: #e74c3c;
}

.status-badge-warning {
    background: #fef5e7;
    color: #e67e22;
}

.status-badge-info {
    background: #e8f4fd;
    color: #3498db;
}

.status-badge-primary {
    background: #eefaf7;
    color: #1ab394;
}

.status-badge-clickable {
    cursor: pointer;
}

.status-switch {
    position: relative;
    display: inline-block;
}

.status-switch-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.status-switch-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 120px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 120;
    padding: 4px 0;
    text-align: left;
}

.status-switch.is-open .status-switch-menu:not(.is-fixed) {
    display: block;
}

.status-switch-menu.is-fixed {
    display: block;
}

.status-switch-option {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.status-switch-option:hover,
.status-switch-option.is-active {
    background: #1890ff;
    color: #fff;
}

.status-switch-option.status-option-warning { color: #e67e22; }
.status-switch-option.status-option-info { color: #3498db; }
.status-switch-option.status-option-success { color: #27ae60; }
.status-switch-option.status-option-danger { color: #e74c3c; }
.status-switch-option.status-option-default { color: #666; }

.status-switch-option.status-option-warning:hover,
.status-switch-option.status-option-info:hover,
.status-switch-option.status-option-success:hover,
.status-switch-option.status-option-danger:hover,
.status-switch-option.status-option-default:hover,
.status-switch-option.is-active {
    color: #fff;
}

.btn-link-qr {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link-qr:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .product-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 支出明细表（保留兼容） */
.data-table-expenses {
    table-layout: fixed;
}

.data-table-expenses .w-check { width: 42px; }
.data-table-expenses .w-no { width: 108px; }
.data-table-expenses .w-date { width: 88px; }
.data-table-expenses .w-summary { width: 16%; }
.data-table-expenses .w-type { width: 72px; }
.data-table-expenses .w-money { width: 96px; }
.data-table-expenses .w-dept { width: 72px; }
.data-table-expenses .w-budget-month { width: 80px; }
.data-table-expenses .w-account { width: 72px; }
.data-table-expenses .w-handler { width: 64px; }
.data-table-expenses .w-voucher { width: 72px; }
.data-table-expenses .w-remark { width: 12%; }
.data-table-expenses .w-action { width: 72px; }

.data-table-expenses th,
.data-table-expenses td {
    white-space: nowrap;
}

.data-table-expenses .cell-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

.data-table-expenses .expense-amount {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

/* 订单列表：舒适布局，重要列完整显示 */
.table-wrap-orders {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table-orders {
    table-layout: fixed;
    width: 100%;
    min-width: 1400px;
    font-size: 13px;
}

.data-table-orders col.col-check { width: 42px; }
.data-table-orders col.col-order-no { width: 148px; }
.data-table-orders col.col-user-info { width: 90px; }
.data-table-orders col.col-surname { width: 72px; }
.data-table-orders col.col-phone { width: 110px; }
.data-table-orders col.col-address { width: 140px; }
.data-table-orders col.col-date { width: 104px; }
.data-table-orders col.col-type { width: 96px; }
.data-table-orders col.col-commission { width: 84px; }
.data-table-orders col.col-designer { width: 96px; }
.data-table-orders col.col-cs { width: 84px; }
.data-table-orders col.col-status { width: 96px; }
.data-table-orders col.col-review { width: 96px; }
.data-table-orders col.col-settle { width: 96px; }
.data-table-orders col.col-remark { width: 100px; }
.data-table-orders col.col-report { width: 90px; }
.data-table-orders col.col-action { width: 120px; }

.data-table-orders th,
.data-table-orders td {
    padding: 11px 10px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table-orders th {
    font-size: 13px;
    font-weight: 600;
    padding: 12px 10px;
}

.data-table-orders th.col-check,
.data-table-orders td.col-check {
    overflow: visible;
    text-overflow: clip;
    padding-left: 10px;
    padding-right: 6px;
}

.data-table-orders td.col-order-no,
.data-table-orders td.col-designer,
.data-table-orders td.col-commission {
    overflow: visible;
    text-overflow: clip;
}

.data-table-orders td.actions {
    overflow: visible;
    padding-left: 6px;
    padding-right: 6px;
}

.data-table-orders .cell-ellipsis {
    max-width: none;
}

.data-table-orders .status-badge {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
    vertical-align: middle;
}

.data-table-orders .status-switch {
    max-width: 100%;
}

.data-table-orders .status-switch-trigger {
    max-width: 100%;
}

.data-table-orders .status-switch-trigger .status-badge {
    display: inline-block;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.data-table-orders .commission-amount {
    font-size: 13px;
}

.data-table-orders .order-no-link {
    display: inline-block;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.data-table-orders .btn-action {
    padding: 5px;
}

.data-table-orders .actions .btn-action + .btn-action {
    margin-left: 4px;
}

.data-table-orders .order-remark-cell {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
    text-align: left;
    font-size: 12px;
}

.data-table-designer-orders {
    table-layout: fixed;
    width: 100%;
    font-size: 13px;
}

.data-table-designer-orders col.col-check { width: 42px; }
.data-table-designer-orders col.col-order-no { width: 15%; }
.data-table-designer-orders col.col-surname { width: 7%; }
.data-table-designer-orders col.col-phone { width: 10%; }
.data-table-designer-orders col.col-address { width: 14%; }
.data-table-designer-orders col.col-date { width: 9%; }
.data-table-designer-orders col.col-type { width: 9%; }
.data-table-designer-orders col.col-commission { width: 8%; }
.data-table-designer-orders col.col-status { width: 10%; }
.data-table-designer-orders col.col-review { width: 10%; }
.data-table-designer-orders col.col-settle { width: 10%; }
.data-table-designer-orders col.col-remark { width: 11%; }
.data-table-designer-orders col.col-action { width: 110px; }

.data-table-designer-orders th,
.data-table-designer-orders td {
    padding: 11px 10px;
    text-align: center;
    vertical-align: middle;
}

.data-table-designer-orders th {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.data-table-designer-orders td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table-designer-orders th.col-check,
.data-table-designer-orders td.col-check,
.data-table-designer-orders td.actions {
    overflow: visible;
    text-overflow: clip;
}

.data-table-designer-orders .status-badge {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
}

.data-table-designer-orders .order-no-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table-designer-orders .cell-ellipsis {
    max-width: none;
}

.table-wrap-designers {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table-designers {
    table-layout: fixed;
    width: 100%;
    min-width: 1180px;
    font-size: 12px;
}

.data-table-designers col.col-check { width: 34px; }
.data-table-designers col.col-no { width: 86px; }
.data-table-designers col.col-user { width: 78px; }
.data-table-designers col.col-nickname { width: 78px; }
.data-table-designers col.col-stat { width: 58px; }
.data-table-designers col.col-status { width: 58px; }
.data-table-designers col.col-qr { width: 72px; }
.data-table-designers col.col-remark { width: 72px; }
.data-table-designers col.col-action { width: 100px; }

.data-table-designers th,
.data-table-designers td {
    padding: 7px 5px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table-designers th {
    font-size: 12px;
    font-weight: 600;
    overflow: visible;
    text-overflow: clip;
}

.data-table-designers td {
    overflow: visible;
    text-overflow: clip;
}

.data-table-designers .designer-no-cell {
    font-family: Consolas, Monaco, monospace;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.designer-no-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.designer-no-input-row .form-control {
    flex: 1;
}

.designer-no-input-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.data-table-designers .designer-remark-cell {
    white-space: normal;
    word-break: break-word;
    line-height: 1.45;
    text-align: left;
    font-size: 12px;
}

.data-table-designers .designer-remark-cell.is-empty {
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
    color: var(--text-muted);
}

.data-table-designers th.col-check,
.data-table-designers td.col-check,
.data-table-designers td.actions {
    overflow: visible;
}

.data-table-designers .status-badge {
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.45;
}

.data-table-designers .btn-link-qr {
    font-size: 12px;
    white-space: nowrap;
}

.data-table-designers td.actions {
    white-space: nowrap;
}

.data-table-designers td.actions .btn-action {
    padding: 4px;
}

.data-table-designers td.actions .btn-action + .btn-action {
    margin-left: 2px;
}

/* 配件管理表格 */
.table-wrap-parts {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table-parts {
    table-layout: fixed;
    width: 100%;
    min-width: 860px;
}

.data-table-parts col.col-check { width: 44px; }
.data-table-parts col.col-name { width: 18%; }
.data-table-parts col.col-model { width: 12%; }
.data-table-parts col.col-qty { width: 80px; }
.data-table-parts col.col-status { width: 90px; }
.data-table-parts col.col-remark { width: 16%; }
.data-table-parts col.col-datetime { width: 150px; }
.data-table-parts col.col-action { width: 110px; }

.data-table-parts th,
.data-table-parts td {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.data-table-parts th.col-check,
.data-table-parts td.col-check {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.data-table-parts td.col-datetime,
.data-table-parts th.col-datetime {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.data-table-parts .cell-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table-parts td.actions {
    white-space: nowrap;
}

.data-table-part-usage {
    table-layout: fixed;
    width: 100%;
    min-width: 680px;
}

.data-table-part-usage col.col-order-no { width: 26%; }
.data-table-part-usage col.col-designer { width: 14%; }
.data-table-part-usage col.col-qty { width: 70px; }
.data-table-part-usage col.col-status { width: 90px; }
.data-table-part-usage col.col-deduct { width: 80px; }
.data-table-part-usage col.col-datetime { width: 160px; }

.data-table-part-usage th,
.data-table-part-usage td {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.data-table-part-usage td.col-datetime,
.data-table-part-usage th.col-datetime {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.designer-portal .table-wrap-orders {
    overflow-x: auto;
}

.commission-amount {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

.fee-tip {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dashed rgba(231, 76, 60, 0.45);
}

/* 浮动批注挂在 body，避免表格 overflow 裁切 */
.fee-tip-float {
    position: fixed;
    z-index: 9999;
    min-width: 148px;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
    white-space: pre-line;
    text-align: left;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.fee-tip-float.is-show {
    opacity: 1;
    visibility: visible;
}

.order-no-link {
    color: var(--primary);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.order-no-link:hover {
    text-decoration: underline;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-list-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-list-item:first-child {
    padding-top: 0;
}

.detail-list-item .label {
    flex: 0 0 80px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.detail-list-item .value {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
    word-break: break-word;
}

.fee-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 20px;
}

.fee-inline-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 72px;
}

.fee-inline-item i {
    font-style: normal;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.fee-inline-item b {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

.designer-stats-readonly {
    margin-bottom: 8px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.designer-stats-readonly .designer-stats-tip {
    margin: 0 0 12px;
    font-size: 12px;
}

.form-control-static {
    min-height: 38px;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.data-table th.text-right,
.data-table td.text-right {
    text-align: right;
}

.data-table th.text-center,
.data-table td.text-center {
    text-align: center;
}

.data-table tbody tr:nth-child(even) { background: #fafafa; }
.data-table tbody tr:hover { background: #f0f9f7; }

/* 操作列勿对 td 使用 flex，否则会与行高错位出现多余横线 */
.data-table td.actions {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

.data-table td.actions .btn-action {
    display: inline-flex;
    vertical-align: middle;
}

.data-table td.actions .btn-action + .btn-action {
    margin-left: 6px;
}

.btn-action {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color .2s;
}

.btn-action:hover {
    color: var(--primary);
}

.btn-action.btn-action-danger:hover {
    color: var(--danger);
}

.system-logo {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    background: #fafafa;
}

.tab-nav-item {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .2s;
}

.tab-nav-item:hover {
    color: var(--primary);
}

.tab-nav-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
    background: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.form-stack .form-group {
    max-width: 520px;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 6px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.logo-preview {
    margin-top: 10px;
}

.logo-preview img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px;
    background: #fff;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--primary); }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
    color: var(--text-dark);
    background: #fff;
}

.pagination a:hover { background: var(--bg-light); border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: 0.5; pointer-events: none; }

/* ===== 表单 ===== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

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

.form-group label .required { color: var(--danger); }

.designer-combobox {
    position: relative;
}

.designer-combobox-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    z-index: 20;
}

.designer-combobox-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
}

.designer-combobox-item:hover,
.designer-combobox-item:focus {
    background: #f5f7fa;
    outline: none;
}

.dispatch-order-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
    transition: border-color .2s;
    background: #fff;
}

select.form-control,
select.form-control-select {
    appearance: auto;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    cursor: pointer;
    padding-right: 28px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,179,148,.15);
}

.form-control-readonly,
.form-control[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: #fff;
    border-radius: 6px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    transform: scale(0.94) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    will-change: transform, opacity;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal {
        transition: none;
    }
}

.modal-wide {
    max-width: 720px;
}

.budget-adjust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
}

@media (max-width: 640px) {
    .budget-adjust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 500; }

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-body { padding: 20px; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ===== 提示 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-success { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.alert-error { background: #f2dede; color: #a94442; border: 1px solid #ebccd1; }
.alert-warning { background: #fcf8e3; color: #8a6d3b; border: 1px solid #faebcc; }

/* ===== 首页/报表 统计卡片 ===== */
.metric-card-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 18px 16px;
    text-align: left;
    flex: 1 1 0;
    min-width: 0;
    box-shadow: none;
}

.metric-card-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #e67e22;
    line-height: 1.15;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.metric-card-sub {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-card-grid-home .metric-card-label {
    font-size: 12px;
}

.metric-card-grid-home .metric-card-value {
    font-size: 28px;
}

@media (max-width: 1200px) {
    .metric-card-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .metric-card {
        flex: 0 0 140px;
    }
    .metric-card-label,
    .metric-card-sub {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .metric-card-value {
        font-size: 24px;
    }
    .metric-card-grid-home .metric-card-value {
        font-size: 22px;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

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

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.stat-card.primary .stat-value { color: var(--primary); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.info .stat-value { color: var(--info); }
.stat-card.warning .stat-value { color: var(--warning); }

.stats-grid-home {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stats-grid-home-admin {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 12px;
}

.stats-grid-home-admin .stat-card {
    padding: 14px 10px;
}

.stats-grid-home-admin .stat-label {
    font-size: 12px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.stats-grid-home-admin .stat-value {
    font-size: 20px;
}

@media (max-width: 1400px) {
    .stats-grid-home-admin {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .stats-grid-home-admin .stat-card {
        flex: 1 0 120px;
        min-width: 120px;
    }
}

@media (max-width: 1200px) {
    .stats-grid-home {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .stats-grid-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-grid-home-admin .stat-card {
        flex: 0 0 110px;
        min-width: 110px;
    }
    .stats-grid-home-admin .stat-value {
        font-size: 18px;
    }
}

/* 首页公告 */
.home-notice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-notice-card {
    display: flex;
    flex-direction: column;
    min-height: 280px;
    cursor: default;
    transition: box-shadow .2s;
}

.home-notice-card[title] {
    cursor: pointer;
}

.home-notice-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.home-notice-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.home-notice-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.home-notice-edit-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    opacity: .7;
}

.home-notice-edit-btn:hover {
    opacity: 1;
}

.home-notice-card-body {
    flex: 1;
    padding: 16px;
    font-size: 13px;
    line-height: 1.8;
    color: #555;
}

.home-notice-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.home-notice-content {
    white-space: normal;
    word-break: break-word;
}

.home-notice-card-foot {
    padding: 10px 16px 14px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    min-height: 38px;
}

@media (max-width: 992px) {
    .home-notice-grid {
        grid-template-columns: 1fr;
    }
}

.chart-panel {
    padding: 16px 20px 8px;
    background: #fff;
    min-height: 220px;
}

.hbar-chart {
    display: block;
    width: 100%;
    min-height: 180px;
    background: #fff;
}

.chart-year-tag {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
}

/* ===== 财务报表页 ===== */
.report-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    background: #fff;
    padding: 14px 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-bottom: 3px solid #2c3e50;
    overflow-x: auto;
}

.report-top-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.report-top-title .report-icon {
    font-size: 24px;
    line-height: 1;
    color: #2c3e50;
}

.report-top-title h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.report-header {
    background: #fff;
    padding: 24px 30px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-bottom: 3px solid #2c3e50;
}

.report-header .report-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.report-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report-header .report-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.report-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
}

.report-layout-full {
    grid-template-columns: 1fr;
}

.finance-chart-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px 4px;
    min-height: 360px;
}

.finance-line-chart {
    width: 100%;
    height: 360px;
}

.finance-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    color: #999;
    font-size: 14px;
}

.report-main { min-width: 0; }

.type-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.type-summary-grid-finance {
    grid-template-columns: repeat(6, 1fr);
}

.finance-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.finance-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 8px 12px;
    min-width: 0;
}

.finance-stat-card-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.finance-stat-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.finance-stat-metric {
    text-align: center;
    min-width: 0;
}

.finance-stat-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finance-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.2;
    word-break: break-all;
}

.finance-stat-value.is-money {
    font-size: 16px;
}

.type-summary-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 8px;
    text-align: center;
}

.type-summary-item .type-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.type-summary-item .type-amount {
    font-size: 16px;
    font-weight: 600;
    color: #555;
}

.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-box {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.chart-box h4 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}

.chart-canvas { width: 100%; height: 200px; }

.report-sidebar .sidebar-stat {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.sidebar-stat .stat-label-bar {
    background: #5b7a9d;
    color: #fff;
    padding: 8px 14px;
    font-size: 12px;
    text-align: center;
}

.sidebar-stat .stat-value-box {
    padding: 14px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.sidebar-stat .stat-value-box-sm {
    font-size: 14px;
    padding: 12px 10px;
}

.expense-detail-table .data-table th {
    background: #5b7a9d;
    color: #fff;
    border-bottom: none;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.filter-bar-report {
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
}

.filter-bar-report label {
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
}

.filter-bar-report .form-control {
    width: auto;
    min-width: 118px;
    flex-shrink: 0;
}

.filter-bar-report .btn {
    flex-shrink: 0;
}

.period-filters {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.filter-bar label {
    font-size: 13px;
    color: var(--text-muted);
}

.filter-bar .form-control { width: auto; min-width: 140px; }

.order-list-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.order-list-bar .filter-bar {
    margin-bottom: 0;
    padding: 0;
    box-shadow: none;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 8px;
}

.order-list-bar .filter-bar-orders .form-control {
    min-width: 108px;
}

.order-list-bar .filter-bar-orders input[name="keyword"] {
    min-width: 160px;
    max-width: 200px;
}

.order-list-bar .filter-bar-designers .form-control {
    min-width: 108px;
}

.order-list-bar .filter-bar-designers input[name="keyword"] {
    min-width: 180px;
    max-width: 240px;
}

.order-list-bar .filter-bar-settlement-history .form-control {
    min-width: 108px;
}

.order-list-bar .filter-bar-settlement-history input[name="keyword"] {
    min-width: 180px;
    max-width: 220px;
}

.order-list-bar .filter-bar label {
    white-space: nowrap;
    flex-shrink: 0;
}

.order-list-bar .toolbar {
    margin-bottom: 0;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.toolbar-inline .btn {
    white-space: nowrap;
}

.voucher-link {
    color: var(--info);
    font-size: 12px;
}

.voucher-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    margin-top: 8px;
}

.data-report-total-row {
    background: #f8fafb;
}

.data-report-filter {
    padding: 16px 20px 0;
    margin-bottom: 0;
}

.data-report-product-filter .form-control[name="keyword"] {
    width: 160px;
    min-width: 140px;
}

.budget-section-head .data-report-product-filter {
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ===== 预算管理（遗留样式） ===== */
.budget-section { margin-bottom: 20px; }

.budget-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.budget-section-head h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.budget-section-head h3 small {
    font-weight: normal;
}

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

.budget-filter-form .form-control {
    width: auto;
    min-width: 120px;
}

.budget-filter-form .btn,
.budget-filter-form a.btn {
    white-space: nowrap;
}

.import-budget-tips {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.import-budget-tips p {
    margin: 0 0 6px;
}

.import-budget-tips code {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 11px;
}

.budget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: auto;
}

.budget-table th,
.budget-table td {
    border: 1px solid #e4e4e4;
    padding: 8px 6px;
    text-align: center;
    white-space: nowrap;
}

.budget-table thead th {
    background: #f7f7f7;
    font-weight: 600;
    color: #555;
}

.budget-row-label {
    background: #fafafa;
    font-weight: 600;
    text-align: left !important;
    padding-left: 12px !important;
    min-width: 64px;
}

.budget-num { font-weight: 500; }
.budget-expense { color: #e74c3c; }
.budget-income { color: #3498db; }
.budget-remain { color: #3498db; }
.budget-over { color: #e74c3c; font-weight: 600; }

.budget-input {
    width: 72px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
}

.budget-input:focus {
    outline: none;
    border-color: var(--primary);
}

.budget-footnote {
    font-size: 11px;
    color: var(--text-muted);
    padding: 10px 0 4px;
    line-height: 1.5;
}

.annual-budget-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.annual-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 480px;
}

.annual-input-row .form-control {
    flex: 1;
}

.budget-day-table th,
.budget-day-table td {
    min-width: 48px;
    font-size: 11px;
    padding: 6px 4px;
}

.budget-month-table .budget-input {
    width: 64px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .type-summary-grid { grid-template-columns: repeat(3, 1fr); }
    .type-summary-grid-finance { grid-template-columns: repeat(3, 1fr); }
    .finance-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .charts-row { grid-template-columns: 1fr; }
    .report-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .type-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .type-summary-grid-finance { grid-template-columns: repeat(2, 1fr); }
    .finance-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row { grid-template-columns: 1fr; }
}

/* ===== 出入库单据打印 ===== */
.stock-slip-body {
    background: #eef1f4;
    min-height: 100vh;
}

.stock-slip-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.stock-slip-sheet {
    position: relative;
    background: #fff;
    border: 1px solid #d9dee3;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 36px 40px 48px;
    overflow: hidden;
}

.stock-slip-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.04);
    transform: rotate(-24deg);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.stock-slip-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 18px;
    letter-spacing: 2px;
}

.stock-slip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 12px 0 18px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #ddd;
    margin-bottom: 18px;
    font-size: 13px;
}

.stock-slip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 18px;
}

.stock-slip-table th,
.stock-slip-table td {
    border: 1px solid #bbb;
    padding: 8px 10px;
}

.stock-slip-table thead th {
    background: #f3f3f3;
    font-weight: 600;
}

.stock-slip-remark {
    font-size: 13px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.stock-slip-signatures {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    font-size: 13px;
}

.stock-slip-sign-item {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.stock-slip-sign-line {
    flex: 1;
    border-bottom: 1px solid #333;
    min-width: 120px;
    height: 18px;
}

.stock-slip-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body.stock-slip-body {
        background: #fff;
    }

    .stock-slip-page {
        max-width: none;
        padding: 0;
        margin: 0;
    }

    .stock-slip-sheet {
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

/* ===== 用户管理权限 ===== */
.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 16px;
}

.permission-panel {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    max-height: 360px;
    overflow: auto;
}

.permission-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.permission-preset-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.permission-preset-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 4px;
}

.permission-group {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 4px;
}

.permission-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.permission-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px 12px;
    padding-left: 22px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: normal;
}

@media (max-width: 768px) {
    .user-form-grid {
        grid-template-columns: 1fr;
    }
}

.data-table-users {
    table-layout: fixed;
    width: 100%;
}

.data-table-users col.w-check { width: 42px; }
.data-table-users col.w-user { width: 14%; }
.data-table-users col.w-name { width: 12%; }
.data-table-users col.w-role { width: 12%; }
.data-table-users col.w-status { width: 8%; }
.data-table-users col.w-perm { width: 8%; }
.data-table-users col.w-date { width: 16%; }
.data-table-users col.w-action { width: 120px; }

.data-table-users th,
.data-table-users td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table-users td.actions {
    overflow: visible;
    white-space: nowrap;
}

.stock-breakdown-summary {
    margin: 0 0 12px;
    font-size: 13px;
}

.stock-breakdown-total td {
    background: #fafafa;
}

.stock-transfer-warehouses {
    align-items: flex-end;
    margin-bottom: 8px;
}

.stock-transfer-warehouses .form-group {
    flex: 1;
    min-width: 180px;
}

.stock-transfer-arrow {
    flex: 0 0 auto;
    width: auto;
}

.transfer-arrow-icon {
    height: 38px;
    line-height: 38px;
    font-size: 22px;
    color: var(--primary);
    text-align: center;
    padding: 0 8px;
}

.stock-transfer-tip {
    display: block;
    margin: 0 0 16px;
}

.slip-watermark-preview {
    margin-top: 12px;
    height: 120px;
    border: 1px dashed var(--border);
    border-radius: 4px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.slip-watermark-preview-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.06);
    transform: rotate(-24deg);
    white-space: nowrap;
    user-select: none;
}

.modal-settlement {
    max-width: 960px;
}

.modal-settlement-detail {
    max-width: 1080px;
}

.data-table-settlement-orders {
    table-layout: fixed;
    width: 100%;
}

.data-table-settlement-orders col.w-order-no { width: 130px; }
.data-table-settlement-orders col.w-surname { width: 72px; }
.data-table-settlement-orders col.w-phone { width: 110px; }
.data-table-settlement-orders col.w-address { width: 140px; }
.data-table-settlement-orders col.w-time { width: 130px; }
.data-table-settlement-orders col.w-type { width: 88px; }
.data-table-settlement-orders col.w-money { width: 72px; }
.data-table-settlement-orders col.w-cs { width: 72px; }
.data-table-settlement-orders col.w-status { width: 88px; }
.data-table-settlement-orders col.w-remark { width: 100px; }

.data-table-settlement-orders th,
.data-table-settlement-orders td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settlement-confirm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.settlement-orders-table {
    max-height: 320px;
    overflow: auto;
}

.settlement-confirm-side {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    background: #fafafa;
}

.settlement-side-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.settlement-qr-box {
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.settlement-qr-box img {
    max-width: 160px;
    max-height: 160px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
}

.settlement-amount-input {
    font-size: 18px;
    font-weight: 600;
    color: var(--danger);
    background: #f8f9fb;
    cursor: default;
}

.settlement-commission-cell {
    padding: 6px 8px !important;
    overflow: visible !important;
}

.settlement-commission-display {
    display: inline-block;
    min-width: 72px;
    max-width: 100%;
    padding: 4px 6px;
    font-size: 13px;
    text-align: right;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.settlement-commission-cell:hover .settlement-commission-display {
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px #c7d9f7;
}

.settlement-commission-input {
    width: 100%;
    min-width: 72px;
    max-width: 96px;
    margin-left: auto;
    padding: 4px 6px;
    font-size: 13px;
    text-align: right;
}

.settlement-batch-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settlement-batch-info {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 16px;
    background: #fff;
}

.settlement-batch-info-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.settlement-batch-info-row:last-child {
    border-bottom: none;
}

.settlement-batch-info-row .label {
    flex: 0 0 72px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.settlement-batch-info-row .value {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
    word-break: break-word;
}

.batch-no-inline {
    font-size: 13px;
    word-break: break-all;
}

.settlement-batch-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.settlement-batch-orders {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.modal-voucher {
    max-width: 720px;
}

.settlement-voucher-modal-body {
    text-align: center;
}

.settlement-voucher-view {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settlement-voucher-full {
    max-width: 100%;
    max-height: 70vh;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.settlement-voucher-thumb {
    max-width: 240px;
    max-height: 240px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.settlement-voucher-preview {
    margin-top: 8px;
}

.settlement-voucher-preview img {
    max-width: 100%;
    max-height: 120px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.btn-action-settle:hover {
    color: var(--success);
}

.btn-action-transfer:hover {
    color: var(--primary, #1a9b8e);
}

@media (max-width: 768px) {
    .settlement-confirm-layout {
        grid-template-columns: 1fr;
    }
}

.login-switch-link {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}

.login-switch-link a {
    color: var(--primary);
}

/* ===== 维修技师中心 ===== */
.designer-portal .designer-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    vertical-align: middle;
}

.designer-balance-pill {
    background: rgba(255,255,255,.95);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 12px;
}

.designer-main {
    padding: 20px;
}

.designer-alert-banner {
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #8a6d3b;
    background: #fcf8e3;
    border: 1px solid #faebcc;
    border-radius: 4px;
}

.designer-alert-banner a {
    color: var(--primary);
    font-weight: 600;
}

.designer-qr-hint {
    display: block;
    margin: 4px 0 8px;
}

.designer-qr-empty {
    margin: 8px 0 0;
    font-size: 13px;
}

.designer-home-card {
    overflow: hidden;
    margin-bottom: 20px;
}

.designer-home-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(90deg, #1c84c6, #1a7bb9);
    color: #fff;
}

.designer-home-card-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.designer-home-card-actions {
    display: flex;
    gap: 8px;
}

.designer-home-card-actions .btn-default {
    background: rgba(255,255,255,.9);
    border-color: transparent;
}

.designer-home-card-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 24px;
    align-items: center;
}

.designer-home-profile {
    text-align: center;
    border-right: 1px solid var(--border);
    padding-right: 24px;
}

.designer-home-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eef2f5;
    margin-bottom: 12px;
}

.designer-home-welcome {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.designer-home-meta {
    list-style: none;
    text-align: left;
}

.designer-home-meta li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
}

.designer-home-meta li span {
    color: var(--text-muted);
    flex-shrink: 0;
}

.designer-home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.designer-home-stats-plain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    align-self: center;
    width: 100%;
    gap: 24px 16px;
    padding: 8px 0;
}

.designer-stat-plain {
    text-align: center;
    min-width: 80px;
}

.designer-home-stats-plain .designer-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 4px;
}

.designer-home-stats-plain .designer-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.designer-stat-item {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
}

.designer-stat-item.highlight {
    background: #eefaf7;
    border-color: #b8e6dc;
}

.designer-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 6px;
}

.designer-stat-item.highlight .designer-stat-value {
    color: var(--primary);
    font-size: 22px;
}

.designer-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.designer-notice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.designer-notice-card .card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.designer-notice-card .card-header h3 {
    font-size: 15px;
    font-weight: 500;
}

.designer-notice-text p {
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.7;
}

.designer-recent-list {
    list-style: none;
}

.designer-recent-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.designer-recent-list .order-no {
    font-weight: 600;
    grid-column: 1;
}

.designer-recent-list .order-meta {
    color: var(--text-muted);
    grid-column: 1;
}

.designer-recent-list .order-status {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--primary);
    font-size: 12px;
}

.designer-more-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
}

.designer-finance-summary {
    margin-bottom: 16px;
}

.finance-stat-grid-designer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.designer-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.designer-tab {
    padding: 10px 20px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
}

.designer-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.designer-qr-preview {
    margin-top: 8px;
}

.designer-qr-preview img {
    max-width: 160px;
    max-height: 160px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.designer-view-modal .designer-view-basic {
    grid-template-columns: repeat(4, 1fr);
}

.designer-view-stats-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.designer-view-stats-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.designer-view-modal .designer-view-stats {
    grid-template-columns: repeat(5, 1fr);
}

.designer-view-extra {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.designer-view-row {
    margin-bottom: 16px;
}

.designer-view-row:last-child {
    margin-bottom: 0;
}

.designer-view-row .label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.designer-view-row .value {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .designer-view-modal .designer-view-basic {
        grid-template-columns: repeat(2, 1fr);
    }
    .designer-view-modal .designer-view-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.radio-inline-group label {
    margin-right: 16px;
    font-weight: normal;
}

@media (max-width: 992px) {
    .designer-home-card-body {
        grid-template-columns: 1fr;
    }
    .designer-home-profile {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 20px;
    }
    .designer-home-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .designer-home-stats-plain {
        justify-content: flex-start;
        gap: 20px 12px;
    }
    .designer-home-stats-plain .designer-stat-value {
        font-size: 22px;
    }
    .designer-notice-grid {
        grid-template-columns: 1fr;
    }
}