:root {
    /* Brand accent (logo green) — navbar, sidebar, footer, dashboard tiles. */
    --brand-primary: #139451;
    --brand-primary-dark: #107F45;
    --brand-primary-darker: #0E6D3C;
    --brand-primary-light: #EFFBF5;
    /* Reserved for destructive actions (delete/return buttons) and error states only. */
    --brand-red: #E53935;
    --brand-red-dark: #D32F2F;
    --brand-red-darker: #C62828;
    --brand-red-light: #FFEBEE;
    --off-white: #F5F5F5;
    --border-gray: #E2E2E2;
    --brand-dark: #212121;
    --brand-dark-light: #2E2E2E;
    --brand-green: #43A047;
    --brand-green-light: #E8F5E9;
    --brand-orange: #FB8C00;
    --brand-orange-light: #FFF3E0;
    --brand-blue: #1E88E5;
    --brand-blue-light: #E3F2FD;
    --brand-purple: #8E24AA;
    --brand-purple-light: #F3E5F5;
}

body {
    overflow-x: hidden;
}

/* Bootstrap 5 dropped `.form-group` entirely (BS3/4 concept, replaced by
   margin utilities like `.mb-3`). The CRUD scaffolding across ~26 view
   templates still wraps every field in `.form-group` for spacing, so this
   restores that spacing rather than touching every template. */
.form-group {
    margin-bottom: 1rem;
}

:root {
    --app-sidebar-w: 208px;
    --app-sidebar-w-collapsed: 60px;
    --app-topbar-h: 56px;
}

#wrapper {
    padding-top: var(--app-topbar-h);
}

#sidebar-wrapper {
    z-index: 1000;
    position: fixed;
    top: var(--app-topbar-h);
    left: 0;
    bottom: 0;
    width: var(--app-sidebar-w);
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border-right: 1px solid var(--border-gray);
    padding: 10px 8px;
    box-sizing: border-box;
    -webkit-transition: width 0.18s ease;
    -moz-transition: width 0.18s ease;
    -o-transition: width 0.18s ease;
    transition: width 0.18s ease;
}

#wrapper.toggled #sidebar-wrapper {
    width: var(--app-sidebar-w-collapsed);
}

#sidebar-wrapper a {
    color: #5b6472;
    text-decoration: none;
}

#sidebar-wrapper a:hover {
    color: var(--brand-primary-dark);
    text-decoration: none;
    background: var(--brand-primary-light);
}

/* Bootstrap's .nav is display:flex by default (built for horizontal tab
   bars); left as-is, the top-level items only wrap in a narrow rail by
   accident of flex-wrap, and each <li>/<a> shrinks to its own content width
   instead of filling the rail — so the hover/active highlight only ever
   covered the text, not the row. Force it back to a plain block list. */
#sidebar-wrapper #main-menu {
    display: block;
    /* Controller::buildmenu() emits this <ul> with a hardcoded
       `style="width: 250px"` from its old fixed-rail days — override it so
       the row always spans whatever width #sidebar-wrapper currently has
       (otherwise the collapsed 60px rail centers each icon inside an
       invisible 250px-wide box, and only a clipped sliver of it is
       visible). */
    width: 100% !important;
    padding: 0;
    margin: 0;
    list-style: none;
}

#sidebar-wrapper #main-menu > li {
    display: block;
    width: 100%;
    margin-bottom: 2px;
}

#sidebar-wrapper #main-menu > li > a,
#sidebar-wrapper #main-menu > li > a.sidebar-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 10px;
    white-space: nowrap;
    box-sizing: border-box;
    border-radius: 10px;
}

/* Plain links navigate directly (no children) — the actual clickable
   destinations, so they get the heavier/bigger treatment. */
#sidebar-wrapper #main-menu > li > a:not(.sidebar-menu-toggle) {
    font-weight: 600;
    font-size: 14px;
    color: #333333;
}

/* Toggles only ever expand their submenu inline (Controller::buildmenu()
   gives every item with children this class) — they don't navigate
   anywhere themselves, so they read as a lighter category label rather
   than a destination. */
#sidebar-wrapper #main-menu > li > a.sidebar-menu-toggle {
    font-weight: 700;
    font-size: 11.5px;
    color: #9aa1ac;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#sidebar-wrapper #main-menu > li > a i,
#sidebar-wrapper #main-menu > li > a.sidebar-menu-toggle i {
    flex: none;
    width: 18px;
    text-align: center;
    margin-right: 0 !important;
}

/* Chevron indicating a toggle expands/collapses — rotates to point down
   once its submenu is open (Bootstrap adds/removes `.collapsed` on the
   toggle itself, inverted: present while the target is hidden). */
#sidebar-wrapper .sidebar-menu-chevron {
    margin-left: auto;
    flex: none;
    width: auto !important;
    font-size: 10px;
    color: #c2c7cf;
    transition: transform .15s ease;
}

#sidebar-wrapper .sidebar-menu-toggle[aria-expanded="true"] .sidebar-menu-chevron {
    transform: rotate(90deg);
}

/* Item label text is wrapped in <span> by Controller::buildmenu() so it can
   be hidden independently of the icon when the rail is collapsed. */
#wrapper.toggled #sidebar-wrapper #main-menu > li > a span,
#wrapper.toggled #sidebar-wrapper .sidebar-menu-chevron {
    display: none;
}

#wrapper.toggled #sidebar-wrapper #main-menu > li > a,
#wrapper.toggled #sidebar-wrapper #main-menu > li > a.sidebar-menu-toggle {
    justify-content: center;
    padding: 10px 0;
}

/* Highlight the current section (Controller::buildmenu() adds this class
   when the item's route matches the current request). */
#sidebar-wrapper #main-menu > li > a.active-menu-item {
    color: var(--brand-primary-dark);
    background: var(--brand-primary-light);
}

/* Highlight a toggle while its submenu is expanded. */
#sidebar-wrapper .sidebar-menu-toggle[aria-expanded="true"] {
    color: var(--brand-primary-dark);
    background: var(--brand-primary-light);
}

/* Submenus now expand inline (Bootstrap's plain `.collapse` component —
   see Controller::buildmenu()), pushing the rest of the sidebar down,
   instead of opening as a separate flyout popup next to it. Each nesting
   level gets a bit more left padding so the hierarchy stays readable. */
#sidebar-wrapper .sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 2px 0 2px 0;
}

#sidebar-wrapper .sidebar-submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px 8px 30px;
    white-space: nowrap;
    box-sizing: border-box;
    border-radius: 10px;
}

#sidebar-wrapper .nav-third-level a {
    padding-left: 48px;
}

/* Длинные пункты («Журнал кассовых операций», «Техническая поддержка») не
   влезали в 208px-рейку и обрезались из-за nowrap выше — в развёрнутом
   сайдбаре переносим на вторую строку. В свёрнутом (.toggled) текст и так
   скрыт, там nowrap оставляем. */
