* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: #0b1730;
    color: #e6edf6;
    font-size: 14px;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 230px;
    background: #0f1f3d;
    padding: 20px;
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto;
    height: 100vh;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 20px;
    margin: 0 0 25px 0;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    color: #a8b3cf;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    background: #1c2f55;
    color: #fff;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    height: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    background: #0f1f3d;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.content {
    padding: 30px 60px;
    max-width: 1280px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.card {
    background: #14284d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card span {
    display: block;
    font-size: 13px;
    color: #9fb2d6;
    margin-bottom: 10px;
}

.card h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.card-split {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.metric-left {
    flex: 0 0 4ch;
    max-width: 4ch;
    text-align: left;
    margin: 0;
}

.metric-right {
    flex: 1;
    text-align: right;
    margin: 0;
}

.clickable-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

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

.table-wrapper {
    background: #14284d;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    color: #9fb2d6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
}

td {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
    vertical-align: middle;
}

tr:hover {
    background: rgba(255,255,255,0.03);
}

th[data-sort]::after {
    content: " ↕";
    font-size: 11px;
    color: #5c6f95;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-home {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.status-cancelled {
    background: rgba(255, 80, 80, 0.2);
    color: #ff7b7b;
}

.status-open {
    background: rgba(255, 200, 80, 0.2);
    color: #ffd580;
}

.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.status-completed {
    background: rgba(80, 255, 140, 0.2);
    color: #7bffb0;
}

.status-default {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.low-stock-danger {
    color: #ff7b7b !important;
    font-weight: 700;
}

.low-stock-safe {
    color: #86efac !important;
    font-weight: 700;
}

#lowStockCardLabel.low-stock-danger,
#lowStockCount.low-stock-danger {
    color: #ff7b7b !important;
}

#lowStockCardLabel.low-stock-safe,
#lowStockCount.low-stock-safe {
    color: #86efac !important;
}

#lowStockMenuLink.low-stock-danger {
    color: #ff7b7b !important;
    font-weight: 700;
}

#lowStockMenuLink.low-stock-safe {
    color: #86efac !important;
    font-weight: 700;
}

.low-stock-row {
    background: rgba(255, 80, 80, 0.08);
}

.low-stock-row td {
    color: #ff7b7b;
    font-weight: 600;
}

/* BUTTONS */
.primary-btn,
.secondary-btn,
.danger-btn,
.action-btn,
.icon-btn {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: 0.2s ease;
}

.primary-btn {
    background: #2563eb;
    color: #ffffff;
    padding: 10px 16px;
    font-weight: 600;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.secondary-btn {
    background: rgba(255,255,255,0.08);
    color: #e6edf6;
    padding: 10px 16px;
    font-weight: 600;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.14);
}

.danger-btn {
    background: #dc2626;
    color: #ffffff;
    padding: 10px 16px;
    font-weight: 600;
}

.danger-btn:hover {
    background: #b91c1c;
}

.action-btn {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.action-btn.edit-btn {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

.action-btn.edit-btn:hover {
    background: rgba(59, 130, 246, 0.28);
}

.action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.28);
}

.icon-btn {
    background: transparent;
    color: #cbd5e1;
    width: 36px;
    height: 36px;
    font-size: 24px;
    line-height: 1;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

/* MODAL */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    background: #14284d;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.06);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-card.modal-lg {
    max-width: 920px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    background: #14284d;
    position: sticky;
    bottom: 0;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    color: #9fb2d6;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: #0f1f3d;
    color: #e6edf6;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-group {
    justify-content: flex-end;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #e6edf6;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

@media (max-width: 1100px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content {
        padding: 24px 28px;
    }
}

@media (max-width: 700px) {
    .layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 18px;
    }

    .topbar {
        padding: 0 18px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal-card.modal-lg {
        max-width: 100%;
    }
}
body.modal-open {
    overflow: hidden;
}
.action-bar {
    display: flex;
    gap: 10px;
}

.action-bar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.offer-cell {
    position: relative;
}

.offer-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(80, 255, 140, 0.2);
    color: #7bffb0;
}

.offer-pill.inactive {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.offer-tooltip {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 8px);
    min-width: 220px;
    max-width: 260px;
    background: #0f1f3d;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    padding: 10px 12px;
    z-index: 99999;
    display: none;
    font-size: 12px;
    line-height: 1.5;
    color: #e6edf6;
    white-space: nowrap;
}

.offer-cell:hover .offer-tooltip {
    display: block;
}

.offer-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.offer-tooltip-label {
    color: #9fb2d6;
}
.offer-tooltip-header {
    margin-bottom: 6px;
}

.offer-tooltip-title {
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
}

.offer-tooltip-sku {
    font-size: 11px;
    color: #9fb2d6;
}

.offer-tooltip-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 0 8px;
}
.floating-offer-tooltip {
    position: fixed;
    display: none;
    min-width: 220px;
    max-width: 280px;
    background: #0f1f3d;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    padding: 10px 12px;
    z-index: 999999;
    font-size: 12px;
    line-height: 1.5;
    color: #e6edf6;
    pointer-events: none;
    white-space: nowrap;
}

.floating-offer-tooltip.show {
    display: block;
}

.floating-offer-tooltip .offer-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.floating-offer-tooltip .offer-tooltip-label {
    color: #9fb2d6;
    flex-shrink: 0;
}
#productsTable {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

#productsTable th,
#productsTable td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#productsTable th:last-child,
#productsTable td:last-child {
    border-right: none;
}

/* Sütun genişlikleri */
#productsTable th:nth-child(1),
#productsTable td:nth-child(1) {
    width: 38px;
    text-align: center;
}

#productsTable th:nth-child(2),
#productsTable td:nth-child(2) {
    width: 50px;
}

#productsTable th:nth-child(3),
#productsTable td:nth-child(3) {
    width: 180px;
}

#productsTable th:nth-child(4),
#productsTable td:nth-child(4) {
    width: 90px;
}

#productsTable th:nth-child(5),
#productsTable td:nth-child(5) {
    width: 140px;
}

#productsTable th:nth-child(6),
#productsTable td:nth-child(6),
#productsTable th:nth-child(7),
#productsTable td:nth-child(7) {
    width: 110px;
}

#productsTable th:nth-child(8),
#productsTable td:nth-child(8),
#productsTable th:nth-child(9),
#productsTable td:nth-child(9) {
    width: 90px;
}

