:root {
    --app-bg: #f5f7fb;
    --sidebar: #172033;
    --sidebar-active: #2f7cf6;
    --border: #e6eaf2;
    --text: #202938;
    --muted: #667085;
}

* {
    box-sizing: border-box;
}

html,
body,
#app {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background: var(--app-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    overflow: hidden;
}

.login-page {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #eef4ff 0%, #f7fafc 45%, #f8fbf4 100%);
}

.login-panel {
    width: min(420px, 100%);
    padding: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(31, 41, 55, .12);
}

.login-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 650;
}

.login-subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 14px;
}

.captcha-row {
    display: flex;
    gap: 10px;
}

.captcha-row .el-input {
    flex: 1;
}

.captcha-img {
    width: 128px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
}

.admin-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 232px 1fr;
    grid-template-rows: 68px 1fr;
    overflow: hidden;
}

.sidebar {
    grid-row: 1 / span 2;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    color: #fff;
    overflow: hidden;
}

/* Two-level navigation: compact module rail + contextual submenu. */
.admin-shell {
    grid-template-columns: 258px 1fr;
    transition: grid-template-columns .18s ease;
}

.admin-shell.rail-only {
    grid-template-columns: 78px 1fr;
}

.sidebar {
    display: grid;
    grid-template-columns: 78px 180px;
    background: transparent;
    color: var(--text);
    overflow: visible;
}

.nav-rail {
    height: 100vh;
    background: #252a33;
    color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
}

.rail-logo {
    height: 68px;
    display: grid;
    place-items: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.rail-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
}