#wrapper:not(.toggled) #sidebar-wrapper #main-menu > li > a,
#wrapper:not(.toggled) #sidebar-wrapper .sidebar-submenu a {
    white-space: normal;
    line-height: 1.3;
}

#sidebar-wrapper #main-menu a span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Plain leaf links — the actual page you land on. */
#sidebar-wrapper .sidebar-submenu a:not(.sidebar-menu-toggle) {
    font-weight: 600;
    font-size: 14px;
    color: #333333;
}

/* Nested toggle (e.g. a "Система" row that itself opens a third-level
   submenu) — same de-emphasized label treatment as the top-level toggles,
   since it doesn't navigate anywhere on its own either. */
#sidebar-wrapper .sidebar-submenu a.sidebar-menu-toggle {
    font-weight: 700;
    font-size: 11.5px;
    color: #9aa1ac;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#sidebar-wrapper .sidebar-submenu a:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-light);
}

#page-content-wrapper {
    /* No explicit width — block-level default (width:auto) already shrinks
       to fill exactly the space left after margin-left, which is what we
       want. Pairing width:100% with margin-left here (as an earlier pass
       did) adds the margin ON TOP of the full 100% width instead, pushing
       the right edge that many px past the viewport. */
    box-sizing: border-box;
    margin-left: var(--app-sidebar-w);
    padding: 15px 20px;
    -webkit-transition: margin-left 0.18s ease;
    -moz-transition: margin-left 0.18s ease;
    -o-transition: margin-left 0.18s ease;
    transition: margin-left 0.18s ease;
}

#wrapper.toggled #page-content-wrapper {
    margin-left: var(--app-sidebar-w-collapsed);
}


/* Sidebar Styles */

.sidebar-nav {
    position: absolute;
    top: 0;
    width: 250px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li {
    text-indent: 20px;
    line-height: 40px;
}

.sidebar-nav li a {
    display: block;
    text-decoration: none;
    color: #555555;
}

.sidebar-nav li a:hover {
    text-decoration: none;
    color: var(--brand-primary);
    background: var(--brand-primary-light);
}

.sidebar-nav li a:active, .sidebar-nav li a:focus {
    text-decoration: none;
}

.sidebar-nav > .sidebar-brand {
    height: 65px;
    font-size: 18px;
    line-height: 60px;
}

.sidebar-nav > .sidebar-brand a {
    color: #555555;
}

.sidebar-nav > .sidebar-brand a:hover {
    color: var(--brand-primary);
    background: none;
}

/* Below this width the sidebar div isn't even rendered server-side (the
   layout gates it behind `@if(DeviceType!=1)`), so drop the rail's reserved
   space entirely rather than leaving a blank gutter. */
@media (max-width: 900px) {
    #sidebar-wrapper {
        display: none;
    }

    #page-content-wrapper {
        margin-left: 0;
        padding: 15px 12px;
    }

    #wrapper.toggled #page-content-wrapper {
        margin-left: 0;
    }
}

#page-inner {
    width: 100%;
    margin: 10px 20px 10px 0px;
    background-color: #fff !important;
    padding: 10px;
    #min-height: 600px;
}

.page-head-line {
    font-size: 30px;
    text-transform: uppercase;
    color: #000;
    font-weight: 800;
    padding-bottom: 20px;
    border-bottom: 2px solid #d2d2d2;
    margin-bottom: 30px;
}

.progress {
    height: 5px;
}

.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
    color: #A3A3A3 !important;
}


/*==============================================
    MENU STYLES    
 =============================================*/


.header-right {
    color: #ffffff;
    padding: 15px 50px 5px 50px;
    float: right;
    font-size: 16px;
}

.user-img-div {
    min-height: 130px;
    padding: 20px;
    background-color: var(--off-white);
    text-align: center;
}

.user-img-div img {
    height: 130px;
    border: 5px solid var(--brand-primary);
}


.active-menu {
    background-color: #fff !important;
    border-left: 5px solid var(--brand-primary);
}

.active-menu-top {
    background-color: var(--brand-primary) !important;
}

.arrow {
    float: right;
}

.fa.arrow:before {
    content: "\f104";
}

.active > a > .fa.arrow:before {
    content: "\f107";
}


.nav-second-level li,
.nav-third-level li {
    border-bottom: none !important;
}

.nav-second-level li a {
    padding-left: 37px;
}

.nav-third-level li a {
    padding-left: 55px;
}

.sidebar-collapse, .sidebar-collapse .nav {
    background: none;
}

.sidebar-collapse .nav {
    padding: 0;
}

.sidebar-collapse .nav > li > a {
    color: #000;
    background: var(--off-white);
    text-shadow: none;
    border-bottom: 1px solid var(--border-gray);
}

.sidebar-collapse > .nav > li > a {
    padding: 15px 10px;
}

.sidebar-collapse .nav > li > a:hover,
.sidebar-collapse .nav > li > a:focus {
    background: var(--brand-primary-light);
    outline: 0;
}


.nav-second-level > li:last-child > a:after,
.nav-third-level > li:last-child > a:after {
    height: 50%;
}

.nav-third-level > li > a:after,
.nav-third-level > li > a:before {
    left: 40px;
}

.navbar-cls-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--app-topbar-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-gray);
}

.app-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    color: var(--brand-dark);
    flex: none;
}

.app-icon-btn:hover {
    background: var(--off-white);
    color: var(--brand-dark);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
}

.app-topbar-spacer {
    flex: 1;
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.app-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 9px;
    color: #5b6472;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.app-link-btn:hover {
    background: var(--off-white);
    color: var(--brand-dark);
}

.nav > li > a > i {
    margin-right: 10px;
}

/*==============================================
    NOTIFICATION  STYLES    
 =============================================*/
.notifications-wrapper {
    margin-left: 3px;
}

.notifications-wrapper .nav {
    background-color: #D2d2d2;
}

.notifications-wrapper li {
    display: inline-block;
}


.notifications-wrapper li a {
    padding: 25px;
    min-height: 50px;
}


.notifications-wrapper .dropdown-tasks {
    width: 250px;
    min-width: 0;
}


.notifications-wrapper .dropdown-menu li {
    display: block;
}

.notifications-wrapper .dropdown-menu li a {
    padding: 3px 20px;
    min-height: 0;
}

.notifications-wrapper .nav > li > a {
    background-color: #E2E2E2;
    color: #000;
}

.notifications-wrapper .nav > li > a:hover, .nav > li > a:focus {
    text-decoration: none;
    background-color: #FFF !important;
    color: #000 !important;

}

.notifications-wrapper .dropdown-menu {
    margin: 0px;
    border-radius: 0px !important;
    -moz-border-radius: 0px !important;
    -webkit-border-radius: 0px !important;
}

/*==============================================
    FOOTER  STYLES    
 =============================================*/
