* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f4f6f5;
    color: #1d2520;
}

a {
    color: inherit;
    text-decoration: none;
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(42, 122, 81, 0.14), transparent 34%),
        linear-gradient(135deg, #f7faf8, #edf2ef);
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #dde5df;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(12, 40, 25, 0.12);
}

.brand,
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    margin-bottom: 28px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #1f7a4d;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
}

.brand h1 {
    margin: 0;
    font-size: 24px;
}

.brand p {
    margin: 4px 0 0;
    color: #68756e;
}

.login-form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 15px;
    outline: none;
}

.login-form input:focus {
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.login-form button {
    width: 100%;
    margin-top: 22px;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: #1f7a4d;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

/* ALERTS */
.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-error {
    background: #fff1f1;
    border: 1px solid #f0baba;
    color: #9d1212;
}

.alert-info {
    background: #eef6ff;
    border: 1px solid #c8ddf5;
    color: #18496f;
}

.alert-success {
    background: #eaf7ef;
    border: 1px solid #badfc7;
    color: #17633e;
}

/* LAYOUT */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: #15251c;
    color: #ffffff;
    padding: 26px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    margin-bottom: 34px;
}

.sidebar-logo .brand-mark {
    background: #2c9b65;
}

.sidebar-logo strong {
    display: block;
    font-size: 20px;
}

.sidebar-logo span {
    display: block;
    color: #aac2b4;
    font-size: 13px;
    margin-top: 2px;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: #dbe8df;
    font-weight: 600;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.logout-link {
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 700;
}

.main-content {
    padding: 34px;
}

.topbar {
    background: #ffffff;
    border: 1px solid #e1e8e3;
    border-radius: 22px;
    padding: 26px;
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 6px 0 0;
    color: #6d7a72;
}

/* DASHBOARD CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background: #ffffff;
    border: 1px solid #e1e8e3;
    border-radius: 20px;
    padding: 22px;
    min-height: 170px;
    box-shadow: 0 12px 30px rgba(20, 48, 32, 0.05);
}

.card-link {
    display: block;
}

.card span {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1f7a4d;
    margin-bottom: 12px;
}

.card strong {
    display: block;
    font-size: 19px;
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    color: #69776f;
    line-height: 1.5;
}

/* PANELS */
.panel {
    background: #ffffff;
    border: 1px solid #e1e8e3;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(20, 48, 32, 0.04);
}

.panel h2 {
    margin-top: 0;
}

.muted {
    color: #6d7a72;
    line-height: 1.6;
}

/* FILTERS */
.filters-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.filter-field label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #405047;
}

.filter-field input,
.filter-field select {
    width: 100%;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 12px 13px;
    font-size: 14px;
    background: #ffffff;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    background: #1f7a4d;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.filter-actions a {
    border-radius: 12px;
    padding: 12px 16px;
    background: #edf2ef;
    color: #405047;
    font-weight: 800;
}

/* TABLES GENERAL */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.table-header h2 {
    margin: 0;
    font-size: 21px;
}

.table-header p {
    margin: 5px 0 0;
    color: #6d7a72;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5d6b63;
    background: #f4f7f5;
    padding: 13px 12px;
    border-bottom: 1px solid #dfe8e2;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf1ee;
    font-size: 14px;
    vertical-align: middle;
}

.empty-table {
    text-align: center;
    color: #69776f;
    padding: 34px !important;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* PRODUCTS ADMIN TABLE */
.products-admin-table {
    min-width: 760px;
    font-size: 13px;
}

.products-admin-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.products-admin-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

/* Randuri alternate alb/gri */
.products-admin-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.products-admin-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

/* Hover pe rand */
.products-admin-table tbody tr:hover td {
    background: #e5f1eb;
}

/* SKU */
.products-admin-table td:first-child {
    font-weight: 800;
    white-space: nowrap;
}

/* Pret */
.products-admin-table .text-right {
    text-align: right !important;
    white-space: nowrap;
}

/* Actiuni */
.products-admin-table .text-center {
    text-align: center !important;
    white-space: nowrap;
}

/* BUTTONS */
.table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: #1f7a4d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.table-action-btn:hover {
    background: #17633e;
    color: #ffffff;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-green {
    background: #e6f5ed;
    color: #17633e;
}

.badge-gray {
    background: #eef1ef;
    color: #5d6861;
}

.badge-red {
    background: #fff0f0;
    color: #a61717;
}

/* IMPORT */
.import-form {
    display: grid;
    gap: 18px;
    max-width: 620px;
}

.import-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.import-actions button {
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    background: #1f7a4d;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.import-actions .button-danger {
    background: #9f2d20;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-box {
    border: 1px solid #e1e8e3;
    border-radius: 16px;
    padding: 18px;
    background: #fafcfb;
}

.summary-box span {
    display: block;
    color: #6d7a72;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.summary-box strong {
    display: block;
    font-size: 26px;
}

.after-import-link a {
    display: inline-flex;
    margin-top: 18px;
    padding: 12px 16px;
    background: #1f7a4d;
    color: #ffffff;
    border-radius: 12px;
    font-weight: 800;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .filters-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 18px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ADMIN FORMS */
.admin-form {
    margin-top: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 800;
    color: #405047;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 12px 13px;
    font-size: 14px;
    background: #ffffff;
    color: #1d2520;
    font-family: inherit;
}

.form-field textarea {
    resize: vertical;
    line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.checkbox-field {
    align-content: end;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8faf9;
    cursor: pointer;
}

.checkbox-field input {
    width: auto;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    background: #1f7a4d;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.form-actions a,
.secondary-btn {
    display: inline-flex;
    border-radius: 12px;
    padding: 12px 16px;
    background: #edf2ef;
    color: #405047;
    font-weight: 800;
}

.form-top-actions {
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* CLIENTS ADMIN TABLE */
.clients-admin-table {
    min-width: 1050px;
    font-size: 13px;
}

.clients-admin-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.clients-admin-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.clients-admin-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.clients-admin-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.clients-admin-table tbody tr:hover td {
    background: #e5f1eb;
}

.clients-admin-table td:first-child {
    font-weight: 800;
    white-space: nowrap;
}

.clients-admin-table .text-right {
    text-align: right !important;
    white-space: nowrap;
}

.clients-admin-table .text-center {
    text-align: center !important;
    white-space: nowrap;
}

.clients-filters-row {
    grid-template-columns: 1fr auto;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 16px;
    background: #1f7a4d;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.primary-btn:hover {
    background: #17633e;
    color: #ffffff;
}

.password-note {
    margin-top: 18px;
}

/* CATEGORIES ADMIN TABLE */
.categories-admin-table {
    min-width: 820px;
    font-size: 13px;
}

.categories-admin-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.categories-admin-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.categories-admin-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.categories-admin-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.categories-admin-table tbody tr:hover td {
    background: #e5f1eb;
}

.categories-admin-table td:first-child {
    font-weight: 800;
}

.cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* DISCOUNTS ADMIN TABLE */
.discounts-admin-table {
    min-width: 760px;
    font-size: 13px;
}

.discounts-admin-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.discounts-admin-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.discounts-admin-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.discounts-admin-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.discounts-admin-table tbody tr:hover td {
    background: #e5f1eb;
}

.discount-input {
    width: 120px;
    max-width: 100%;
    border: 1px solid #d5ddd8;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: right;
    background: #ffffff;
}

.discount-input:focus {
    outline: none;
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

/* ORDERS ADMIN TABLE */
.orders-admin-table,
.order-items-table {
    min-width: 980px;
    font-size: 13px;
}

.orders-admin-table th,
.order-items-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.orders-admin-table td,
.order-items-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.orders-admin-table tbody tr:nth-child(odd) td,
.order-items-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.orders-admin-table tbody tr:nth-child(even) td,
.order-items-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.orders-admin-table tbody tr:hover td,
.order-items-table tbody tr:hover td {
    background: #e5f1eb;
}

.orders-filters-row {
    grid-template-columns: 1.4fr 0.8fr auto;
}

.muted-small {
    color: #6d7a72;
    font-size: 12px;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.info-box {
    border: 1px solid #e1e8e3;
    border-radius: 16px;
    padding: 18px;
    background: #fafcfb;
}

.info-box span {
    display: block;
    color: #6d7a72;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.info-box strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.info-box p {
    margin: 0;
    color: #405047;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .orders-filters-row,
    .order-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ORDER EDIT TABLE */
.order-items-edit-table {
    min-width: 1180px;
    font-size: 13px;
}

.order-items-edit-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.order-items-edit-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.order-items-edit-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.order-items-edit-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.order-items-edit-table tbody tr:hover td {
    background: #e5f1eb;
}

.small-input {
    width: 76px;
    border: 1px solid #d5ddd8;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: 13px;
    text-align: center;
}

.small-select {
    width: 130px;
    border: 1px solid #d5ddd8;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: 13px;
    background: #ffffff;
}

.table-text-input {
    width: 220px;
    border: 1px solid #d5ddd8;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: 13px;
}

.small-input:focus,
.small-select:focus,
.table-text-input:focus {
    outline: none;
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.button-secondary-action {
    background: #18496f !important;
}

.button-secondary-action:hover {
    background: #123852 !important;
}

.orders-filters-row {
    grid-template-columns: 1.2fr 1.2fr 0.7fr 0.8fr auto;
}

.order-top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.print-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 1100px) {
    .orders-filters-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .sidebar,
    .form-top-actions,
    .topbar,
    .no-print,
    .form-actions,
    .alert,
    .logout-link {
        display: none !important;
    }

    .app-shell {
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .panel {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 18px !important;
    }

    .table-wrap {
        overflow: visible !important;
    }

    .data-table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11px !important;
        padding: 6px !important;
    }
}

/* SETTINGS */
.settings-log-table,
.settings-recipients-table {
    min-width: 760px;
    font-size: 13px;
}

.settings-log-table th,
.settings-recipients-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.settings-log-table td,
.settings-recipients-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.settings-log-table tbody tr:nth-child(odd) td,
.settings-recipients-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.settings-log-table tbody tr:nth-child(even) td,
.settings-recipients-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.settings-log-table tbody tr:hover td,
.settings-recipients-table tbody tr:hover td {
    background: #e5f1eb;
}

/* SETTINGS TABS */
.settings-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.settings-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 16px;
    background: #edf2ef;
    color: #405047;
    font-weight: 800;
}

.settings-tabs a.active,
.settings-tabs a:hover {
    background: #1f7a4d;
    color: #ffffff;
}

/* PRODUCT EDIT TABS */
.product-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.product-tab-btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    background: #edf2ef;
    color: #405047;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.product-tab-btn.active,
.product-tab-btn:hover {
    background: #1f7a4d;
    color: #ffffff;
}

.product-tab-panel {
    display: none;
}

.product-tab-panel.active {
    display: block;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.usage-card {
    display: grid;
    gap: 8px;
    border: 1px solid #d5ddd8;
    border-radius: 16px;
    padding: 18px;
    background: #f8faf9;
    cursor: pointer;
}

.usage-card input {
    width: auto;
}

.usage-card strong {
    font-size: 16px;
    color: #1d2520;
}

.usage-card span {
    font-size: 13px;
    color: #6d7a72;
    line-height: 1.4;
}

.attribute-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
    padding: 14px;
    border: 1px solid #e1e8e3;
    border-radius: 14px;
    margin-bottom: 12px;
    background: #fafcfb;
}

.product-discounts-table {
    min-width: 780px;
}

.product-discounts-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.product-discounts-table td {
    padding: 8px 10px;
    font-size: 13px;
    border-bottom: 1px solid #dfe6e2;
}

.date-input {
    width: 150px;
    border: 1px solid #d5ddd8;
    border-radius: 9px;
    padding: 7px 8px;
    font-size: 13px;
}

.sticky-save-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e1e8e3;
    padding-top: 16px;
    margin-top: 26px;
    z-index: 5;
}

@media (max-width: 1000px) {
    .usage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attribute-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .usage-grid {
        grid-template-columns: 1fr;
    }
}

/* CLIENT OFFER */
.client-offer-table {
    min-width: 820px;
    font-size: 13px;
}

.client-export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.client-offer-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.client-offer-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.client-offer-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.client-offer-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.client-offer-table tbody tr:hover td {
    background: #e5f1eb;
}

.client-price {
    font-weight: 800;
    color: #17633e;
    white-space: nowrap;
}

.quantity-discounts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quantity-discounts-list span {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef6ff;
    color: #18496f;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.offer-filters-row {
    grid-template-columns: 1.4fr 1fr auto;
}

@media (max-width: 1024px) {
    .offer-filters-row {
        grid-template-columns: 1fr;
    }
}

/* CLIENT EXPORT COLUMNS */
.export-column-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.export-column-actions button {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.export-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.export-column-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d5ddd8;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8faf9;
    cursor: pointer;
    font-weight: 700;
}

.export-column-card input {
    width: auto;
}

.export-column-card:hover {
    background: #eaf3ee;
}

@media (max-width: 1024px) {
    .export-columns-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .export-columns-grid {
        grid-template-columns: 1fr;
    }
}

/* QUICK ORDER */
.quick-order-table {
    min-width: 980px;
    font-size: 13px;
}

.quick-order-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.quick-order-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.quick-order-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.quick-order-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.quick-order-table tbody tr:hover td {
    background: #e5f1eb;
}

.quick-qty-input {
    width: 90px;
    border: 1px solid #d5ddd8;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
}

.quick-qty-input:focus {
    outline: none;
    border-color: #1f7a4d;
    box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.12);
}

.quick-line-total {
    font-weight: 800;
    white-space: nowrap;
}

.quick-order-summary {
    position: sticky;
    bottom: 0;
    z-index: 8;
}

.quick-total-box {
    margin-top: 18px;
    border: 1px solid #badfc7;
    background: #eaf7ef;
    border-radius: 16px;
    padding: 18px;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.quick-total-box span {
    color: #405047;
    font-size: 13px;
    font-weight: 800;
}

.quick-total-box strong {
    color: #17633e;
    font-size: 24px;
}

/* CLIENT MY ORDERS */
.my-orders-table,
.my-order-items-table {
    min-width: 880px;
    font-size: 13px;
}

.my-orders-table th,
.my-order-items-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.my-orders-table td,
.my-order-items-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.my-orders-table tbody tr:nth-child(odd) td,
.my-order-items-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.my-orders-table tbody tr:nth-child(even) td,
.my-order-items-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.my-orders-table tbody tr:hover td,
.my-order-items-table tbody tr:hover td {
    background: #e5f1eb;
}

.my-order-items-table tfoot td {
    background: #eaf7ef;
    border-top: 2px solid #badfc7;
}

.my-orders-filters-row {
    grid-template-columns: 0.8fr 1fr auto;
}

@media (max-width: 1024px) {
    .my-orders-filters-row {
        grid-template-columns: 1fr;
    }
}

/* ATTRIBUTES ADMIN */
.attributes-table,
.attribute-values-table {
    min-width: 920px;
    font-size: 13px;
}

.attributes-table th,
.attribute-values-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.attributes-table td,
.attribute-values-table td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #dfe6e2;
}

.attributes-table tbody tr:nth-child(odd) td,
.attribute-values-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.attributes-table tbody tr:nth-child(even) td,
.attribute-values-table tbody tr:nth-child(even) td {
    background: #f2f4f3;
}

.attributes-table tbody tr:hover td,
.attribute-values-table tbody tr:hover td {
    background: #e5f1eb;
}

.attributes-actions {
    white-space: nowrap;
}

.table-action-btn-muted {
    background: #edf2ef;
    color: #405047;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.attribute-value-form {
    margin-bottom: 24px;
}

/* PRODUCT NEW ATTRIBUTES */
.product-attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.product-attribute-field {
    border: 1px solid #d5ddd8;
    border-radius: 14px;
    padding: 14px;
    background: #f8faf9;
}

.product-attribute-field label {
    font-weight: 800;
    color: #26352d;
}

.attribute-unit {
    color: #6d7a72;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .product-attributes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .product-attributes-grid {
        grid-template-columns: 1fr;
    }
}

/* ATTRIBUTES TABBED LAYOUT */
.attributes-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.attributes-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 16px;
    background: #edf2ef;
    color: #26352d;
    font-weight: 800;
    text-decoration: none;
}

.attributes-tab.active,
.attributes-tab:hover {
    background: #1f7a4d;
    color: #ffffff;
}

.attributes-tab-import {
    margin-left: auto;
    background: #eaf3ff;
    color: #18496f;
}

.attributes-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.7fr);
    gap: 20px;
    align-items: start;
}

.attributes-list-panel,
.attribute-values-side-panel {
    min-width: 0;
}

.attribute-values-side-panel {
    align-self: start;
}

.attribute-values-sticky {
    position: sticky;
    top: 18px;
}

.selected-attribute-row td {
    background: #e5f1eb !important;
}

.compact-attribute-value-form {
    margin-bottom: 18px;
}

.compact-values-grid {
    grid-template-columns: 1fr 100px;
    gap: 10px;
}

.compact-form-actions {
    margin-top: 12px;
}

.attribute-values-list {
    display: grid;
    gap: 10px;
    max-height: 620px;
    overflow: auto;
    padding-right: 4px;
}

.attribute-value-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #d5ddd8;
    border-radius: 12px;
    padding: 11px 12px;
    background: #f8faf9;
}