.rail-item {
    width: 100%;
    min-height: 66px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 2px;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.rail-item:hover { background: rgba(255,255,255,.07); }
.rail-item.active { background: #43bd88; }

.rail-icon {
    min-height: 22px;
    font-size: 22px;
    line-height: 22px;
}

.sub-sidebar {
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 14px rgba(31,45,61,.04);
    overflow: hidden;
}

.sub-brand {
    height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sub-brand strong {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.sub-brand span { color: var(--sidebar-active); font-size: 13px; }

.sub-menu {
    padding: 10px 0;
    overflow-y: auto;
    height: calc(100vh - 68px);
}

.sub-menu button {
    position: relative;
    width: 100%;
    min-height: 46px;
    padding: 10px 18px 10px 28px;
    border: 0;
    color: #4b5563;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.sub-menu button:hover { color: #20a66a; background: #f3fbf7; }
.sub-menu button.active { color: #20a66a; background: #eaf8f1; font-weight: 600; }

.sub-menu-dot {
    position: absolute;
    left: 16px;
    top: 21px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a8b0bc;
}

.sub-menu button.active .sub-menu-dot { background: #20a66a; }

.breadcrumb-home { margin-right: 8px; color: #6b7280; }
.breadcrumb-sep { margin: 0 9px; color: #c0c4cc; font-weight: 400; }

.brand {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 650;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #2f7cf6;
}

.sidebar .el-menu {
    flex: 1;
    border-right: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 17px;
    font-weight: 650;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content {
    min-width: 0;
    height: calc(100vh - 68px);
    padding: 18px;
    overflow: auto;
}

.workspace {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

/* Unified column resizing for automatically managed tables on every page. */
.el-table[data-smart-auto] .el-table__header-wrapper th {
    position: relative;
}

.smart-auto-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    z-index: 8;
    width: 9px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
}

.smart-auto-resizer:hover,
.smart-column-resizing .smart-auto-resizer {
    border-right: 2px solid var(--sidebar-active);
}

.smart-column-resizing,
.smart-column-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    width: 100%;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.stat-card:hover {
    border-color: #9fc2fb;
    box-shadow: 0 8px 24px rgba(47, 124, 246, .08);
    transform: translateY(-1px);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.stat-value {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 650;
}

.stat-link {
    margin-top: 9px;
    color: var(--sidebar-active);
    font-size: 12px;
}

.dashboard-head,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-head {
    margin-bottom: 16px;
}

.dashboard-head h2,
.panel-head h3 {
    margin: 0;
}

.dashboard-head p,
.panel-head span {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-page > .el-alert {
    margin-bottom: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 14px;
}

.dashboard-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-filters .el-select {
    width: 104px;
}

.dashboard-echart {
    width: 100%;
    height: 320px;
    margin-top: 4px;
}

.trend-chart {
    height: 205px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 4px 0;
    border-bottom: 1px solid var(--border);
}

.trend-column {
    min-width: 0;
    flex: 1;
    text-align: center;
}

.trend-bars {
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.trend-bar {
    width: min(12px, 22%);
    min-width: 3px;
    border-radius: 3px 3px 0 0;
}

.trend-label {
    padding-top: 7px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
}

.trend-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.quick-grid button {
    min-height: 48px;
    color: var(--text);
    background: #f8faff;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
}

.quick-grid button:hover {
    color: var(--sidebar-active);
    border-color: #9fc2fb;
    background: #f2f7ff;
}

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.placeholder {
    min-height: 380px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px dashed #cfd7e6;
    border-radius: 8px;
    background: #fbfcff;
}

.goods-page {
    padding: 14px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-left .el-input {
    width: 280px;
}

.pager {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
}

.summary-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    color: var(--text);
    font-weight: 600;
}

.ledger-intro,
.ledger-summary,
.ledger-filter {
    display: flex;
    align-items: center;
}

.ledger-intro {
    justify-content: space-between;
    margin-bottom: 12px;
}

.ledger-intro h2 {
    margin: 0;
    font-size: 20px;
}

.ledger-intro p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.ledger-summary {
    gap: 12px;
    margin-bottom: 12px;
}

.ledger-summary > div {
    min-width: 145px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fbfcff;
}

.ledger-summary span,
.ledger-summary strong {
    display: block;
}

.ledger-summary span {
    color: var(--muted);
    font-size: 12px;
}

.ledger-summary strong {
    margin-top: 4px;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}

.ledger-in strong,
.qty-positive { color: #16a34a; }
.ledger-out strong,
.qty-negative { color: #dc2626; }
.ledger-summary .ledger-alert { border-color: #f5b8b8; background: #fff6f6; }
.ledger-summary .ledger-alert strong { color: #dc2626; }

.ledger-filter {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8faff;
}

.ledger-primary { color: var(--text); line-height: 20px; }
.ledger-secondary { color: var(--muted); font-size: 12px; line-height: 18px; }

.amount-chip {
    display: inline-block;
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
}

.bill-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bill-actions .el-button + .el-button {
    margin-left: 0;
}

.purchase-form-page {
    position: relative;
    min-height: calc(100vh - 94px);
    padding: 0;
    overflow: hidden;
}

.purchase-form-locked .purchase-meta,
.purchase-form-locked .purchase-lines,
.purchase-form-locked .purchase-settlement {
    pointer-events: none;
}

.purchase-form-locked .purchase-meta .el-input__wrapper,
.purchase-form-locked .purchase-meta .el-select__wrapper,
.purchase-form-locked .purchase-lines .el-input__wrapper,
.purchase-form-locked .purchase-lines .el-select__wrapper,
.purchase-form-locked .purchase-settlement .el-input__wrapper,
.purchase-form-locked .purchase-settlement .el-select__wrapper {
    background: #f7f8fa;
    box-shadow: 0 0 0 1px #e1e5eb inset;
}

.purchase-audit-stamp {
    position: absolute;
    right: 42px;
    bottom: 34px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 68px;
    color: #d9363e;
    border: 4px double #d9363e;
    border-radius: 5px;
    background: rgba(255, 255, 255, .88);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: 8px;
    line-height: 1;
    text-indent: 8px;
    transform: rotate(-4deg);
    pointer-events: none;
    user-select: none;
}

.purchase-audit-stamp:before,
.purchase-audit-stamp:after {
    position: absolute;
    content: '';
    border: 1px solid rgba(217, 54, 62, .55);
}

.purchase-audit-stamp:before { inset: 5px; }
.purchase-audit-stamp:after { inset: 9px; border-style: dashed; }

.purchase-form-head,
.purchase-meta,
.purchase-line-footer,
.purchase-settlement {
    display: flex;
    align-items: center;
}

.purchase-form-head {
    justify-content: space-between;
    height: 58px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}

.purchase-form-title {
    margin-left: 10px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
    font-size: 16px;
    font-weight: 650;
}

.purchase-meta {
    gap: 18px;
    padding: 14px 16px 4px;
}

.purchase-meta .el-form-item,
.purchase-settlement .el-form-item {
    margin-bottom: 10px;
}

.purchase-lines {
    margin: 0 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.purchase-lines > .el-table { border: 0; }
.smart-table{position:relative}.smart-table-tools{display:flex;justify-content:flex-end;margin:-4px 0 8px}.smart-table .el-table .cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.smart-table-setting{display:grid;grid-template-columns:28px 1fr auto;align-items:center;min-height:42px;padding:0 10px;border-bottom:1px solid #ebeef5}.smart-table-setting:hover{background:#f5f7fa}.smart-table-grip{cursor:grab;color:#909399;font-weight:700;letter-spacing:-3px}
.smart-auto-button{float:right;margin:0 0 8px 8px;padding:7px 13px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;color:#606266;cursor:pointer}.smart-auto-button:hover{border-color:#409eff;color:#409eff}.smart-auto-shade{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.42)}.smart-auto-panel{width:440px;max-height:80vh;padding:20px;border-radius:10px;background:#fff;box-shadow:0 12px 36px rgba(0,0,0,.2)}.smart-auto-panel h3{margin:0 0 6px}.smart-auto-panel>p{margin:0 0 14px;color:#909399;font-size:13px}.smart-auto-list{max-height:55vh;overflow:auto;border-top:1px solid #ebeef5}.smart-auto-row{display:grid;grid-template-columns:28px 1fr 74px 24px;align-items:center;min-height:42px;border-bottom:1px solid #ebeef5}.smart-auto-row .grip{cursor:grab;color:#909399}.smart-auto-row .width{width:68px;padding:5px;border:1px solid #dcdfe6;border-radius:4px}.smart-auto-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.smart-auto-footer button{padding:8px 15px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;cursor:pointer}.smart-auto-footer .primary{border-color:#409eff;background:#409eff;color:#fff}

.warehouse-select {
    width: 100%;
}

.warehouse-product-tip {
    display: block;
    color: #a8b0bc;
    font-size: 12px;
    text-align: center;
}

.stock-query-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #445267;
    cursor: pointer;
}

.stock-query-inline:hover {
    color: var(--primary);
}

.stock-search-icon {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.stock-search-icon:after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
    transform-origin: left center;
    content: '';
}

.stock-dialog-goods {
    margin-bottom: 14px;
}

.stock-dialog-total {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.purchase-line-footer {
    justify-content: flex-end;
    min-height: 48px;
    padding: 0 14px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.purchase-settlement {
    flex-wrap: wrap;
    gap: 0 18px;
    padding: 16px;
    background: #fbfcff;
    border-top: 1px solid var(--border);
}

.purchase-settlement .el-form-item {
    width: 245px;
}

.purchase-settlement .el-form-item__content > * { width: 100%; }
.purchase-settlement .purchase-note { width: 360px; }

.inline-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 10px;
}

.hr-schedule-scroll{overflow:auto;height:calc(100vh - 245px);border:1px solid #dfe5ec;border-radius:6px;background:#fff}.hr-schedule-table{border-collapse:separate;border-spacing:0;min-width:max-content;font-size:12px}.hr-schedule-table th,.hr-schedule-table td{width:92px;min-width:92px;height:58px;padding:6px;border-right:1px solid #e5eaf0;border-bottom:1px solid #e5eaf0;text-align:center;cursor:pointer}.hr-schedule-table th{height:44px;background:#f6f8fb;position:sticky;top:0;z-index:3;color:#526075}.hr-schedule-table th small{display:block;color:#9aa4b2}.hr-schedule-table .hr-fixed{position:sticky;left:0;z-index:2}.hr-schedule-table th.hr-fixed{z-index:4}.hr-schedule-table .hr-name{width:175px;min-width:175px;background:#fff;text-align:left;cursor:default}.hr-schedule-table .hr-name strong,.hr-schedule-table .hr-name small{display:block}.hr-schedule-table .hr-name small{margin-top:4px;color:#8a94a3}.hr-cell.is-missing{background:#fff0f0;color:#d95454}.hr-cell.is-rest{background:#edf1f5;color:#667487}.hr-cell.is-leave{background:#fff4d9;color:#ad7515}.hr-cell.is-cross{background:#e7f2ff;color:#2870b8}.hr-cell.is-work{background:#fff8d8;color:#5a4b12}.hr-cell.is-selected{box-shadow:inset 0 0 0 3px #409eff!important;background:#dcecff!important;color:#185ca8!important}

.goods-form {
    padding-right: 8px;
}

.goods-editor-dialog .el-dialog__body {
    min-height: 560px;
    padding-top: 8px;
}

.goods-editor-tabs > .el-tabs__header {
    margin-bottom: 20px;
}

.goods-editor-tabs .el-tabs__item {
    height: 48px;
    padding: 0 24px;
    font-size: 16px;
}

.goods-unit-control {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
}

.goods-unit-control .el-select {
    flex: 1;
}

.goods-multi-unit-check {
    flex: 0 0 auto;
    margin-right: 0;
}

.unit-price-pane {
    padding-top: 2px;
}

.unit-price-pane .el-table th.el-table__cell {
    height: 50px;
    color: #5f6b7a;
    background: #f8fafc;
}

.unit-price-pane .el-table td.el-table__cell {
    padding: 10px 0;
}

.unit-price-pane .el-input-number .el-input__inner {
    text-align: left;
}

.unit-price-add {
    font-size: 20px;
    color: #606266;
}

.warehouse-warning-pane {
    padding: 10px 4px 0;
}

.warehouse-warning-rules {
    margin-top: 22px;
}

.warehouse-warning-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.customer-page {
    overflow: auto;
    padding: 26px 30px 24px;
    background: #f4f7fb;
}

.customer-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.customer-page-head h2 {
    margin: 3px 0 5px;
    color: #172033;
    font-size: 26px;
    line-height: 36px;
}

.customer-page-head p {
    margin: 0;
    color: #8490a3;
    font-size: 13px;
}

.customer-eyebrow {
    color: #409eff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.customer-add-icon {
    margin-right: 5px;
    font-size: 18px;
}

.customer-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.customer-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 108px;
    padding: 18px 20px;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31, 45, 61, .04);
}

.customer-summary-card:after {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: #409eff;
    content: "";
}

.customer-summary-card span,
.customer-summary-card small {
    display: block;
    color: #8a96a8;
    font-size: 12px;
}

.customer-summary-card strong {
    display: block;
    margin: 8px 0 4px;
    color: #1b2738;
    font-size: 25px;
    line-height: 30px;
}

.customer-summary-success:after { background: #26b887; }
.customer-summary-muted:after { background: #a2abba; }
.customer-summary-money:after { background: #8a6de9; }

.customer-panel {
    overflow: hidden;
    border: 1px solid #e3e9f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(31, 45, 61, .04);
}

.customer-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #edf0f5;
}

.customer-search,
.customer-batch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-search .el-input { width: 310px; }
.customer-search .el-select { width: 130px; }
.customer-batch span { color: #409eff; font-size: 12px; }

.customer-table {
    --el-table-border-color: #edf0f5;
    --el-table-header-bg-color: #f8fafc;
    --el-table-row-hover-bg-color: #f6faff;
}

.customer-table th.el-table__cell {
    height: 48px;
    color: #68758a;
    font-weight: 600;
}

.customer-table td.el-table__cell { padding: 12px 0; }

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.customer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #2878d0;
    background: #eaf4ff;
    font-weight: 700;
}

.customer-name-cell strong,
.customer-name-cell small,
.customer-contact-cell strong,
.customer-contact-cell small {
    display: block;
}

.customer-name-cell strong,
.customer-contact-cell strong {
    color: #253044;
    font-size: 13px;
}

.customer-name-cell small,
.customer-contact-cell small {
    margin-top: 3px;
    color: #9aa4b3;
    font-size: 11px;
}

.customer-category {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 12px;
    color: #59677a;
    background: #f0f3f7;
    font-size: 12px;
}

.customer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.customer-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.customer-status.is-enabled { color: #21a675; }
.customer-status.is-disabled { color: #98a1ae; }
.customer-balance-positive { color: #e66a56; }

.customer-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #8b96a7;
    font-size: 12px;
}

.customer-editor-dialog .el-dialog__body {
    min-height: 470px;
    padding-top: 4px;
}

.customer-editor-tabs .el-tabs__item {
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
}

.customer-link-head,
.customer-link-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-link-head {
    margin-bottom: 12px;
}

.customer-link-head strong,
.customer-link-head span {
    display: block;
}

.customer-link-head span {
    margin-top: 3px;
    color: #9099a8;
    font-size: 12px;
}

.customer-link-list {
    max-height: 390px;
    overflow: auto;
}

.customer-link-card {
    margin-bottom: 12px;
    padding: 14px 16px 16px;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    background: #fafbfd;
}

.customer-link-card-head {
    margin-bottom: 12px;
}

.customer-link-card .el-col {
    margin-bottom: 12px;
}

.goods-head-actions {
    display: flex;
    gap: 10px;
}

.goods-search .el-select:nth-child(1) { width: 250px; }
.goods-search .el-select:nth-child(2) { width: 175px; }
.goods-search .el-select:nth-child(3) { width: 125px; }

.goods-avatar {
    color: #7b55d8;
    background: #f0ebff;
}

.goods-modern-table .el-table__row td.el-table__cell {
    height: 62px;
}

.goods-stock-negative {
    color: #e45656;
}

.inventory-check-form-page {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 14px;
    background: #f4f6f9;
}

.inventory-check-form-head,
.inventory-check-meta-card,
.inventory-check-summary {
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    background: #fff;
}

.inventory-check-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.inventory-check-form-head h2 {
    display: inline-block;
    margin: 0 0 0 14px;
    color: #253247;
    font-size: 20px;
}

.inventory-check-form-head p {
    margin: 8px 0 0;
    color: #8993a4;
    font-size: 13px;
}

.inventory-check-head-actions {
    display: flex;
    gap: 8px;
}

.inventory-check-meta-card {
    padding: 16px 18px 2px;
}

.inventory-check-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.inventory-check-summary > div {
    min-width: 112px;
    padding: 8px 14px;
    border-radius: 6px;
    background: #f5f7fa;
}

.inventory-check-summary span {
    margin-right: 12px;
    color: #7c8798;
}

.inventory-check-summary strong {
    color: #263348;
    font-size: 18px;
}

.inventory-check-summary .profit {
    background: #edf9f2;
}

.inventory-check-summary .profit strong,
.inventory-check-profit {
    color: #2c9b5f;
    font-weight: 700;
}

.inventory-check-summary .loss {
    background: #fff1f0;
}

.inventory-check-summary .loss strong,
.inventory-check-loss {
    color: #e05252;
    font-weight: 700;
}

.inventory-check-even {
    color: #7d8795;
    font-weight: 600;
}

.inventory-check-search {
    width: 290px;
    margin-left: auto;
}

@media (max-width: 1200px) {
    .customer-summary {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .customer-filter {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 78px 1fr;
    }

    .admin-shell:not(.rail-only) {
        grid-template-columns: 238px 1fr;
    }

    .sidebar { grid-template-columns: 78px 160px; }

    .brand span,
    .sidebar-title {
        display: none;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-left,
    .toolbar-right {
        flex-wrap: wrap;
    }

    .toolbar-left .el-input {
        width: 100%;
    }

    .goods-form .el-col {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

.wb-page .customer-page-head { margin-bottom: 18px; }
.wb-summary .customer-summary-card { cursor: pointer; }
.wb-summary .customer-summary-card:hover { border-color: #409eff; transform: translateY(-1px); }
.wb-summary .customer-summary-danger strong { color: #f56c6c; }
.wb-page .el-card { border-radius: 10px; }

/* Attendance status colors */
.hr-cell.is-rest { background: #fff0f0; color: #e53935; font-weight: 600; }
.hr-cell.is-leave,
.hr-cell.is-personal-leave { background: #fff8d8; color: #c58a00; font-weight: 600; }
.hr-cell.is-sick-leave { background: #f4eaff; color: #8e44ad; font-weight: 600; }
.att-status-rest { color: #e53935; font-weight: 600; }
.att-status-late { color: #409eff; font-weight: 600; }
.att-status-early { color: #27ae60; font-weight: 600; }
.att-status-personal { color: #c58a00; font-weight: 600; }
.att-status-sick { color: #8e44ad; font-weight: 600; }
.att-status-leave { color: #c58a00; font-weight: 600; }
.att-status-business-trip { color: #7a4bb3; font-weight: 600; }