footer {
    background-color: var(--off-white);
    border-top: 2px solid var(--brand-primary);
    padding: 20px 50px;
    color: #333333;
    font-size: 12px;
}

footer a {
    color: #333333;
}

footer a:hover, footer a:focus {
    color: var(--brand-primary);
    text-decoration: none;
}

/*===============================================================================================
    DASHBOARD STYLES
 ===============================================================================================*/

.dash-logo {
    margin-top: 10px;
}

.dash-subtitle {
    color: #777;
    margin-bottom: 30px;
}

.dash-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #777;
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-gray);
}

.dash-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 110px;
    padding: 20px 10px;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: .75rem;
    text-decoration: none;
    color: #333;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.dash-tile:hover {
    color: #333;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
    border-color: var(--brand-primary);
}

.dash-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-size: 20px;
}

.dash-tile-label {
    font-size: 13px;
    text-align: center;
}

.current-notices ul {
    padding-left: 20px;
    list-style: decimal-leading-zero;
    line-height: 30px;
}

/*===============================================================================================
    PROFILE PAGE STYLES (cabinet: stat tiles + card grid)
 ===============================================================================================*/

.stat-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: .75rem;
    padding: 16px 18px;
}

.stat-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-size: 18px;
}

.stat-tile-value {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

.stat-tile-label {
    font-size: 12px;
    color: #777;
}

.user-tile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.user-tile-actions a {
    font-size: 11px;
    color: var(--brand-primary);
    text-decoration: none;
    margin-right: 12px;
    white-space: nowrap;
}

.user-tile-actions a:hover {
    text-decoration: underline;
}

.profile-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: .75rem;
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-gray);
}

.profile-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.profile-card-title i {
    color: var(--brand-primary);
}

.profile-card-action {
    font-size: 12px;
    color: var(--brand-primary);
    text-decoration: none;
    white-space: nowrap;
}

.profile-card-action:hover {
    text-decoration: underline;
}

.profile-card-body {
    padding: 6px 18px 12px;
    flex: 1 1 auto;
}

.profile-card-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border-gray);
    text-align: right;
}

.profile-card-footer a {
    font-size: 12px;
    color: var(--brand-primary);
    text-decoration: none;
}

.profile-card-footer a:hover {
    text-decoration: underline;
}

.profile-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-gray);
    color: #333;
    text-decoration: none;
}

.profile-list-item:last-child {
    border-bottom: none;
}

.profile-list-item:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

.profile-list-item-name {
    font-size: 13px;
    color: inherit;
    text-decoration: none;
}

.profile-list-item-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--brand-primary);
    background: var(--brand-primary-light);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.profile-list-item .chev {
    color: #bbb;
    font-size: 12px;
}

/* Звезда «основная касса» в карточке касс профиля */
.kassa-main-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #c4c4c4;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: color .15s, background-color .15s;
}

.kassa-main-star:hover,
.kassa-main-star:focus-visible {
    color: #f5a623;
    background: rgba(245, 166, 35, .12);
    outline: none;
}

.kassa-main-star:hover i {
    font-weight: 900; /* far → закрашенная при наведении */
}

.kassa-main-star.is-main {
    color: #f5a623;
    cursor: default;
}

.kassa-main-star.is-main:hover {
    background: transparent;
}

.profile-kv {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-gray);
}

.profile-kv:last-child {
    border-bottom: none;
}

.profile-kv-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #999;
}

.profile-kv-value {
    font-size: 13px;
    color: #222;
}

.profile-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 16px 0;
}

.profile-doc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-gray);
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.profile-doc-link:last-child {
    border-bottom: none;
}

.profile-doc-link:hover {
    color: var(--brand-primary);
    text-decoration: none;
}

.profile-doc-link i {
    color: var(--brand-primary);
    width: 18px;
    text-align: center;
}

/*===============================================================================================
    KASSA EDIT PAGE STYLES (app/eacc?ui=kassa&action=kassa_edit — "Режим программирования")
 ===============================================================================================*/

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--brand-primary);
    margin-bottom: 2px;
}

.value-display {
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.access-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-size: 10px;
    font-weight: 700;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 12px;
    border-radius: 999px;
    background: var(--off-white);
    border: 1px solid var(--border-gray);
    font-size: 12.5px;
    color: #333;
}

.chip button {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: none;
    background: var(--border-gray);
    color: #555;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chip button:hover {
    background: var(--brand-red);
    color: #fff;
}

.checksum-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--brand-dark);
    color: #fff;
    border-radius: .75rem;
    font-size: 12.5px;
}

.checksum-strip .val {
    font-size: 16px;
    font-weight: 700;
}

.checksum-strip .lbl {
    color: rgba(255, 255, 255, .65);
}

.receipt-card {
    border: 1px solid var(--border-gray);
    border-top: none;
    border-radius: 0 0 .75rem .75rem;
    background: #fff;
    padding: 20px 20px 18px;
}

.receipt-card-perf {
    height: 12px;
    background:
        linear-gradient(-45deg, var(--off-white) 6px, transparent 0) 0 4px,
        linear-gradient(45deg, var(--off-white) 6px, #fff 0) 0 4px;
    background-size: 12px 12px;
    background-repeat: repeat-x;
    background-position: bottom;
    border: 1px solid var(--border-gray);
    border-bottom: none;
    border-radius: .75rem .75rem 0 0;
}

.qr-box {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    background: var(--off-white);
    border: 1px solid var(--border-gray);
    border-radius: .5rem;
    padding: 6px;
}

.qr-box svg {
    width: 100%;
    height: 100%;
}

.token-str {
    display: block;
    word-break: break-all;
    background: var(--off-white);
    border: 1px dashed var(--border-gray);
    border-radius: .5rem;
    padding: 10px 12px;
    font-size: 11.5px;
    color: #555;
    line-height: 1.6;
}

/*==============================================
    MEDIA QUERIES
  =============================================*/

@media (min-width: 768px) {
    .navbar {
        border-radius: 0px;
    }
}

@media (min-width: 280px) and (max-width: 767px ) {
    #menuClose {
        visibility: hidden;
    }
}

.card-title {
    color: #333;
    font-size: 16px;
    text-align: center;
}

.card-text {
    color: #84919B;
    font-size: 12px;
    text-align: center;
}

/*Login style*/

#col22 {
    background-image: url(../images/image_login.jpg);
    position: fixed;
    display: block;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;

}

.form11 {
    padding: 20px 40px;
    width: 500px;
}

.navButton {
    display: inline-block;
    margin: 40px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #fff;

    box-shadow: 0 0 20px rgba(0, 0, 0, 1),
    inset 0 2px 0 rgba(255, 255, 255, .6),
    0 2px 0 rgba(0, 0, 0, .1),
    inset 0 0 20px rgba(0, 0, 0, .1);
}

.navButton:hover {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .2),
    0 2px 0 rgba(255, 255, 255, .4),
    inset 0 2px 0 rgba(0, 0, 0, .1);
}