#productsTable th:nth-child(10),
#productsTable td:nth-child(10) {
    width: 110px;
}
.secondary-btn.active {
    background-color: #2ecc71;
    color: #fff;
    border-color: #2ecc71;
}

.secondary-btn.active:hover {
    background-color: #27ae60;
}
.undo-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 9999;
}

.undo-toast button {
    background: transparent;
    color: #2ecc71;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/*.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.toolbar-input,
.toolbar-select {
    height: 38px;
}

.toolbar-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toolbar-button.secondary {
    cursor: pointer;
}*/
.filter-bar input,
.filter-bar select,
.filter-bar button {
    height: 42px;
    box-sizing: border-box;
}
.filter-bar input,
.filter-bar select {
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}
.filter-bar label {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
}
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reset-btn {
    margin-left: auto;
}
.filter-bar input,
.filter-bar select {
    background: #0f1c2e;
    color: #fff;
    border: 1px solid #2c3e50;
}

.filter-bar button {
    height: 42px;
    padding: 0 16px;
}
.filter-category-picker {
    position: relative;
    min-width: 220px;
}

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

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.toolbar-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.toolbar-input {
    width: 190px;
    height: 42px;
    box-sizing: border-box;
}

.filter-category-picker {
    position: relative;
    width: 210px;
    flex: 0 0 210px;
}

.filter-category-selected {
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.filter-category-selected::after {
    content: "▾";
    font-size: 12px;
    color: #4b5563;
    margin-left: 10px;
    flex-shrink: 0;
}

.filter-category-selected.active {
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77,163,255,0.12);
}

.toolbar-checkbox {
    height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toolbar-button.secondary {
    height: 42px;
    box-sizing: border-box;
}

.filter-category-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 480px;
    display: none;
    background: #112b57;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.35);
    overflow: hidden;
    z-index: 2500;
}

.filter-category-menu.show {
    display: flex;
}

.filter-category-list,
.filter-subcategory-list {
    width: 240px;
    max-height: 320px;
    overflow-y: auto;
}

.filter-category-list {
    border-right: 1px solid rgba(255,255,255,0.08);
    background: #10264f;
}

.filter-subcategory-list {
    background: #0d2145;
}

.filter-category-item,
.filter-subcategory-item {
    padding: 12px 14px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1.35;
    transition: background 0.15s ease;
}

.filter-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-category-item.has-children::after {
    content: "›";
    font-size: 14px;
    opacity: 0.8;
    margin-left: 12px;
}

.filter-category-item:hover,
.filter-category-item.active,
.filter-subcategory-item:hover {
    background: rgba(255,255,255,0.08);
}

.filter-subcategory-empty {
    padding: 12px 14px;
    color: rgba(255,255,255,0.55);
}
.category-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 10px;
}

.admin-panel-card {
    background: #0f1b33;
    border: 1px solid #223456;
    border-radius: 14px;
    padding: 20px;
}

.admin-panel-card h3 {
    margin-bottom: 16px;
}

.admin-panel-card .form-group {
    margin-bottom: 14px;
}

.admin-panel-card input,
.admin-panel-card select {
    width: 100%;
    height: 44px;
    background: #101d36;
    color: #ffffff;
    border: 1px solid #2a3d63;
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
}

.admin-panel-card input::placeholder {
    color: #7f8da8;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.category-row-card {
    width: 100%;
    background: #0f1b33;
    border: 1px solid #223456;
    border-radius: 14px;
    overflow: hidden;
}

.category-row-main {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
}

.category-row-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.category-row-info strong {
    color: #ffffff;
    font-size: 16px;
}

.category-row-info span {
    color: #8fa0bd;
    font-size: 13px;
}

.category-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.small-btn {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.dropdown-btn {
    min-width: 38px;
}

.subcategory-panel {
    display: none;
    border-top: 1px solid #223456;
    background: #0b162b;
    padding: 8px 18px 12px 42px;
}

.subcategory-panel.open {
    display: block;
}

.subcategory-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.subcategory-row:last-child {
    border-bottom: none;
}

.subcategory-row-info {
    min-width: 0;
}

.subcategory-row-info strong {
    color: #ffffff;
    font-size: 14px;
}

.subcategory-row-info span {
    display: block;
    margin-top: 3px;
    color: #7f8da8;
    font-size: 12px;
}

.subcategory-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.muted-text,
.empty-state {
    color: #8fa0bd;
    font-size: 14px;
    padding: 10px 0;
}

@media (max-width: 900px) {
    .category-admin-grid {
        grid-template-columns: 1fr;
    }

    .category-row-main,
    .subcategory-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .category-row-actions,
    .subcategory-row-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
/* PRODUCT MODAL CATEGORY PICKER */
.category-picker {
    position: relative;
    min-width: 260px;
}

.category-selected {
    height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-radius: 10px;
    background: #0f1f3d;
    color: #e6edf6;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-selected::after {
    content: "▾";
    font-size: 12px;
    color: #9fb2d6;
    margin-left: 10px;
    flex-shrink: 0;
}

.category-selected:hover {
    border-color: #3b82f6;
}

.category-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 520px;
    display: none;
    background: #112b57;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    overflow: hidden;
    z-index: 100000;
}

.category-menu.show {
    display: flex;
}

.category-list,
.subcategory-list {
    width: 260px;
    max-height: 320px;
    overflow-y: auto;
}

.category-list {
    border-right: 1px solid rgba(255,255,255,0.08);
    background: #10264f;
}

.subcategory-list {
    background: #0d2145;
}

.category-item,
.subcategory-item {
    padding: 12px 14px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1.35;
    transition: background 0.15s ease;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-item::after {
    content: "›";
    font-size: 14px;
    opacity: 0.8;
    margin-left: 12px;
}

.category-item:hover,
.subcategory-item:hover {
    background: rgba(255,255,255,0.08);
}
.offer-status-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
}

.offer-status-btn {
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #e6edf6;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.15s ease;
}

.offer-status-btn span {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.offer-status-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.14);
}

