body {
    background: #f1f1f1;
}

.btn-primary {
    background-color: var(--primary) !important;
}

.btn-primary:hover {
    border-color: var(--primary) !important;
    background-color: #ffffff !important;
    color: black !important;
}

.select2-dropdown {
    z-index: 9001 !important;
}

a,
a:link,
a:active,
a:visited,
a:hover {
    text-decoration: none;
}

.topmost {
    z-index: 9999;
}

.absolute {
    position: absolute;
}

small,
.small {
    font-size: 12px;
    font-weight: normal;
}

.main-panel {
    background: #F2F2F2;
    background: -webkit-linear-gradient(-45deg, #F2F2F2, #EEE);
    background: linear-gradient(-45deg, #F2F2F2, #EEE);
}

a.blacklink:link,
a.blacklink:active,
a.blacklink:visited {
    color: black;
}

a.blacklink:hover {
    color: gray;
}

a.btn-default,
a.btn-default:link,
a.btn-default:active,
a.btn-default:visited {
    background-color: rgb(239, 239, 239);
    border-color: rgb(239, 239, 239);
    color: black;
    text-decoration: none;
}

.pointer {
    cursor: pointer;
}

.badge-label {
    border-radius: 3px;
    padding: 4px 6px;
}

.text-65 {
    font-size: 65%;
}

.text-80 {
    font-size: 80%;
}

.text-110 {
    font-size: 110%;
}

.text-125 {
    font-size: 125%;
}

.text-135 {
    font-size: 135%;
}

.text-150 {
    font-size: 150%;
}

.text-175 {
    font-size: 175%;
}

.text-200 {
    font-size: 200%;
}

/* HoverControl */

.hover-control {
    opacity: 0;
    transition: visibility 0s, opacity .175s linear;
}

.hover-control-transparent {
    opacity: .1;
}

.hover-container:hover .hover-control,
.hover-control:hover {
    opacity: 1;
}

/* end HoverControl */

/* DivTable */

.divtable-header>div {
    font-weight: bold !important;
    font-size: 125%;
    padding-bottom: 16px;
}

.divtable-row>div {
    border: 0px;
    padding: 5px 15px 5px 15px !important;
    vertical-align: middle !important;
}

.divtable-stripe-row:nth-of-type(odd) {
    background-color: rgba(210, 40, 156, .05);
}

.divtable-hover-row:hover {
    background-color: rgba(120, 205, 213, .2);
}

/* end DivTable */

/* Media */

@media (min-width: 0) {
    .divtable-header {
        display: none;
    }

    .divtable-row>div:last-child {
        border-bottom: 1px #ebedf2 solid !important;
    }
}

@media (min-width: 576px) {
    .divtable-header {
        display: flex;
    }

    .divtable-row>div:not(:last-child) {
        border-bottom: 1px #ebedf2 solid !important;
    }
}

@media (max-height: 425px) {
    #CommonAddBalanceLabelElement {
        display: none;
    }
}

@media (max-height: 360px) {
    #CommonAddBalanceProductLabelElement {
        display: none;
    }
}

@media (min-width: 400px) {
    #ShowDivElementOnSmallScreen {
        display: none;
    }
}

@media (max-width: 400px) {
    #ShowDivElementOnSmallScreen {
        display: block;
    }
}

@media (max-width: 550px) {
    table.table.table-striped.table-bordered tbody tr.child>td.child ul {
        width: 100%;
    }

    table.table.table-striped.table-bordered tbody tr.child>td.child ul>li,
    table.table.table-striped.table-bordered tbody tr.child>td.child ul.dtr-details>li {
        /* Horizontally centers the content */
        align-items: center !important;
        /* Vertically centers the content */
        text-align: center !important;
        /* Ensures text within flex items is centered */
    }

    table.table.table-striped.table-bordered tbody tr.child>td.child ul>li>span.dtr-data>a.btn,
    table.table.table-striped.table-bordered tbody tr.child>td.child ul>li>span.dtr-data>button.btn.btn-sm.btn-danger {
        margin: 1rem;
    }

    table.table.table-striped.table-bordered tbody td.child {
        border-bottom: 1px solid black !important;
    }
}

/* end Media */

/* CustomMenu */

.double-menu-icon {
    margin: 0 !important;
    padding: 0 !important;
}

/* end CustomMenu */

/* Kanban Drag and Drop */

.kanban-drag {
    width: 100%;
    height: 100%;
    min-height: 10em !important;
    padding: 6px 0;
}