#btn111 {
    position: relative;
    top: 370px;
    right: 105px;
    font-size: 65px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}


#btn111:hover {
    color: #808080;
}

@media (max-width: 576px) {

    .form11 {
        position: relative;
        top: 0;
        left: 0;
        transform: translate(0, 0);
        padding: 10px;
        margin-top: 20px;
    }

    #col22 {
        display: none;

    }

    .navButton {
        display: none;
    }

    #btn111 {
        display: none;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    #col22 {
        display: none;

    }

    .navButton {
        display: none;
    }

    #btn111 {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #col22 {
        display: none;

    }


    .navButton {
        display: none;
    }

    #btn111 {
        display: none;
    }
}

.footer {
    padding: 20px;
    color: #000000;
    font-size: 12px;
    position: fixed;
    width: 100%;
    height: auto;
    background-color: #f8f8f8;
    bottom: -10px;
    z-index: 111;
}

#version {
    position: absolute;
    bottom: 15px;
    left: 70px;
}

#copy {
    position: absolute;
    bottom: 15px;
    right: 45%;
}

/* Dropdown */

.dropdown-lang {
    position: relative;
}

.dd-input {
    display: none;
}

.dd-button {
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: inherit;
}

.dd-menu {
    position: absolute;
    top: 100%;
    right: 0;
    border: 1px solid #ccc;
    /*border-radius: 4px;*/
    padding: 0;
    margin: 2px 0 0 0;
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    list-style-type: none;
}

.dd-input + .dd-menu {
    display: none;
}

.dd-input:checked + .dd-menu {
    display: block;
}

.dd-menu li {
    padding: 10px 20px;
    cursor: pointer;
    white-space: nowrap;
}

.dd-menu li:hover {
    background-color: #f6f6f6;
}

.dd-menu li a {
    display: block;
    margin: -10px -20px;
    padding: 10px 20px;
}


.dd-menu li.divider {
    padding: 0;
    border-bottom: 1px solid #cccccc;
}

@media (min-width: 575.98px) {
    .news-widget {
        height: 89vh;
        overflow-y: scroll;
        overflow-x: hidden;
    }
}

@media (max-width: 575.98px) {
    .m-none {
        display: none !important;
    }

    .m-xs-1 {
        margin: .25rem;
    }

    .m-xs-2 {
        margin: .5rem;
    }

    .m-xs-3 {
        margin: 1rem;
    }

    .m-xs-4 {
        margin: 1.5rem;
    }

    .m-xs-5 {
        margin: 3rem;
    }

    .mt-xs-1 {
        margin-top: .25rem;
    }

    .mt-xs-2 {
        margin-top: .5rem;
    }

    .mt-xs-3 {
        margin-top: 1rem;
    }

    .mt-xs-4 {
        margin-top: 1.5rem;
    }

    .mt-xs-5 {
        margin-top: 3rem;
    }

    .mb-xs-1 {
        margin-bottom: .25rem;
    }

    .mb-xs-2 {
        margin-bottom: .5rem;
    }

    .mb-xs-3 {
        margin-bottom: 1rem;
    }

    .mb-xs-4 {
        margin-bottom: 1.5rem;
    }

    .mb-xs-5 {
        margin-bottom: 3rem;
    }

    .ml-xs-1 {
        margin-left: .25rem;
    }

    .ml-xs-2 {
        margin-left: .5rem;
    }

    .ml-xs-3 {
        margin-left: 1rem;
    }

    .ml-xs-4 {
        margin-left: 1.5rem;
    }

    .ml-xs-5 {
        margin-left: 3rem;
    }

    .mr-xs-1 {
        margin-right: .25rem;
    }

    .mr-xs-2 {
        margin-right: .5rem;
    }

    .mr-xs-3 {
        margin-right: 1rem;
    }

    .mr-xs-4 {
        margin-right: 1.5rem;
    }

    .mr-xs-5 {
        margin-right: 3rem;
    }

    .p-xs-1 {
        padding: .25rem;
    }

    .p-xs-2 {
        padding: .5rem;
    }

    .p-xs-3 {
        padding: 1rem;
    }

    .p-xs-4 {
        padding: 1.5rem;
    }

    .p-xs-5 {
        padding: 3rem;
    }

    .pt-xs-1 {
        padding-top: .25rem;
    }

    .pt-xs-2 {
        padding-top: .5rem;
    }

    .pt-xs-3 {
        padding-top: 1rem;
    }

    .pt-xs-4 {
        padding-top: 1.5rem;
    }

    .pt-xs-5 {
        padding-top: 3rem;
    }

    .pb-xs-1 {
        padding-bottom: .25rem;
    }

    .pb-xs-2 {
        padding-bottom: .5rem;
    }

    .pb-xs-3 {
        padding-bottom: 1rem;
    }

    .pb-xs-4 {
        padding-bottom: 1.5rem;
    }

    .pb-xs-5 {
        padding-bottom: 3rem;
    }

    .pl-xs-1 {
        padding-left: .25rem;
    }

    .pl-xs-2 {
        padding-left: .5rem;
    }

    .pl-xs-3 {
        padding-left: 1rem;
    }

    .pl-xs-4 {
        padding-left: 1.5rem;
    }

    .pl-xs-5 {
        padding-left: 3rem;
    }

    .pr-xs-1 {
        padding-right: .25rem;
    }

    .pr-xs-2 {
        padding-right: .5rem;
    }

    .pr-xs-3 {
        padding-right: 1rem;
    }

    .pr-xs-4 {
        padding-right: 1.5rem;
    }

    .pr-xs-5 {
        padding-right: 3rem;
    }
}

@media (max-width: 575.98px){
    .m-none{
        display: none;
    }

    .w-xs-100{
        width: 100%;
    }

    .w-xs-80{
        width: 80%;
    }

    .m-0{
        margin: 0;
    }
}

@media (min-width: 575.98px){
    .pc-none{
        display: none;
    }
}

@media (min-width: 575.98px) and (max-width: 1400px){
    #kassa .kassa-btn-modal{
        font-size: 14pt;
        margin-top: 3px;
        margin-left: 3px;
    }

    .kassa-td-text{
        font-size: 12pt !important;
    }

    .input-lg{
        height: 30px!important;
    }

    .input-lg::placeholder{
        font-size: 10pt!important;
    }

    .kassa-btn-cat-add .btn{
        font-size: 10pt!important;
    }

    .kassa-btn-otch .btn-sm{
        font-size: 8pt!important;
    }

    #kassa .chosen-container-single .chosen-single{
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
    }

    #kassa .chosen-container-single .chosen-single div b{
        margin-top: 2px;
    }

    .kassa-table-result .btn-success, .kassa-table-result .btn-primary{
        font-size: 18pt !important;
    }

    .kassa-table-result .btn-danger{
        font-size: 14pt !important;
    }

    #kassa:not(.kassabuy) #selected_goods_container,
    #kassa:not(.kassabuy) #journal_container{
        min-height: 280px;
        overflow-y: scroll;
        border-bottom: 1px solid #ccc;
    }

    #kassa.kassabuy #selected_goods_container,
    #kassa.kassabuy #journal_container{
        min-height: 335px;
        overflow-y: scroll;
        border-bottom: 1px solid #ccc;
    }

}