.offer-status-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.offer-status-btn.standard {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.offer-status-btn.active-offer {
    background: rgba(34, 197, 94, 0.20);
    color: #86efac;
}

.offer-status-btn.planned-offer {
    background: rgba(245, 158, 11, 0.20);
    color: #ffd580;
}

.offer-status-btn.expired-offer {
    background: rgba(100, 116, 139, 0.25);
    color: #cbd5e1;
}

.offer-status-btn.standard.active,
.offer-status-btn.active-offer.active,
.offer-status-btn.planned-offer.active,
.offer-status-btn.expired-offer.active {
    outline: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}
.offer-status-btn.all-offers {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
}

.offer-status-btn.all-offers.active {
    outline: 2px solid rgba(216, 180, 254, 0.55);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
}
#productsPage.page.active {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#productsPage .section-header,
#productsPage .offer-status-filter-bar,
#productsPage .products-toolbar {
    flex-shrink: 0;
}

#productsPage .table-wrapper {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin-bottom: 0;
}
#productsTable thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #14284d;
}
/* PRODUCTS TABLE SCROLL CLEAN FIX */
#productsPage .table-wrapper {
    padding: 0;
    overflow: auto;
}

#productsTable {
    margin: 0;
}

#productsTable thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #14284d;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
/* OFFER STATUS LABEL COLORS */
.offer-pill.planned {
    background: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
}
/* Kategorien-Seite: eigener Scrollbereich */
#categoriesPage.page.active {
    height: 100%;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding-bottom: 32px;
}
.order-detail-summary-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1.2fr;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
}

.order-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.order-summary-item span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a9b8d6;
}

.order-summary-item strong {
    font-size: 15px;
    color: #ffffff;
    white-space: nowrap;
}

.order-status-select,
.order-payment-select {
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #0f2447;
    color: #ffffff;
    padding: 0 10px;
    font-weight: 700;
    outline: none;
}

.order-status-select:focus,
.order-payment-select:focus {
    border-color: #3b82f6;
}
/* Bestellung row status colors */
#recentOrdersTable tbody tr.order-row-in-arbeit,
#ordersTable tbody tr.order-row-in-arbeit {
    background: rgba(234, 179, 8, 0.06);
}

#recentOrdersTable tbody tr.order-row-bereit,
#ordersTable tbody tr.order-row-bereit {
    background: rgba(249, 115, 22, 0.07);
}

#recentOrdersTable tbody tr.order-row-erledigt,
#ordersTable tbody tr.order-row-erledigt {
    background: rgba(34, 197, 94, 0.06);
}

#recentOrdersTable tbody tr.order-row-storniert,
#ordersTable tbody tr.order-row-storniert {
    background: rgba(239, 68, 68, 0.07);
}

/* Hover daha güzel dursun */
#recentOrdersTable tbody tr.order-row-in-arbeit:hover,
#ordersTable tbody tr.order-row-in-arbeit:hover {
    background: rgba(234, 179, 8, 0.24);
}

#recentOrdersTable tbody tr.order-row-bereit:hover,
#ordersTable tbody tr.order-row-bereit:hover {
    background: rgba(249, 115, 22, 0.26);
}

#recentOrdersTable tbody tr.order-row-erledigt:hover,
#ordersTable tbody tr.order-row-erledigt:hover {
    background: rgba(34, 197, 94, 0.24);
}

#recentOrdersTable tbody tr.order-row-storniert:hover,
#ordersTable tbody tr.order-row-storniert:hover {
    background: rgba(239, 68, 68, 0.26);
}
/* Status ve Zahlung: sadece yazı rengi */
.status-label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-width: auto !important;
    border-radius: 0 !important;
    font-weight: 700;
}

/* Bestellung Status Farben */
.status-offen,
.status-bestellt {
    color: #e5e7eb !important;
}

.status-in_bearbeitung {
    color: #facc15 !important; /* sarı */
}

.status-bereit_zur_abholung {
    color: #fb923c !important; /* orange */
}

.status-abgeholt,
.status-geliefert,
.status-abgeschlossen {
    color: #4ade80 !important; /* yeşil */
}

.status-storniert {
    color: #f87171 !important; /* kırmızı */
}

/* Zahlung Farben */
.payment-unbezahlt {
    color: #fb923c !important; /* orange / uyarı */
    background: transparent !important;
    border: none !important;
}

.payment-bezahlt {
    color: #4ade80 !important; /* yeşil */
    background: transparent !important;
    border: none !important;
}
.warning-btn {
    background-color: #f59e0b;
    color: #ffffff;
    border: none;
}

.warning-btn:hover:not(:disabled) {
    background-color: #d97706;
}

.warning-btn:disabled {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    opacity: 1;
    cursor: not-allowed;
}

/* ================================
   ORDERS PAGE SAFE SCROLL FIX
   display özelliğine dokunmaz
================================ */

#ordersPage .table-wrapper {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overflow-x: auto;
}

#ordersTable {
    width: 100%;
    border-collapse: collapse;
}

#ordersTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
}
/* ================================
   KUNDEN PAGE SAFE SCROLL FIX
   Başlık ve butonlar sabit, sadece tablo scroll
================================ */

#customersPage.page.active {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#customersPage .section-header {
    flex-shrink: 0;
}

#customersPage .table-wrapper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    margin-bottom: 0;
    padding: 0;
}

#customersTable {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

#customersTable thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #14284d;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
/* ================================
   KUNDEN TABLE HEADER WHITE FIX
   Başlık arka plan beyaz, yazılar siyah
================================ */

#customersTable thead th {
    background: #ffffff !important;
    color: #111827 !important;
    font-weight: 800;
    border-bottom: 1px solid #d1d5db;
}

#customersTable thead th[data-sort]::after {
    color: #111827 !important;
}


/* ================================
   KUNDEN BEARBEITEN BUTTON ACTIVE
   Checkbox seçilince buton yeşil
================================ */

#customersPage #editCustomerBtn:not(:disabled) {
    background: #2ecc71 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: none !important;
}

#customersPage #editCustomerBtn:not(:disabled):hover {
    background: #27ae60 !important;
    color: #ffffff !important;
}

#customersPage #editCustomerBtn:disabled {
    background: rgba(255,255,255,0.08);
    color: #e6edf6;
    font-weight: 600;
    opacity: 0.4;
    cursor: not-allowed;
}
/* ================================
   KUNDEN BESTELLHISTORIE ROWS
================================ */