.attribute-value-item strong {
    display: block;
    color: #16231c;
}

.attribute-value-item span {
    display: inline-flex;
    margin-top: 3px;
    color: #6d7a72;
    font-size: 12px;
}

.attribute-value-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.small-inline-action {
    border: 0;
    background: #edf2ef;
    color: #405047;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.small-inline-action:hover {
    background: #1f7a4d;
    color: #ffffff;
}

.button-inline-reset {
    display: inline-flex;
}

@media (max-width: 1200px) {
    .attributes-layout {
        grid-template-columns: 1fr;
    }

    .attribute-values-sticky {
        position: static;
    }

    .attributes-tab-import {
        margin-left: 0;
    }
}

.generated-descriptions-table {
    min-width: 980px;
    font-size: 13px;
}

.generated-descriptions-table th {
    font-size: 11px;
    padding: 9px 10px;
    background: #e9efec;
    color: #26352d;
}

.generated-descriptions-table td {
    padding: 10px;
    vertical-align: top;
    line-height: 1.45;
    border-bottom: 1px solid #dfe6e2;
}

.generated-descriptions-table td:nth-child(3) {
    max-width: 720px;
}

.add-order-product-box {
    margin: 16px 0 20px;
    padding: 16px;
    border: 1px solid #d5ddd8;
    border-radius: 16px;
    background: #f8faf9;
}