@media (min-width: 1400px){
    #kassa .kassa-btn-modal{
        font-size: 20pt;
        margin-top: 3px;
    }

    #kassa .chosen-container-single .chosen-single{
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
    }

    #kassa .chosen-container-single .chosen-single div b{
        margin-top: 10px;
    }

    .kassa-table-result .btn-success, .kassa-table-result .btn-primary{
        font-size: 30pt;
    }

    .kassa-table-result .btn-danger{
        font-size: 20pt;
    }

    #kassa:not(.kassabuy) #selected_goods_container,
    #kassa:not(.kassabuy) #journal_container{
        min-height: 380px;
        overflow-y: scroll;
        border-bottom: 1px solid #ccc;
    }

    #kassa.kassabuy #selected_goods_container,
    #kassa.kassabuy #journal_container{
        min-height: 440px;
        overflow-y: scroll;
        border-bottom: 1px solid #ccc;
    }

}



.kassa-btn-cat-add .btn{
    font-size: 16pt;
}

.kassa-td-text{
    font-size: 20pt;
    padding: 10pt;
}

.w-100{
    width: 100%;
}

.w-80{
    width: 80%;
}


.d-flex{
    display: flex;
}

.justify-content-between{
    justify-content: space-between;
}

.justify-content-around{
    justify-content: space-around;
}

.justify-content-center{
    justify-content: center;
}

.align-items-center{
    align-items: center;
}

.align-items-end{
    align-items: flex-end;
}

#kassa .buttons-kassa .btn-sm{
    text-decoration: none;
    cursor: pointer;
}

#kassa .btn-sm{
    text-decoration: none;
    cursor: pointer;
}

#kassa .table .btn-sm{
    border: none;
}

#kassa td{
    vertical-align: middle;
}

#kassa .buttons-kassa .kassa-btn-otch,
#kassa .kassa-btn-cat-add {
    background: var(--off-white);
    border: 1px solid var(--border-gray);
    border-radius: .5rem;
    padding: 10px;
    width: 100%;
}

.kassa-total-card {
    border-color: var(--border-gray);
}

.kassa-total-card .kassa-table-result {
    margin-bottom: 0;
}

.kassa-total-card .kassa-table-result td {
    border-top: none;
    border-bottom: 1px solid var(--border-gray);
    padding: 10px 4px;
}

.kassa-total-card .kassa-table-result tr:last-child td {
    border-bottom: none;
}

.kassa-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    font-size: .5em;
    vertical-align: middle;
    margin-right: 4px;
}

.kassa-pay-icon-cash {
    background: var(--brand-green-light);
    color: var(--brand-green);
}

.kassa-pay-icon-card {
    background: var(--brand-blue-light);
    color: var(--brand-blue);
}

.kassa-pay-icon-mobile {
    background: var(--brand-purple-light);
    color: var(--brand-purple);
}

/*=====================================================================
  KASSA DESKTOP REDESIGN — shared by workplace.blade.php (ui=kassa) and
  buy.blade.php (ui=kassabuy), both rendered inside #kassa. Most rules
  are plain "#kassa ..." so they apply to both pages identically; rules
  scoped "#kassa:not(.kassabuy) ..." style markup that only exists on
  the workplace page (payment tiles, buyer ИИН/ФИО fields, NDS row,
  kassa-switch select, PIN lock overlay). The separate mobile views
  (mobileworkplace.blade.php / mobilebuy.blade.php) are unaffected.
  No existing selector above this block is modified or removed.
=====================================================================*/

#kassa {
    --k-text-soft: rgba(33, 33, 33, .62);
    --k-text-faint: rgba(33, 33, 33, .42);
    --k-radius-lg: 18px;
    --k-radius-md: 14px;
    --k-radius-sm: 10px;
    --k-shadow-sm: 0 1px 2px rgba(15, 20, 30, .05);
    --k-shadow-md: 0 12px 28px -16px rgba(15, 20, 30, .22);
}

/* ---- panel (card wrapper) ---- */
#kassa .kassa-panel {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-lg);
    box-shadow: var(--k-shadow-sm);
    padding: 18px;
    margin-bottom: 16px;
}

/* ---- top status bar ---- */
#kassa .kassa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-lg);
    box-shadow: var(--k-shadow-sm);
    padding: 14px 18px;
    margin-bottom: 14px;
}

#kassa:not(.kassabuy) .kassa-select-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--k-text-faint);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

#kassa:not(.kassabuy) .kassa-title-select {
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-sm);
    background: var(--off-white);
    font-weight: 700;
    padding: 8px 12px;
}

#kassa .kassa-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

#kassa .kassa-badge-row .badge,
#kassa .kassa-badge-row label.badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
    padding: 5px 10px;
    letter-spacing: .02em;
}

#kassa .kassa-close-shift-btn {
    border-radius: var(--k-radius-sm);
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    font-weight: 700;
    padding: 9px 16px;
}

#kassa .kassa-close-shift-btn:hover {
    background: #C62828;
    border-color: #C62828;
    color: #fff;
}

/* ---- toolbars (operations row + add/cat/newtype/return/lock row) ---- */
#kassa .kassa-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--off-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-md);
    padding: 10px;
    margin-bottom: 12px;
}

#kassa .kassa-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--k-radius-sm);
    padding: 9px 14px;
    font-weight: 700;
    font-size: 12.5px;
    border: 1px solid var(--border-gray);
    background: #fff;
    color: var(--brand-dark);
    text-decoration: none !important;
    line-height: 1.2;
}

#kassa .kassa-toolbar-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
}

#kassa .kassa-toolbar-btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

#kassa .kassa-toolbar-btn-primary:hover {
    background: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #fff;
}

#kassa .kassa-toolbar-btn-danger {
    background: var(--brand-red-light);
    border-color: var(--brand-red-light);
    color: var(--brand-red);
}

#kassa .kassa-toolbar-btn-danger:hover {
    background: #F9DCDB;
    color: var(--brand-red);
}

#kassa .kassa-toolbar-btn-icon {
    flex: none;
    width: 40px;
    padding: 9px 0;
}

/* ---- search row ---- */
#kassa .kassa-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

#kassa .kassa-search-field {
    position: relative;
    flex: 1 1 220px;
    display: flex;
    align-items: stretch;
}

#kassa .kassa-search-field input {
    border-radius: var(--k-radius-sm) 0 0 var(--k-radius-sm);
    border: 1px solid var(--border-gray);
    background: var(--off-white);
}