.customer-history-row {
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.customer-history-row:hover {
    background: rgba(59, 130, 246, 0.16);
}

.customer-history-row-completed,
.customer-history-row-completed td {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #4ade80 !important;
    font-weight: 700;
}

.customer-history-row-completed:hover,
.customer-history-row-completed:hover td {
    background: rgba(34, 197, 94, 0.28) !important;
    color: #86efac !important;
}

.customer-history-row-completed .status-label,
.customer-history-row-completed .payment-bezahlt {
    color: #4ade80 !important;
    font-weight: 800;
}

/* =========================================================
   ÖNCÜ MARKET ERP - MODERN FULL WIDTH DASHBOARD REDESIGN
   Safe override layer: existing IDs/classes stay compatible.
========================================================= */
:root {
    --app-bg: #eef3f8;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --sidebar: #081a34;
    --sidebar-2: #0d2447;
    --topbar: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e5eaf1;
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --blue: #2563eb;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

body {
    background: var(--app-bg);
    color: var(--text);
    font-size: 14px;
}

.layout {
    min-height: 100vh;
    height: 100vh;
    background: var(--app-bg);
}

.sidebar {
    width: 286px;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    padding: 18px 16px;
    border-right: 0;
    box-shadow: 18px 0 45px rgba(8, 26, 52, 0.12);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: #ffffff;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.sidebar h2 {
    font-size: 17px;
    letter-spacing: -0.02em;
    margin: 0;
    color: #ffffff;
    line-height: 1.15;
}

.sidebar-brand span,
.sidebar-section-label,
.sidebar-footer-card span {
    color: #95a7c5;
    font-size: 12px;
}

.sidebar-section-label {
    margin: 18px 10px 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    margin-bottom: 7px;
    border-radius: 14px;
    color: #c3cde0;
    font-weight: 700;
}

.nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    flex: 0 0 auto;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.25);
}