.kanban-col-sprint {
    min-width: 10em !important;
    max-width: 20em !important;
}

/* end Kanban Drag and Drop */

/* pagination */

li.active>.page {
    background-color: #f8b4ae;
}

ul.pagination>li>a.page {
    font-weight: 400;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-size: 14px;
    letter-spacing: 0.05em;
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    word-wrap: break-word;
    list-style: none;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    font-family: 'Lato', sans-serif;
    position: relative;
    display: block;
    border: 1px solid #dee2e6;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    padding: .375rem .75rem;
    text-decoration: none;
    border-radius: 100px !important;
    margin: 0 2px;
    color: #777777;
    border-color: #ddd;
}

/* end pagination */

/* SUBMENU */
.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a {
    min-width: 45px !important;
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a {
    background: var(--primary) !important;
    box-shadow: 4px 4px 10px 0 rgba(0, 0, 0, 0.1), 4px 4px 15px -5px rgba(21, 114, 232, 0.4);
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a:before {
    background: transparent !important;
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a p,
.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a i,
.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a .caret,
.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a span {
    color: #ffffff !important;
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a[data-toggle=collapse][aria-expanded=true] i {
    color: #ffffff !important;
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav .nav-item {
    padding: 0 0px;
}

.wrapper.sidebar_minimize .sidebar.sidebar-style-2 .nav .nav-item.subMenuDiv {
    padding: 0 15px;
}

.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a {
    background: var(--primary) !important;
    box-shadow: 4px 4px 10px 0 rgba(0, 0, 0, 0.1), 4px 4px 15px -5px rgba(21, 114, 232, 0.4);
}

.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a:before {
    background: transparent !important;
}

.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a p,
.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a i,
.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a .caret,
.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a span {
    color: #ffffff !important;
}

.sidebar.sidebar-style-2 .nav.nav-primary>.subMenuDiv>.nav-item.active>a[data-toggle=collapse][aria-expanded=true] i {
    color: #ffffff !important;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.sidebar.sidebar-style-2 .nav.nav-primary>.nav-item a .caret,
.sidebar[data-background-color="white"] .nav>.nav-item a .caret {
    margin-left: auto;
    margin-right: 10px;
    transition: all .5s;
    color: #8d9498;
}

.sidebar.sidebar-style-2 .nav.nav-primary>.nav-item a[data-toggle=collapse][aria-expanded=true] .caret,
.sidebar[data-background-color="white"] .nav>.nav-item a[data-toggle=collapse][aria-expanded=true] .caret {
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
    -webkit-transform: rotate(-180deg);
    transform: rotate(-180deg);
}

/* SUBMENU */

/* COLORPICKER */
.form-control.form-control-color {
    width: 25px !important;
    padding: 0px;
}

/* COLORPICKER */

/* TINY SLIDER */
.ticket-show-slider.tns-slider>.tns-item {
    max-width: 200px;
    max-height: 200px;
    padding: 2px;
}

/* TINY SLIDER */

/* DataTable Select Option size minimalize to phone look*/
.table_small_select_options select {
    max-width: 75px;
    overflow: hidden;
    word-wrap: normal !important;
    white-space: normal;
}

/* DataTable */

/* SIGNATURE */
.signature-custom-css {
    touch-action: none;
    user-select: none;
    border: dotted black 1px;
    min-width: 90% !important;
    min-height: 250px !important;
    max-width: 95% !important;
    max-height: 95% !important;
}

/* SIGNATURE */

/* Common Digit PopUp Powered By Robi */

.flexRowSymbol {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0.1rem;
    /* width: 250px; */
    margin: 0 auto;
    max-width: 30rem;
}

.flexRowSymbol_item {
    background-color: orange;
    font-weight: bold;
    font-size: clamp(1rem, 6vw, 5rem) !important;
    color: white;
    width: calc(100% / 3) !important;
    /* height: calc(100% / 24); */
    padding: 0.5rem;
    margin: 0.25rem;
    text-align: center;
    border-radius: 1rem;
    cursor: pointer;
}

/* Common Digit PopUp Powered By Robi */


/* Common Digit PopUp */
.qty-picker {
    --qty-accent: #4f6df5;
    --qty-bg-display: #1c2128;
    --qty-text-display: #f4f6fb;
    --qty-key-bg: #eef0f4;
    --qty-key-text: #262b33;
    --qty-radius: 0.85rem;

    width: 100%;
    max-width: 21rem;
    margin: 0 auto;
    font-family: inherit;
}

.qty-picker__picture {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.qty-picker__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.qty-picker__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--qty-accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.qty-picker__product {
    font-size: 0.95rem;
    color: #2b2f36;
}

.qty-picker__barcode {
    color: #8a8f99;
    font-size: 0.8rem;
    margin-left: 0.35rem;
}

.qty-picker__current {
    font-size: 0.78rem;
    color: #8a8f99;
}

.qty-picker__display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--qty-bg-display);
    border-radius: var(--qty-radius);
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.6rem;
}

.qty-picker__input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--qty-text-display);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.3rem, 7vw, 1.9rem);
    font-weight: 600;
    text-align: right;
}

.qty-picker__input::placeholder {
    color: #565e6c;
}

.qty-picker__unit {
    color: #9aa2b1;
    font-size: 0.85rem;
    white-space: nowrap;
}

.qty-picker__del {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: none;
    border-radius: 0.6rem;
    background: #2c333d;
    color: #cdd3dd;
    cursor: pointer;
    transition: background 0.1s ease;
}

.qty-picker__del:active {
    background: #3a4351;
}

.qty-picker__keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.qty-picker__key {
    aspect-ratio: 1.3 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--qty-key-bg);
    color: var(--qty-key-text);
    font-size: clamp(1.1rem, 5.5vw, 1.5rem);
    font-weight: 600;
    border: none;
    border-radius: var(--qty-radius);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform 0.06s ease, background 0.06s ease;
}

.qty-picker__key:active {
    transform: scale(0.93);
    background: #e2e5eb;
}

.qty-picker__key--dot {
    color: var(--qty-accent);
}

.qty-picker__key--clear {
    color: #d64545;
    font-size: 0;
}

.qty-picker__key--clear::after {
    content: "C";
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.qty-picker__key--clear:active {
    background: #fbeaea;
}

@media (max-width: 340px) {
    .qty-picker__keypad {
        gap: 0.4rem;
    }

    .qty-picker__key {
        border-radius: 0.65rem;
    }
}

/* Common Digit PopUp */

/* SweetAlert2 Transparent and blur */

/* Blurred background effect */
.my-custom-swal-popup.swal2-container {
    backdrop-filter: blur(10px);
    /* Adjust the blur effect */
}

/* Transparent popup background */
.my-custom-swal-popup.swal2-popup {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Semi-transparent background */
    box-shadow: none !important;
    /* Remove shadow */
    border: none !important;
    /* Remove border */
    width: 100% !important;
    height: 100% !important;
}

/* Remove border and padding for transparency */
.my-custom-swal-popup.swal2-popup .swal2-title {
    color: white;
}

.my-custom-swal-popup.swal2-popup .swal2-content {
    color: white;
}

.my-custom-swal-popup.swal2-popup .swal2-actions {
    display: none;
    /* Remove any actions/buttons */
}

/* SweetAlert2 Transparent and blur end */

.dataTables_scrollBody {
    box-shadow: inset -8px 0 6px -6px rgba(0, 0, 0, 0.1);
}

.text-wrap-cell {
    max-width: 200px;
    /* Vagy amekkora helyet max szánsz neki mobilon */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

/* DataTable custom CSS - Osztály alapú verzió */

/* 1200px ALATT: Automatikusan KÁRTYA NÉZETRE váltunk */
@media (max-width: 1199.98px) {
    .custom-data-table {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

    /* Elrejtjük a táblázat fejlécét */
    .custom-data-table thead {
        display: none !important;
    }

    .custom-data-table tbody {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
        gap: 10px;
        padding: 8px 0;
        width: 100%;
    }

    .custom-data-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        padding: 10px;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
        /* flex item ne kényszerítse ki a tartalmát */
        height: auto !important;
        min-height: 0 !important;
        line-height: 1.3 !important;
    }

    .custom-data-table tbody td {
        display: block;
        padding: 3px 0;
        border: none;
        white-space: normal !important;
        word-break: break-word;
        font-size: 0.875rem;
        /* kompaktabb szöveg */
        height: auto !important;
        min-height: 0 !important;
        line-height: 1.3 !important;
    }

    .custom-data-table tbody td.cell-name .d-flex {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap;
        gap: 8px !important;
    }

    .custom-data-table tbody td.cell-name a {
        display: block;
        flex: 1;
        min-width: 0;
        font-size: 0.95rem;
    }

    .custom-data-table tbody td.cell-name .btn-product-image {
        padding: 0.25rem 0.5rem;
    }

    /* Ár/készlet egy sorba, kompaktan, ne két külön blokk legyen */
    .custom-data-table tbody td.cell-stock-price {
        display: inline-block;
        margin-right: 12px;
    }

    .custom-data-table tbody td.cell-actions .d-flex {
        gap: 4px !important;
    }

    .custom-data-table tbody td.cell-actions .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

    /* Mobil kártya nézetben a link kaphat egy picit nagyobb sortávolságot a jobb olvashatóságért */
    .custom-data-table tbody td.cell-name .product-title-link {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* 1200px FELETT: Védelem, hogy a gombok és szövegek ne nyomják szét a táblázatot */
@media (min-width: 1200px) {
    .custom-data-table {
        table-layout: fixed;
        /* Kényszeríti a böngészőt, hogy tartsa a megadott oszlopszélességeket */
    }

    /* Az akció gombok oszlopa (mind a th, mind a td fejlécekben és sorokban) fix szélességet kap */
    .custom-data-table th:last-child,
    .custom-data-table td:last-child {
        width: 140px;
        /* Igazítsd a gombjaid számához */
        white-space: nowrap !important;
    }

    /* A név oszlop megkapja a maradék hely nagy részét, és ha nem fér el, három ponttal zárul (...) */
    .custom-data-table td.cell-name a {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }

    /* Desktopon a fix szélességű oszlopban ne törjön sort — elég hely van egy sorban */
    .custom-data-table td.cell-actions .d-flex {
        flex-wrap: nowrap;
    }
}


/* Sidebar custom CSS */
/* 1199.98px: viselkedjen úgy, mint a téma alapból <992px-nél teszi */
@media screen and (min-width: 1199.98px) and (max-width: 1199.98px) {
    .sidebar {
        position: fixed;
        left: 0 !important;
        transform: translate3d(-270px, 0, 0) !important;
        transition: all .5s;
    }

    .nav_open .sidebar {
        transform: translate3d(0, 0, 0) !important;
    }

    .nav_open .main-header,
    .nav_open .main-panel {
        transform: translate3d(250px, 0, 0) !important;
    }

    .logo-header .navbar-toggler {
        opacity: 1 !important;
        display: none !important;
    }

    .main-panel {
        width: 100% !important;
    }
}

/* Termék lista név oszlop */
/* Új terméknév és gomb esztétika */
.product-title-block {
    display: block;
    /* Megszünteti a flex elrendezést, engedi a körbefolyást */
    width: 100%;
}

/* A gomb egyedi formázása a körbefutáshoz */
.product-title-block .btn-product-image {
    float: left;
    /* Ez kényszeríti a szöveget a körbefutásra */
    margin-right: 10px;
    /* Távolság a szövegtől jobbra */
    margin-bottom: 4px;
    /* Távolság a szövegtől, ha aláfolyna */
    padding: 0.35rem 0.6rem;
    background-color: #f8f9fa;
    border: 1px solid #e3e6f0;
    transition: all 0.2s ease-in-out;
}

/* Gomb hover effekt */
.product-title-block .btn-product-image:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
    transform: scale(1.05);
    /* Enyhe nagyítás rámutatáskor */
}

/* A link (terméknév) esztétikusabb megjelenítése */
.product-title-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    font-size: 0.95rem;
    transition: color 0.15s ease-in-out;
    display: inline;
    /* Kötelező a folytonos szövegkörbefutáshoz */
    word-break: break-word;
}

/* Link hover effekt */
.product-title-link:hover {
    color: #4e73df;
    /* Szép Bootstrap kék / sablon elsődleges szín */
    text-decoration: underline;
}

/* Tisztítás a biztonság kedvéért (ha a cella utáni elemek elcsúsznának) */
.cell-name::after {
    content: "";
    display: table;
    clear: both;
}

/* Dropdown gomb szövegének rövidítése */
#tasksDayDropdown {
    max-width: 120px;        /* kompakt méret, mobilon is jó */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Mobilon még kisebb */
@media (max-width: 350px) {
    #tasksDayDropdown {
        max-width: 90px;
        font-size: 12px;
        padding: 4px 6px;
    }
}

.empty-tab { color: #adb5bd !important; }
.active-tab { color: #198754 !important; }
.alert-tab { color: #dc3545 !important; font-weight: 600; }
#customer-tabs .nav-link[disabled] { pointer-events: none; opacity: 0.6; }