#kassa .kassa-search-field input:focus {
    background: #fff;
    border-color: var(--brand-primary);
}

#kassa .kassa-search-enter {
    flex: none;
    border-radius: 0 var(--k-radius-sm) var(--k-radius-sm) 0 !important;
    font-weight: 700;
    font-size: 11.5px;
}

/* ---- current sale / history toggle ---- */
#kassa .kassa-history-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#kassa .kassa-history-toggle a {
    border-radius: var(--k-radius-sm) !important;
}

/* ---- cart table ---- */
#kassa .kassa-cart-table {
    width: 100%;
    border-collapse: collapse;
}

#kassa .kassa-cart-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-gray);
    vertical-align: middle;
    overflow: hidden;
}

#kassa .kassa-cart-table tr:last-child td {
    border-bottom: none;
}

#kassa .kassa-row-num {
    color: var(--k-text-faint);
    font-weight: 700;
}

#kassa .kassa-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--off-white);
    border-radius: var(--k-radius-sm);
    padding: 2px;
}

#kassa .kassa-qty-stepper button {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-weight: 800;
    color: var(--k-text-soft);
}

#kassa .kassa-qty-stepper button:hover {
    background: #fff;
}

#kassa .kassa-qty-stepper input {
    width: 34px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
}

#kassa .kassa-qty-stepper span {
    min-width: 22px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
}

#kassa .kassa-row-del {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--k-text-faint);
}

#kassa .kassa-row-del:hover {
    background: var(--brand-red-light);
    color: var(--brand-red);
}

#kassa .kassa-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 16px;
    color: var(--k-text-faint);
    gap: 6px;
}

#kassa .kassa-empty-cart .kassa-empty-icon {
    font-size: 30px;
    color: var(--border-gray);
    margin-bottom: 4px;
}

#kassa .kassa-empty-cart h4 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--brand-dark);
}

#kassa .kassa-empty-cart p {
    margin: 0;
    font-size: 12.5px;
}

/* ---- journal (sale history) table ---- */
#kassa .kassa-journal-table td {
    vertical-align: middle;
}

/* ---- payment card ---- */
#kassa:not(.kassabuy) .kassa-total-card {
    position: sticky;
    top: 12px;
    border-radius: var(--k-radius-lg) !important;
    box-shadow: var(--k-shadow-sm);
}

#kassa:not(.kassabuy) .kassa-buyer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#kassa:not(.kassabuy) .kassa-buyer-grid label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--k-text-faint);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

#kassa:not(.kassabuy) .kassa-buyer-grid input {
    border-radius: var(--k-radius-sm);
    border: 1px solid var(--border-gray);
    background: var(--off-white);
}

#kassa .kassa-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px dashed var(--border-gray);
    border-bottom: 1px dashed var(--border-gray);
    margin: 10px 0;
}

#kassa .kassa-total-row .kassa-total-label {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--k-text-soft);
}

#kassa .kassa-total-row input#total_summ {
    border: none;
    background: transparent;
    text-align: right;
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-dark);
    padding: 0;
}

#kassa:not(.kassabuy) .kassa-pay-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

#kassa:not(.kassabuy) .kassa-pay-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 1.5px solid var(--border-gray);
    border-radius: var(--k-radius-md);
    padding: 10px 4px 8px;
    background: #fff;
}

#kassa:not(.kassabuy) .kassa-pay-tile:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
}

#kassa:not(.kassabuy) .kassa-pay-tile .kassa-pay-icon {
    width: 30px;
    height: 30px;
    font-size: .55em;
    margin-right: 0;
}

#kassa:not(.kassabuy) .kassa-pay-tile-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--k-text-soft);
    text-align: center;
}

#kassa:not(.kassabuy) .kassa-pay-tile input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--brand-dark);
    padding: 0;
}

#kassa:not(.kassabuy) .kassa-nds-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

#kassa .kassa-pay-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: var(--k-radius-md) !important;
    padding: 14px !important;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 800 !important;
    font-size: 14.5px !important;
    letter-spacing: .02em;
    box-shadow: 0 14px 26px -14px rgba(19, 148, 81, .55);
}

#kassa .kassa-pay-submit:hover {
    background: var(--brand-primary-dark);
    color: #fff;
}

#kassa .kassa-pay-submit:disabled {
    opacity: .5;
    box-shadow: none;
}

#kassa .kassa-pay-submit-danger {
    background: var(--brand-red);
    box-shadow: 0 14px 26px -14px rgba(229, 57, 53, .55);
}

#kassa .kassa-pay-submit-danger:hover {
    background: var(--brand-red-dark);
}

/* ---- remove native number-input spin buttons on the payment tiles ----
   (also see the onwheel="this.blur()" added in the blade markup, which
   stops the browser's default "mouse wheel changes a focused number
   input's value" behaviour) */
#kassa:not(.kassabuy) .kassa-pay-tile input[type="number"] {
    -moz-appearance: textfield;
}

#kassa:not(.kassabuy) .kassa-pay-tile input[type="number"]::-webkit-outer-spin-button,
#kassa:not(.kassabuy) .kassa-pay-tile input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- cart row: unit select + inline price editor (render_selected()) ---- */
#kassa #selected_goods_container select {
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-sm);
    background: var(--off-white);
    padding: 4px 6px;
    font-size: 12px;
}

#kassa:not(.kassabuy) .kassa-price-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

#kassa:not(.kassabuy) .kassa-price-edit input {
    width: 100%;
    min-width: 0;
    max-width: 56px;
    box-sizing: border-box;
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-sm);
    background: var(--off-white);
    padding: 5px 4px;
    font-size: 12px;
    text-align: right;
}

#kassa:not(.kassabuy) .kassa-price-edit input:focus {
    background: #fff;
    border-color: var(--brand-primary);
}

#kassa:not(.kassabuy) .kassa-price-edit input[type="number"] {
    -moz-appearance: textfield;
}

#kassa:not(.kassabuy) .kassa-price-edit input[type="number"]::-webkit-outer-spin-button,
#kassa:not(.kassabuy) .kassa-price-edit input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#kassa:not(.kassabuy) .kassa-price-edit button {
    flex: none;
    border: none;
    border-radius: var(--k-radius-sm);
    background: var(--brand-primary-light);
    color: var(--brand-primary-dark);
    font-weight: 700;
    font-size: 10px;
    padding: 5px 6px;
    white-space: nowrap;
}

#kassa:not(.kassabuy) .kassa-price-edit button:hover {
    background: var(--brand-primary);
    color: #fff;
}

/* ---- kassabuy: compact inline price input (render_selected() has no
   separate OK button — value commits on keyup via upd_item()) ---- */
#kassa.kassabuy .kassa-cart-table input[type="number"] {
    width: 72px;
    box-sizing: border-box;
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-sm);
    background: var(--off-white);
    padding: 5px 6px;
    font-size: 12px;
    text-align: right;
    -moz-appearance: textfield;
}