.sidebar-footer-card {
    margin: 24px 4px 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-footer-card strong { color: #ffffff; }

.main {
    background: var(--app-bg);
}

.topbar {
    height: 78px;
    min-height: 78px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    display: grid;
    grid-template-columns: auto minmax(280px, 620px) auto;
    gap: 22px;
}

.topbar-left,
.topbar-actions,
.admin-menu-btn,
.notification-btn,
.topbar-search {
    display: flex;
    align-items: center;
}

.topbar-left { gap: 14px; min-width: 0; }
.topbar h1 { color: var(--text); font-size: 22px; letter-spacing: -0.03em; }
.page-subtitle { color: var(--muted); font-size: 12px; font-weight: 700; }

.topbar-icon-btn,
.notification-btn {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.topbar-icon-btn { width: 42px; height: 42px; font-size: 18px; display: grid; place-items: center; }

.topbar-search {
    height: 46px;
    padding: 0 14px;
    gap: 10px;
    background: #f3f6fb;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--muted);
}

.topbar-search input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    height: 100%;
    color: var(--text);
    font: inherit;
}

.topbar-actions { justify-content: flex-end; gap: 12px; }
.notification-btn { position: relative; height: 44px; min-width: 44px; justify-content: center; }
.notification-btn span {
    position: absolute;
    top: -6px;
    right: -6px;
    height: 20px;
    min-width: 20px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
}

.admin-menu { position: relative; }
.admin-menu-btn {
    gap: 10px;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 16px;
    padding: 6px 10px 6px 6px;
    cursor: pointer;
    color: var(--text);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #0d2447;
    color: #fff;
    font-weight: 900;
}
.admin-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.admin-text strong { font-size: 13px; }
.admin-text small { color: var(--muted); font-size: 11px; font-weight: 700; }
.admin-chevron { color: var(--muted); }
.admin-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 4000;
}
.admin-menu.open .admin-dropdown { display: block; }
.admin-dropdown button {
    width: 100%;
    height: 40px;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0 12px;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
}
.admin-dropdown button:hover { background: #f3f6fb; }
.admin-dropdown .logout-option { color: var(--danger); }

.content {
    max-width: none;
    width: 100%;
    padding: 26px 28px;
    overflow: auto;
    color: var(--text);
}

.page.active { min-height: 100%; }

h2 { color: var(--text); font-size: 24px; letter-spacing: -0.03em; }
.section-subtitle { margin: -8px 0 0; color: var(--muted); font-weight: 600; }

.cards {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 18px;
}
.card,
.table-wrapper,
.admin-panel-card,
.category-row-card,
.modal-card {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.card {
    border-radius: var(--radius);
    min-height: 126px;
}
.card span { color: var(--muted); font-weight: 800; }
.card h2 { color: var(--text); font-size: 28px; }

.section-header {
    margin-bottom: 18px;
}
.products-section-header {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 22px;
    padding: 18px 20px;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.warning-btn,
.toolbar-button.secondary {
    min-height: 42px;
    border-radius: 13px;
    font-weight: 800;
}
.primary-btn { background: var(--primary); }
.primary-btn:hover { background: var(--primary-dark); }
.secondary-btn,
.toolbar-button.secondary {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
}
.secondary-btn:hover,
.toolbar-button.secondary:hover { background: #f3f6fb; }
.danger-btn { background: var(--danger); }

.offer-status-filter-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.offer-status-btn {
    height: auto;
    min-height: 72px;
    border-radius: 18px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px;
    background: #ffffff !important;
    color: var(--text) !important;
    border: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}
.offer-status-btn span {
    background: #eef2f7;
    color: var(--text);
    height: 28px;
    min-width: 34px;
    font-weight: 900;
}
.offer-status-btn.active {
    border-color: rgba(220, 38, 38, 0.35) !important;
    box-shadow: 0 16px 36px rgba(220, 38, 38, 0.14);
    outline: none !important;
}
.offer-status-btn.active span { background: var(--primary); color: #ffffff; }
.offer-status-btn.active-offer span { background: #dcfce7; color: #15803d; }
.offer-status-btn.planned-offer span { background: #fef3c7; color: #b45309; }
.offer-status-btn.expired-offer span { background: #e5e7eb; color: #475569; }
.offer-status-btn.all-offers span { background: #f3e8ff; color: #7e22ce; }

.products-toolbar {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.toolbar-left { flex: 1; }
.toolbar-input {
    width: min(420px, 100%);
    flex: 1 1 320px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7f9fc;
    color: var(--text);
    padding: 0 14px;
    outline: none;
}
.toolbar-checkbox { color: var(--text); font-weight: 800; }
.toolbar-checkbox input { accent-color: var(--primary); }
.filter-category-selected {
    background: #f7f9fc;
    border-color: var(--line);
    border-radius: 14px;
    color: var(--text);
    font-weight: 800;
}
.filter-category-menu,
.category-menu {
    background: #ffffff;
    border-color: var(--line);
    box-shadow: var(--shadow);
}
.filter-category-list,
.category-list { background: #ffffff; border-right-color: var(--line); }
.filter-subcategory-list,
.subcategory-list { background: #f7f9fc; }
.filter-category-item,
.filter-subcategory-item,
.category-item,
.subcategory-item { color: var(--text); }
.filter-category-item:hover,
.filter-category-item.active,
.filter-subcategory-item:hover,
.category-item:hover,
.subcategory-item:hover { background: #eef2f7; }
.filter-subcategory-empty { color: var(--muted); }

.table-wrapper {
    border-radius: 20px;
    padding: 0;
    overflow: auto;
}
table { color: var(--text); }
th {
    background: #f7f9fc !important;
    color: #475467 !important;
    border-bottom: 1px solid var(--line);
    font-weight: 900;
}
td {
    border-top: 0;
    border-bottom: 1px solid #edf1f6;
    color: #1f2937;
}
tr:hover { background: #f8fafc; }
#productsTable th,
#productsTable td,
#customersTable th,
#customersTable td {
    border-right: 0;
}
#productsTable thead th,
#customersTable thead th,
#ordersTable thead th {
    background: #f7f9fc !important;
    color: #475467 !important;
}
.low-stock-row,
.low-stock-row td { background: #fff1f2 !important; color: #be123c !important; }
.offer-pill {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.offer-pill.planned { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.offer-pill.inactive { background: #e5e7eb; color: #475569; }
.floating-offer-tooltip {
    background: #ffffff;
    color: var(--text);
    border-color: var(--line);
    box-shadow: var(--shadow);
}
.floating-offer-tooltip .offer-tooltip-label,
.offer-tooltip-label,
.offer-tooltip-sku { color: var(--muted); }
.offer-tooltip-title { color: var(--text); }
.offer-tooltip-divider { background: var(--line); }

#productsPage.page.active,
#customersPage.page.active {
    height: calc(100vh - 130px);
}
#productsPage .table-wrapper { background: #ffffff; }

.modal { background: rgba(15, 23, 42, 0.55); }
.modal-card { border-radius: 22px; }
.modal-header,
.modal-footer { background: #ffffff; border-color: var(--line); }
.modal-header h3 { color: var(--text); }
.modal-body { background: #fbfcfe; }
.form-group label { color: #475467; }
.form-group input,
.admin-panel-card input,
.admin-panel-card select,
.category-selected,
.order-status-select,
.order-payment-select {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
}
.form-group input:focus,
.category-selected:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10); }
.checkbox-label { color: var(--text); }
.icon-btn { color: var(--muted); }
.icon-btn:hover { background: #f3f6fb; color: var(--text); }

.admin-panel-card h3,
.category-row-info strong,
.subcategory-row-info strong,
.order-summary-item strong { color: var(--text); }
.category-row-info span,
.subcategory-row-info span,
.muted-text,
.empty-state,
.order-summary-item span { color: var(--muted); }
.subcategory-panel { background: #f8fafc; border-top-color: var(--line); }
.category-row-card { overflow: hidden; }

.undo-toast { background: #111827; }
.mobile-overlay { display: none; }

@media (max-width: 1280px) {
    .topbar { grid-template-columns: auto 1fr auto; }
    .offer-status-filter-bar { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}

@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 5000;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.52);
        z-index: 4500;
    }
    .topbar {
        grid-template-columns: 1fr auto;
        height: auto;
        min-height: 74px;
        padding: 12px 16px;
    }
    .topbar-search { grid-column: 1 / -1; order: 3; }
    .admin-text { display: none; }
    .content { padding: 18px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .offer-status-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .products-toolbar,
    .toolbar-left { flex-wrap: wrap; }
    .filter-category-picker { width: 100%; flex: 1 1 240px; }
    .toolbar-right { width: 100%; }
    .toolbar-button.secondary { width: 100%; }
}

@media (max-width: 640px) {
    .content { padding: 14px; }
    .cards,
    .offer-status-filter-bar { grid-template-columns: 1fr; }
    .products-section-header,
    .section-header { flex-direction: column; align-items: stretch; }
    .action-bar { flex-wrap: wrap; }
    .action-bar button { flex: 1 1 140px; }
    .topbar-actions { gap: 8px; }
    .admin-menu-btn { padding-right: 6px; }
    .admin-dropdown { right: -4px; }
    .filter-category-menu,
    .category-menu { width: min(92vw, 520px); }
    .filter-category-list,
    .filter-subcategory-list,
    .category-list,
    .subcategory-list { width: 50%; }
    #productsPage.page.active,
    #customersPage.page.active { height: auto; min-height: 0; overflow: visible; }
    #productsPage .table-wrapper,
    #customersPage .table-wrapper { max-height: 65vh; }
}
/* ================================
   MODAL HEADER DARK BRAND STYLE
   Details / Bearbeiten / Create Modals
================================ */

.modal-header {
    background: #0c2243 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-header h3,
.modal-header h2,
.modal-header .modal-title {
    color: #ffffff !important;
    font-weight: 800;
}

.modal-header .icon-btn,
.modal-header button {
    color: #ffffff !important;
}

.modal-header .icon-btn:hover,
.modal-header button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}
/* ================================
   MODAL BODY SOFT BACKGROUND
   Beyaz info alanları daha iyi ayrılsın
================================ */

.modal-card {
    background: #f3f6fb !important;
    color: #111827 !important;
}

.modal-body {
    background: #f3f6fb !important;
    color: #111827 !important;
}

.modal-footer {
    background: #f3f6fb !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Modal içindeki bilgi kartları / tablo alanları beyaz kalsın */
.modal-body .table-wrapper,
.modal-body table,
.modal-body .admin-panel-card,
.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .order-summary-item,
.modal-body #customerHistoryBody,
.modal-body #orderDetailBody {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Modal içindeki label ve küçük başlıklar */
.modal-body label,
.modal-body span,
.modal-body small {
    color: #475569;
}

/* Modal içindeki strong / başlık / değerler */
.modal-body strong,
.modal-body h3,
.modal-body h4,
.modal-body p {
    color: #111827;
}

/* Modal içindeki tablo başlığı */
.modal-body th {
    background: #f8fafc !important;
    color: #334155 !important;
}

/* Modal içindeki tablo hücreleri */
.modal-body td {
    color: #111827 !important;
    border-top: 1px solid #e5e7eb !important;
}
/* ================================
   MODAL FONT SIZE IMPROVEMENT
   Modal yazıları daha okunaklı
================================ */

.modal-card {
    font-size: 16px !important;
}

.modal-body {
    font-size: 16px !important;
    line-height: 1.55;
}

.modal-body p,
.modal-body td,
.modal-body input,
.modal-body select,
.modal-body textarea,
.modal-body button {
    font-size: 16px !important;
}

.modal-body label,
.modal-body span,
.modal-body small {
    font-size: 15px !important;
    line-height: 1.45;
}

/* Modal başlıkları */
.modal-header h3,
.modal-header h2,
.modal-header .modal-title {
    font-size: 20px !important;
    line-height: 1.3;
}

/* Modal içindeki bölüm başlıkları */
.modal-body h3 {
    font-size: 19px !important;
}

.modal-body h4 {
    font-size: 17px !important;
}

/* Modal tablo başlıkları */
.modal-body th {
    font-size: 15px !important;
    letter-spacing: 0.03em;
}

/* Sipariş detay özet alanları */
.order-summary-item span {
    font-size: 14px !important;
}

.order-summary-item strong {
    font-size: 17px !important;
}
/* ================================
   GLOBAL FONT SIZE IMPROVEMENT
   Dashboard genel okunabilirlik
================================ */

html {
    font-size: 16px;
}

body {
    font-size: 16px !important;
    line-height: 1.5;
}

/* Ana başlıklar */
.topbar h1,
#pageTitle {
    font-size: 24px !important;
    font-weight: 800 !important;
}

h2 {
    font-size: 24px !important;
    font-weight: 800 !important;
}

h3 {
    font-size: 20px !important;
    font-weight: 800 !important;
}

/* Sidebar */
.sidebar h2,
.brand-title {
    font-size: 20px !important;
}

.nav-link {
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Topbar arama ve admin alanı */
.topbar input,
.topbar-search,
.admin-menu,
.admin-name,
.admin-role {
    font-size: 16px !important;
}

/* Kartlar */
.card span,
.stat-card span,
.metric-card span {
    font-size: 15px !important;
}

.card h2,
.stat-card h2,
.metric-card h2 {
    font-size: 28px !important;
}

/* Toolbar, filtreler, butonlar */
button,
.primary-btn,
.secondary-btn,
.danger-btn,
.warning-btn,
.toolbar-button,
.offer-status-btn {
    font-size: 16px !important;
}

input,
select,
textarea,
.toolbar-input,
.filter-category-selected,
.category-selected {
    font-size: 16px !important;
}

/* Tablolar */
table {
    font-size: 16px !important;
}

th {
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
}

td {
    font-size: 16px !important;
}

/* Status / Angebot / Badge yazıları */
.status-badge,
.status-label,
.offer-pill,
.offer-status-btn span {
    font-size: 15px !important;
    font-weight: 800 !important;
}

/* Küçük butonlar */
.action-btn,
.small-btn {
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Modal alanları da genel ayara dahil */
.modal-card,
.modal-body,
.modal-body p,
.modal-body td,
.modal-body input,
.modal-body select,
.modal-body textarea,
.modal-body button {
    font-size: 16px !important;
}

.modal-body label,
.modal-body span,
.modal-body small {
    font-size: 15px !important;
}

/* Form label'ları */
.form-group label {
    font-size: 15px !important;
}

/* Mobilde de okunabilir kalsın */
@media (max-width: 700px) {
    body {
        font-size: 16px !important;
    }

    .nav-link,
    button,
    input,
    select,
    textarea,
    td {
        font-size: 16px !important;
    }

    th {
        font-size: 14px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    .topbar h1,
    #pageTitle {
        font-size: 22px !important;
    }
}
/* =========================================================
   FINAL PRODUCT IMAGE FIX
   Tabelle und Produktmodal getrennt yönetilsin
========================================================= */

/* -----------------------------
   PRODUCTS TABLE IMAGE
----------------------------- */

#productsPage .table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    background: #ffffff !important;
}

#productsTable {
    width: 100% !important;
    min-width: 1240px !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

#productsTable th,
#productsTable td {
    height: 72px !important;
    max-height: 72px !important;
    vertical-align: middle !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    padding: 10px 12px !important;
}

/* Checkbox */
#productsTable th:nth-child(1),
#productsTable td:nth-child(1) {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    text-align: center !important;
}

/* Bild */
#productsTable th:nth-child(2),
#productsTable td:nth-child(2) {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    text-align: center !important;
}

/* ID */
#productsTable th:nth-child(3),
#productsTable td:nth-child(3) {
    width: 70px !important;
}

/* Name */
#productsTable th:nth-child(4),
#productsTable td:nth-child(4) {
    width: 240px !important;
}

/* SKU */
#productsTable th:nth-child(5),
#productsTable td:nth-child(5) {
    width: 150px !important;
}

/* Kategorie */
#productsTable th:nth-child(6),
#productsTable td:nth-child(6) {
    width: 150px !important;
}

/* Preise */
#productsTable th:nth-child(7),
#productsTable td:nth-child(7),
#productsTable th:nth-child(8),
#productsTable td:nth-child(8) {
    width: 120px !important;
}

/* Bestand */
#productsTable th:nth-child(9),
#productsTable td:nth-child(9) {
    width: 100px !important;
}

/* Mindestbestand */
#productsTable th:nth-child(10),
#productsTable td:nth-child(10) {
    width: 125px !important;
}

/* Angebot */
#productsTable th:nth-child(11),
#productsTable td:nth-child(11) {
    width: 160px !important;
}

/* Nur Tabellenbilder klein halten */
#productsTable img,
#productsTable .product-thumb,
#productsTable .product-table-image,
#productsTable .product-image-thumb,
#productsTable .product-thumbnail {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    background: #ffffff !important;
}

/* Nur Tabellenplaceholder */
#productsTable .product-image-placeholder,
#productsTable .product-thumb-placeholder,
#productsTable .product-placeholder {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: #eef3f8 !important;
    color: #0c2243 !important;
    font-weight: 800 !important;
    font-size: 14px !important;
}

#productsTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    background: #f8fafc !important;
    color: #334155 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* -----------------------------
   PRODUCT MODAL IMAGE
----------------------------- */

#productModal .modal-card.modal-lg {
    max-width: 920px !important;
}

#productModal .modal-body {
    padding: 22px 24px !important;
}

/* Modal içindeki ürün görseli asla büyük açılmasın */
#productModal .modal-body img,
#productModal .product-image-preview img,
#productModal #productImagePreview,
#productModal #productImagePreviewImg {
    width: 118px !important;
    height: 118px !important;
    max-width: 118px !important;
    max-height: 118px !important;
    min-width: 118px !important;
    min-height: 118px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Görsel alanını kompakt tut */
#productModal .product-image-upload,
#productModal .product-image-section,
#productModal .image-upload-section,
#productModal .image-upload-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    margin-bottom: 18px !important;
}

/* Görsel açıklama / buton alanı */
#productModal .product-image-actions,
#productModal .image-actions,
#productModal .upload-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

/* Dosya seçme / kaldırma butonları */
#productModal label[for*="Image"],
#productModal label[for*="image"],
#productModal .image-upload-btn,
#productModal .remove-image-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #111827 !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

/* Eğer file input görünürse küçük kalsın */
#productModal input[type="file"] {
    max-width: 260px !important;
    font-size: 15px !important;
}

/* Form alanları tekrar okunabilir düzende kalsın */
#productModal .form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 18px !important;
}

#productModal .form-group.full-width {
    grid-column: 1 / -1 !important;
}

@media (max-width: 700px) {
    #productModal .form-grid {
        grid-template-columns: 1fr !important;
    }

    #productModal .product-image-upload,
    #productModal .product-image-section,
    #productModal .image-upload-section,
    #productModal .image-upload-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}
/* =========================================================
   PRODUCT MODAL IMAGE COMPACT FIX
   Resim solda küçük, butonlar sağda
========================================================= */

#productModal .product-image-panel {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px !important;
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    margin-bottom: 18px !important;
}

