.status-active-color{
    color: #27ae60;
}

.status-completed-color{
    color: #e74c3c;
}

.label-status{
    border-radius: 4px;
    padding: 5px;
    font-size: 80%;
    font-weight: bold;
}

a.btn {
    text-decoration: none;
}

body.dark-mode tr.selected{
    background-color: #1e272e !important;
    color: #f5f6fa !important;
}

tr.selected{
    background-color: #BBDDF2 !important;
    color: #0a3d62 !important;
}

tr.selected td a.row-link, tr.selected td a.row-link:hover{
    background-color: #2980b9 !important;
    color: #ECF0F0 !important;
}

.dataTables_wrapper .dataTables_length {
    float: right;
    margin-right: 20px;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
}

input:read-only{
    cursor: pointer;
}

.option-on-foreground{
    color: #009432;
}

.option-off-foreground{
    color: #EA2027;
}

@page {
    size: auto;
}

/* ==========================================================================
   Delivery/POS Order - Product Selection Grid (CDM UI v2)
   Suportă dark/light mode prin variabile CSS din admin-theme.css
   ========================================================================== */

/* Container principal pentru grid-ul de produse */
.products-grid-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Breadcrumb navigare */
.products-breadcrumb {
    background: var(--at-bg-hover, #f8f9fa);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
    border: 1px solid var(--at-border-color, #dee2e6);
}

.products-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--at-text-secondary, #495057);
}

.products-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    padding: 0 10px;
}