#kassa.kassabuy .kassa-cart-table input[type="number"]:focus {
    background: #fff;
    border-color: var(--brand-primary);
}

#kassa.kassabuy .kassa-cart-table input[type="number"]::-webkit-outer-spin-button,
#kassa.kassabuy .kassa-cart-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* lighter card look for the category/goods grid (bycat()) instead of
   the flat bootstrap btn-secondary grey */
#kassa .kassa-bycat-card.kassa-btn-modal {
    background: #fff !important;
    border: 1px solid var(--border-gray) !important;
    color: var(--brand-dark) !important;
}

#kassa .kassa-bycat-card.kassa-btn-modal:hover {
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary-dark) !important;
}

/* ---- lightweight modal used in place of native alert() popups ---- */
#kassa #kassa_alert_modal .modal-dialog {
    max-width: 360px;
}

#kassa #kassa_alert_modal .modal-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}

#kassa #kassa_alert_modal .kassa-alert-icon {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary-light);
    color: var(--brand-primary-dark);
    font-size: 15px;
}

/* ---- generic small circular icon badge (decorative FA icon wrapper) ---- */
#kassa .kassa-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7em;
    height: 1.7em;
    border-radius: 50%;
    font-size: .6em;
    vertical-align: middle;
    margin-right: 6px;
    background: var(--off-white);
    color: var(--k-text-soft);
}

#kassa .kassa-icon-badge-primary {
    background: var(--brand-primary-light);
    color: var(--brand-primary-dark);
}

#kassa .kassa-icon-badge-danger {
    background: var(--brand-red-light);
    color: var(--brand-red);
}

/* ---- category / quick-pick modal chips ---- */
#kassa .kassa-bycat-chip.kassa-btn-modal,
#kassa .kassa-bycat-card.kassa-btn-modal {
    border-radius: 999px !important;
}

#kassa .kassa-bycat-card.kassa-btn-modal {
    border-radius: var(--k-radius-md) !important;
    text-align: left;
}

/* ---- "no active kassa/shift" alternate screen ---- */
#kassa .kassa-alt-screen {
    margin-top: 16px;
}

#kassa .kassa-alt-card {
    border-radius: var(--k-radius-lg) !important;
    box-shadow: var(--k-shadow-sm);
    border-color: var(--border-gray) !important;
    margin-bottom: 16px;
}

/* ---- PIN lock overlay ---- */
#pinlock.kassa-lock-overlay {
    background: linear-gradient(180deg, #0E1611, #182219) !important;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 1 !important;
    padding: 0 !important;
}

#pinlock.kassa-lock-overlay label {
    color: #9AA79E;
}

#pinlock.kassa-lock-overlay .kassa-lock-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

#pinlock.kassa-lock-overlay .kassa-lock-field {
    width: 220px;
    text-align: center;
    border-radius: var(--k-radius-sm);
    border: 1px solid #33403A;
    background: #1B241E;
    color: #fff;
    padding: 10px;
    margin: 6px 0 14px;
}

#pinlock.kassa-lock-overlay .btn-primary {
    border-radius: var(--k-radius-md);
    padding: 10px 26px;
}

/* ---- modal chrome (check/operation/bycat/newtype/simplemode) ---- */
#kassa .modal-content {
    border-radius: var(--k-radius-lg);
    border: none;
    box-shadow: var(--k-shadow-md);
    overflow: hidden;
}

#kassa .modal-header {
    border-bottom: 1px solid var(--border-gray);
    padding: 14px 18px;
}

#kassa .modal-body {
    padding: 18px;
}

#kassa .modal-body .form-group {
    margin-bottom: 12px;
}

#kassa .modal-body .form-group label {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--k-text-faint);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

#kassa .modal-body .form-control {
    border-radius: var(--k-radius-sm);
    border: 1px solid var(--border-gray);
    background: var(--off-white);
}

#kassa .modal-footer {
    border-top: 1px solid var(--border-gray);
    padding: 12px 18px;
}

#kassa .modal-footer .btn,
#kassa .modal-body .btn-success {
    border-radius: var(--k-radius-sm);
    font-weight: 700;
}

#kassa #search_result:not(:empty) {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--k-radius-md);
    box-shadow: var(--k-shadow-md);
    margin-bottom: 10px;
    overflow: hidden;
}

/* ---- category / quick-pick modal grid ---- */
#kassa #bycat_modal_body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- receipt modal: the server-rendered check (check.blade.php) is a
   real fiscal document — never truncate/reflow its table (e.g. the НТИН
   column), just let it scroll horizontally inside the modal if it's wider
   than the dialog. ---- */
#kassa #check_modal_body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* The footer's #sendToMail (col-md-7) + Печать/Закрыть (col-md-5) columns
   rely on Bootstrap's grid split without a wrapping .row — their computed
   widths sum to exactly the footer's content width, so any sub-pixel
   rounding (padding, borders, scrollbar) flips flex-wrap and stacks them.
   Stack them deliberately instead of leaving that a hairline away from
   breaking, and lay the email field out as its own row so its button
   doesn't fall onto a line of its own underneath it. */
#kassa #check_modal .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

#kassa #check_modal .modal-footer > div {
    width: 100% !important;
    flex: none !important;
}

#kassa #sendToMail {
    display: flex;
    gap: 8px;
    align-items: center;
}

#kassa #sendToMail input[type="email"] {
    flex: 1;
    min-width: 0;
}

#kassa #check_modal .modal-footer > div:last-child {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Card-like framing for CRUD form/show tab content (nav-tabs + tab-content),
   without touching the tab markup itself. */
.nav-tabs.bar_tabs {
    border-bottom-color: var(--border-gray);
}

.nav-tabs.bar_tabs .nav-link,
.nav-tabs.bar_tabs > li > a {
    border-radius: .5rem .5rem 0 0;
}

#myTabContent.tab-content {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-top: none;
    border-radius: 0 0 .5rem .5rem;
    padding: 1.25rem;
}

/* Soft pill-style status badges (pale tint + colored text) per design
   reference, instead of Bootstrap's solid-fill .text-bg-*. */
.badge {
    font-weight: 600;
    padding: .4em .75em;
}

.badge.text-bg-success {
    background-color: var(--brand-green-light) !important;
    color: var(--brand-green) !important;
}

.badge.text-bg-danger {
    background-color: var(--brand-red-light) !important;
    color: var(--brand-red-dark) !important;
}

.badge.text-bg-warning {
    background-color: var(--brand-orange-light) !important;
    color: #B26A00 !important;
}

.badge.text-bg-secondary {
    background-color: #EEEEEE !important;
    color: #616161 !important;
}

.badge.text-bg-primary {
    background-color: var(--brand-primary-light) !important;
    color: var(--brand-primary) !important;
}

.badge.text-bg-info {
    background-color: var(--brand-blue-light) !important;
    color: var(--brand-blue) !important;
}