#productModal .product-image-preview {
    width: 118px !important;
    height: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
    border-radius: 18px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

#productModal .product-image-preview img,
#productModal #productImagePreviewImg {
    width: 100% !important;
    height: 100% !important;
    max-width: 118px !important;
    max-height: 118px !important;
    object-fit: contain !important;
    background: #ffffff !important;
    border-radius: 16px !important;
}

#productModal #productImagePlaceholder {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    background: #f1f5f9 !important;
}

#productModal .product-image-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

#productModal .product-image-info label {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #111827 !important;
    margin: 0 !important;
}

#productModal .product-image-info p {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    color: #64748b !important;
}

#productModal .product-image-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

#productModal .image-upload-btn,
#productModal .image-clear-btn {
    min-height: 40px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    border: 1px solid #dbe3ee !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#productModal .image-upload-btn:hover,
#productModal .image-clear-btn:hover {
    background: #f3f6fb !important;
}

#productModal .product-image-file-name {
    font-size: 16px !important;
    color: #475569 !important;
    font-weight: 600 !important;
}

/* Mobilde yine kompakt kalsın */
@media (max-width: 700px) {
    #productModal .product-image-panel {
        gap: 14px !important;
        align-items: flex-start !important;
    }

    #productModal .product-image-preview {
        width: 96px !important;
        height: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
        min-height: 96px !important;
        max-height: 96px !important;
    }

    #productModal .product-image-preview img,
    #productModal #productImagePreviewImg {
        max-width: 96px !important;
        max-height: 96px !important;
    }
}
/* ================================
   NEW ORDER ALERT / PRINT NOTICE
================================ */

