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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
    line-height: 1.5;
}

.main-header {
    padding: 22px 0 12px;
    text-align: center;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.main-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.page-container {
    width: min(1350px, 96%);
    margin: 24px auto 40px;
}

.panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.form-panel {
    padding: 24px 28px 28px;
    border: 1px solid #d1d5db;
}

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

.field {
    display: flex;
    flex-direction: column;
}

.field label {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.field select,
.field textarea {
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font-size: 1rem;
}

.field textarea {
    min-height: 120px;
    padding: 14px 16px;
}

.field input[type="date"],
.field input[type="time"] {
    padding-left: 14px;
    cursor: pointer;
    min-height: 50px;
    font-family: inherit;
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    width: 100%;
    padding-right: 62px;
}

.suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
}

.small-checkbox {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.small-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.98rem;
}

.small-checkbox input {
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: white;
}

.submit-button {
    margin-top: 18px;
    width: 180px;
}

.status-display {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}

.transfer-list {
    display: grid;
    gap: 10px;
}

.transfer-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.transfer-item small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}

.transfer-item-value {
    white-space: nowrap;
    font-weight: 600;
    color: #334155;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 600;
    min-height: 44px;
}

.button:hover {
    background: #1d4ed8;
}

.button.secondary {
    background: #e2e8f0;
    color: #111827;
}

.button.small {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.button.danger {
    background: #dc2626;
}

.button.edit {
    background: #10b981;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-item label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.filter-item input,
.filter-item input[type="date"],
.filter-item select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-family: inherit;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 12px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: unset;
}

thead {
    background: #2563eb;
    color: white;
}

thead th {
    padding: 10px 10px;
    text-align: left;
    font-size: 0.82rem;
    white-space: nowrap;
}

tbody td {
    padding: 8px 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #334155;
    vertical-align: top;
}

tbody td small {
    color: #64748b;
    font-size: 0.78rem;
}

tbody tr:hover {
    background: #f8fafc;
}

.empty-row {
    padding: 24px;
    text-align: center;
    color: #64748b;
}

.history-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 400;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 18px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
}

.summary-item strong {
    color: #111827;
}

.main-header {
    padding: 20px 0 8px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    width: min(1350px, 96%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    background: #f8fafc;
    border: 1px solid transparent;
    font-weight: 600;
}

.nav-link:hover {
    background: #eef2ff;
}

.nav-link.active {
    background: #2563eb;
    color: white;
    border-color: transparent;
}

.stats-controls {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}

.stats-controls .filter-item {
    display: flex;
    flex-direction: column;
}

.stats-controls label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.stats-controls select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #111827;
    font-size: 0.95rem;
    cursor: pointer;
}

.stats-controls select:hover {
    border-color: #94a3b8;
}

/* File input */
input[type="file"] {
    height: auto;
    min-height: 50px;
    padding: 10px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

input[type="file"]::file-selector-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
    transition: background 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    background: #1d4ed8;
}

.file-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 6px;
}

.form-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ============================================================
   Đăng nhập & Phân quyền (auth)
   ============================================================ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    color: #334155;
}

.user-chip .user-name {
    white-space: nowrap;
}

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

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

.role-badge.role-editor {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.role-viewer {
    background: #e2e8f0;
    color: #475569;
}

.user-menu .logout-link {
    color: #dc2626;
}

.user-menu .logout-link:hover {
    background: #fee2e2;
}

/* Viewer (chỉ xem): ẩn toàn bộ nút hành động */
.viewer-role .admin-only {
    display: none !important;
}

/* Mục kho (nhóm quản lý kho tách biệt) */
.inventory-tabs .section-tab {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.inventory-tabs .section-tab.active {
    background: #4f46e5;
    border-color: transparent;
    color: #fff;
}

.section-delete {
    align-self: center;
    color: #dc2626;
    font-weight: 700;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.section-delete:hover {
    background: #fee2e2;
}

/* Trang đăng nhập */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%, #eef2ff 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.login-card h1 {
    font-size: 1.5rem;
    margin: 0 0 4px;
    text-align: center;
}

.login-sub {
    text-align: center;
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.login-card .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.login-card label {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.login-card input {
    height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
}

.login-card input:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}

.login-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 16px;
}

/* Existing images in form */
.existing-images {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.keep-images-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    margin-bottom: 10px;
}

.keep-images-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.img-delete-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #dc2626;
    cursor: pointer;
    font-weight: 500;
}

.img-delete-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/* Product gallery grid in table */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gallery-thumb-sm {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-thumb-sm:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
    position: relative;
}

/* Zoom Modal */
.zoom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.zoom-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.zoom-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: -40px;
    right: -8px;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.zoom-close:hover {
    color: #94a3b8;
}

.zoom-actions {
    display: flex;
    gap: 12px;
}

/* Notification modal */
.notify-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.notify-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: notifySlideIn 0.3s ease;
}

