[hidden] { display: none !important; }

:root {
    --dtw-primary: #2563eb;
    --dtw-primary-dark: #1d4ed8;
    --dtw-success: #16a34a;
    --dtw-danger: #dc2626;
    --dtw-warning: #f59e0b;
    --dtw-bg: #f8fafc;
    --dtw-sidebar-bg: #1e293b;
    --dtw-sidebar-text: #cbd5e1;
    --dtw-sidebar-active: #3b82f6;
}

body {
    background: var(--dtw-bg);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 10;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

.login-footer a {
    color: inherit;
    text-decoration: none;
}

.login-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-footer-sep {
    margin: 0 6px;
    color: rgba(255, 255, 255, 0.4);
}

.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

@media (max-width: 480px), (max-height: 640px) {
    .login-page {
        flex-direction: column;
        padding: 24px 16px 12px;
    }

    .login-footer {
        position: static;
        margin-top: 18px;
        padding-bottom: 4px;
    }
}

.sidebar {
    background: var(--dtw-sidebar-bg);
    color: var(--dtw-sidebar-text);
    min-height: 100vh;
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar .nav-link {
    color: var(--dtw-sidebar-text);
    padding: 10px 20px;
    border-radius: 6px;
    margin: 2px 8px;
    font-size: 14px;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link.active {
    background: var(--dtw-sidebar-active);
    color: white;
}

.sidebar .nav-section {
    padding: 8px 20px 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.sidebar-brand {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-content {
    margin-left: 240px;
    padding: 20px;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
}

.topbar {
    background: white;
    padding: 12px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.card-stat {
    border: none;
    border-radius: 8px;
    transition: transform 0.15s;
}

.card-stat:hover {
    transform: translateY(-2px);
}

.table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.table-container .table {
    margin-bottom: 0;
}

.table-container .table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.table-container .table tbody td {
    vertical-align: middle;
    font-size: 14px;
}

.table-container .table tbody tr:hover {
    background: #f1f5f9;
}

.btn-action {
    padding: 4px 12px;
    font-size: 13px;
}

.badge-valid {
    background: #dcfce7;
    color: #166534;
}

.badge-invalid {
    background: #fee2e2;
    color: #991b1b;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h4 {
    font-weight: 700;
    color: #1e293b;
}

.query-bar {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}
body.sidebar-open {
    overflow: hidden;
}
@media (min-width: 769px) {
    .sidebar-overlay { display: none; }
    body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
    body.sidebar-collapsed .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 8px 0 24px rgba(15, 23, 42, .18);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Stock query */
.stock-page { background: #f6f8fb; }
.main-content.public-stock-page { margin-left: 0; }
.public-stock-topbar { background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%); }
.stock-summary-scope { margin: -0.25rem 0 0.75rem; font-size: .8rem; color: #92400e; font-weight: 600; }
.stock-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.stock-heading h4 { letter-spacing: -.02em; }
.stock-heading-hint { font-size: .8rem; color: #475569; background: #eef6ff; border: 1px solid #dbeafe; padding: .45rem .7rem; border-radius: 999px; white-space: nowrap; }
.stock-filter-card { border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 30px rgba(15,23,42,.04); margin-bottom: 1.25rem; }
.stock-filter-card .form-label { font-size: .78rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.stock-filter-card .form-control, .stock-filter-card .form-select, .stock-filter-card .input-group-text { border-color: #dbe3ee; }
.stock-filter-card .form-control:focus, .stock-filter-card .form-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.stock-more-select { max-width: 8.5rem; flex: 0 0 8.5rem; }
.stock-image-switch .form-check-input:checked { background-color: var(--dtw-primary); border-color: var(--dtw-primary); }
.stock-summary { margin-bottom: 1.25rem; }
.stock-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem 1.1rem; height: 100%; display: flex; align-items: baseline; gap: .45rem; box-shadow: 0 6px 18px rgba(15,23,42,.03); }
.stock-stat-label { color: #64748b; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stock-stat-value { font-size: 1.6rem; font-weight: 700; color: #0f172a; line-height: 1; font-variant-numeric: tabular-nums; }
.stock-stat-unit { color: #94a3b8; font-size: .8rem; }
.stock-stat-accent { background: linear-gradient(135deg, #eff6ff, #fff); border-color: #bfdbfe; }
.stock-stat-accent .stock-stat-value { color: #1d4ed8; }
.stock-loading { display: flex; align-items: center; gap: .5rem; color: #475569; padding: 1rem 0; }
.stock-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 3.5rem 1rem; text-align: center; margin-top: 1rem; }
.stock-empty-icon { width: 3rem; height: 3rem; border-radius: 1rem; background: #eff6ff; color: #2563eb; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: .8rem; }
.stock-shop-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 10px 28px rgba(15,23,42,.04); margin-bottom: 1.25rem; overflow: hidden; }
.stock-shop-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: linear-gradient(180deg, #f8fafc, #fff); border-bottom: 1px solid #e2e8f0; }
.stock-shop-icon { width: 2rem; height: 2rem; border-radius: .65rem; background: #eff6ff; color: #2563eb; display: inline-flex; align-items: center; justify-content: center; }
.stock-shop-totals { display: flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
.stock-shop-total-label { color: #64748b; font-size: .78rem; }
.stock-divider { width: 1px; height: 1.1rem; background: #e2e8f0; display: inline-block; }
.stock-size-group { padding: 0 1.2rem 1rem; }
.stock-group-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0 .6rem; }
.stock-group-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #2563eb; display: inline-block; }
.stock-matrix-wrap { border: 1px solid #e2e8f0; border-radius: 10px; max-height: 65vh; }
.stock-matrix { margin: 0; --bs-table-bg: transparent; }
.stock-matrix thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; border-bottom: 1px solid #e2e8f0; color: #64748b; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; padding: .65rem .7rem; }
.stock-matrix tbody td { padding: .65rem .7rem; border-color: #f1f5f9; font-size: .86rem; white-space: nowrap; }
.stock-matrix tbody tr:hover { background: #f8fbff; }
.stock-matrix tfoot td { background: #f8fafc; font-weight: 600; border-top: 1px solid #e2e8f0; padding: .65rem .7rem; }
.stock-matrix .size-col { text-align: center; min-width: 3.2rem; }
.stock-brand { font-weight: 600; color: #334155; }
.stock-item-no { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #475569; }
.stock-price { color: #475569; font-variant-numeric: tabular-nums; }
.stock-total { font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; }
.stock-qty { display: inline-flex; min-width: 2rem; justify-content: center; padding: .12rem .45rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-weight: 700; font-size: .78rem; font-variant-numeric: tabular-nums; }
.stock-qty.zero { background: transparent; color: #cbd5e1; font-weight: 400; }
.stock-qty.low { background: #fff7ed; color: #c2410c; }
.stock-image-cell { width: 3.6rem; }
.stock-thumb { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: .5rem; border: 1px solid #e2e8f0; background: #f8fafc; }
.stock-subtotal-label { color: #64748b; font-size: .78rem; }
.stock-grand-total { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 1rem 1.2rem; margin-top: .5rem; }
.stock-grand-title { font-weight: 700; color: #fff; }
.stock-grand-total .text-muted { color: #cbd5e1 !important; }
.stock-grand-total .btn-outline-primary { color: #dbeafe; border-color: #3b82f6; }
.stock-grand-total .btn-outline-primary:hover { background: #1d4ed8; color: #fff; }
@media (max-width: 991.98px) {
    .stock-heading { align-items: flex-start; flex-direction: column; }
    .stock-heading-hint { white-space: normal; }
    .stock-shop-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) {
    .stock-stat { flex-wrap: wrap; row-gap: .15rem; }
    .stock-stat-label { flex: 0 0 100%; }
    .stock-stat-value { font-size: 1.25rem; }
    .stock-size-group { padding: 0 .75rem .85rem; }
    .stock-shop-header { padding: .85rem .9rem; }
}
@media print {
    .sidebar, .topbar, .stock-filter-card, .stock-summary, .stock-heading-hint, .toast-container, .stock-grand-total .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .stock-shop-card { break-inside: avoid; box-shadow: none; }
    .stock-matrix-wrap { max-height: none; overflow: visible; }
}


/* Sales reports */
.sales-page { background: #f6f8fb; }
.sales-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.sales-heading h4 { letter-spacing: -.02em; }
.sales-heading .btn { white-space: nowrap; flex-shrink: 0; }
.sales-heading > .d-flex { flex-shrink: 0; }
.report-stats-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.report-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: .85rem .95rem; box-shadow: 0 6px 18px rgba(15,23,42,.03); min-width: 0; }
.report-stat-label { display: block; color: #64748b; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; white-space: nowrap; }
.report-stat-value { display: inline; color: #0f172a; font-size: 1.15rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-stat-unit { color: #94a3b8; font-size: .75rem; margin-left: .2rem; }
.report-stat-accent { background: linear-gradient(135deg, #eff6ff, #fff); border-color: #bfdbfe; }
.report-stat-accent .report-stat-value { color: #1d4ed8; }
.report-tabs { display: flex; gap: .35rem; flex-wrap: wrap; border-bottom: 1px solid #e2e8f0; margin: 0 0 1rem; padding: 0; }
.report-tab { border: 0; background: transparent; color: #64748b; font-size: .86rem; font-weight: 600; padding: .65rem .9rem; border-bottom: 2px solid transparent; }
.report-tab:hover { color: #1d4ed8; background: #f8fafc; }
.report-tab.active { color: #1d4ed8; border-bottom-color: #2563eb; }
.report-panel { animation: reportFade .18s ease-out; }
.report-panel-note { color: #64748b; font-size: .8rem; margin: 0 0 .75rem; }
@keyframes reportFade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.report-table { margin: 0; background: #fff; }
.report-table thead th { background: #f8fafc; color: #64748b; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.report-table tbody td { border-color: #f1f5f9; font-size: .86rem; }
.report-table tfoot td { background: #f8fafc; border-top: 1px solid #e2e8f0; }
.report-total-row td { font-weight: 700; background: #f8fafc; }
.report-date-header { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .7rem 1rem; margin: .25rem 0 .75rem; }
.report-date-header strong { color: #fff; }
.report-date-header .text-muted { color: #cbd5e1 !important; }
.report-shop-card { margin-bottom: 1rem; }
.report-brand-block { padding: 0 1.2rem 1rem; }
.report-brand-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .8rem 0 .55rem; }
.report-brand-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #2563eb; display: inline-block; }
.report-brand-totals { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .78rem; font-variant-numeric: tabular-nums; }
.report-matrix-wrap { max-height: 55vh; }
.report-shop-card .table-container { border: 0; }
.report-shop-card .table { margin-bottom: 0; }
.report-empty-panel { background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 3rem 1rem; text-align: center; }
@media (max-width: 1199.98px) { .report-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .sales-heading { align-items: flex-start; flex-direction: column; }
    .report-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-tab { flex: 1 0 auto; }
    .report-brand-block { padding: 0 .75rem .85rem; }
    .report-brand-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) { .report-stat-value { font-size: 1rem; } .report-tab { font-size: .8rem; } }
@media print {
    .sidebar, .topbar, .stock-filter-card, .sales-heading .btn, .report-tabs, .toast-container, .report-panel-note { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .sales-heading { display: block; }
    .report-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .report-stat { box-shadow: none; }
    .stock-shop-card, .report-brand-block { break-inside: avoid; }
    .stock-matrix-wrap, .report-matrix-wrap { max-height: none; overflow: visible; }
}





/* POS */
.pos-page { background: #f6f8fb; }
.pos-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.pos-heading h4 { letter-spacing: -.02em; }
.pos-card { border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 30px rgba(15,23,42,.04); height: 100%; }
.pos-card .card-header { border-radius: 14px 14px 0 0 !important; }
.pos-cart-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pos-cart-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.pos-draft-toggle { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos-draft-menu { min-width: 15rem; max-height: 18rem; overflow-y: auto; }
.pos-draft-item { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-draft-item.current { color: var(--dtw-primary); font-weight: 600; }
.pos-draft-empty { padding: .55rem .75rem; color: #94a3b8; font-size: .82rem; }
.pos-card .form-label { font-size: .78rem; font-weight: 600; color: #64748b; }
.pos-card .form-control, .pos-card .form-select, .pos-card .input-group-text { border-color: #dbe3ee; }
.pos-card .form-control:focus, .pos-card .form-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.pos-empty { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 2.5rem 1rem; text-align: center; color: #64748b; }
.pos-empty i { font-size: 1.8rem; color: #94a3b8; }
.pos-readonly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .9rem; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: .85rem .9rem; }
.pos-readonly-grid > div { min-width: 0; }
.pos-readonly-grid span { display: block; color: #94a3b8; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pos-readonly-grid strong { display: block; color: #334155; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.pos-line-error { color: #dc2626; font-size: .8rem; min-height: 1.2rem; margin-bottom: .15rem; visibility: hidden; }
.pos-line-error.show { visibility: visible; }
.pos-table { font-size: .84rem; }
.pos-table thead th { background: #f8fafc; color: #64748b; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.pos-table tbody td { border-color: #f1f5f9; vertical-align: middle; }
.pos-table tbody td, .pos-candidate-table tbody td { white-space: nowrap; }
.pos-candidate-table { font-size: .85rem; }
.pos-candidate-table thead th { background: #f8fafc; color: #64748b; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.pos-candidate-table tbody td { border-color: #f1f5f9; vertical-align: middle; }
.pos-candidate-table tbody tr:focus { outline: 2px solid #93c5fd; outline-offset: -2px; background: #f0f7ff; }
.pos-due { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; background: #0f172a; color: #cbd5e1; border-radius: 12px; padding: .9rem 1rem; }
.pos-due span { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pos-due strong { color: #fff; font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pos-pay-field { display: flex; align-items: center; gap: .35rem; flex-wrap: nowrap; }
.pos-pay-label { flex: 0 0 auto; margin: 0; color: #475569; font-size: .92rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pos-pay-full { flex: 0 0 auto; width: .85rem; height: .85rem; margin: 0; cursor: pointer; }
.pos-pay-full:checked { background-color: var(--dtw-primary); border-color: var(--dtw-primary); }
.pos-pay-field .pay-input { flex: 1 1 auto; min-width: 0; font-size: .9rem; }
.pos-payment-summary { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid #eef2f7; font-size: .92rem; color: #64748b; font-variant-numeric: tabular-nums; }
.pos-payment-summary strong { color: #0f172a; }
@media (max-width: 1199.98px) {
    .pos-heading { align-items: flex-start; flex-direction: column; }
    .pos-card { height: auto; }
}
@media (max-width: 575.98px) {
    .pos-readonly-grid { grid-template-columns: 1fr; }
    .pos-due strong { font-size: 1.3rem; }
    .pos-table, .pos-candidate-table { font-size: .78rem; }
}
@media print {
    .sidebar, .topbar, .toast-container, .pos-heading .badge { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .pos-card { box-shadow: none; break-inside: avoid; }
}

/* Stock taking */
.stock-taking-page { background: #f6f8fb; }
.stock-taking-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.stock-taking-heading h4 { letter-spacing: -.02em; }
.stock-taking-hint { font-size: .8rem; color: #475569; background: #eef6ff; border: 1px solid #dbeafe; padding: .45rem .7rem; border-radius: 999px; white-space: nowrap; }
.stock-taking-filter-card { border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 12px 30px rgba(15,23,42,.04); margin-bottom: 1rem; }
.stock-taking-filter-card .form-label { font-size: .78rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.stock-taking-filter-card .form-control, .stock-taking-filter-card .form-select { border-color: #dbe3ee; }
.stock-taking-summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: #64748b; font-size: .85rem; margin-bottom: .75rem; }
.stock-taking-summary strong { color: #0f172a; }
.stock-taking-loading { display: flex; align-items: center; gap: .5rem; color: #475569; padding: 1rem 0; }
.stock-taking-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 3rem 1rem; text-align: center; color: #64748b; margin-top: 1rem; }
.stock-taking-empty i { font-size: 1.8rem; color: #94a3b8; }
.stock-taking-table-card { border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 28px rgba(15,23,42,.04); }
.stock-taking-table { margin: 0; font-size: .85rem; }
.stock-taking-table thead th { background: #f8fafc; color: #64748b; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.stock-taking-table tbody td { border-color: #f1f5f9; vertical-align: middle; }
.stock-taking-sheet-num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #475569; white-space: nowrap; }
.stock-taking-link { border: 0; background: transparent; color: #2563eb; font-weight: 600; padding: 0; }
.stock-taking-link:hover { text-decoration: underline; }
.stock-taking-remarks { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; }
.stock-taking-actions { white-space: nowrap; }
.stock-taking-actions .btn { margin-right: .25rem; }
.stock-taking-drawer { width: min(560px, 100vw); }
.stock-taking-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .9rem; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: .85rem .9rem; }
.stock-taking-meta > div { min-width: 0; }
.stock-taking-meta span { display: block; color: #94a3b8; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stock-taking-meta strong { display: block; color: #334155; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.stock-taking-detail-table { font-size: .82rem; }
.stock-taking-detail-table thead th { background: #f8fafc; color: #64748b; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.stock-taking-detail-table tbody td { border-color: #f1f5f9; }
@media (max-width: 991.98px) {
    .stock-taking-heading { align-items: flex-start; flex-direction: column; }
    .stock-taking-hint { white-space: normal; }
}
@media (max-width: 575.98px) {
    .stock-taking-meta { grid-template-columns: 1fr; }
    .stock-taking-remarks { max-width: 9rem; }
}
@media print {
    .sidebar, .topbar, .stock-taking-filter-card, .stock-taking-hint, .toast-container, .stock-taking-actions { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .stock-taking-table-card { box-shadow: none; break-inside: avoid; }
}