.new-order-alert-box {
    position: fixed;
    right: 28px;
    top: 96px;
    width: min(440px, calc(100vw - 40px));
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #ffffff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 24px 70px rgba(220, 38, 38, 0.38);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(calc(100% + 60px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.new-order-alert-box.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    animation: newOrderPulse 1s infinite;
}

.new-order-alert-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    font-size: 28px;
    flex: 0 0 auto;
}

.new-order-alert-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.new-order-alert-content strong {
    color: #ffffff;
    font-size: 19px;
    font-weight: 900;
}

.new-order-alert-content span,
.new-order-alert-content small {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.new-order-alert-box button {
    border: none;
    border-radius: 14px;
    background: #ffffff;
    color: #991b1b;
    padding: 10px 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

@keyframes newOrderPulse {
    0% {
        box-shadow: 0 24px 70px rgba(220, 38, 38, 0.38);
    }

    50% {
        box-shadow: 0 24px 90px rgba(220, 38, 38, 0.75);
    }

    100% {
        box-shadow: 0 24px 70px rgba(220, 38, 38, 0.38);
    }
}

#productsTable tbody tr[data-product-id] {
    cursor: pointer;
}

#productsTable tbody tr[data-product-id]:hover {
    background-color: rgba(22, 163, 74, 0.06);
}

#productsTable tbody tr[data-product-id] input,
#productsTable tbody tr[data-product-id] button,
#productsTable tbody tr[data-product-id] a {
    cursor: auto;
}

#ordersTable tbody tr[data-order-id] {
    cursor: pointer;
}

#ordersTable tbody tr[data-order-id]:hover {
    background-color: rgba(22, 163, 74, 0.06);
}

#ordersTable tbody tr[data-order-id] button,
#ordersTable tbody tr[data-order-id] input,
#ordersTable tbody tr[data-order-id] a {
    cursor: auto;
}

.category-clickable-row {
    cursor: pointer;
}

.category-clickable-row:hover {
    background-color: rgba(22, 163, 74, 0.06);
}

.category-clickable-row button,
.category-clickable-row input,
.category-clickable-row a {
    cursor: auto;
}

/* Kategorien Aktiv / Inaktiv */

.category-active-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #dbe4de;
    border-radius: 12px;
    background: #f8faf9;
    cursor: pointer;
}

.category-active-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.category-active-switch-track {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #94a3b8;
    transition: background-color 0.18s ease;
}

.category-active-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.24);
    transition: transform 0.18s ease;
}

.category-active-switch input:checked +
.category-active-switch-track {
    background: #16a34a;
}

.category-active-switch input:checked +
.category-active-switch-track
.category-active-switch-knob {
    transform: translateX(20px);
}