.report-sort-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-sort-actions .sort-active {
    background: #12804f;
    color: #ffffff;
}

/* Mobile hamburger menu - Schmitter admin/client */
.mobile-admin-bar,
.mobile-menu-overlay,
.mobile-menu-close {
    display: none;
}

@media (max-width: 1024px) {
    body.has-mobile-admin-menu {
        overflow-x: hidden;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .mobile-admin-bar {
        position: sticky;
        top: 0;
        z-index: 9990;
        display: flex !important;
        align-items: center;
        gap: 12px;
        min-height: 58px;
        margin: -14px -14px 14px;
        padding: 10px 14px;
        background: #ffffff;
        border-bottom: 1px solid #dfe8e2;
        box-shadow: 0 8px 18px rgba(15, 44, 32, 0.08);
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        border: 0;
        border-radius: 12px;
        background: #0f2d20;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        display: block;
        border-radius: 99px;
        background: #ffffff;
    }

    .mobile-admin-brand {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
    }

    .mobile-admin-brand strong {
        color: #0f2d20;
        font-size: 17px;
        font-weight: 900;
    }

    .mobile-admin-brand span {
        margin-top: 2px;
        color: #5d6d67;
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: block !important;
        border: 0;
        background: rgba(5, 18, 13, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-close {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 2;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
    }

    .app-shell .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 10001 !important;
        width: min(82vw, 310px) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
        border-radius: 0 22px 22px 0 !important;
        box-shadow: 18px 0 40px rgba(0, 0, 0, 0.24) !important;
    }

    body.mobile-menu-open .app-shell .sidebar {
        transform: translateX(0) !important;
    }

    .app-shell .sidebar .sidebar-logo {
        position: relative;
        padding-right: 48px;
    }

    .app-shell .sidebar nav {
        margin-top: 18px;
    }

    .app-shell .sidebar nav a,
    .app-shell .sidebar .logout-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .app-shell .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (min-width: 1025px) {
    .mobile-admin-bar,
    .mobile-menu-overlay,
    .mobile-menu-close {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    body.has-mobile-admin-menu .app-shell .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 10001 !important;
        width: min(82vw, 310px) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
        border-radius: 0 22px 22px 0 !important;
        box-shadow: 18px 0 40px rgba(0, 0, 0, 0.24) !important;
    }

    body.mobile-menu-open .app-shell .sidebar {
        transform: translateX(0) !important;
    }

    body.has-mobile-admin-menu .mobile-admin-bar {
        display: flex !important;
    }
}

@media (max-width: 1024px) {
    body.has-mobile-admin-menu .app-shell .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        z-index: 10001 !important;
        width: min(82vw, 310px) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
        border-radius: 0 22px 22px 0 !important;
        box-shadow: 18px 0 40px rgba(0, 0, 0, 0.24) !important;
    }

    body.mobile-menu-open .app-shell .sidebar {
        transform: translateX(0) !important;
    }

    body.has-mobile-admin-menu .mobile-admin-bar {
        display: flex !important;
    }
}

/* Fix overflow orizontal specific pentru liste/carduri mobile */
@media (max-width: 1024px) {
    .products-main-content,
    .products-list-panel,
    .products-scroll-area,
    .products-admin-table,
    .products-admin-table tbody,
    .products-admin-table tr,
    .products-admin-table td {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .products-admin-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .products-admin-table tbody tr {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .products-admin-table td {
        width: 100% !important;
        min-width: 0 !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    .products-header-actions,
    .products-filters-row,
    .products-filter-panel,
    .products-list-header {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .products-header-actions a,
    .products-filter-actions a,
    .products-filter-actions button {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }
}

@media (max-width: 1024px) {
    body:has(.products-admin-page),
    body:has(.products-admin-page) .app-shell {
        position: relative !important;
        overflow-x: clip !important;
    }
}

/* Bara hamburger fixă pe mobil - toate paginile */
@media (max-width: 1024px) {
    body.has-mobile-admin-menu {
        padding-top: 62px !important;
        overflow-x: hidden !important;
    }

    body.has-mobile-admin-menu .mobile-admin-bar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9990 !important;

        display: flex !important;
        align-items: center !important;
        gap: 12px !important;

        height: 62px !important;
        min-height: 62px !important;
        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 9px 14px !important;

        background: #ffffff !important;
        border-bottom: 1px solid #dfe8e2 !important;
        box-shadow: 0 8px 18px rgba(15, 44, 32, 0.08) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.has-mobile-admin-menu .app-shell,
    body.has-mobile-admin-menu .main-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    body.has-mobile-admin-menu .topbar {
        margin-top: 0 !important;
    }

    body.mobile-menu-open {
        overflow: hidden !important;
    }

    body.mobile-menu-open .mobile-admin-bar {
        z-index: 10002 !important;
    }
}

/* Oprește zoom-ul automat pe inputuri în iPhone/Safari */
@media (max-width: 1024px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100% !important;
    }

    .quick-order-table .qo-qty-cell input.quick-qty-input,
    input.quick-qty-input {
        font-size: 16px !important;
        line-height: 1.2 !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        width: 76px !important;
        max-width: 76px !important;
        padding: 6px 8px !important;
        transform: none !important;
        touch-action: manipulation;
    }

    .quick-order-table .qo-qty-cell input.quick-qty-input:focus,
    input.quick-qty-input:focus {
        font-size: 16px !important;
        transform: none !important;
    }
}