@keyframes notifySlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.notify-header {
    padding: 24px 24px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.notify-header h2 {
    font-size: 1.3rem;
    color: #111827;
    margin: 0 0 4px;
}

.notify-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.notify-list {
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notify-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notify-item-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notify-name {
    font-size: 1rem;
    color: #111827;
}

.notify-phone {
    font-size: 0.85rem;
    color: #475569;
}

.notify-item-detail {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: #475569;
    flex-wrap: wrap;
}

.notify-freq {
    font-weight: 600;
    color: #1f2937;
}

.notify-remind {
    color: #2563eb;
    font-weight: 500;
}

.notify-promise {
    font-size: 0.82rem;
    color: #64748b;
    padding: 6px 10px;
    background: #fef3c7;
    border-radius: 8px;
    margin-top: 2px;
}

.notify-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: center;
}

/* Customer potential badges */
.potential-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.potential-very_high {
    background: #ede9fe;
    color: #5b21b6;
}

.potential-high {
    background: #dcfce7;
    color: #166534;
}

.potential-medium {
    background: #fef3c7;
    color: #92400e;
}

.potential-low {
    background: #fef2f2;
    color: #9f1239;
}

/* Car model tags */
.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.model-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.model-tag:hover {
    background: #2563eb;
    color: white;
}

.model-tag-highlight {
    background: #2563eb;
    color: white;
    box-shadow: 0 0 0 2px #bfdbfe;
}

/* Product management */
.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: block;
}

.no-image {
    color: #94a3b8;
    font-size: 1.2rem;
}

.profit-positive {
    color: #10b981;
    font-weight: 600;
}

.profit-negative {
    color: #dc2626;
    font-weight: 600;
}

.image-preview {
    margin-top: 8px;
}

.image-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    object-fit: cover;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

/* Inventory management */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1180px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

.inventory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
}

.inventory-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.inventory-tab:hover {
    background: #f8fafc;
    color: #1f2937;
}

.inventory-tab.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 16px;
    text-align: center;
}

.summary-card.warning {
    background: #fef2f2;
    border-color: #fecaca;
}

.summary-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.summary-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.summary-card-value small {
    font-size: 0.8rem;
    color: #64748b;
}

.panel-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.inline-form {
    display: flex;
    gap: 8px;
}

.inline-form input[type="text"] {
    height: 40px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.9rem;
    min-width: 180px;
}

.product-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.product-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-row select {
    flex: 1;
    min-width: 220px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.qty-input {
    width: 90px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.price-input {
    flex: 1;
    min-width: 150px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.remove-row {
    padding: 6px 10px;
    min-height: 36px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.total-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}

.total-field label {
    margin: 0;
    font-size: 1rem;
}

.total-field span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2563eb;
}

.form-success {
    background: #f0fdf4;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 0.95rem;
}

.badge-gray {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #64748b;
}

.badge-green {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.badge-red {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fef2f2;
    color: #dc2626;
}

.stock-positive {
    color: #166534;
    font-weight: 600;
}

.stock-zero {
    color: #94a3b8;
}

.stock-total {
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
}

.debt-amount {
    color: #dc2626;
    font-weight: 700;
}

/* Dashboard (Trang chủ) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
    border-color: #2563eb;
}

.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.dashboard-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.dashboard-count {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 14px;
}

.dashboard-action {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
}

@media (max-width: 1180px) {
    .filter-row,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .summary-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .page-container {
        width: 95%;
    }

    .button,
    .filter-actions {
        width: 100%;
    }

    .filter-actions {
        flex-direction: column;
    }
}

/* ===== Stock table styling (sub warehouse inventory) ===== */
.stock-table-wrapper {
    margin-top: 12px;
}

.stock-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.stock-table thead th {
    background: #f1f5f9;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.stock-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.stock-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.stock-qty {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.stock-qty.stock-positive {
    color: #166534;
    background: #dcfce7;
    border-radius: 8px;
    padding: 6px 16px;
    display: inline-block;
    min-width: 60px;
}

.stock-qty.stock-zero {
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 6px 16px;
    display: inline-block;
    min-width: 60px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}

.pagination a:hover {
    background: #eef2ff;
    color: #2563eb;
    border-color: #93c5fd;
}

.pagination .current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination .disabled {
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: default;
}

.pagination .disabled:hover {
    background: #f1f5f9;
    color: #94a3b8;
}

.pagination .ellipsis {
    color: #94a3b8;
    cursor: default;
    border: none;
    background: transparent;
    min-width: 30px;
}

.pagination-info {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 8px;
}