.category-active-switch-text {
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.category-status-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.category-status-badge.active {
    color: #166534;
    background: #dcfce7;
}

.category-status-badge.inactive {
    color: #991b1b;
    background: #fee2e2;
}

.category-inactive-row {
    opacity: 0.58;
}

.category-inactive-row:hover {
    opacity: 0.82;
}

.mhd-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
}

.mhd-summary:not([hidden]) {
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 8px;
    color: #78350f;
    background: #fef3c7;
    font-weight: 700;
}

.mhd-expiring {
    color: #78350f;
    background: #fef3c7;
}

.mhd-expired {
    color: #991b1b;
    background: #fee2e2;
}

.offer-status-filter-bar {
    grid-template-columns: repeat(7, minmax(145px, 1fr));
}

.offer-status-btn.mhd-expired-status span {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 1280px) {
    .offer-status-filter-bar { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}

@media (max-width: 980px) {
    .offer-status-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .offer-status-filter-bar { grid-template-columns: 1fr; }
}

/* The live table gained Einheit and MHD columns; keep dates readable. */
#productsTable {
    min-width: 2000px !important;
}

#productsTable th:nth-child(11),
#productsTable td:nth-child(11) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
}

#productsTable th:nth-child(12),
#productsTable td:nth-child(12) {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
}

#productsTable th:nth-child(13),
#productsTable td:nth-child(13) {
    width: 140px !important;
    min-width: 140px !important;
}
#productModal .barcode-scan-button {
    align-self: stretch;
    border: 1px solid #2160d5;
    border-radius: 8px;
    background: #2160d5;
    color: white;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.barcode-scan-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .82);
    padding: 16px;
}
.barcode-scan-panel {
    background: white;
    border-radius: 14px;
    padding: 18px;
    width: min(100%, 460px);
    display: grid;
    gap: 12px;
    text-align: center;
}
.barcode-scan-panel video {
    background: #111;
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 8px;
}
.barcode-scan-panel button { padding: 12px; cursor: pointer; }
@media (max-width: 700px) {
    #productModal .barcode-scan-button { white-space: normal; font-size: 12px; }
}
/* Mobile product editor: each input gets an independent full-width row. */
@media (max-width: 700px) {
    #productModal #productModalLayoutGrid > .pm-translation-row { order: 1; }
    #productModal #productModalLayoutGrid > .pm-identifiers-row { display: contents !important; }
    #productModal #productModalLayoutGrid > .pm-identifiers-row > :first-child { order: 2; }
    #productModal #productModalLayoutGrid > .pm-category-row { order: 3; }
    #productModal #productModalLayoutGrid > .pm-identifiers-row > .pm-barcode-field { order: 4; }
    #productModal #productModalLayoutGrid > .pm-prices-row { order: 5; }
    #productModal #productModalLayoutGrid > .pm-layout-row:not(.pm-translation-row):not(.pm-identifiers-row):not(.pm-category-row):not(.pm-prices-row) { order: 6; }

    #productModal #productModalLayoutGrid .pm-prices-row,
    #productModal #productModalLayoutGrid .pm-offer-date-row,
    #productModal #productModalLayoutGrid .pm-cols-4 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    #productModal #productModalLayoutGrid .pm-barcode-field {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px !important;
        align-items: center;
    }
    #productModal #productModalLayoutGrid .pm-barcode-field > label {
        grid-column: 1 / -1;
    }
    #productModal #productModalLayoutGrid .pm-barcode-field > #productBarcode {
        min-width: 0 !important;
        width: 100% !important;
    }
    #productModal #productModalLayoutGrid .barcode-scan-button {
        min-width: 102px;
        max-width: 120px;
        padding: 8px !important;
        white-space: normal !important;
    }
    #productModal #productModalLayoutGrid .category-picker,
    #productModal #productModalLayoutGrid #selectedCategory {
        width: 100% !important;
        min-width: 0 !important;
    }
    #productModal #productModalLayoutGrid .category-menu {
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #productModal #productModalLayoutGrid .category-list,
    #productModal #productModalLayoutGrid .subcategory-list {
        min-width: 0;
        width: 50%;
    }

    #productModal .product-image-panel.product-image-panel-compact {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 14px !important;
        align-items: stretch !important;
    }
    #productModal .product-image-info,
    #productModal .product-image-actions { display: contents !important; }
    #productModal .product-image-info > label,
    #productModal .product-image-info > p { display: none !important; }
    #productModal .product-image-actions > label[for="productImageInput"] { order: 1; }
    #productModal #productImagePreview {
        order: 2;
        justify-self: center;
        width: 160px !important;
        height: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }
    #productModal #productImagePreview img,
    #productModal #productImagePreviewImg {
        max-width: 160px !important;
        max-height: 160px !important;
    }
    #productModal .product-image-actions > label[for="productCameraInput"] { order: 3; }
    #productModal #clearProductImageSelectionBtn { order: 4; }
    #productModal #productImageFileName { order: 5; text-align: center; }
    #productModal .product-image-actions > .image-upload-btn,
    #productModal .product-image-actions > .image-clear-btn {
        display: flex !important;
        width: 100% !important;
        min-height: 44px !important;
    }
}
.barcode-label-preview {
    grid-column: 1 / -1;
    display: grid;
    justify-items: start;
    gap: 8px;
    width: 100%;
    color: #a12626;
    font-size: 13px;
}
.barcode-label-preview:empty { display: none; }
.barcode-label-preview svg {
    max-width: 100%;
    height: auto;
    background: white;
    border: 1px solid #e2e8f0;
}
.barcode-print-button {
    padding: 8px 12px;
    background: #f5f8ff;
    border: 1px solid #2160d5;
    color: #174eb0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.barcode-product-label {
    width: min(100%, 60mm);
    height: 62mm;
    padding: 2mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1mm;
    background: white;
    color: black;
    border: 1px solid #d7dee8;
    overflow: hidden;
}
.barcode-product-name {
    width: 100%;
    font-size: 10.5pt;
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.barcode-product-price {
    font-size: 15pt;
    font-weight: bold;
    white-space: nowrap;
}
.barcode-product-code { width: 100%; flex: 0 0 auto; display: flex; justify-content: center; align-items: center; }
.barcode-product-code svg { max-width: 54mm; max-height: 31mm; width: auto; height: auto; }