/*=====================================================================
  KASSA JOURNAL (SMENA REPORT) REDESIGN — journal.blade.php (ui=journal,
  action=journal_show). All rules are scoped under ".kassa-journal" so
  they cannot leak into other pages. journal_mobile.blade.php is
  unaffected. No existing selector above this block is modified.
=====================================================================*/

.kassa-journal {
    --kj-radius-lg: 14px;
    --kj-radius-md: 10px;
    --kj-shadow-md: 0 12px 28px -18px rgba(15, 20, 30, .18);
    font-variant-numeric: tabular-nums;
}

.kassa-journal .kj-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.kassa-journal .kj-header-card {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--kj-radius-lg);
    padding: 22px 26px;
    margin-bottom: 20px;
    box-shadow: var(--kj-shadow-md);
}

.kassa-journal .kj-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.kassa-journal .kj-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kassa-journal .kj-title h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    color: var(--brand-dark);
}

.kassa-journal .kj-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px 4px 8px;
    border-radius: 20px;
}

.kassa-journal .kj-status-pill.kj-open {
    background: var(--brand-primary-light);
    color: var(--brand-primary-dark);
}

.kassa-journal .kj-status-pill.kj-open .kj-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary);
    animation: kjPulse 2s infinite;
}

.kassa-journal .kj-status-pill.kj-closed {
    background: var(--off-white);
    color: #667085;
}

@keyframes kjPulse {
    0% { box-shadow: 0 0 0 0 rgba(19, 148, 81, .4); }
    70% { box-shadow: 0 0 0 6px rgba(19, 148, 81, 0); }
    100% { box-shadow: 0 0 0 0 rgba(19, 148, 81, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .kassa-journal .kj-status-pill.kj-open .kj-dot { animation: none; }
}

.kassa-journal .kj-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-gray);
}

.kassa-journal .kj-meta-item .kj-lbl {
    font-size: 11px;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.kassa-journal .kj-meta-item .kj-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-dark);
}

.kassa-journal .kj-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.kassa-journal .kj-stat-tile {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--kj-radius-md);
    padding: 16px 18px 14px;
    position: relative;
    overflow: hidden;
}

.kassa-journal .kj-stat-tile::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--kj-accent, var(--brand-primary));
}

.kassa-journal .kj-stat-tile .kj-lbl {
    font-size: 11.5px;
    color: #667085;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kassa-journal .kj-stat-tile .kj-lbl .kj-sw {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--kj-accent, var(--brand-primary));
}

.kassa-journal .kj-stat-tile .kj-val {
    font-size: 22px;
    font-weight: 700;
    margin-top: 8px;
}

.kassa-journal .kj-stat-tile.kj-total {
    background: linear-gradient(160deg, var(--brand-primary-light), #fff 70%);
}

.kassa-journal .kj-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 26px 0 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.kassa-journal .kj-section-head h2 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0;
    color: var(--brand-dark);
}

.kassa-journal .kj-section-head .kj-count {
    color: #98a2b3;
    font-weight: 500;
}

.kassa-journal .kj-section-head .kj-hint {
    font-size: 12px;
    color: #98a2b3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    cursor: pointer;
}

.kassa-journal .kj-section-head .kj-hint:hover {
    color: var(--brand-primary-dark);
}

.kassa-journal .kj-filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.kassa-journal .kj-filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #667085;
    margin: 0;
}

.kassa-journal .kj-filter-bar .form-control,
.kassa-journal .kj-filter-bar .form-select {
    min-width: 120px;
}

.kassa-journal .kj-filter-count {
    font-size: 12px;
    color: #98a2b3;
    align-self: center;
}

.kassa-journal .kj-table-card {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--kj-radius-lg);
    overflow: hidden;
}

.kassa-journal .kj-table-scroll {
    overflow-x: auto;
}

.kassa-journal .kj-table-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.kassa-journal .kj-table-card thead th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #98a2b3;
    font-weight: 700;
    padding: 12px 14px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-gray);
    white-space: nowrap;
}

.kassa-journal .kj-table-card th.num,
.kassa-journal .kj-table-card td.num {
    text-align: right;
}

.kassa-journal .kj-table-card tbody td {
    padding: 11px 14px;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border-gray);
    vertical-align: middle;
    white-space: nowrap;
}

.kassa-journal .kj-table-card tbody tr:last-child td {
    border-bottom: none;
}

.kassa-journal .kj-table-card tbody tr.kj-row-clickable {
    cursor: pointer;
    transition: background .12s;
}

.kassa-journal .kj-table-card tbody tr.kj-row-clickable:hover {
    background: #f2f5fc;
}

.kassa-journal .kj-table-card tbody tr.kj-row-clickable:hover .kj-receipt-link {
    text-decoration: underline;
}

.kassa-journal .kj-receipt-link {
    color: var(--brand-primary-dark);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kassa-journal .kj-who {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kassa-journal .kj-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kassa-journal .kj-op-badge.kj-return {
    color: var(--brand-red);
    font-weight: 600;
}

.kassa-journal .kj-cancel-badge {
    font-size: 11px;
}

.kassa-journal .kj-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.kassa-journal .kj-person-card {
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: var(--kj-radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.kassa-journal .kj-person-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kassa-journal .kj-person-id .kj-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.kassa-journal .kj-person-id .kj-name {
    font-weight: 700;
    font-size: 14px;
}

.kassa-journal .kj-person-id .kj-sub {
    font-size: 11.5px;
    color: #98a2b3;
}

.kassa-journal .kj-breakdown {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.kassa-journal .kj-breakdown .kj-b {
    text-align: right;
}

.kassa-journal .kj-breakdown .kj-b .kj-l {
    font-size: 10.5px;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kassa-journal .kj-breakdown .kj-b .kj-v {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.kassa-journal .kj-detail-toggle-wrap {
    text-align: center;
    margin: 18px 0;
}

.kassa-journal .kj-detail-toggle {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-primary-dark);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
}

.kassa-journal .kj-detail-toggle:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .kassa-journal .kj-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .kassa-journal .kj-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* Receipt-preview modal opened from the journal table ("show_check()").
   Bootstrap's default modal-footer just flex-wraps its direct children;
   #sendToWhatsapp's input (a block-level .form-control) grabs a full row
   on its own, stranding its WhatsApp button and shoving Печать/Закрыть
   onto a crooked second line. Group each control cluster explicitly. */
.kassa-journal-check-modal #printArea {
    overflow-x: auto;
}

.kassa-journal-check-modal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.kassa-journal-check-modal .modal-footer #sendToWhatsapp {
    display: flex;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
}

.kassa-journal-check-modal .modal-footer #sendToWhatsapp input {
    flex: 1 1 auto;
    min-width: 0;
}

.kassa-journal-check-modal .modal-footer #sendToWhatsapp .btn {
    flex: 0 0 auto;
}