.products-breadcrumb .breadcrumb-item a {
    color: var(--at-accent, #5a67d8);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.products-breadcrumb .breadcrumb-item a:hover {
    background: var(--at-bg-selected, #e3f2fd);
    color: var(--at-accent-hover, #4c51bf);
}

.products-breadcrumb .breadcrumb-item.active {
    color: #fff !important;
    background: var(--at-accent, #5a67d8);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
}

/* Separare chevron de background-ul elementului activ */
.products-breadcrumb .breadcrumb-item.active::before {
    background: transparent !important;
    color: #fff !important;
    margin-right: 8px;
}

body.dark-mode .products-breadcrumb .breadcrumb-item.active {
    background: var(--at-accent, #0066ff);
    color: #fff !important;
}

/* Buton back vizibil */
.products-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--at-text-secondary, #495057);
    background: var(--at-bg-card, #fff);
    border: 1px solid var(--at-border-color, #dee2e6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.products-back-btn:hover {
    background: var(--at-bg-hover, #f8f9fa);
    border-color: var(--at-accent, #5a67d8);
    color: var(--at-accent, #5a67d8);
}

.products-back-btn i {
    font-size: 0.75rem;
}

/* Grid container pentru items */
#ContainerProducts, #ContainerCategories, #ContainerSubcategories,
#productsGridContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 4px;
}

/* ==========================================================================
   Item Cards - Stil comun pentru categorii, subcategorii, produse
   ========================================================================== */

.order-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85px;
    min-height: 75px;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.order-item-card:hover {
    transform: scale(1.03);
}

.order-item-card img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.order-item-card:hover img {
    transform: scale(1.15);
}

.order-item-card .item-title {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.order-item-card .item-price {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 2px;
}

/* ==========================================================================
   Categorii - Gradient violet
   ========================================================================== */

.order-item-card.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.order-item-card.category-card:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.order-item-card.category-card .item-title {
    color: #fff;
}

.order-item-card.category-card .item-price {
    color: rgba(255, 255, 255, 0.8);
}

/* Dark mode - categorii */
body.dark-mode .order-item-card.category-card {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* ==========================================================================
   Subcategorii - Gradient verde
   ========================================================================== */

.order-item-card.subcategory-card {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.order-item-card.subcategory-card:hover {
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.5);
}

.order-item-card.subcategory-card .item-title {
    color: #1a1a1a;
}

.order-item-card.subcategory-card .item-price {
    color: rgba(0, 0, 0, 0.6);
}

/* Dark mode - subcategorii */
body.dark-mode .order-item-card.subcategory-card {
    background: linear-gradient(135deg, #0d7377 0%, #14a085 100%);
}

body.dark-mode .order-item-card.subcategory-card .item-title {
    color: #fff;
}

/* ==========================================================================
   Produse - Card neutru cu border
   ========================================================================== */

.order-item-card.product-card {
    background: var(--at-bg-card, #fff);
    border: 1px solid var(--at-border-color, #dee2e6);
    box-shadow: var(--at-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.order-item-card.product-card:hover {
    border-color: var(--at-accent, #5a67d8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-item-card.product-card .item-title {
    color: var(--at-text-primary, #212529);
}

.order-item-card.product-card .item-price {
    color: var(--at-success-text, #155724);
    background: var(--at-success-bg, #d4edda);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Dark mode - produse */
body.dark-mode .order-item-card.product-card {
    background: var(--at-bg-card, #1a1a1a);
    border-color: var(--at-border-color, #333);
}

body.dark-mode .order-item-card.product-card:hover {
    border-color: var(--at-accent, #0066ff);
}

/* ==========================================================================
   Backward Compatibility - Clasele vechi (pentru cod existent)
   ========================================================================== */

/* OrderCategory - mapare la noul stil */
.OrderCategory {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85px;
    min-height: 75px;
    padding: 6px;
    margin: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.OrderCategory:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.OrderCategory .CategoryImage {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    padding: 0;
}

.OrderCategory .CategoryTitle {
    background: transparent !important;
    border: none !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 0 0 0;
}

.OrderCategory img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

body.dark-mode .OrderCategory {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* OrderSubcategory - mapare la noul stil */
.OrderSubcategory {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85px;
    min-height: 75px;
    padding: 6px;
    margin: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.OrderSubcategory:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.5);
}

.OrderSubcategory .SubcategoryImage {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    padding: 0;
}

.OrderSubcategory .SubcategoryTitle {
    background: transparent !important;
    border: none !important;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 0 0 0;
}

.OrderSubcategory img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

body.dark-mode .OrderSubcategory {
    background: linear-gradient(135deg, #0d7377 0%, #14a085 100%);
}

body.dark-mode .OrderSubcategory .SubcategoryTitle {
    color: #fff;
}

/* OrderProduct - mapare la noul stil */
.OrderProduct {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85px;
    min-height: 75px;
    padding: 6px;
    margin: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    background: var(--at-bg-card, #fff);
    border: 1px solid var(--at-border-color, #dee2e6);
    box-shadow: var(--at-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.OrderProduct:hover {
    transform: scale(1.03);
    border-color: var(--at-accent, #5a67d8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.OrderProduct .ProductImage {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    padding: 0;
}

.OrderProduct .ProductTitle {
    background: transparent !important;
    border: none !important;
    color: var(--at-text-primary, #212529);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 0 0 0;
}

.OrderProduct img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

body.dark-mode .OrderProduct {
    background: var(--at-bg-card, #1a1a1a);
    border-color: var(--at-border-color, #333);
}

body.dark-mode .OrderProduct:hover {
    border-color: var(--at-accent, #0066ff);
}

body.dark-mode .OrderProduct .ProductTitle {
    color: var(--at-text-primary, #d4d4d4);
}

.form-control-sm-cdm {
    height: calc(1.8125rem + -2px);
    padding: 0.25rem 0.5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* trigger pentru selectia randului in data tables
definit doar pentru a fi disponibil in code completition*/
.table-selection-row{

}

.mandatory-fields-info{
    font-size: 87%; font-style: italic; font-weight: bold
}

.form-control-xs {
    height: calc(1em + .375rem + 2px) !important;
    padding: .125rem .25rem !important;
    font-size: .75rem !important;
    line-height: 1.5;
    border-radius: .2rem;
}

.img-sm{
    max-width: 16px; max-height: 16px;
}

.img-sm-btn{
    max-width: 16px; max-height: 16px; cursor: pointer;
}

.success-warn{
    font-style: italic;
    font-weight: bold;
    color: white;
}

.btn-xxs {
    padding: 2px 3px;
    font-size: .75rem;
    line-height: 1.2;
    border-radius: 3px;
}

body.dark-mode .tab-new-order-delivery, body.dark-mode .tab-option-panel, body.dark-mode .tab-profile-option{
    background-color: unset;
}

body .tab-new-order-delivery, body .tab-option-panel, body .tab-profile-option{
    background-color: white;
}

body.dark-mode a{
    color: #f5f6fa;
}
body.dark-mode a:not(.btn):hover {
    color: #dcdde1;
}

body.dark-mode .navbar-white{
    background-color: #2f3640;
}
body.dark-mode .navbar-light .navbar-nav .nav-link {
    color: #f5f6fa
}

.dark-mode .page-item .page-link {
    color: #f5f6fa;
}

link:focus, .dark-mode .page-item:not(.active) .page-link:hover {
    color: #f5f6fa;
    background-color: #3f474e;
}

body.dark-mode table.dataTable tr.dtrg-group td {
    background-color: unset;
}

body.dark-mode a:not(.btn):hover {
    color: #dcdde1;
}

body.dark-mode ul[role="tablist"] a.nav-link:hover {
    color: #dcdde1 !important;
    text-decoration: underline;
}

.table-font-xs {
    font-size: 85%;
}

.blink {
    animation: blink-animation 1s infinite;
}

@keyframes blink-animation {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Fix pentru autocomplete pe tema dark - fundal albastru închis lizibil */
body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode input:-webkit-autofill:active,
body.dark-mode textarea:-webkit-autofill,
body.dark-mode select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1a3a5c inset !important;
    -webkit-text-fill-color: #e9ecef !important;
    caret-color: #e9ecef !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================
   Discount Card - Stiluri pentru zona de discount
   ============================================ */
.discount-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    background: var(--at-bg-card, #fff);
    border: 1px solid var(--at-border-color, #dee2e6);
}

.discount-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
}

.discount-card-header i {
    margin-right: 8px;
}

.discount-card-body {
    padding: 12px 15px;
}

.discount-card-note {
    font-size: 12px;
    font-style: italic;
    color: var(--at-text-muted, #6c757d);
    margin-bottom: 12px;
    line-height: 1.4;
}

.discount-card .input-group {
    margin-bottom: 0;
}

.discount-card .input-group-text {
    background: var(--at-bg-light, #f8f9fa);
    border-color: var(--at-border-color, #ced4da);
    min-width: 38px;
    justify-content: center;
}

.discount-card .form-control {
    border-color: var(--at-border-color, #ced4da);
}

.discount-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Discount card - disabled state */
.discount-card.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.discount-card.disabled .discount-card-header {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* Dark mode */
body.dark-mode .discount-card {
    background: var(--at-bg-card, #2d3436);
    border-color: var(--at-border-color, #4a5568);
}

body.dark-mode .discount-card-header {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

body.dark-mode .discount-card-note {
    color: var(--at-text-muted, #a0aec0);
}

body.dark-mode .discount-card .input-group-text {
    background: var(--at-bg-light, #4a5568);
    border-color: var(--at-border-color, #4a5568);
    color: var(--at-text-color, #e2e8f0);
}

body.dark-mode .discount-card .form-control {
    background: var(--at-bg-input, #2d3436);
    border-color: var(--at-border-color, #4a5568);
    color: var(--at-text-color, #e2e8f0);
}

body.dark-mode .discount-card .form-control:focus {
    border-color: #5a67d8;
    box-shadow: 0 0 0 0.2rem rgba(90, 103, 216, 0.25);
}