/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Isee Lens brand system ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
:root {
    --isee-navy: #073f87;
    --isee-blue: #0867bd;
    --isee-sky: #28a8e8;
    --isee-ice: #eaf5ff;
    --isee-line: #d9e8f6;
    --isee-ink: #173554;
    --bs-primary: #0867bd;
    --bs-primary-rgb: 8, 103, 189;
    --bs-success: #0876b9;
    --bs-success-rgb: 8, 118, 185;
    --bs-body-color: #173554;
    --bs-body-font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --bs-link-color: #075eae;
    --bs-link-hover-color: #063f87;
    --bs-border-color: #d9e8f6;
}

html,
body {
    min-height: 100%;
}

body {
    color: var(--isee-ink);
    background:
        radial-gradient(circle at 96% 23%, rgba(40, 168, 232, 0.14), transparent 20rem),
        radial-gradient(circle at 4% 82%, rgba(8, 103, 189, 0.11), transparent 24rem),
        linear-gradient(135deg, #f9fcff 0%, #eff7ff 52%, #f8fbff 100%);
    letter-spacing: 0.005em;
}

body::before {
    content: '';
    position: fixed;
    z-index: 0;
    top: 58%;
    right: -13rem;
    width: 35rem;
    height: 35rem;
    opacity: 0.48;
    pointer-events: none;
    background:
        linear-gradient(138deg, transparent 0 33%, rgba(31, 133, 210, 0.14) 33% 37%, transparent 37% 48%, rgba(7, 63, 135, 0.18) 48% 54%, transparent 54% 64%, rgba(40, 168, 232, 0.16) 64% 69%, transparent 69%),
        radial-gradient(circle, rgba(8, 103, 189, 0.42) 1px, transparent 1.8px);
    background-size: auto, 11px 11px;
    transform: rotate(-12deg);
}

/* Keep decorative bg behind content; header above main so dropdowns aren't covered */
#header {
    position: relative;
    z-index: 1030;
}

#main,
#footer {
    position: relative;
    z-index: 1;
}

#main {
    min-height: calc(100vh - 8.75rem);
}

.isee-navbar {
    min-height: 4.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(7, 63, 135, 0.1);
    box-shadow: 0 6px 24px rgba(7, 63, 135, 0.08);
    backdrop-filter: blur(14px);
}

.isee-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--isee-navy), var(--isee-sky), var(--isee-blue));
}

.isee-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    margin-right: 0.85rem;
    color: var(--isee-navy);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.isee-navbar-work-shift {
    margin-right: 0.65rem;
}

@media (min-width: 992px) {
    .isee-navbar-work-shift {
        margin-right: 1rem;
    }
}

.isee-navbar .navbar-brand:hover,
.isee-navbar .navbar-brand:focus {
    color: var(--isee-blue);
}

.isee-brand-logo {
    display: block;
    width: auto;
    height: 2.1rem;
    max-width: 14.5rem;
    object-fit: contain;
    object-position: left center;
}

.isee-navbar .navbar-nav .nav-link {
    padding: 0.55rem 0.78rem;
    color: #4d6680;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.isee-navbar .navbar-nav .nav-link:hover,
.isee-navbar .navbar-nav .nav-link:focus,
.isee-navbar .navbar-nav .nav-link.active,
.isee-navbar .navbar-nav .show > .nav-link {
    color: var(--isee-navy);
    background: #e9f5ff;
}

.isee-navbar .dropdown-menu {
    padding: 0.45rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.75rem;
    box-shadow: 0 14px 32px rgba(7, 63, 135, 0.13);
}

/* Profile menu sits at the right edge — keep it inside the viewport */
.isee-navbar .navbar-nav.ms-auto > .dropdown > .dropdown-menu {
    --bs-position: end;
    right: 0;
    left: auto;
}

.isee-navbar .navbar-nav.ms-auto .isee-account-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: var(--isee-navy);
}

.isee-navbar .dropdown-item {
    padding: 0.56rem 0.7rem;
    color: #38536e;
    font-size: 0.9rem;
    border-radius: 0.45rem;
}

.isee-navbar .dropdown-item:hover,
.isee-navbar .dropdown-item:focus {
    color: var(--isee-navy);
    background: #e9f5ff;
}

.isee-navbar .navbar-toggler.isee-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    width: 2.5rem;
    height: 2.35rem;
    padding: 0.5rem;
    border: 1px solid rgba(7, 63, 135, 0.22);
    border-radius: 0.52rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(7, 63, 135, 0.06);
}

.isee-navbar .navbar-toggler.isee-nav-toggle:focus {
    box-shadow: 0 0 0 0.22rem rgba(40, 168, 232, 0.2);
}

.isee-navbar .navbar-toggler.isee-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 99px;
    background: var(--isee-navy);
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.isee-navbar .navbar-toggler.isee-nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(0.35rem) rotate(45deg);
}

.isee-navbar .navbar-toggler.isee-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.isee-navbar .navbar-toggler.isee-nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-0.35rem) rotate(-45deg);
}

@media (max-width: 991.98px) {
    .isee-navbar .navbar-brand {
        margin-right: 0;
    }

    .isee-navbar .navbar-toggler.isee-nav-toggle {
        display: inline-flex;
    }

    .isee-navbar .navbar-collapse {
        margin-top: 0.65rem;
        padding: 0.55rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--isee-line);
        border-radius: 0.75rem;
        box-shadow: 0 16px 36px rgba(7, 63, 135, 0.16);
    }

    .isee-navbar .navbar-collapse .navbar-nav + .navbar-nav {
        margin-top: 0.4rem;
        padding-top: 0.4rem;
        border-top: 1px solid var(--isee-line);
    }
}

main > .container {
    padding: calc(5.75rem + env(safe-area-inset-top, 0px)) 15px 20px;
}

/* Wide pages use container-fluid; keep space under fixed-top navbar */
main > .container-fluid {
    padding-top: calc(5.75rem + env(safe-area-inset-top, 0px));
    padding-bottom: 20px;
}

.isee-impersonation-bar {
    position: fixed;
    top: calc(4.5rem + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    z-index: 1025;
    padding: 0.55rem 0;
    background: linear-gradient(90deg, var(--isee-navy), var(--isee-blue));
    color: #fff;
    box-shadow: 0 4px 16px rgba(7, 63, 135, 0.2);
    font-size: 0.9rem;
}

.isee-impersonation-bar .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.isee-impersonation-bar .btn-light {
    white-space: nowrap;
}

body.isee-impersonating main > .container,
body.isee-impersonating main > .container-fluid {
    padding-top: calc(5.75rem + 2.85rem + env(safe-area-inset-top, 0px));
}

@media (max-width: 575.98px) {
    .isee-impersonation-bar {
        font-size: 0.82rem;
    }

    body.isee-impersonating main > .container,
    body.isee-impersonating main > .container-fluid {
        padding-top: calc(5.75rem + 4.25rem + env(safe-area-inset-top, 0px));
    }
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

#footer {
    margin-top: 2rem;
    padding: 1.1rem 0;
    color: #6b8298;
    font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(7, 63, 135, 0.08);
}

.footer-caption {
    font-size: 0.78rem;
}

.breadcrumb {
    margin-bottom: 1.3rem;
    padding: 0.55rem 0.75rem;
    color: #6d8499;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(217, 232, 246, 0.78);
    border-radius: 0.55rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: #9fb9cf; }
.breadcrumb-item.active { color: #4b6883; }

.card {
    border: 1px solid rgba(217, 232, 246, 0.9) !important;
    border-radius: 0.85rem;
    box-shadow: 0 7px 24px rgba(22, 79, 130, 0.07) !important;
}

.card-header { border-color: var(--isee-line) !important; }

.btn {
    --bs-btn-font-weight: 650;
    --bs-btn-border-radius: 0.52rem;
    --bs-btn-padding-x: 0.9rem;
    --bs-btn-padding-y: 0.48rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }

.btn-primary,
.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--isee-blue);
    --bs-btn-border-color: var(--isee-blue);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #07549b;
    --bs-btn-hover-border-color: #07549b;
    --bs-btn-focus-shadow-rgb: 8, 103, 189;
    --bs-btn-active-bg: #064988;
    --bs-btn-active-border-color: #064988;
    box-shadow: 0 4px 10px rgba(8, 103, 189, 0.17);
}

.btn-outline-primary {
    --bs-btn-color: #075eae;
    --bs-btn-border-color: #8dc6ee;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--isee-blue);
    --bs-btn-hover-border-color: var(--isee-blue);
}

.btn-outline-secondary {
    --bs-btn-color: #56718b;
    --bs-btn-border-color: #c7d9e8;
    --bs-btn-hover-bg: #6b8298;
    --bs-btn-hover-border-color: #6b8298;
}

.form-label,
.form-group > label,
.form-check-label {
    color: #3c5873;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control,
.form-select {
    color: var(--isee-ink);
    border-color: #cbddeb;
    border-radius: 0.5rem;
    box-shadow: none;
}

.form-control::placeholder { color: #9aafc0; }
.form-control:hover, .form-select:hover { border-color: #93c5e7; }

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #6eb6e7;
    box-shadow: 0 0 0 0.22rem rgba(40, 168, 232, 0.16);
}

.form-check-input:checked {
    background-color: var(--isee-blue);
    border-color: var(--isee-blue);
}

.alert { border-radius: 0.65rem; }

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}

/* Login */
.site-index {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 9.5rem);
}

.site-index > .row { width: 100%; }

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.13fr) minmax(21rem, 0.87fr);
    overflow: hidden;
    min-height: 33rem;
    background: #fff;
    border: 1px solid rgba(217, 232, 246, 0.95);
    border-radius: 1.25rem;
    box-shadow: 0 20px 55px rgba(7, 63, 135, 0.14);
}

.login-intro {
    position: relative;
    overflow: hidden;
    padding: clamp(2.2rem, 5vw, 4.7rem);
    color: #fff;
    background:
        radial-gradient(circle at 24% 25%, rgba(118, 217, 255, 0.48), transparent 23rem),
        linear-gradient(135deg, #043b7e 0%, #0765b5 58%, #159ee0 100%);
}

.login-intro::before,
.login-intro::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.login-intro::before {
    right: -10rem;
    bottom: -12rem;
    width: 37rem;
    height: 37rem;
    opacity: 0.8;
    background: repeating-linear-gradient(48deg, transparent 0 3.8rem, rgba(255, 255, 255, 0.15) 3.8rem 5.2rem, transparent 5.2rem 7.4rem);
    transform: rotate(-16deg);
}

.login-intro::after {
    left: -5rem;
    bottom: -8rem;
    width: 24rem;
    height: 24rem;
    opacity: 0.3;
    background-image: radial-gradient(circle, #fff 1.3px, transparent 1.7px);
    background-size: 11px 11px;
}

.login-intro > * { position: relative; z-index: 1; }

.login-intro-brand {
    display: inline-flex;
    align-items: center;
    width: min(100%, 18rem);
    margin-bottom: clamp(3.3rem, 11vw, 7rem);
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0.65rem;
    box-shadow: 0 6px 18px rgba(0, 38, 90, 0.14);
}

.login-brand-logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 3.75rem;
    object-fit: contain;
    object-position: left center;
}

.login-kicker {
    margin: 0 0 0.65rem;
    color: #e5f5ff;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.login-intro h1 {
    max-width: 30rem;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 3.4vw, 3.3rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.06;
}

.login-intro-copy {
    max-width: 26rem;
    margin: 1.25rem 0 1.7rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.03rem;
    line-height: 1.6;
}

.login-intro-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.login-intro-points span {
    padding: 0.38rem 0.68rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.login-card-wrap {
    display: flex;
    align-items: center;
    padding: clamp(2rem, 4vw, 4rem);
    background: linear-gradient(150deg, #fff 0%, #f6fbff 100%);
}

.login-card {
    width: 100%;
    max-width: 23rem;
    margin: 0 auto;
}

.login-card-heading { margin-bottom: 2rem; }
.login-card-heading .login-kicker { color: var(--isee-blue); }

.login-card-heading h2 {
    margin: 0 0 0.5rem;
    color: var(--isee-navy);
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.login-card-heading p:last-child {
    margin: 0;
    color: #72879a;
    font-size: 0.94rem;
}

.login-card .form-group,
.login-card .mb-3 { margin-bottom: 1.1rem !important; }

.login-card .form-control {
    min-height: 2.9rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
}

.login-card .btn-lg {
    min-height: 3rem;
    font-size: 0.98rem;
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Order view ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.order-view-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #f0fdf4 100%);
}

.order-view-hero .letter-spacing {
    letter-spacing: 0.08em;
}

.order-view-status-wrap .order-status-badge {
    font-size: 1rem;
    padding: 0.5em 0.85em;
}

.order-view-track {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: #1e293b;
}

.order-view-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.order-view-product-tiles > [class*="col-"] {
    min-width: 0;
}

.order-view-eye-badge {
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.order-view-dl dt {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.order-view-dl dd {
    margin-bottom: 1rem;
    color: #0f172a;
}

.order-view-dl dd:last-child {
    margin-bottom: 0;
}

.order-view-dl.row dt {
    padding-top: 0.35rem;
}

.order-view-dl.row dd {
    margin-bottom: 0.75rem;
}

.order-view-empty {
    color: #94a3b8;
    font-style: normal;
}

.order-view-rx thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
}

.order-view-rx tbody td {
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.order-view-rx tbody tr:last-child td {
    border-bottom: 0;
}

.order-view-muted-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1 !important;
}

.order-view-remark {
    line-height: 1.6;
    color: #334155;
}

.frame-view .badge.rounded-pill.fs-6 {
    font-size: 0.875rem !important;
}

@media (max-width: 767.98px) {
    .order-view-hero .card-body {
        padding: 1.25rem !important;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ List index (shared grid pages) ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.list-index-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #f0fdf4 100%);
}

.list-index-eyebrow {
    letter-spacing: 0.08em;
}

.list-index-table-card .grid-view {
    border: 0;
}

.list-index-table-card .table-responsive {
    margin: 0;
}

.list-index-table {
    width: 100%;
    margin-bottom: 0;
}

.list-index-table thead th {
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.list-index-table thead th a {
    color: #64748b;
}

.order-index-sort {
    min-width: 11.5rem;
    width: auto;
    max-width: 18rem;
}

.order-index-toolbar {
    background: #fff;
}

.order-bulk-toolbar {
    background: #fcf8f8;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.order-bulk-status,
.order-bulk-payment-status {
    min-width: 14rem;
}

.order-index-table .order-bulk-check {
    width: 1.1rem;
    height: 1.1rem;
}

/* Desktop: allow filter dropdowns to escape the table. Mobile: keep horizontal scroll. */
.order-index-table-card .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
    .order-index-table-card .table-responsive {
        overflow-x: visible;
    }
}

.order-index-table {
    table-layout: auto;
    width: 100%;
}

.order-index-table th,
.order-index-table td {
    white-space: normal;
}

.order-index-table .text-nowrap {
    white-space: nowrap;
}

.list-index-table tbody tr.order-index-row-reorder > td {
    background-color: #fffbeb;
    box-shadow: inset 0 2px 0 #eab308, inset 0 -2px 0 #eab308;
}

.list-index-table tbody tr.order-index-row-reorder > td:first-child {
    box-shadow: inset 2px 2px 0 #eab308, inset 0 -2px 0 #eab308;
}

.list-index-table tbody tr.order-index-row-reorder > td:last-child {
    box-shadow: inset -2px 2px 0 #eab308, inset 0 -2px 0 #eab308;
}

.list-index-table tbody tr.order-index-row-urgent > td,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-reorder > td,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor > td,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor.order-index-row-reorder > td {
    background-color: #fef2f2;
    box-shadow: inset 0 2px 0 #dc2626, inset 0 -2px 0 #dc2626;
}

.list-index-table tbody tr.order-index-row-urgent > td:first-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-reorder > td:first-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor > td:first-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor.order-index-row-reorder > td:first-child {
    box-shadow: inset 2px 2px 0 #dc2626, inset 0 -2px 0 #dc2626;
}

.list-index-table tbody tr.order-index-row-urgent > td:last-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-reorder > td:last-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor > td:last-child,
.list-index-table tbody tr.order-index-row-urgent.order-index-row-contractor.order-index-row-reorder > td:last-child {
    box-shadow: inset -2px 2px 0 #dc2626, inset 0 -2px 0 #dc2626;
}

.list-index-table tbody tr.order-index-row-contractor > td {
    background-color: #f3e8ff;
    box-shadow: inset 0 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.order-index-row-contractor > td:first-child {
    box-shadow: inset 2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.order-index-row-contractor > td:last-child {
    box-shadow: inset -2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.order-index-row-contractor.order-index-row-reorder > td {
    background-color: #f3e8ff;
    box-shadow: inset 0 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.order-index-row-contractor.order-index-row-reorder > td:first-child {
    box-shadow: inset 2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.order-index-row-contractor.order-index-row-reorder > td:last-child {
    box-shadow: inset -2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.optic-index-row-contractor > td {
    background-color: #f3e8ff;
    box-shadow: inset 0 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.optic-index-row-contractor > td:first-child {
    box-shadow: inset 2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.list-index-table tbody tr.optic-index-row-contractor > td:last-child {
    box-shadow: inset -2px 2px 0 #9333ea, inset 0 -2px 0 #9333ea;
}

.text-bg-contractor {
    background-color: #9333ea !important;
    color: #fff !important;
}

.order-index-subsidiary-filter-cell {
    min-width: 12rem;
}

.order-index-subsidiary-filter-cell .searchable-combobox-list {
    min-width: 16rem;
}

.order-index .order-index-product-filter-cell {
    min-width: 8rem;
    max-width: none;
}

.list-index-table tbody td {
    border-color: #f1f5f9;
    vertical-align: middle;
}

.list-index-table .filters td {
    background: #fafbfc;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    vertical-align: top;
}

.list-index-grid .btn + .btn {
    margin-left: 0.25rem;
}

.list-index-summary {
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}

.list-index-page-size-wrap {
    flex: 0 0 auto;
}

.list-index-page-size {
    width: auto;
    min-width: 4.5rem;
}

.list-index-pager .pagination {
    --bs-pagination-padding-x: 0;
    --bs-pagination-padding-y: 0;
    --bs-pagination-border-width: 0;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.list-index-pager .page-item {
    margin: 0;
}

.list-index-pager .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    text-decoration: none;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.list-index-pager .page-item:first-child .page-link,
.list-index-pager .page-item:last-child .page-link {
    border-radius: 0.55rem;
}

.list-index-pager .page-link:hover,
.list-index-pager .page-link:focus {
    z-index: 2;
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.list-index-pager .page-item.active .page-link {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.28);
}

.list-index-pager .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: none;
    pointer-events: none;
}

.list-index-pager .page-item.prev .page-link,
.list-index-pager .page-item.next .page-link,
.list-index-pager .page-item.first .page-link,
.list-index-pager .page-item.last .page-link {
    font-size: 1.25rem;
    font-weight: 500;
}

@media (max-width: 575.98px) {
    .list-index-pager .page-link {
        min-width: 2.25rem;
        min-height: 2.25rem;
        font-size: 0.9375rem;
    }
}

.order-index-track,
.list-index-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    padding: 0.2rem 0.45rem;
    background: #f1f5f9;
    border-radius: 0.25rem;
    color: #334155;
    text-decoration: none;
}

.order-index-track:hover,
.list-index-mono:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.order-index-product,
.list-index-truncate {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    word-break: break-word;
}

.order-index-product-filter-cell {
    min-width: 9rem;
    max-width: 12rem;
}

.order-index-product-filter {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.order-index-product-filter .form-control-sm {
    width: 100%;
    min-width: 0;
}

.order-status-badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.searchable-combobox-list {
    top: 100%;
    left: 0;
    z-index: 1050;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.searchable-combobox-list .list-group-item-action {
    cursor: pointer;
}

.report-monthly-country .report-optic-filter-toggle {
    position: relative;
    padding-right: 2rem;
}

.report-monthly-country .report-optic-filter-chevron::before {
    content: '';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    margin-top: -0.15rem;
    border: 0.3em solid transparent;
    border-top-color: currentColor;
}

.report-monthly-country .report-optic-filter-modal-dialog {
    max-width: 34rem;
}

.report-monthly-country .report-optic-select-all-wrap {
    background: rgba(var(--bs-primary-rgb), 0.06);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
    border-radius: 0.5rem;
    padding: 0.75rem 0.85rem;
}

.report-monthly-country .report-optic-filter-tree {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: #fff;
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
}

.report-monthly-country .report-optic-group {
    padding: 0.55rem 0;
}

.report-monthly-country .report-optic-group + .report-optic-group {
    border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.report-monthly-country .report-optic-group-parent .form-check-label {
    font-weight: 600;
    color: var(--bs-body-color);
}

.report-monthly-country .report-optic-group-children {
    margin: 0.35rem 0 0 0.35rem;
    padding: 0.15rem 0 0.15rem 1rem;
    border-left: 2px solid rgba(var(--bs-primary-rgb), 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.report-monthly-country .report-optic-group-child .form-check-label {
    color: var(--bs-secondary-color);
}

.report-monthly-country .report-optic-group-child .form-check-label::before {
    content: 'ÃÂ¢ÃÂÃÂ ';
    color: var(--bs-secondary-color);
}

.report-monthly-country .report-optic-filter .form-check {
    min-height: 1.35rem;
    padding-left: 1.65em;
}

.report-monthly-country .report-optic-filter .form-check-input {
    margin-top: 0.2em;
}

.order-dia-pane {
    max-width: 28rem;
}

.order-dia-pane .form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.order-dia-decentral .form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

.order-dia-decentral-field {
    min-width: 7rem;
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Price list sheets ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.price-list-sheets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.price-list-sheet {
    background: linear-gradient(180deg, #f4f9ff 0%, #dceaf8 100%);
    color: #14376e;
    border-radius: 0.65rem;
    padding: 0.7rem 0.85rem 0.85rem;
    overflow: hidden;
    border: 1px solid rgba(43, 76, 126, 0.12);
}

.price-list-sheet__header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0.35rem;
    min-height: 1.6rem;
}

.price-list-sheet__title {
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #14376e;
    letter-spacing: 0.01em;
}

.price-list-sheet__add {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
}

.price-list-sheet__table {
    width: 100%;
    border-collapse: collapse;
}

.price-list-sheet__table th,
.price-list-sheet__table td {
    border-bottom: 1px solid #2b4c7e;
    padding: 0.28rem 0.4rem;
    text-align: center;
    vertical-align: middle;
    color: #14376e;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.price-list-sheet__table thead th {
    font-weight: 700;
    font-size: 0.8rem;
    border-bottom-width: 1px;
}

.price-list-sheet__table tbody th {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    width: 1%;
    padding-left: 0.15rem;
}

.price-list-sheet__table tbody tr:last-child th,
.price-list-sheet__table tbody tr:last-child td {
    border-bottom-color: #2b4c7e;
}

.price-list-sheet__axis {
    width: 1%;
    border-bottom-color: transparent !important;
}

.price-list-sheet__price {
    color: #14376e;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

a.price-list-sheet__price:hover {
    text-decoration: underline;
    color: #0f2d5c;
}

.price-list-sheet__empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    color: #7ba3d4;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
}

.price-list-sheet__empty:hover {
    background: rgba(20, 55, 110, 0.08);
    color: #14376e;
}

@media (min-width: 1400px) {
    .price-list-sheets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .price-list-sheets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .price-list-sheets {
        grid-template-columns: 1fr;
    }

    .price-list-sheet {
        padding: 0.75rem;
        border-radius: 0;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .price-list-sheet__title {
        font-size: 1.05rem;
    }

    .price-list-sheet__add {
        position: static;
        transform: none;
        margin-top: 0.35rem;
    }

    .price-list-sheet__header {
        flex-direction: column;
    }

    .price-list-sheet__table th,
    .price-list-sheet__table td {
        padding: 0.35rem 0.4rem;
        font-size: 0.8rem;
    }

    .list-index-table-card {
        border-radius: 0;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .list-index-table .ps-4,
    .list-index-table thead th.ps-4,
    .list-index-table .filters td.ps-4 {
        padding-left: 0.75rem !important;
    }

    .list-index-table .pe-4,
    .list-index-table .filters td.pe-4 {
        padding-right: 0.75rem !important;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Task board (kanban) ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.task-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.task-board-column {
    min-width: 220px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.task-board-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    border-top: 3px solid #94a3b8;
    border-radius: 0.75rem 0.75rem 0 0;
    background: #fff;
}

.task-board-column.tone-new .task-board-column-head { border-top-color: #3b82f6; }
.task-board-column.tone-progress .task-board-column-head { border-top-color: #0ea5e9; }
.task-board-column.tone-review .task-board-column-head { border-top-color: #f59e0b; }
.task-board-column.tone-rework .task-board-column-head { border-top-color: #64748b; }
.task-board-column.tone-rejected .task-board-column-head { border-top-color: #ef4444; }
.task-board-column.tone-done .task-board-column-head { border-top-color: #22c55e; }

.task-board-column-title {
    font-size: 0.85rem;
    font-weight: 650;
    margin: 0;
    line-height: 1.3;
}

.task-board-column-count {
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.task-board-column-body {
    padding: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.task-board-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    padding: 1.25rem 0.5rem;
}

.task-board-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.85rem 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.task-board-card:hover {
    color: inherit;
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.task-board-card.is-overdue {
    background: #fef2f2;
    border-color: #fca5a5;
}

.task-board-card.is-overdue:hover {
    border-color: #f87171;
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.12);
}

.task-board-card-title {
    font-weight: 650;
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.task-board-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #64748b;
}

.task-board-user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
}

.task-board-user-label {
    flex: 0 0 auto;
    color: #94a3b8;
    font-weight: 600;
}

.task-board-user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-board-card-due {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: #475569;
}

.task-board-card-due.is-overdue {
    color: #b91c1c;
    font-weight: 600;
}

.task-board-card-viewed {
    margin-top: 0.45rem;
}

.task-board-card-optic,
.task-board-card-order {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: #475569;
}

.task-body-text {
    white-space: pre-wrap;
    line-height: 1.55;
}

.task-result-item {
    background: #f8fafc;
}

@media (max-width: 1199.98px) {
    .task-board {
        grid-template-columns: repeat(6, minmax(240px, 1fr));
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Mobile / PWA ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
html {
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    overflow-x: hidden;
    overflow-x: clip;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

#main,
#main > .container,
#main > .container-fluid {
    max-width: 100%;
    min-width: 0;
}

#main > .container,
#main > .container-fluid {
    overflow-x: clip;
}

.table-responsive,
.list-index-table-card .table-responsive {
    max-width: 100%;
}

#header .navbar.fixed-top {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.list-index-table-card .table-responsive,
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.task-board {
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
}

.task-board-column {
    scroll-snap-align: start;
}

@media (max-width: 991.98px) {
    .order-bulk-status,
    .order-bulk-payment-status,
    .order-index-sort {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .order-bulk-toolbar .order-bulk-form,
    .order-index-toolbar .card-body {
        width: 100%;
    }

    .order-bulk-toolbar .card-body {
        align-items: stretch !important;
    }

    .list-index-hero .card-body {
        padding: 1.15rem !important;
    }

    .list-index-hero h1.h2 {
        font-size: 1.45rem;
    }

    .order-view-hero h1.h2,
    .task-view .h2 {
        font-size: 1.45rem;
        word-break: break-word;
    }

    .order-view-hero .btn,
    .task-view .order-view-hero .btn,
    .list-index-hero .d-flex.flex-wrap.gap-2 > .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 575.98px) {
    main > .container,
    main > .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Prevent iOS zoom on focus */
    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm,
    textarea.form-control {
        font-size: 16px;
    }

    .list-index-hero .d-flex.flex-wrap.gap-2 {
        width: 100%;
    }

    .list-index-hero .d-flex.flex-wrap.gap-2 > .btn {
        flex: 1 1 100%;
        text-align: center;
    }

    .order-view-hero .d-flex.flex-wrap.gap-2 > .btn,
    .task-view .order-view-hero .d-flex.flex-wrap.gap-2 > .btn {
        flex: 1 1 calc(50% - 0.25rem);
        text-align: center;
    }

    .order-index-product-filter-cell,
    .order-index-subsidiary-filter-cell {
        min-width: 10rem;
    }

    .order-index-subsidiary-filter-cell .searchable-combobox-list {
        min-width: 100%;
    }

    .report-monthly-country .fs-4 {
        font-size: 1.05rem !important;
        white-space: normal !important;
        word-break: break-word;
        line-height: 1.25;
    }

    .report-monthly-country .btn-group.w-100 {
        flex-direction: column;
    }

    .report-monthly-country .btn-group.w-100 > .btn,
    .report-monthly-country .btn-group.w-100 > label.btn {
        border-radius: 0.375rem !important;
        width: 100%;
    }

    .list-index-summary,
    .list-index-page-size-wrap,
    .list-index-pager {
        width: 100%;
    }

    .list-index-page-size-wrap {
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: flex-start;
    }

    .list-index-pager .pagination {
        justify-content: center;
    }

    #header .navbar-collapse {
        max-height: calc(100vh - 3.5rem - env(safe-area-inset-top));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-dia-decentral-field {
        min-width: 0;
        flex: 1 1 100%;
    }

    .order-dia-decentral .form-label {
        white-space: normal;
    }

    .task-board {
        grid-template-columns: repeat(6, minmax(78vw, 1fr));
        gap: 0.75rem;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .task-board-column {
        min-width: min(78vw, 100%);
        max-height: calc(100vh - 180px - env(safe-area-inset-bottom));
    }

    .breadcrumb {
        font-size: 0.8125rem;
        flex-wrap: wrap;
    }
}

/* Applied after component styles so every screen shares the Isee Lens palette. */
.order-view-hero,
.list-index-hero {
    position: relative;
    overflow: hidden;
    color: var(--isee-ink);
    background: linear-gradient(102deg, rgba(255, 255, 255, 0.97) 0%, rgba(245, 251, 255, 0.96) 53%, rgba(223, 242, 255, 0.92) 100%);
}

.order-view-hero::after,
.list-index-hero::after {
    content: '';
    position: absolute;
    top: -8rem;
    right: -3rem;
    width: 22rem;
    height: 22rem;
    opacity: 0.72;
    pointer-events: none;
    background: repeating-linear-gradient(137deg, transparent 0 2.4rem, rgba(8, 103, 189, 0.1) 2.4rem 3.6rem, transparent 3.6rem 5rem);
}

.order-view-hero .card-body,
.list-index-hero .card-body { position: relative; z-index: 1; }
.list-index-eyebrow { color: var(--isee-blue) !important; }

.list-index-hero h1,
.order-view-hero h1 {
    color: var(--isee-navy);
    letter-spacing: -0.035em;
}

.list-index-table-card,
.order-index-toolbar,
.order-bulk-toolbar { background: rgba(255, 255, 255, 0.94); }

/* Keep order filter dropdowns above neighboring cells */
.order-index-table .filters td {
    position: relative;
    overflow: visible;
}

.list-index-table thead th {
    color: #54708a;
    background: #eef7ff;
    border-bottom-color: #d5e7f6;
}

.list-index-table thead th a { color: #3f6381; }
.list-index-table tbody td { border-color: #e8f1f8; }

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #f0f8ff;
    color: var(--isee-ink);
}

.list-index-table .filters td {
    background: #f8fbfe;
    border-color: #e1edf7;
}

.order-index-track,
.list-index-mono {
    color: #075eae;
    background: #e9f5ff;
}

.order-index-track:hover,
.list-index-mono:hover {
    color: var(--isee-navy);
    background: #d7edff;
}

.list-index-pager .page-link {
    color: #3d5d78;
    border-color: #d3e3f0;
}

.list-index-pager .page-link:hover,
.list-index-pager .page-link:focus {
    color: var(--isee-navy);
    background: #eaf5ff;
    border-color: #9dc9e7;
    box-shadow: 0 0 0 0.2rem rgba(8, 103, 189, 0.1);
}

.list-index-pager .page-item.active .page-link {
    background: var(--isee-blue);
    border-color: var(--isee-blue);
}

.order-view-tile,
.task-result-item {
    background: #f6fbff;
    border-color: #dceaf6;
}

.order-view-dl dt { color: #62809a; }
.order-view-dl dd { color: var(--isee-ink); }

/* Task board */
.task-board-column {
    border-color: #d7e6f3;
    background: rgba(247, 251, 255, 0.9);
    box-shadow: 0 5px 15px rgba(22, 79, 130, 0.05);
}

.task-board-column-head {
    border-bottom-color: #dceaf6;
    background: #fff;
}

.task-board-column.tone-new .task-board-column-head { border-top-color: #159ee0; }
.task-board-column.tone-progress .task-board-column-head { border-top-color: #0867bd; }
.task-board-column.tone-review .task-board-column-head { border-top-color: #f0a128; }
.task-board-column.tone-rework .task-board-column-head { border-top-color: #6688a8; }
.task-board-column.tone-rejected .task-board-column-head { border-top-color: #d95b63; }
.task-board-column.tone-done .task-board-column-head { border-top-color: #159d90; }

.task-board-column-title { color: #365572; }

.task-board-column-count {
    color: #075eae;
    background: #e2f2ff;
}

.task-board-card {
    border-color: #d9e8f4;
    box-shadow: 0 2px 7px rgba(22, 79, 130, 0.04);
}

.task-board-card:hover {
    border-color: #97c9eb;
    box-shadow: 0 8px 18px rgba(8, 103, 189, 0.1);
}

/* Price list */
.price-list-sheet {
    color: var(--isee-navy);
    background: linear-gradient(150deg, #f9fdff 0%, #ddecfa 100%);
    border-color: #c7e0f3;
    box-shadow: 0 5px 16px rgba(22, 79, 130, 0.07);
}

.price-list-sheet__title,
.price-list-sheet__table th,
.price-list-sheet__table td,
.price-list-sheet__price { color: var(--isee-navy); }

.price-list-sheet__table th,
.price-list-sheet__table td { border-bottom-color: rgba(7, 63, 135, 0.44); }

@media (max-width: 991.98px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 38rem;
        margin: 0 auto;
    }

    .login-intro { padding: 2.2rem; }
    .login-intro-brand { margin-bottom: 2.2rem; }
}

@media (max-width: 575.98px) {
    .isee-navbar .navbar-brand {
        margin-right: 0;
        font-size: 1.18rem;
    }

    .isee-brand-mark { width: 1.85rem; }
    .site-index { min-height: auto; }

    .login-shell {
        margin: 0 -0.15rem;
        border-radius: 0.95rem;
    }

    .login-intro,
    .login-card-wrap { padding: 1.55rem; }

    .login-intro h1 { font-size: 1.9rem; }

    .login-intro-copy {
        margin-bottom: 1.2rem;
        font-size: 0.94rem;
    }
}

.design-theme-toggle {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .navbar-nav .design-theme-toggle {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Maximum range sheets ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.maximum-range-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.maximum-range-section {
    color: var(--isee-navy);
    background: linear-gradient(150deg, #f9fdff 0%, #ddecfa 100%);
    border: 1px solid #c7e0f3;
    border-radius: 0.65rem;
    padding: 0.8rem 0.9rem 0.9rem;
    overflow: hidden;
    box-shadow: 0 5px 16px rgba(22, 79, 130, 0.07);
}

.maximum-range-section__header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.maximum-range-section__title {
    margin: 0;
    color: var(--isee-navy);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.maximum-range-section__subtitle {
    margin: 0.1rem 0 0;
    color: #52749f;
    font-size: 0.8rem;
    font-weight: 600;
}

.maximum-range-section__add {
    position: absolute;
    top: 50%;
    right: 0;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    transform: translateY(-50%);
}

.maximum-range-section__actions {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    transform: translateY(-50%);
}

.maximum-range-section__actions .maximum-range-section__add {
    position: static;
    padding: 0.375rem 0.7rem;
    font-size: 0.8rem;
    transform: none;
}

.maximum-range-section__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.375rem 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
}

.maximum-range-section__actions .btn:hover:not(:disabled) {
    transform: none;
}

.maximum-range-table {
    width: 100%;
    border-collapse: collapse;
}

.maximum-range-table th,
.maximum-range-table td {
    padding: 0.33rem 0.45rem;
    color: var(--isee-navy);
    border-bottom: 1px solid rgba(7, 63, 135, 0.44);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    vertical-align: middle;
}

.maximum-range-table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.maximum-range-table tbody th {
    font-weight: 600;
    text-align: left;
}

.maximum-range-table__group {
    min-width: 9rem;
    background: rgba(255, 255, 255, 0.28);
}

.maximum-range-table__note {
    padding: 0.55rem 0.45rem !important;
    color: #315f93 !important;
    background: rgba(255, 255, 255, 0.42);
    font-size: 0.76rem !important;
    line-height: 1.35;
    text-align: left !important;
}

.maximum-range-table__value {
    color: var(--isee-navy);
    text-decoration: none;
}

.maximum-range-table__value:hover {
    color: #0f4e91;
    text-decoration: underline;
}

.maximum-range-table--progressive th,
.maximum-range-table--progressive td {
    min-width: 4.75rem;
    font-size: 0.76rem;
}

.maximum-range-table--progressive .maximum-range-table__group {
    min-width: 11rem;
    white-space: normal;
}

.maximum-range-table--bifocal {
    max-width: 46rem;
    margin: 0 auto;
}

.maximum-range-table--bifocal th:first-child,
.maximum-range-table--bifocal td:first-child {
    text-align: left;
}

@media (min-width: 768px) {
    .price-list-sheet__add.btn:hover:not(:disabled),
    .maximum-range-section__header > .maximum-range-section__add.btn:hover:not(:disabled) {
        transform: translateY(-50%);
    }
}

@media (max-width: 767.98px) {
    .maximum-range-grid {
        grid-template-columns: 1fr;
    }

    .maximum-range-section {
        border-radius: 0;
        margin-right: -0.75rem;
        margin-left: -0.75rem;
        padding: 0.75rem;
    }

    .maximum-range-section__header {
        flex-direction: column;
    }

    .maximum-range-section__add {
        position: static;
        margin-top: 0.35rem;
        transform: none;
    }

    .maximum-range-section__actions {
        position: static;
        justify-content: center;
        margin-top: 0.35rem;
        transform: none;
    }
}

/* ISEE CRM starter pages */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin-right: 0.36rem;
    border-radius: 0.58rem;
    color: #fff;
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--isee-navy), var(--isee-sky));
}

.login-brand-text {
    color: #fff;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.isee-navbar .isee-crm-logo {
    width: auto;
    height: 2.8rem;
    max-width: 11rem;
    border-radius: 0.35rem;
    object-fit: contain;
}

.login-crm-logo {
    display: block;
    width: min(100%, 22rem);
    height: auto;
    padding: 0.3rem 0.5rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(4, 33, 73, 0.2);
}

.page-kicker,
.home-kicker {
    margin-bottom: 0.4rem;
    color: var(--isee-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem 1.5rem;
    align-items: stretch;
    padding: clamp(1.35rem, 3.2vw, 2.1rem) clamp(1.35rem, 3.5vw, 2.4rem);
    border: 1px solid rgba(7, 86, 166, 0.09);
    border-radius: 1.1rem;
    color: #fff;
    background: linear-gradient(125deg, var(--isee-navy), var(--isee-blue));
    box-shadow: 0 16px 36px rgba(7, 63, 135, 0.14);
}

.home-hero--with-shift {
    grid-template-columns: minmax(0, 1.35fr) minmax(16.5rem, 0.85fr);
}

.home-hero::after {
    position: absolute;
    top: -12rem;
    right: -8rem;
    width: 22rem;
    height: 22rem;
    border: 2rem solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.home-hero__main,
.home-hero__shift,
.home-hero h1,
.home-copy,
.home-kicker,
.home-actions {
    position: relative;
    z-index: 1;
}

.home-hero h1 {
    max-width: 36rem;
    margin-bottom: 0.55rem;
    font-size: clamp(1.65rem, 3.4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.home-hero .home-kicker { color: #a9e5ff; margin-bottom: 0.3rem; }
.home-copy {
    max-width: 34rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
    line-height: 1.45;
}

.home-shift-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: 100%;
    padding: 0.95rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: var(--isee-ink);
    box-shadow: 0 12px 28px rgba(7, 63, 135, 0.16);
}

.home-shift-card__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--isee-ink);
}

.home-shift-card__status {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.3;
}

.home-shift-card__gate {
    margin: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(217, 119, 6, 0.35);
    background: rgba(254, 243, 199, 0.95);
    color: #92400e;
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 600;
}

.home-shift-card__timer-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.home-shift-card__timer {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--isee-navy);
    line-height: 1;
}

.home-shift-card__state {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.home-shift-card__label {
    color: #64748b;
    font-size: 0.78rem;
}

.home-shift-card__elapsed-value {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--isee-navy);
    line-height: 1.1;
}

.home-shift-card__pauses,
.home-shift-card__limit {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.78rem;
}

.home-shift-card__open-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

@media (min-width: 420px) {
    .home-shift-card__open-actions {
        grid-template-columns: minmax(6.5rem, 0.9fr) minmax(0, 1.2fr);
    }

    .home-shift-card__open-actions #isee-home-shift-close {
        grid-column: 2;
        grid-row: 1;
    }

    .home-shift-card__open-actions #isee-home-shift-pause,
    .home-shift-card__open-actions #isee-home-shift-resume {
        grid-column: 1;
        grid-row: 1;
    }
}

.home-shift-card .btn-isee-pause,
.home-shift-card .btn-isee-resume,
.home-shift-card .btn-isee-finish {
    width: 100%;
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
}

@media (max-width: 991.98px) {
    .home-hero--with-shift {
        grid-template-columns: 1fr;
    }

    .home-hero__shift {
        max-width: 24rem;
    }
}

@media (max-width: 575.98px) {
    .home-hero__shift {
        max-width: none;
    }

    .home-shift-card__open-actions {
        grid-template-columns: 1fr;
    }

    .home-shift-card__open-actions #isee-home-shift-close,
    .home-shift-card__open-actions #isee-home-shift-pause,
    .home-shift-card__open-actions #isee-home-shift-resume {
        grid-column: auto;
        grid-row: auto;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Client card ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.client-card {
    border-radius: 1rem;
    overflow: hidden;
}

.client-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.client-card-row,
.schedule-field-row {
    display: grid;
    grid-template-columns: minmax(9rem, 11.5rem) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
}

.client-card-label,
.schedule-field-label {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border-radius: 0.55rem;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--isee-blue), var(--isee-sky));
    box-shadow: 0 6px 16px rgba(8, 103, 189, 0.18);
}

.client-card-value {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.55rem;
    background: #fff;
    color: var(--isee-ink);
    font-weight: 500;
}

.client-card-value--input {
    padding: 0.35rem 0.5rem;
}

.client-card-value--input .form-control,
.client-card-value--input .form-select,
.schedule-field-control .form-control,
.schedule-field-control .form-select {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
}

.client-card-value--input .form-control:focus,
.client-card-value--input .form-select:focus,
.schedule-field-control .form-control:focus,
.schedule-field-control .form-select:focus {
    border-color: rgba(8, 103, 189, 0.35);
    box-shadow: 0 0 0 0.2rem rgba(40, 168, 232, 0.15);
    background: #fff;
}

.client-visit-context {
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    background: linear-gradient(165deg, rgba(239, 247, 255, 0.95), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(8, 103, 189, 0.16);
}

.client-appointment-focus-row > td {
    background-color: rgba(8, 103, 189, 0.08) !important;
}

.client-appointment-history tr.appointment-tone-reschedule-new.client-appointment-focus-row > td,
.client-appointment-history tr.appointment-tone-rescheduled-away.client-appointment-focus-row > td {
    box-shadow: inset 0 0 0 2px rgba(8, 103, 189, 0.35);
}

.schedule-appointment-panel {
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.schedule-appointment-panel.is-open {
    max-height: 120rem;
    margin-top: 1.25rem;
    opacity: 1;
    pointer-events: auto;
}

.schedule-appointment-inner {
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.85rem;
    background:
        linear-gradient(180deg, rgba(234, 245, 255, 0.85), rgba(255, 255, 255, 0.95));
}

.schedule-appointment-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.schedule-field-control {
    display: flex;
    align-items: stretch;
    min-height: 2.75rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.55rem;
    background: #fff;
}

.schedule-field-row--textarea .schedule-field-label {
    align-items: flex-start;
    padding-top: 0.95rem;
}

.schedule-field-row--textarea .schedule-field-control {
    min-height: 7rem;
}

.schedule-field-row--textarea textarea {
    resize: vertical;
}

@media (max-width: 575.98px) {
    .client-card-row,
    .schedule-field-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .client-card-label,
    .schedule-field-label {
        width: fit-content;
        min-width: 8.5rem;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Sale checkout ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.sale-checkout-page {
    width: 100%;
    max-width: 100%;
}

.sale-checkout {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sale-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.92fr);
    gap: 0;
    align-items: start;
    border: 1px solid var(--isee-line);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(7, 63, 135, 0.06);
}

.sale-checkout-layout--mvp {
    grid-template-columns: minmax(0, 1fr);
}

.sale-checkout-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem 1.1rem 1.15rem;
    border-right: 2px solid rgba(8, 103, 189, 0.35);
}

.sale-checkout-layout--mvp .sale-checkout-main {
    border-right: 0;
}

.sale-item-type-badge {
    display: inline-block;
    margin-bottom: 0.2rem;
    color: var(--isee-blue);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sale-add-product-panel {
    margin-top: 0.35rem;
    padding: 0.9rem 1rem;
    border: 1px dashed rgba(8, 103, 189, 0.35);
    border-radius: 0.75rem;
    background: #f7fbff;
}

.sale-add-product-inner .form-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.sale-add-product-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sale-add-product-row {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(8, 103, 189, 0.12);
}

.sale-add-product-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.sale-payment-block {
    padding: 1.05rem 1.1rem 1.15rem;
    border: 1px solid rgba(7, 86, 166, 0.12);
    border-radius: 1rem;
    background:
        linear-gradient(165deg, rgba(234, 245, 255, 0.7), rgba(255, 255, 255, 0.96));
    box-shadow: 0 10px 26px rgba(7, 63, 135, 0.06);
}

.sale-payment-due {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(7, 86, 166, 0.1);
}

.sale-payment-due-label {
    color: #5a758f;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sale-payment-due-value {
    color: var(--isee-navy);
    font-size: clamp(1.55rem, 3.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.sale-prepay-toggle {
    margin: 0;
}

.sale-prepay-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    margin: 0;
    padding: 0.95rem 1.05rem;
    border: 2px solid rgba(214, 140, 20, 0.35);
    border-radius: 0.95rem;
    background:
        linear-gradient(135deg, #fff8e8 0%, #fff3d4 55%, #ffe8b0 140%);
    color: #7a4d05;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(196, 120, 10, 0.12);
    transition:
        transform 0.14s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
    user-select: none;
}

.sale-prepay-card:hover {
    transform: translateY(-1px);
    border-color: rgba(196, 120, 10, 0.55);
    box-shadow: 0 12px 24px rgba(196, 120, 10, 0.18);
}

.sale-prepay-card-check {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid rgba(196, 120, 10, 0.55);
    border-radius: 0.4rem;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
}

.sale-prepay-card-check::after {
    content: '';
    position: absolute;
    left: 0.28rem;
    top: 0.05rem;
    width: 0.42rem;
    height: 0.72rem;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.14s ease;
}

.sale-prepay-card-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.sale-prepay-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sale-prepay-card-hint {
    color: #9a6a18;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
}

.btn-check:checked + .sale-prepay-card,
.sale-prepay-toggle.is-active .sale-prepay-card {
    border-color: transparent;
    background: linear-gradient(135deg, #f0a020 0%, #e08910 50%, #c96e08 120%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(196, 120, 10, 0.32);
}

.btn-check:checked + .sale-prepay-card .sale-prepay-card-hint,
.sale-prepay-toggle.is-active .sale-prepay-card .sale-prepay-card-hint {
    color: rgba(255, 255, 255, 0.88);
}

.btn-check:checked + .sale-prepay-card .sale-prepay-card-check,
.sale-prepay-toggle.is-active .sale-prepay-card .sale-prepay-card-check {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.2);
}

.btn-check:checked + .sale-prepay-card .sale-prepay-card-check::after,
.sale-prepay-toggle.is-active .sale-prepay-card .sale-prepay-card-check::after {
    transform: rotate(45deg) scale(1);
}

.btn-check:focus-visible + .sale-prepay-card {
    outline: 2px solid var(--isee-sky);
    outline-offset: 3px;
}

.sale-prepay-amount-input {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sale-payment-methods-label {
    margin-bottom: 0.55rem;
    color: var(--isee-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.sale-payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.sale-payment-pill {
    margin: 0;
    min-width: 6.5rem;
    padding: 0.72rem 1.15rem;
    border: 1px solid rgba(7, 86, 166, 0.2);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--isee-ink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(7, 63, 135, 0.06);
    transition:
        transform 0.14s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
    user-select: none;
}

.sale-payment-pill:hover {
    border-color: rgba(8, 103, 189, 0.5);
    color: var(--isee-blue);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(7, 63, 135, 0.12);
}

.btn-check:checked + .sale-payment-pill {
    border-color: transparent;
    background: linear-gradient(135deg, var(--isee-navy) 0%, var(--isee-blue) 48%, var(--isee-sky) 130%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(7, 63, 135, 0.28);
    transform: translateY(-1px);
}

.btn-check:focus-visible + .sale-payment-pill {
    outline: 2px solid var(--isee-sky);
    outline-offset: 2px;
}

.sale-target-type-choice .frame-form-choice-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sale-split-fields .form-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.sale-embed-body {
    margin: 0;
    background: #f5f8fc;
    min-height: 100vh;
}

.sale-checkout-page--embed {
    padding: 0.75rem 0.85rem 1rem;
}

.sale-checkout--embed .sale-checkout-layout {
    box-shadow: none;
}

.appointment-sale-checkout-modal .modal-dialog {
    width: min(1120px, calc(100vw - 1.25rem));
    max-width: min(1120px, calc(100vw - 1.25rem));
    height: calc(100vh - 1.5rem);
    margin: 0.75rem auto;
}

.appointment-sale-checkout-modal .modal-content {
    height: 100%;
    overflow: hidden;
}

.appointment-sale-checkout-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.appointment-sale-checkout-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 248, 252, 0.92);
}

.appointment-sale-checkout-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    opacity: 0;
}

.appointment-sale-checkout-frame.is-ready {
    opacity: 1;
}

.sale-payment-parts {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sale-payment-part {
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(7, 86, 166, 0.12);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
}

.sale-payment-part.is-inactive {
    opacity: 0.55;
}

.sale-payment-part.is-invalid {
    border-color: rgba(180, 35, 24, 0.45);
    background: rgba(255, 245, 245, 0.95);
}

.sale-payment-part .form-select.is-invalid,
.sale-payment-part .form-control.is-invalid {
    border-color: #b42318;
}

.sale-payment-part .form-check-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #7a4d05;
}

.sale-payment-part .sale-payment-part-prepay:checked + .form-check-label {
    color: #c96e08;
}

.sale-payment-parts-summary {
    color: #5a758f;
    font-size: 0.9rem;
    font-weight: 600;
}

.sale-payment-parts-summary.is-ok strong {
    color: #0f7a3a;
}

.sale-payment-parts-summary.is-over strong,
.sale-payment-parts-summary.is-under strong#sale-payment-parts-left {
    color: #b42318;
}

.sale-checkout-picker {
    min-width: 0;
    min-height: 22rem;
    padding: 1rem 1.05rem 1.15rem;
    background: linear-gradient(180deg, #f3f8fd 0%, #fff 42%);
}

.sale-picker-title {
    margin: 0 0 0.85rem;
    color: var(--isee-blue);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sale-picker-toolbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.sale-picker-toolbar .sale-picker-title {
    margin: 0;
    font-size: 1.25rem;
}

.sale-picker-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sale-picker-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 5.5rem;
    padding: 0.85rem 0.75rem;
    border: 0;
    border-radius: 0.95rem;
    background: linear-gradient(145deg, #1a6fd4 0%, #3f7fe0 48%, #6a6fd4 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 10px 22px rgba(8, 103, 189, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sale-picker-cat:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(8, 103, 189, 0.28);
    filter: brightness(1.04);
}

.sale-picker-cat:not(:disabled):active {
    transform: translateY(0);
}

.sale-picker-cat.is-disabled,
.sale-picker-cat:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.25);
    box-shadow: none;
}

.sale-picker-cat-label {
    display: block;
}

.sale-picker-cat-note {
    display: block;
    max-width: 9.5rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

.sale-picker-search {
    margin-bottom: 0.75rem;
}

.sale-picker-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    max-height: min(62vh, 36rem);
    overflow: auto;
    padding-right: 0.15rem;
}

.sale-picker-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.85rem;
    background: #fff;
    text-align: left;
    color: var(--isee-ink);
    box-shadow: 0 6px 16px rgba(7, 63, 135, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.sale-picker-card:hover {
    border-color: rgba(8, 103, 189, 0.45);
    box-shadow: 0 10px 22px rgba(8, 103, 189, 0.12);
    transform: translateY(-1px);
}

.sale-picker-card.is-picked {
    border-color: var(--isee-blue);
    background: var(--isee-ice);
}

.sale-picker-card-name {
    font-weight: 750;
    font-size: 0.98rem;
}

.sale-picker-card-meta {
    color: #6a8098;
    font-size: 0.82rem;
}

.sale-picker-card-stock {
    color: #4a667f;
    font-size: 0.78rem;
    line-height: 1.35;
}

.sale-picker-lens-variant-stock {
    margin-top: 0.35rem;
}

.sale-item-warehouse {
    margin-top: 0.15rem;
}

.sale-picker-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.sale-picker-card-barcode {
    color: #7b8fa6;
    font-size: 0.8rem;
}

.sale-picker-card-price {
    font-weight: 800;
    color: var(--isee-navy);
    white-space: nowrap;
}

.sale-picker-empty,
.sale-picker-soon {
    padding: 0.85rem 0.95rem;
    border: 1px dashed var(--isee-line);
    border-radius: 0.85rem;
    background: #f8fbfe;
}

.sale-picker-subtitle {
    color: #5d738c;
    font-size: 0.92rem;
    font-weight: 650;
}

.sale-picker-categories--types {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}

.sale-picker-index-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.sale-picker-index-label {
    margin: 0;
    color: #6a8098;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sale-picker-index-dd {
    position: relative;
    flex: 1 1 12rem;
    max-width: 18rem;
}

.sale-picker-index-toggle {
    text-align: left;
    cursor: pointer;
}

.sale-picker-index-menu {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 14rem;
    overflow: auto;
    padding: 0.35rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(7, 63, 135, 0.12);
}

.sale-picker-index-dd.is-open .sale-picker-index-menu {
    display: block;
}

.sale-picker-index-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.sale-picker-index-option:hover {
    background: var(--isee-ice);
}

.sale-picker-matrix-wrap {
    max-height: min(58vh, 34rem);
    overflow: auto;
}

.sale-picker-matrix {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.86rem;
}

.sale-picker-matrix th,
.sale-picker-matrix td {
    padding: 0.45rem 0.4rem;
    border-bottom: 1px solid var(--isee-line);
    text-align: center;
    vertical-align: middle;
}

.sale-picker-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5fb;
    color: var(--isee-navy);
    font-weight: 750;
}

.sale-picker-matrix-axis {
    width: 7rem;
}

.sale-picker-matrix tbody th {
    text-align: left;
    color: var(--isee-ink);
    font-weight: 650;
    background: #fbfcfe;
    white-space: nowrap;
}

.sale-picker-matrix-group th {
    text-align: left;
    padding-top: 0.75rem;
    color: var(--isee-blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #f3f8fd;
    border-bottom-color: rgba(8, 103, 189, 0.25);
}

.sale-picker-matrix-empty {
    color: #a0b0c2;
}

.sale-picker-matrix-price {
    display: inline-block;
    padding: 0.25rem 0.4rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: var(--isee-navy);
    font-weight: 750;
    white-space: nowrap;
}

.sale-picker-matrix-price:hover {
    background: var(--isee-ice);
    color: var(--isee-blue);
}

.sale-picker-lens-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.75rem;
}

.sale-picker-lens-variant {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 100%;
    padding: 0.85rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 6px 16px rgba(7, 63, 135, 0.05);
}

.sale-picker-lens-variant-title {
    margin: 0;
    color: var(--isee-navy);
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
}

.sale-picker-lens-variant-body {
    flex: 1 1 auto;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.55rem;
    background: #f8fbfe;
}

.sale-picker-lens-variant-desc {
    margin: 0 0 0.35rem;
    color: var(--isee-ink);
    font-size: 0.86rem;
    line-height: 1.35;
}

.sale-picker-lens-variant-price {
    width: 100%;
    font-weight: 750;
}

.sale-picker-lens-variant-price.is-picked {
    filter: brightness(1.08);
}

.sale-checkout-picker-hint {
    font-weight: 600;
}

.sale-item-card.is-just-added {
    animation: sale-item-flash 0.6s ease;
}

@keyframes sale-item-flash {
    0% { box-shadow: 0 0 0 0 rgba(8, 103, 189, 0.35); }
    40% { box-shadow: 0 0 0 4px rgba(8, 103, 189, 0.18); }
    100% { box-shadow: 0 8px 20px rgba(7, 63, 135, 0.05); }
}

.sale-checkout-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.sale-checkout-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--isee-navy), var(--isee-blue));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 650;
    box-shadow: 0 8px 18px rgba(7, 63, 135, 0.18);
}

.sale-checkout-tab-menu {
    opacity: 0.75;
    font-weight: 700;
}

.sale-checkout-add-client {
    display: none;
}

.sale-recipe-form-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.sale-recipe-form-panel.is-open {
    max-height: 80rem;
    opacity: 1;
    margin-top: 0.85rem;
    pointer-events: auto;
}

.sale-recipe-form-inner {
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(234, 245, 255, 0.9), #fff);
}

.sale-checkout-meta-row {
    display: none;
}

.sale-checkout-card {
    padding: 1rem;
    border: 1px solid var(--isee-line);
    border-radius: 1rem;
    background: linear-gradient(180deg, #f4f8fc, #fff);
}

.sale-checkout-client-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    align-items: start;
}

.sale-checkout-client-main .client-card-row {
    grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr);
}

.sale-checkout-client-main .client-card-label {
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
}

.sale-checkout-client-main .client-card-value--input {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: block;
}

.sale-checkout-client-name {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--isee-ink);
}

.sale-checkout-client-phone {
    color: #5d738c;
    font-size: 0.95rem;
}

.sale-checkout-recipe {
    position: relative;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid var(--isee-line);
    box-shadow: 0 6px 16px rgba(7, 63, 135, 0.06);
}

.sale-checkout-recipe.is-empty {
    opacity: 0.72;
}

.sale-checkout-recipe-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    color: #6a8098;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.sale-checkout-recipe-clear {
    border: 0;
    background: transparent;
    color: #8aa0b8;
    font-size: 1.1rem;
    line-height: 1;
}

.sale-checkout-recipe-body {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    font-size: 0.92rem;
    color: var(--isee-ink);
}

.sale-checkout-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sale-checkout-meta-card {
    padding: 0.7rem 0.8rem;
    border-radius: 0.7rem;
    background: #fff;
    border: 1px solid var(--isee-line);
}

.sale-checkout-meta-label {
    margin-bottom: 0.3rem;
    color: #6a8098;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sale-item-card {
    padding: 0.9rem 1rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(7, 63, 135, 0.05);
}

.sale-item-card + .sale-item-card {
    margin-top: 0.65rem;
}

.sale-item-top,
.sale-item-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.sale-item-name {
    font-weight: 750;
    color: var(--isee-ink);
}

.sale-item-barcode {
    color: #7b8fa6;
    font-size: 0.82rem;
}

.sale-item-line-total {
    font-weight: 750;
    white-space: nowrap;
}

.sale-item-controls {
    align-items: center;
    margin-top: 0.55rem;
}

.sale-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem;
    border-radius: 999px;
    background: #eef5fb;
}

.sale-qty-btn {
    width: 1.8rem;
    height: 1.8rem;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--isee-blue);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(7, 63, 135, 0.08);
}

.sale-qty-input {
    width: 2.4rem;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 700;
}

.sale-item-pick {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.sale-item-type-row {
    max-width: 10rem;
}

.sale-item-remove {
    align-self: flex-start;
}

.sale-checkout-items-empty {
    padding: 0.85rem 1rem;
    border: 1px dashed var(--isee-line);
    border-radius: 0.9rem;
    background: #f8fbfe;
    text-align: center;
}

.sale-checkout-add-row .btn {
    white-space: nowrap;
}

.sale-checkout-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid var(--isee-line);
}

.sale-checkout-total-label {
    color: #6a8098;
    font-size: 0.9rem;
}

.sale-checkout-total-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--isee-ink);
}

.sale-checkout-actions {
    display: flex;
    gap: 0.55rem;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.sale-checkout-pay {
    min-width: 10rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background: #2ea86a !important;
    border-color: #2ea86a !important;
    font-weight: 700;
}

.sale-checkout-pay:hover {
    background: #248a56 !important;
    border-color: #248a56 !important;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.home-actions .btn {
    min-width: 9.5rem;
    font-weight: 650;
    padding: 0.55rem 0.95rem;
}

.home-appointments {
    margin-top: 1.75rem;
    padding-bottom: 1rem;
}

.home-appointments .crm-index-header {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .sale-checkout-layout {
        grid-template-columns: 1fr;
    }

    .sale-checkout-main {
        border-right: 0;
        border-bottom: 2px solid rgba(8, 103, 189, 0.35);
    }

    .sale-checkout-picker {
        min-height: 0;
    }

    .sale-picker-cards {
        max-height: 18rem;
        grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    }

    .sale-checkout-picker-hint {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .sale-checkout-client-row,
    .sale-checkout-meta-row {
        grid-template-columns: 1fr;
    }

    .sale-checkout-main,
    .sale-checkout-picker {
        padding: 0.85rem 0.9rem 1rem;
    }

    .sale-picker-categories {
        gap: 0.55rem;
    }

    .sale-picker-cat {
        min-height: 4.75rem;
        font-size: 0.92rem;
        border-radius: 0.8rem;
    }

    .sale-picker-cat-note {
        font-size: 0.68rem;
    }

    .sale-picker-cards {
        grid-template-columns: 1fr;
        max-height: 16rem;
    }

    .sale-payment-pill {
        flex: 1 1 calc(50% - 0.55rem);
        min-width: 0;
        padding: 0.75rem 0.7rem;
    }

    .sale-prepay-card {
        padding: 0.85rem 0.9rem;
    }

    .sale-checkout-actions {
        width: 100%;
    }

    .sale-checkout-pay,
    .sale-checkout-more {
        flex: 1;
        min-width: 0;
    }

    .home-actions .btn {
        min-width: 0;
        flex: 1 1 calc(50% - 0.375rem);
    }

    .crm-search-field,
    .clients-search-field {
        flex-wrap: wrap;
        max-width: 100%;
        min-width: 0;
    }

    .crm-search-input,
    .clients-search-input {
        min-width: 0;
        flex: 1 1 8rem;
    }
}

.client-purchase-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.client-purchase-block {
    padding: 1rem 1.1rem;
    border: 1px solid var(--isee-line, #d9e2ec);
    border-radius: 0.85rem;
    background: #fff;
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Clients index (cards + search) ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.clients-index-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.clients-index-subtitle {
    color: #5f7f9c;
    font-size: 0.95rem;
}

.clients-mini-report {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem 1rem;
    border: 1px solid rgba(7, 86, 166, 0.12);
    border-radius: 0.95rem;
    background: linear-gradient(165deg, rgba(234, 245, 255, 0.75), rgba(255, 255, 255, 0.98));
    box-shadow: 0 8px 20px rgba(7, 63, 135, 0.05);
}

.clients-mini-report__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.75rem;
}

.clients-mini-report__title {
    margin: 0;
    color: var(--isee-navy, #073f87);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.clients-mini-report__hint {
    color: #5a758f;
    font-size: 0.78rem;
    font-weight: 600;
}

.clients-mini-report__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.clients-mini-report__stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(7, 86, 166, 0.1);
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.14s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

.clients-mini-report__stat:hover {
    transform: translateY(-1px);
    border-color: rgba(8, 103, 189, 0.35);
    box-shadow: 0 8px 16px rgba(7, 63, 135, 0.1);
    color: inherit;
    text-decoration: none;
}

.clients-mini-report__stat.is-active {
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(7, 63, 135, 0.18);
}

.clients-mini-report__stat--came.is-active {
    background: linear-gradient(145deg, rgba(34, 157, 92, 0.16), rgba(255, 255, 255, 0.95));
}

.clients-mini-report__stat--no-show.is-active {
    background: linear-gradient(145deg, rgba(214, 69, 69, 0.14), rgba(255, 255, 255, 0.95));
}

.clients-mini-report__stat--confirmed.is-active {
    background: linear-gradient(145deg, rgba(7, 86, 166, 0.14), rgba(255, 255, 255, 0.95));
}

.clients-mini-report__label {
    color: #5a758f;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.clients-mini-report__value {
    color: var(--isee-navy, #073f87);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.clients-mini-report__stat--came .clients-mini-report__value {
    color: #1f8a4c;
}

.clients-mini-report__stat--no-show .clients-mini-report__value {
    color: #c0392b;
}

.clients-mini-report__stat--confirmed .clients-mini-report__value {
    color: var(--isee-blue, #0867bd);
}

.clients-search {
    margin-bottom: 1.35rem;
}

@media (max-width: 575.98px) {
    .clients-mini-report {
        padding: 0.75rem 0.8rem 0.85rem;
    }

    .clients-mini-report__stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .clients-mini-report__stat {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .clients-mini-report__value {
        font-size: 1.15rem;
    }
}

.clients-target-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
}

.clients-target-filter-label {
    color: #5f7f9c;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clients-target-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.clients-target-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.35rem 0.95rem;
    border: 1px solid rgba(7, 86, 166, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--isee-ink);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    transition:
        transform 0.14s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

.clients-target-filter-pill:hover {
    border-color: rgba(8, 103, 189, 0.45);
    color: var(--isee-blue);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(7, 63, 135, 0.08);
}

.clients-target-filter-pill.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--isee-navy) 0%, var(--isee-blue) 55%, var(--isee-sky) 140%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(7, 63, 135, 0.22);
}

.clients-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 100%;
    min-width: 0;
    padding: 0.55rem 0.55rem 0.55rem 1rem;
    border: 1px solid var(--isee-line);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.96));
    box-shadow: 0 14px 34px rgba(7, 63, 135, 0.07);
}

.clients-search-icon {
    display: inline-flex;
    color: var(--isee-blue);
    flex: 0 0 auto;
}

.clients-search-input {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 2.5rem;
    font-size: 1rem;
}

.clients-search-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.clients-search-clear {
    flex: 0 0 auto;
    color: #6f8aa5;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.clients-search-clear:hover {
    color: var(--isee-navy);
}

.clients-search-submit {
    flex: 0 0 auto;
    border-radius: 0.75rem;
    padding-inline: 1.15rem;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
    gap: 1rem;
}

.client-list-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 1.1rem;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.92));
    box-shadow: 0 16px 36px rgba(7, 63, 135, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.client-list-card:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 103, 189, 0.22);
    box-shadow: 0 20px 42px rgba(7, 63, 135, 0.12);
}

.client-list-card-link {
    display: block;
    padding: 1.15rem 1.15rem 0.85rem;
    color: inherit;
    text-decoration: none;
}

.client-list-card-link:hover {
    color: inherit;
}

.client-list-card-top {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.client-list-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(145deg, var(--isee-blue), var(--isee-navy));
    box-shadow: 0 10px 20px rgba(8, 103, 189, 0.24);
}

.client-list-name {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--isee-ink);
}

.client-list-phone {
    color: var(--isee-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

.client-list-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.client-list-meta-item {
    min-width: 0;
    padding: 0.65rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(217, 232, 246, 0.9);
}

.client-list-meta-label {
    display: block;
    margin-bottom: 0.2rem;
    color: #7a93aa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-list-meta-value {
    display: block;
    color: var(--isee-ink);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-list-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.85rem 1.15rem 1.1rem;
    border-top: 1px solid rgba(217, 232, 246, 0.95);
    background: rgba(255, 255, 255, 0.55);
}

.clients-pager {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.clients-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px dashed rgba(8, 103, 189, 0.28);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.72);
}

.clients-empty-title {
    margin-bottom: 0.45rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--isee-ink);
}

.clients-empty-text {
    max-width: 28rem;
    margin-inline: auto;
    color: #6b879f;
}

@media (max-width: 575.98px) {
    .clients-search-field {
        flex-wrap: wrap;
        padding: 0.75rem;
    }

    .clients-search-icon {
        display: none;
    }

    .clients-search-input {
        width: 100%;
        flex: 1 1 100%;
    }

    .clients-search-submit,
    .clients-search-clear {
        flex: 1 1 auto;
    }

    .client-list-meta {
        grid-template-columns: 1fr;
    }
}

/* ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ Shared CRM index cards ÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂÃÂ¢ÃÂÃÂ */
.crm-index-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.crm-index-subtitle {
    color: #5f7f9c;
    font-size: 0.95rem;
}

/* Дедлайны «Ожидаем рецептуру» */
.recipe-deadline-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.recipe-deadline-subtitle {
    color: #5f7f9c;
    font-size: 0.95rem;
}

.recipe-deadline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.15rem;
}

.recipe-deadline-filter {
    display: inline-flex;
    align-items: center;
    min-height: 2.15rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(7, 86, 166, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--isee-ink, #1f2937);
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.recipe-deadline-filter:hover {
    transform: translateY(-1px);
    border-color: rgba(8, 103, 189, 0.4);
    color: var(--isee-blue, #0867bd);
    text-decoration: none;
}

.recipe-deadline-filter.is-active {
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 16px rgba(7, 63, 135, 0.18);
    background: linear-gradient(135deg, var(--isee-navy) 0%, var(--isee-blue) 55%, var(--isee-sky) 140%);
}

.recipe-deadline-filter--overdue.is-active {
    background: linear-gradient(135deg, #9b2c2c, #d64545);
}

.recipe-deadline-filter--approaching.is-active {
    background: linear-gradient(135deg, #b7791f, #dd6b20);
}

.recipe-deadline-filter--ok.is-active {
    background: linear-gradient(135deg, #276749, #38a169);
}

.recipe-deadline-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipe-deadline-card {
    border: 1px solid rgba(7, 86, 166, 0.12);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(7, 63, 135, 0.05);
    overflow: hidden;
    border-left-width: 5px;
}

.recipe-deadline-card--ok {
    border-left-color: #38a169;
}

.recipe-deadline-card--approaching {
    border-left-color: #dd6b20;
    background: linear-gradient(90deg, rgba(221, 107, 32, 0.08), #fff 42%);
}

.recipe-deadline-card--overdue {
    border-left-color: #d64545;
    background: linear-gradient(90deg, rgba(214, 69, 69, 0.1), #fff 42%);
}

.recipe-deadline-card--none {
    border-left-color: #94a3b8;
}

.recipe-deadline-card-link {
    display: block;
    padding: 0.95rem 1.05rem 0.85rem;
    color: inherit;
    text-decoration: none;
}

.recipe-deadline-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.recipe-deadline-card-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.recipe-deadline-card-id {
    color: #5f7f9c;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.recipe-deadline-card-client {
    margin: 0.15rem 0 0.1rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--isee-navy, #073f87);
}

.recipe-deadline-card-phone {
    color: #5f7f9c;
    font-size: 0.92rem;
    font-weight: 600;
}

.recipe-deadline-card-due {
    text-align: right;
    min-width: 9.5rem;
}

.recipe-deadline-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.recipe-deadline-badge--ok {
    color: #276749;
    background: rgba(56, 161, 105, 0.15);
}

.recipe-deadline-badge--approaching {
    color: #9c4221;
    background: rgba(221, 107, 32, 0.16);
}

.recipe-deadline-badge--overdue {
    color: #9b2c2c;
    background: rgba(214, 69, 69, 0.16);
}

.recipe-deadline-badge--none {
    color: #475569;
    background: rgba(148, 163, 184, 0.2);
}

.recipe-deadline-date {
    margin-top: 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--isee-ink, #1f2937);
}

.recipe-deadline-days {
    margin-top: 0.1rem;
    color: #5f7f9c;
    font-size: 0.82rem;
    font-weight: 650;
}

.recipe-deadline-card--overdue .recipe-deadline-days,
.recipe-deadline-card--overdue .recipe-deadline-date {
    color: #9b2c2c;
}

.recipe-deadline-card--approaching .recipe-deadline-days {
    color: #9c4221;
}

.recipe-deadline-card-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(7, 86, 166, 0.08);
    font-size: 0.88rem;
    font-weight: 650;
}

.recipe-deadline-meta-label {
    display: block;
    margin-bottom: 0.1rem;
    color: #5f7f9c;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.recipe-deadline-card-actions {
    position: relative;
    z-index: 2;
    padding: 0 1.05rem 0.9rem;
    overflow: visible;
}

/* Открытое меню статуса — не обрезать overflow карточки и не перекрывать соседней. */
.recipe-deadline-card:has(.sale-order-status .dropdown-menu.show),
.recipe-deadline-card:has(.sale-order-status .dropdown-toggle.show) {
    position: relative;
    z-index: 40;
    overflow: visible;
}

.recipe-deadline-empty {
    padding: 2.5rem 1.25rem;
    border: 1px dashed rgba(7, 86, 166, 0.22);
    border-radius: 1rem;
    text-align: center;
    background: rgba(246, 251, 255, 0.7);
}

.recipe-deadline-empty-title {
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--isee-navy, #073f87);
}

.recipe-deadline-inline {
    color: #5f7f9c;
    font-weight: 600;
}

.recipe-deadline-inline--approaching {
    color: #9c4221;
}

.recipe-deadline-inline--overdue {
    color: #9b2c2c;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .recipe-deadline-card-due {
        text-align: left;
        width: 100%;
    }

    .recipe-deadline-card-meta {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .recipe-deadline-card-meta {
        grid-template-columns: 1fr;
    }
}

.crm-search {
    margin-bottom: 1.25rem;
}

.crm-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 100%;
    min-width: 0;
    padding: 0.55rem 0.55rem 0.55rem 1rem;
    border: 1px solid var(--isee-line);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.96));
    box-shadow: 0 14px 34px rgba(7, 63, 135, 0.07);
}

.crm-search-icon {
    display: inline-flex;
    color: var(--isee-blue);
    flex: 0 0 auto;
}

.crm-search-input {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 2.5rem;
    font-size: 1rem;
}

.crm-search-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.crm-search-clear {
    flex: 0 0 auto;
    color: #6f8aa5;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.crm-search-clear:hover { color: var(--isee-navy); }

.crm-search-submit {
    flex: 0 0 auto;
    border-radius: 0.75rem;
    padding-inline: 1.15rem;
}

.crm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
}

.crm-cards--compact {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
}

.crm-cards--horizontal {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.crm-cards--horizontal.crm-cards--compact {
    grid-template-columns: minmax(0, 1fr);
}

.list-card-layout-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(7, 86, 166, 0.12);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.78);
}

.list-card-layout-bar-label {
    color: #5d758f;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.list-card-layout-switch.btn-group {
    display: inline-flex;
    flex-wrap: wrap;
}

.list-card-layout-switch .btn {
    min-width: 9.5rem;
}

/* ÃÂ£ÃÂ½ÃÂ¸ÃÂ²ÃÂµÃÂÃÂÃÂ°ÃÂ»ÃÂÃÂ½ÃÂÃÂ¹ ÃÂ³ÃÂ¾ÃÂÃÂ¸ÃÂ·ÃÂ¾ÃÂ½ÃÂÃÂ°ÃÂ»ÃÂÃÂ½ÃÂÃÂ¹ ÃÂ²ÃÂ¸ÃÂ´ ÃÂÃÂÃÂ°ÃÂ½ÃÂ´ÃÂ°ÃÂÃÂÃÂ½ÃÂÃÂ CRM-ÃÂºÃÂ°ÃÂÃÂÃÂ¾ÃÂÃÂµÃÂº */
.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal):hover {
    transform: none;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) > .crm-card-body {
    flex: 1 1 16rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.85rem 1rem;
    min-width: 0;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-topline {
    margin: 0;
    flex: 0 1 auto;
    min-width: 7rem;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-title {
    margin: 0;
    flex: 1 1 10rem;
    min-width: 0;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-phone,
.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-amount,
.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-note {
    margin: 0;
    flex: 0 1 auto;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-grid {
    flex: 1 1 16rem;
    margin: 0;
    min-width: 0;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) .crm-card-tags {
    flex: 1 1 100%;
    margin: 0;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) > .crm-card-recipe-trigger {
    width: auto;
    margin: 0.55rem 0;
    flex: 0 1 12rem;
    align-self: center;
}

.crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) > .crm-card-actions {
    flex: 0 0 auto;
    align-self: stretch;
    justify-content: center;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-top: 0;
    border-left: 1px solid rgba(217, 232, 246, 0.95);
    background: rgba(255, 255, 255, 0.45);
}

.clients-grid--horizontal {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.clients-grid--horizontal .client-list-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
}

.clients-grid--horizontal .client-list-card:hover {
    transform: none;
}

.clients-grid--horizontal .client-list-card-link {
    flex: 1 1 16rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.1rem;
    padding: 0.85rem 1rem;
    min-width: 0;
}

.clients-grid--horizontal .client-list-card-top {
    margin: 0;
    flex: 1 1 14rem;
    min-width: 0;
}

.clients-grid--horizontal .client-list-meta {
    flex: 1 1 16rem;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.clients-grid--horizontal .client-list-card-actions {
    flex: 0 0 auto;
    align-self: stretch;
    justify-content: center;
    border-top: 0;
    border-left: 1px solid rgba(217, 232, 246, 0.95);
    padding: 0.75rem 0.9rem;
}

@media (max-width: 767.98px) {
    .crm-cards--horizontal > .crm-card:not(.crm-card--horizontal) > .crm-card-actions,
    .clients-grid--horizontal .client-list-card-actions {
        flex: 1 1 100%;
        border-left: 0;
        border-top: 1px solid rgba(217, 232, 246, 0.95);
    }

    .clients-grid--horizontal .client-list-meta {
        grid-template-columns: 1fr;
        flex: 1 1 100%;
    }
}

.crm-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 1.1rem;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.92));
    box-shadow: 0 16px 36px rgba(7, 63, 135, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-card:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 103, 189, 0.22);
    box-shadow: 0 20px 42px rgba(7, 63, 135, 0.12);
}

/* Vertical appointment cards: original rounded shell + modern color accents */
.crm-card--appointment-v {
    --v-accent: #0867bd;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 1.1rem;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.92));
    box-shadow: 0 16px 36px rgba(7, 63, 135, 0.07);
    overflow: visible;
}

.crm-card--appointment-v:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 103, 189, 0.22);
    box-shadow: 0 20px 42px rgba(7, 63, 135, 0.12);
}

.crm-card--appointment-v.is-reschedule {
    --v-accent: #ca8a04;
    border-color: rgba(202, 138, 4, 0.35);
    background: linear-gradient(165deg, #fffdf5 0%, #fff8e8 100%);
    box-shadow: 0 16px 36px rgba(168, 130, 0, 0.1);
}

.crm-card--appointment-v .crm-card-body {
    padding: 1.05rem 1.1rem 0.85rem;
}

.crm-card--appointment-v .crm-card-topline {
    margin-bottom: 0.65rem;
}

.crm-card--appointment-v .crm-card-dateblock .crm-card-date {
    font-size: 0.82rem;
}

.crm-card--appointment-v .crm-card-time {
    font-size: 1.05rem;
}

.crm-card--appointment-v .crm-card-title {
    font-size: 1.02rem;
}

.crm-card--appointment-v .crm-card-phone {
    margin-bottom: 0.7rem;
    font-size: 0.86rem;
}

.crm-card--appointment-v .crm-card-grid > div {
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(217, 232, 246, 0.9);
}

.crm-card--appointment-v .crm-card-author {
    margin-top: 0.7rem;
}

.crm-card--appointment-v .appointment-table-operator-name {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: #334155;
    background: #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.crm-card--appointment-v .appointment-table-operator-name.has-user-color {
    --user-color: #64748b;
    color: #fff;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--user-color) 78%, #ffffff) 0%,
        var(--user-color) 100%
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        0 4px 12px color-mix(in srgb, var(--user-color) 28%, transparent);
}

.crm-card--appointment-v .crm-badge {
    border-radius: 999px;
}

.crm-card-v-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem 0.75rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(217, 232, 246, 0.95);
    background: rgba(255, 255, 255, 0.7);
    /* Soft modern accent from nested status state */
    box-shadow: inset 3px 0 0 0 color-mix(in srgb, var(--v-accent) 55%, transparent);
}

.crm-card--appointment-v:has(.appointment-table-confirm.is-confirmed) {
    --v-accent: #16a34a;
}

.crm-card--appointment-v:has(.appointment-table-confirm.is-cancelled),
.crm-card--appointment-v:has(.appointment-table-confirm.is-rescheduled) {
    --v-accent: #dc2626;
}

.crm-card--appointment-v:has(.appointment-table-confirm.is-pending) {
    --v-accent: #0867bd;
}

.crm-card--appointment-v .appointment-table-status {
    max-width: 9.5rem;
}

.crm-card--appointment-v .appointment-table-sale {
    max-width: 11rem;
}

.crm-card-actions--flat {
    padding: 0.75rem 1.1rem 0.95rem;
    border-top: 1px solid rgba(217, 232, 246, 0.95);
    background: rgba(255, 255, 255, 0.55);
    gap: 0.45rem;
}

.crm-card-actions--flat .crm-card-action-buttons {
    gap: 0.45rem;
}

/* ÃÂ¦ÃÂ²ÃÂµÃÂÃÂ° ÃÂÃÂ¾ÃÂ½ÃÂ° ÃÂ·ÃÂ°ÃÂ¿ÃÂ¸ÃÂÃÂµÃÂ¹: ÃÂ¶ÃÂÃÂ»ÃÂÃÂÃÂ¹ / ÃÂ¾ÃÂÃÂ°ÃÂ½ÃÂ¶ÃÂµÃÂ²ÃÂÃÂ¹ / ÃÂºÃÂÃÂ°ÃÂÃÂ½ÃÂÃÂ¹ / ÃÂÃÂ¸ÃÂ½ÃÂ¸ÃÂ¹ / ÃÂÃÂ²ÃÂµÃÂÃÂ»ÃÂ¾-ÃÂ·ÃÂµÃÂ»ÃÂÃÂ½ÃÂÃÂ¹ */
.appointment-list-filters {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.appointment-tone-legend-block,
.appointment-confirm-filter-block {
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.88);
}

.appointment-tone-legend,
.appointment-confirm-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.appointment-filter-hints {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.appointment-filter-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: #52667c;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
}

.appointment-filter-hint .appointment-tone-swatch {
    margin-top: 0.15rem;
}

.appointment-filter-hint-note {
    margin-top: 0.55rem;
    color: #6b8299;
    font-size: 0.76rem;
    line-height: 1.35;
}

.appointment-confirm-filter-label {
    color: #5f7f9c;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-right: 0.15rem;
}

.appointment-confirm-filter-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.14s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}

.appointment-confirm-filter-item.is-confirmed {
    background: linear-gradient(90deg, #9ef07a 0%, #5dd65a 55%, #3ecf45 100%);
    border-color: #1f9a2e;
    color: #14532d;
}

.appointment-confirm-filter-item.is-unconfirmed {
    background: linear-gradient(90deg, #ffb4a8 0%, #ff6b5c 55%, #f03a2e 100%);
    border-color: #c62828;
    color: #7f1d1d;
}

.appointment-confirm-filter-item:hover {
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.appointment-confirm-filter-item.is-active {
    box-shadow: 0 0 0 2px rgba(40, 168, 232, 0.35), 0 6px 14px rgba(15, 23, 42, 0.12);
}

.appointment-tone-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(7, 86, 166, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #41566e;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.14s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}

a.appointment-tone-legend-item:hover {
    color: #41566e;
    border-color: rgba(8, 103, 189, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(7, 63, 135, 0.08);
}

a.appointment-tone-legend-item.is-active {
    border-color: rgba(8, 103, 189, 0.55);
    box-shadow: 0 0 0 2px rgba(40, 168, 232, 0.28);
    background: #fff;
}

a.appointment-tone-legend-item.is-active.appointment-tone-legend-item {
    font-weight: 700;
}

.appointment-tone-legend-clear {
    margin-left: 0.15rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    color: var(--isee-blue);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.appointment-tone-legend-clear:hover {
    color: var(--isee-navy);
    text-decoration: underline;
}

.appointment-tone-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 0.3rem;
    border: 2px solid rgba(0, 0, 0, 0.18);
    flex: 0 0 auto;
    box-sizing: border-box;
}

.crm-card.appointment-tone-cc-confirmed,
.appointment-tone-swatch.appointment-tone-cc-confirmed {
    background: linear-gradient(165deg, #ebfbee, #b2f2bb);
    border: 2px solid #2b9a3f;
}

.crm-card.appointment-tone-cc-rescheduled,
.appointment-tone-swatch.appointment-tone-cc-rescheduled {
    background: linear-gradient(165deg, #fff8c5, #ffe566);
    border: 2px solid #d4a800;
}

.crm-card.appointment-tone-cc-not-confirmed,
.appointment-tone-swatch.appointment-tone-cc-not-confirmed {
    background: linear-gradient(165deg, #ffe3e3, #ffa8a8);
    border: 2px solid #d63333;
}

.crm-card.appointment-tone-cc-confirmed:hover {
    border-color: #218635;
    box-shadow: 0 20px 42px rgba(46, 160, 67, 0.2);
}

.crm-card.appointment-tone-cc-rescheduled:hover {
    border-color: #b88900;
    box-shadow: 0 20px 42px rgba(168, 130, 0, 0.22);
}

.crm-card.appointment-tone-cc-not-confirmed:hover {
    border-color: #b42323;
    box-shadow: 0 20px 42px rgba(201, 42, 42, 0.2);
}

table.table tr.appointment-tone-cc-confirmed > td,
.client-appointment-history tr.appointment-tone-cc-confirmed > td {
    background-color: rgba(178, 242, 187, 0.5) !important;
}

table.table tr.appointment-tone-cc-rescheduled > td,
.client-appointment-history tr.appointment-tone-cc-rescheduled > td {
    background-color: rgba(255, 236, 120, 0.72) !important;
}

table.table tr.appointment-tone-cc-not-confirmed > td,
.client-appointment-history tr.appointment-tone-cc-not-confirmed > td {
    background-color: rgba(255, 170, 170, 0.65) !important;
}

.crm-card.appointment-tone-rescheduled-away,
.appointment-tone-swatch.appointment-tone-rescheduled-away {
    background: linear-gradient(165deg, #fff8c5, #ffe566);
    border: 2px solid #d4a800;
}

.crm-card.appointment-tone-reschedule-new,
.appointment-tone-swatch.appointment-tone-reschedule-new {
    background: linear-gradient(165deg, #ffe8cc, #ffc078);
    border: 2px solid #e07800;
}

.crm-card.appointment-tone-cancelled,
.appointment-tone-swatch.appointment-tone-cancelled {
    background: linear-gradient(165deg, #ffe3e3, #ffa8a8);
    border: 2px solid #d63333;
}

.crm-card.appointment-tone-with-sale,
.appointment-tone-swatch.appointment-tone-with-sale {
    background: linear-gradient(165deg, #dcecff, #a5d8ff);
    border: 2px solid #0870c8;
}

.crm-card.appointment-tone-without-sale,
.appointment-tone-swatch.appointment-tone-without-sale {
    background: linear-gradient(165deg, #ebfbee, #b2f2bb);
    border: 2px solid #2b9a3f;
}

.crm-card.appointment-tone-rescheduled-away:hover {
    border-color: #b88900;
    box-shadow: 0 20px 42px rgba(168, 130, 0, 0.22);
}

.crm-card.appointment-tone-reschedule-new:hover {
    border-color: #c46600;
    box-shadow: 0 20px 42px rgba(217, 118, 0, 0.22);
}

.crm-card.appointment-tone-cancelled:hover {
    border-color: #b42323;
    box-shadow: 0 20px 42px rgba(201, 42, 42, 0.2);
}

.crm-card.appointment-tone-with-sale:hover {
    border-color: #0659a0;
    box-shadow: 0 20px 42px rgba(8, 103, 189, 0.2);
}

.crm-card.appointment-tone-without-sale:hover {
    border-color: #218635;
    box-shadow: 0 20px 42px rgba(46, 160, 67, 0.2);
}

table.table tr.appointment-tone-rescheduled-away > td,
.client-appointment-history tr.appointment-tone-rescheduled-away > td {
    background-color: rgba(255, 236, 120, 0.72) !important;
}

table.table tr.appointment-tone-reschedule-new > td,
.client-appointment-history tr.appointment-tone-reschedule-new > td {
    background-color: rgba(255, 200, 130, 0.7) !important;
}

table.table tr.appointment-tone-cancelled > td,
.client-appointment-history tr.appointment-tone-cancelled > td {
    background-color: rgba(255, 170, 170, 0.65) !important;
}

table.table tr.appointment-tone-with-sale > td,
.client-appointment-history tr.appointment-tone-with-sale > td {
    background-color: rgba(165, 216, 255, 0.55) !important;
}

table.table tr.appointment-tone-without-sale > td,
.client-appointment-history tr.appointment-tone-without-sale > td {
    background-color: rgba(178, 242, 187, 0.5) !important;
}

.crm-card.has-user-color {
    --user-color: #64748b;
    border: 2px solid var(--user-color);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--user-color) 35%, transparent),
        0 16px 36px color-mix(in srgb, var(--user-color) 22%, rgba(7, 63, 135, 0.06));
}

.crm-card.has-user-color:not([class*="appointment-tone-"]) {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--user-color) 16%, #ffffff) 0%,
        color-mix(in srgb, var(--user-color) 8%, #f4f8ff) 100%
    );
}

.crm-card.has-user-color:hover {
    border-color: color-mix(in srgb, var(--user-color) 88%, #0f172a);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--user-color) 40%, transparent),
        0 20px 42px color-mix(in srgb, var(--user-color) 28%, rgba(7, 63, 135, 0.1));
}

.user-color-chip {
    --user-color: #64748b;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    background: var(--user-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-card-author {
    margin-top: 0.85rem;
}

.crm-card-author-label {
    display: block;
    margin-bottom: 0.3rem;
    color: #6f8aa5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.appointment-reschedule-reason-modal .form-label {
    font-weight: 700;
}

.appointment-reschedule-reason-modal textarea.form-control {
    min-height: 7rem;
}

/* ÃÂÃÂ¾ÃÂ´ÃÂ°ÃÂ»ÃÂºÃÂ° ÃÂ½ÃÂ° body Ã¢ÂÂ ÃÂ¿ÃÂ¾ÃÂ²ÃÂµÃÂÃÂ ÃÂ·ÃÂ°ÃÂÃÂµÃÂ¼ÃÂ½ÃÂµÃÂ½ÃÂ¸ÃÂ. */
body > #appointment-reschedule-reason-modal {
    z-index: 1100;
}

body:has(> #appointment-reschedule-reason-modal.show) > .modal-backdrop {
    z-index: 1090;
}

/* ÃÂ¡ÃÂ¾ÃÂ²ÃÂ¼ÃÂµÃÂÃÂÃÂ¸ÃÂ¼ÃÂ¾ÃÂÃÂÃÂ: ÃÂÃÂÃÂ°ÃÂÃÂÃÂ¹ ÃÂºÃÂ»ÃÂ°ÃÂÃÂ ÃÂ½ÃÂ¾ÃÂ²ÃÂ¾ÃÂ¹ ÃÂ¿ÃÂµÃÂÃÂµÃÂ·ÃÂ°ÃÂ¿ÃÂ¸ÃÂÃÂ¸ = ÃÂ¾ÃÂÃÂ°ÃÂ½ÃÂ¶ÃÂµÃÂ²ÃÂÃÂ¹ */
.appointment-reschedule-row > td,
.client-appointment-history .appointment-reschedule-row > td {
    background-color: rgba(255, 200, 130, 0.7) !important;
}

.client-appointment-history-toggle .btn.active {
    pointer-events: none;
}

.client-appointment-history-panel[hidden] {
    display: none !important;
}

.crm-card-body {
    display: block;
    padding: 1.15rem 1.15rem 0.95rem;
    color: inherit;
    text-decoration: none;
}

.crm-card-body:hover { color: inherit; }

.crm-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.crm-card-kicker,
.crm-card-date {
    color: #6f8aa5;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.crm-card-dateblock .crm-card-date {
    color: var(--isee-navy);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    text-transform: none;
}

.crm-card-time {
    color: var(--isee-blue);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.crm-card-title {
    margin: 0 0 0.3rem;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--isee-ink);
}

.crm-card-phone {
    margin-bottom: 0.85rem;
    color: var(--isee-blue);
    font-weight: 600;
}

.crm-card-amount {
    margin-bottom: 0.85rem;
    color: var(--isee-navy);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.crm-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.crm-card-grid--one { grid-template-columns: 1fr; }

.crm-card-span-2 { grid-column: 1 / -1; }

.crm-card-grid > div {
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(217, 232, 246, 0.9);
}

.crm-card-label {
    display: block;
    margin-bottom: 0.15rem;
    color: #7a93aa;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.crm-card-value {
    display: block;
    color: var(--isee-ink);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-card-note {
    margin-top: 0.75rem;
    color: #6b879f;
    font-size: 0.9rem;
    line-height: 1.35;
}

.crm-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.crm-tag {
    display: inline-flex;
    max-width: 100%;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(8, 103, 189, 0.08);
    color: var(--isee-navy);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-tag.is-muted {
    background: rgba(111, 138, 165, 0.12);
    color: #6f8aa5;
}

.crm-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.crm-badge.is-info {
    background: rgba(8, 103, 189, 0.1);
    color: var(--isee-blue);
}

.crm-badge.is-success {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.crm-badge.is-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #9a6700;
}

.crm-badge.is-danger {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.stock-critical-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    margin-right: 0.15rem;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: -0.1em;
    flex-shrink: 0;
}

.nav-link .stock-critical-mark,
.navbar .stock-critical-mark {
    margin-left: 0.35rem;
    margin-right: 0;
    vertical-align: 0.05em;
}

.stock-critical-label,
.stock-critical-label a {
    color: #dc3545 !important;
    font-weight: 600;
}

tr.stock-critical-row > td,
tr.stock-critical-row > td a {
    color: #dc3545;
}

tr.stock-critical-row > td a {
    font-weight: 600;
}

.crm-card.is-stock-critical .crm-card-title,
.crm-card.is-stock-critical .crm-card-title a {
    color: #dc3545;
}

.crm-badge.is-muted {
    background: rgba(111, 138, 165, 0.14);
    color: #6f8aa5;
}

.crm-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1.15rem 1.1rem;
    border-top: 1px solid rgba(217, 232, 246, 0.95);
    background: rgba(255, 255, 255, 0.55);
}

.crm-card-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.crm-card-identity {
    display: block;
    color: inherit;
    text-decoration: none;
}

.crm-card-identity:hover {
    color: inherit;
}

.crm-card-topline .crm-card-dateblock {
    color: inherit;
    text-decoration: none;
}

.crm-card-topline .crm-card-dateblock:hover {
    color: inherit;
}

.crm-card-sale-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: 0.1rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.1);
    color: #146c43;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
}

.crm-card-sale-link:hover {
    background: rgba(25, 135, 84, 0.18);
    color: #0f5132;
}

.crm-card-sale-link--create {
    border-color: rgba(8, 103, 189, 0.3);
    background: rgba(8, 103, 189, 0.1);
    color: var(--isee-blue);
}

.crm-card-sale-link--create:hover {
    background: rgba(8, 103, 189, 0.16);
    color: var(--isee-navy);
}

.crm-card-author-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.crm-card-author-role {
    color: #5d758f;
    font-size: 0.78rem;
    font-weight: 700;
}

.crm-card-note .crm-card-label {
    margin-bottom: 0.25rem;
}

.crm-card-note-text {
    display: block;
    color: #41566e;
    font-size: 0.88rem;
    line-height: 1.35;
}

/* ÃÂÃÂ¾ÃÂÃÂ¸ÃÂ·ÃÂ¾ÃÂ½ÃÂÃÂ°ÃÂ»ÃÂÃÂ½ÃÂÃÂµ ÃÂºÃÂ°ÃÂÃÂÃÂ¾ÃÂÃÂºÃÂ¸ ÃÂ·ÃÂ°ÃÂ¿ÃÂ¸ÃÂÃÂµÃÂ¹ */
.crm-card--horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 1.15rem;
}

.crm-card--horizontal:hover {
    transform: none;
}

.crm-card--horizontal.crm-card--h-blocks {
    --h-card-height: 6.35rem;
    display: grid;
    grid-template-columns:
        7rem
        5.75rem
        minmax(10.5rem, 1fr)
        minmax(8.5rem, 0.75fr)
        minmax(12rem, 1.45fr)
        minmax(12.5rem, 1.2fr)
        8.1rem;
    align-items: stretch;
    height: auto;
    min-height: var(--h-card-height);
    max-height: none;
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(100, 116, 139, 0.28);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.crm-card--horizontal.crm-card--h-blocks.is-reschedule {
    border-color: rgba(212, 168, 0, 0.55);
    box-shadow:
        0 0 0 1px rgba(212, 168, 0, 0.2),
        0 6px 18px rgba(15, 23, 42, 0.06);
}

.crm-card-h-confirm--icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.3rem 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.crm-card-h-confirm--icons .crm-card-h-confirm-title {
    color: #1e3a8a;
    font-size: 0.72rem;
}

.crm-card-h-confirm-icons,
.crm-card-h-visit-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.crm-card-h-confirm-icon,
.crm-card-h-visit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border-radius: 0.45rem;
    border: 1.5px solid rgba(100, 116, 139, 0.45);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.crm-card-h-confirm-icon.is-readonly,
.crm-card-h-visit-icon.is-readonly {
    cursor: default;
}

.crm-card-h-confirm-icon.is-check.is-active,
.crm-card-h-visit-icon.is-check.is-active {
    border-color: #15803d;
    background: linear-gradient(180deg, #bbf7d0 0%, #4ade80 100%);
    color: #14532d;
    box-shadow: 0 1px 3px rgba(21, 128, 61, 0.25);
}

.crm-card-h-confirm-icon.is-cross.is-active,
.crm-card-h-visit-icon.is-cross.is-active {
    border-color: #b91c1c;
    background: linear-gradient(180deg, #fecaca 0%, #f87171 100%);
    color: #7f1d1d;
    box-shadow: 0 1px 3px rgba(185, 28, 28, 0.25);
}

.crm-card-h-confirm-icon.is-saving,
.crm-card-h-visit-icon.is-saving,
.crm-card-h-confirm--icons.is-display-only .crm-card-h-confirm-icon:not(.is-active),
.crm-card-h-visit-icons.is-display-only .crm-card-h-visit-icon:not(.is-active) {
    opacity: 0.45;
    pointer-events: none;
}

.crm-card-h-confirm-icon:not(.is-readonly):hover,
.crm-card-h-visit-icon:not(.is-readonly):hover {
    filter: brightness(1.05);
}

.crm-card--horizontal .crm-card-actions {
    border-top: 0;
    background: transparent;
}

/* Legacy manager block (vertical fallback / older markup) */
.crm-card-h-manager {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    min-width: 7.5rem;
    max-width: 9.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.85rem;
    background: rgba(71, 85, 105, 0.92);
    color: #fff;
}

.crm-card-h-manager.has-user-color {
    --user-color: #64748b;
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--user-color) 88%, #ffffff) 0%,
        var(--user-color) 100%
    );
    border: 2px solid color-mix(in srgb, var(--user-color) 75%, #0f172a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.crm-card-h-manager-role {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.92;
}

.crm-card-h-manager.has-user-color .crm-card-h-manager-role {
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
}

.crm-card-h-manager-empty {
    font-size: 0.85rem;
    opacity: 0.8;
}

.crm-card-h-manager .user-color-chip {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

/* Operator */
.crm-card-h-operator {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.45rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #334155;
    border: 1px solid rgba(100, 116, 139, 0.22);
    overflow: hidden;
    box-sizing: border-box;
}

.crm-card-h-operator-role {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.crm-card-h-operator-name {
    display: inline-block;
    max-width: 100%;
    padding: 0.12rem 0.4rem;
    border-radius: 0.4rem;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    background: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-card-h-operator-name.has-user-color {
    --user-color: #64748b;
    color: #fff;
    background: var(--user-color);
}

/* Confirmation icons block */
.crm-card-h-confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.4rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    overflow: hidden;
    box-sizing: border-box;
}

.crm-card-h-confirm-title {
    display: block;
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Visit: time + client (+ optional attendance toggle) */
.crm-card-h-visit {
    display: flex;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.28);
    overflow: hidden;
    background: #fff;
}

.crm-card-h-visit.visit-tone-pending,
.crm-card-h-visit.visit-tone-came,
.crm-card-h-visit.visit-tone-missed {
    background: #fff;
}

.crm-card-h-visit-link {
    display: flex;
    align-items: stretch;
    min-width: 0;
    flex: 1 1 auto;
    color: inherit;
    text-decoration: none;
}

.crm-card-h-visit-link:hover {
    color: inherit;
}

a.crm-card-h-visit-time,
a.crm-card-h-visit-identity {
    color: inherit;
    text-decoration: none;
}

a.crm-card-h-visit-time:hover,
a.crm-card-h-visit-identity:hover {
    color: inherit;
}

.crm-card-h-visit-identity {
    display: block;
    min-width: 0;
}

.crm-card-h-visit-time {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    flex: 0 0 5.4rem;
    width: 5.4rem;
    padding: 0.3rem 0.4rem;
    background: #f1f5f9;
    color: #334155;
    border-right: 1px dashed rgba(100, 116, 139, 0.35);
}

.crm-card-h-visit-time .crm-card-date {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.crm-card-h-visit-time .crm-card-time {
    color: #1e3a8a;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
}

.crm-card-h-visit-client {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    min-width: 0;
    flex: 1;
    padding: 0.3rem 0.55rem;
    overflow: hidden;
}

.crm-card-h-visit-client .crm-card-title {
    margin: 0;
    color: #1d4ed8;
    font-size: 0.8rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-card-h-visit-client .crm-card-phone {
    margin: 0;
    color: #334155;
    font-size: 0.72rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-card-h-visit-client .crm-badge {
    align-self: flex-start;
    margin-top: 0.1rem;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    max-width: 100%;
}

.crm-card-h-diagnostic {
    display: block;
    width: 100%;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-card-h-group-link {
    display: inline-block;
    margin-top: 0.1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #0b6bcb;
    text-decoration: none;
}

.crm-card-h-group-link:hover {
    text-decoration: underline;
}

a.crm-card-rescheduled-away {
    text-decoration: none;
}

a.crm-card-rescheduled-away:hover {
    color: #7f1d1d;
    text-decoration: underline;
}

.crm-card-h-visit-icons {
    flex: 0 0 auto;
    align-self: center;
    margin: 0 0.35rem 0 0;
}

.crm-card-h-visit.has-visit-toggle .crm-card-h-visit-client,
.crm-card-h-visit:has(.crm-card-h-visit-icons) .crm-card-h-visit-client {
    padding-right: 0.35rem;
}

/* Source / need */
.crm-card-h-params {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.crm-card-h-param {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.crm-card-h-param-label {
    flex: 0 0 3.6rem;
    width: 3.6rem;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 600;
    white-space: nowrap;
}

.crm-card-h-param-value {
    flex: 1 1 auto;
    min-width: 0;
    height: 1.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(100, 116, 139, 0.28);
    background: #fff;
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Comment */
.crm-card-h-comment {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.85rem 0.5rem 0.35rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(100, 116, 139, 0.28);
    background: #fff;
    overflow: hidden;
}

.crm-card-h-comment-label {
    position: absolute;
    top: 0.15rem;
    right: 0.4rem;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.2;
}

.crm-card-h-comment-value {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Sale block */
.crm-card-h-sale-block {
    display: flex;
    align-items: stretch;
    gap: 0.3rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.3rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid rgba(100, 116, 139, 0.28);
    overflow: hidden;
}

.crm-card-h-sale-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 4rem;
    width: 4rem;
    min-width: 4rem;
    padding: 0.25rem 0.3rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: linear-gradient(180deg, #f4f8ff 0%, #dbe7f7 100%);
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.15;
}

a.crm-card-h-sale-btn:hover {
    color: #1e40af;
    background: #fff;
}

.crm-card-h-sale-btn.is-static {
    cursor: default;
}

.crm-card-h-sale-btn.is-static.is-rescheduled-away {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f1f5f9;
    box-shadow: none;
    cursor: not-allowed;
}

.crm-card-h-sale-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0.25rem 0.4rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: linear-gradient(180deg, #eef3f8 0%, #d9e3ef 100%);
}

.crm-card-h-sale-data.is-empty {
    background: linear-gradient(180deg, #eef3f8 0%, #d9e3ef 100%);
}

.crm-card-h-sale-data.is-failed {
    background: linear-gradient(90deg, #ffd0c8 0%, #ff5a4a 100%);
    border-color: #c62828;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.3rem;
}

.crm-card-h-sale-data.is-success {
    background: linear-gradient(180deg, #d8f8d0 0%, #7be86c 100%);
    border-color: #1f9a2e;
}

button.crm-card-h-sale-data,
button.appointment-table-sale-data {
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

button.crm-card-h-sale-data:hover,
button.crm-card-h-sale-data:focus-visible {
    filter: brightness(0.98);
    outline: 2px solid rgba(31, 154, 46, 0.35);
    outline-offset: 1px;
}

button.crm-card-h-sale-data.is-loading,
button.appointment-table-sale-data.is-loading {
    opacity: 0.7;
    cursor: wait;
}

button.appointment-table-sale-data:hover,
button.appointment-table-sale-data:focus-visible {
    text-decoration: underline;
    outline: none;
}

.crm-card-h-sale-order {
    display: block;
    width: 100%;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    color: #8a6a12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-card-h-sale-order.is-success {
    color: #1b7a3d;
}

.crm-card-h-sale-order.is-info {
    color: #0b6bcb;
}

.crm-card-h-sale-order.is-warning {
    color: #8a6a12;
}

.crm-card-h-sale-manager,
.crm-card-h-sale-amount {
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-card-h-sale-failed-label,
.appointment-table-sale-failed-label {
    color: #7f1d1d;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Side actions / reschedule */
.crm-card-h-side-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.crm-card-h-reschedule-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 100%;
    height: 100%;
    padding: 0.35rem 0.45rem;
    border-radius: 0.65rem;
    border: 2px solid #d4a800;
    background: linear-gradient(180deg, #fff8d6 0%, #ffe566 100%);
    color: #8a6d00;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.crm-card-h-reschedule-btn:hover {
    color: #6b5400;
    background: #fff3b0;
    border-color: #b88900;
}

.crm-card-h-reschedule-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    color: #8a6d00;
}

.crm-card-h-side-actions:has(.crm-card-actions--h-compact) .crm-card-h-reschedule-btn {
    flex: 0 0 auto;
    min-height: 1.7rem;
    height: 1.7rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.72rem;
    border-width: 1.5px;
}

.crm-card-actions--h-compact {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 0.15rem;
    align-items: stretch;
    justify-content: stretch;
    box-sizing: border-box;
}

.crm-card-h-side-actions > .crm-card-actions--horizontal.crm-card-actions--h-compact {
    /* Перебиваем .crm-card-actions--horizontal { flex: 1 1 16rem }, иначе кнопки вылезают из колонки */
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    justify-content: stretch;
}

.crm-card-actions--h-compact .crm-card-quick-fields:empty,
.crm-card-actions--h-compact .crm-card-action-buttons:empty {
    display: none;
}

.crm-card-actions--h-compact .crm-card-quick-fields {
    width: 100%;
    min-width: 0;
}

.crm-card-actions--h-compact .crm-card-action-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    justify-content: stretch;
    gap: 0.15rem;
    box-sizing: border-box;
}

.crm-card-actions--h-compact .crm-card-action-buttons .btn {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: 1.55rem;
    padding: 0.15rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 0.45rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.crm-card-actions--horizontal {
    flex: 1 1 16rem;
    margin-top: 0;
    padding: 0;
    align-items: flex-end;
    justify-content: flex-end;
}

.crm-card--horizontal .crm-card-quick-fields {
    flex: 1 1 12rem;
    width: auto;
    min-width: 11rem;
}

.crm-card--horizontal .crm-card-action-buttons {
    justify-content: flex-end;
}

/* Горизонтальные карточки продаж */
.crm-card--horizontal.crm-card--sale-h {
    --h-card-height: 5.6rem;
    grid-template-columns:
        7rem
        minmax(12rem, 1.15fr)
        minmax(8.5rem, 0.85fr)
        minmax(7.25rem, 0.7fr)
        minmax(10rem, 1.15fr)
        minmax(10.5rem, 1.05fr)
        6.75rem;
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
    overflow: visible;
}

.sale-card-h-open {
    display: contents;
    cursor: pointer;
    text-align: left;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
}

.sale-card-h-open:focus-visible .crm-card-h-operator,
.sale-card-h-open:focus-visible .sale-card-h-client,
.sale-card-h-open:focus-visible .sale-card-h-meta,
.sale-card-h-open:focus-visible .sale-card-h-amount,
.sale-card-h-open:focus-visible .sale-card-h-items {
    outline: 2px solid var(--isee-sky, #38bdf8);
    outline-offset: 2px;
}

.sale-card-h-open:hover .sale-card-h-client,
.sale-card-h-open:hover .sale-card-h-meta,
.sale-card-h-open:hover .sale-card-h-amount,
.sale-card-h-open:hover .sale-card-h-items {
    border-color: rgba(8, 103, 189, 0.35);
    box-shadow: 0 4px 12px rgba(7, 63, 135, 0.08);
}

.sale-card-v-open {
    display: block;
    width: 100%;
    text-align: left;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.crm-card--sale-h .crm-card-h-operator {
    height: 100%;
    padding: 0.4rem 0.5rem;
}

.crm-card--sale-h .crm-card-h-operator-role {
    font-size: 0.72rem;
}

.crm-card--sale-h .crm-card-h-operator-name {
    font-size: 0.92rem;
    font-weight: 800;
}

.sale-card-h-client.crm-card-h-visit {
    border: 1px solid rgba(100, 116, 139, 0.22);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.sale-card-h-client .crm-card-h-visit-icons {
    display: none;
}

.sale-card-h-client .crm-card-h-visit-time {
    flex-basis: 6rem;
    width: 6rem;
    padding: 0.4rem 0.5rem;
}

.sale-card-h-client .crm-card-h-visit-time .crm-card-date {
    font-size: 0.82rem;
}

.sale-card-h-client .crm-card-h-visit-time .crm-card-time {
    font-size: 1.12rem;
}

.sale-card-h-client .crm-card-h-visit-client {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.35rem 0.55rem;
}

.sale-card-h-client .crm-card-h-visit-client .crm-card-title {
    display: block;
    font-size: 0.92rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sale-card-h-client .crm-card-h-visit-client .crm-card-phone {
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sale-card-h-client .crm-card-h-visit-time .crm-card-date,
.sale-card-h-client .crm-card-h-visit-time .crm-card-time {
    display: block;
}

.sale-card-h-meta {
    padding: 0.3rem 0.45rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: #fff;
    box-sizing: border-box;
    gap: 0.18rem;
}

.sale-card-h-meta .crm-card-h-param {
    gap: 0.3rem;
}

.sale-card-h-meta .crm-card-h-param-label {
    flex-basis: 3.2rem;
    width: 3.2rem;
    font-size: 0.68rem;
}

.sale-card-h-meta .crm-card-h-param-value {
    height: 1.45rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2rem;
}

.sale-card-h-amount {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: #fff;
    box-sizing: border-box;
}

.sale-card-h-amount-label {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sale-card-h-amount-value {
    color: #0f766e;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sale-card-h-amount-prepay {
    color: #9a6a18;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sale-card-h-items {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.45rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.sale-card-h-items .crm-tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.74rem;
    padding: 0.16rem 0.42rem;
}

.sale-card-h-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.3rem 0.4rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: #fff;
    box-sizing: border-box;
    overflow: visible;
    z-index: 3;
}

.sale-card-h-status-label {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.sale-card-h-status .sale-order-status {
    max-width: none;
}

.sale-card-h-status .sale-order-status__btn {
    min-height: 1.85rem;
    padding: 0.22rem 0.45rem;
    font-size: 0.74rem;
}

.sale-card-h-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 2;
}

.sale-card-h-actions .crm-card-actions--h-compact {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 0;
}

.sale-card-h-actions .crm-card-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    width: 100%;
}

.sale-card-h-actions .crm-card-action-buttons .btn {
    width: 100%;
    padding: 0.32rem 0.4rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.sale-card-v-status {
    padding: 0.65rem 0.85rem 0;
}

.sale-order-status {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 14rem;
}

.sale-order-status__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    min-height: 2rem;
    padding: 0.28rem 0.55rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(100, 116, 139, 0.28);
    background: #fff;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.sale-order-status__btn:hover,
.sale-order-status__btn:focus-visible {
    border-color: rgba(8, 103, 189, 0.45);
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(40, 168, 232, 0.18);
}

.sale-order-status__btn.is-readonly {
    cursor: default;
    background: #f8fafc;
    color: #475569;
    box-shadow: none;
}

.sale-order-status__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sale-order-status.is-warning .sale-order-status__btn {
    border-color: rgba(217, 119, 6, 0.35);
    background: #fffbeb;
    color: #92400e;
}

.sale-order-status.is-success .sale-order-status__btn {
    border-color: rgba(22, 163, 74, 0.35);
    background: #f0fdf4;
    color: #166534;
}

.sale-order-status.is-info .sale-order-status__btn {
    border-color: rgba(37, 99, 235, 0.35);
    background: #eff6ff;
    color: #1d4ed8;
}

.sale-order-status.is-saving {
    opacity: 0.72;
    pointer-events: none;
}

.sale-order-status.is-saved .sale-order-status__btn {
    box-shadow: 0 0 0 0.15rem rgba(34, 197, 94, 0.25);
}

.sale-order-status__menu {
    min-width: 100%;
    z-index: 1080;
}

/* Открытое меню статуса — поверх соседних карточек/строк (иначе следующий ряд перекрывает). */
.sale-order-status:has(.dropdown-menu.show),
.sale-order-status:has(.dropdown-toggle.show) {
    z-index: 50;
}

.crm-card:has(.sale-order-status .dropdown-menu.show),
.crm-card:has(.sale-order-status .dropdown-toggle.show),
.crm-card--sale-h:has(.sale-order-status .dropdown-menu.show),
.crm-card--sale-h:has(.sale-order-status .dropdown-toggle.show) {
    position: relative;
    z-index: 40;
    overflow: visible;
}

.table > tbody > tr:has(.sale-order-status .dropdown-menu.show),
.table > tbody > tr:has(.sale-order-status .dropdown-toggle.show) {
    position: relative;
    z-index: 40;
}

.table > tbody > tr:has(.sale-order-status .dropdown-menu.show) > .sale-table-cell-order-status,
.table > tbody > tr:has(.sale-order-status .dropdown-toggle.show) > .sale-table-cell-order-status {
    overflow: visible;
    z-index: 40;
}

.sale-order-status--table {
    max-width: 11.5rem;
}

.sale-order-status--inline {
    max-width: 16rem;
}

.sale-table-cell-order-status {
    min-width: 10.5rem;
    vertical-align: middle;
    overflow: visible;
}

.crm-card--sale-h.sale-tone-paid {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.12),
        0 6px 18px rgba(15, 23, 42, 0.06);
}

.crm-card--sale-h.sale-tone-prepaid {
    border-color: rgba(217, 119, 6, 0.4);
    box-shadow:
        0 0 0 1px rgba(217, 119, 6, 0.14),
        0 6px 18px rgba(15, 23, 42, 0.06);
}

.sale-detail-modal__content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(7, 63, 135, 0.18);
}

/* Доплата поверх «Подробнее» / поверх чужих backdrop. */
body > .sale-topup-modal {
    z-index: 1100;
}

body:has(> .sale-topup-modal.show) > .modal-backdrop {
    z-index: 1090;
}

.sale-topup-modal .sale-topup-amount {
    max-width: 100%;
}

.sale-topup-modal .sale-payment-methods {
    margin-bottom: 0.25rem;
}

.sale-detail-modal__subtitle {
    line-height: 1.35;
}

.sale-detail-modal__dl dt {
    color: #64748b;
    font-weight: 600;
    font-size: 0.88rem;
}

.sale-detail-modal__dl dd {
    font-size: 0.95rem;
}

.sale-detail-modal__items {
    font-size: 0.9rem;
}

@media (max-width: 1399.98px) {
    .crm-card--horizontal.crm-card--h-blocks {
        --h-card-height: 6.1rem;
        grid-template-columns:
            6.5rem
            5.5rem
            minmax(9.5rem, 0.95fr)
            minmax(7.5rem, 0.7fr)
            minmax(11rem, 1.4fr)
            minmax(11.5rem, 1.15fr)
            7.25rem;
        gap: 0.35rem;
        height: auto;
        min-height: var(--h-card-height);
        max-height: none;
        overflow: visible;
    }

    .crm-card--horizontal.crm-card--sale-h {
        --h-card-height: 5.4rem;
        grid-template-columns:
            6.5rem
            minmax(11rem, 1.1fr)
            minmax(7.75rem, 0.8fr)
            minmax(6.75rem, 0.65fr)
            minmax(9rem, 1.1fr)
            minmax(9.5rem, 1fr)
            6.25rem;
        gap: 0.35rem;
    }

    .crm-card-h-param-label {
        flex-basis: 3.3rem;
        width: 3.3rem;
    }
}

@media (max-width: 1199.98px) {
    .crm-card--horizontal.crm-card--h-blocks {
        --h-card-height: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        display: flex;
        flex-wrap: wrap;
        overflow: visible;
    }

    .crm-card-h-operator {
        flex: 0 0 7rem;
        height: 4.8rem;
    }

    .crm-card-h-confirm,
    .crm-card-h-confirm--icons {
        flex: 0 0 5.75rem;
        height: 4.8rem;
    }

    .crm-card-h-visit {
        flex: 1 1 16rem;
        min-height: 4.8rem;
        height: 4.8rem;
    }

    .crm-card-h-params {
        flex: 1 1 8.5rem;
        height: 4.8rem;
    }

    .crm-card-h-comment {
        flex: 1 1 14rem;
        height: 4.8rem;
    }

    .crm-card-h-sale-block {
        flex: 1 1 14rem;
        height: 4.8rem;
    }

    .crm-card-h-side-actions {
        flex: 0 0 8.1rem;
        height: 4.8rem;
    }

    .crm-card--sale-h .crm-card-h-operator {
        flex: 0 0 7rem;
        height: 5rem;
    }

    .crm-card--sale-h .sale-card-h-client,
    .crm-card--sale-h .sale-card-h-meta,
    .crm-card--sale-h .sale-card-h-amount,
    .crm-card--sale-h .sale-card-h-items {
        flex: 1 1 11rem;
        height: 5rem;
    }

    .crm-card--sale-h .sale-card-h-status {
        flex: 1 1 10.5rem;
        height: 5rem;
    }

    .crm-card--sale-h .sale-card-h-actions {
        flex: 0 0 6.75rem;
        height: 5rem;
    }
}

@media (max-width: 991.98px) {
    .crm-card-actions--horizontal {
        flex: 1 1 100%;
        justify-content: stretch;
    }
}

@media (max-width: 575.98px) {
    .crm-card--horizontal {
        padding: 0.65rem;
    }

    .crm-card-h-operator,
    .crm-card-h-confirm,
    .crm-card-h-visit,
    .crm-card-h-params,
    .crm-card-h-comment,
    .crm-card-h-sale-block,
    .crm-card-h-side-actions,
    .sale-card-h-amount,
    .sale-card-h-items,
    .sale-card-h-status,
    .sale-card-h-actions {
        flex: 1 1 100%;
        height: auto;
        min-height: 3.6rem;
    }

    .crm-card--horizontal .crm-card-quick-fields {
        width: 100%;
        min-width: 0;
    }

    .crm-card--horizontal .crm-card-action-buttons {
        width: 100%;
    }

    .crm-card--horizontal .crm-card-action-buttons .btn {
        flex: 1 1 auto;
    }
}

/* Appointments table: soft CRM panel with status pills */
.appointment-list-table-card {
    --appointment-table-line: #d9e8f6;
    --appointment-table-surface: #ffffff;
    --appointment-table-muted: #eef7ff;
    box-shadow: 0 10px 28px rgba(7, 63, 135, 0.08) !important;
    border: 1px solid var(--appointment-table-line) !important;
    border-radius: 1rem !important;
    background: var(--appointment-table-surface);
    overflow: hidden;
}

.appointment-list-table-card .card-body,
.appointment-list-table-card .grid-view,
.appointment-list-table-card .table-responsive {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.appointment-list-table-card .border-top {
    border-top: 1px solid var(--appointment-table-line) !important;
    background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
}

.appointment-list-table.table {
    --bs-table-border-color: var(--appointment-table-line);
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.appointment-list-table thead th,
.appointment-list-table tbody td,
.appointment-list-table .filters td {
    border: 0 !important;
    border-right: 1px solid var(--appointment-table-line) !important;
    border-bottom: 1px solid var(--appointment-table-line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    vertical-align: middle;
    padding: 0.65rem 0.75rem;
    background-clip: padding-box;
}

.appointment-list-table thead th:last-child,
.appointment-list-table tbody td:last-child,
.appointment-list-table .filters td:last-child {
    border-right: 0 !important;
}

.appointment-list-table thead th {
    background: linear-gradient(180deg, #eef7ff 0%, #e4f1fb 100%) !important;
    color: #3f6381;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.appointment-list-table thead th a {
    color: #3f6381;
    text-decoration: none;
}

.appointment-list-table thead th a:hover {
    color: var(--isee-navy);
}

.appointment-list-table .filters td {
    background: #f8fbfe !important;
    padding: 0.45rem 0.55rem;
}

.appointment-list-table .filters .form-control,
.appointment-list-table .filters .form-select {
    border-radius: 0.55rem;
    border-color: #cfe0ef;
    font-size: 0.78rem;
    min-height: 2rem;
}

.appointment-list-table .filters .form-control:focus,
.appointment-list-table .filters .form-select:focus {
    border-color: var(--isee-sky);
    box-shadow: 0 0 0 0.2rem rgba(40, 168, 232, 0.15);
}

.appointment-list-table tbody tr.appointment-table-row > td {
    background-color: #fff !important;
    transition: background-color 0.15s ease;
}

.appointment-list-table tbody tr.appointment-table-row > td:first-child {
    box-shadow: inset 3px 0 0 transparent !important;
}

.appointment-list-table tbody tr.appointment-table-row:has(.appointment-table-confirm.is-confirmed) > td:first-child {
    box-shadow: inset 3px 0 0 #22c55e !important;
}

.appointment-list-table tbody tr.appointment-table-row:has(.appointment-table-confirm.is-cancelled) > td:first-child,
.appointment-list-table tbody tr.appointment-table-row:has(.appointment-table-confirm.is-rescheduled) > td:first-child {
    box-shadow: inset 3px 0 0 #ef4444 !important;
}

.appointment-list-table tbody tr.appointment-table-row:has(.appointment-table-confirm.is-pending) > td:first-child {
    box-shadow: inset 3px 0 0 #f59e0b !important;
}

.appointment-list-table.table-hover > tbody > tr.appointment-table-row:hover > * {
    --bs-table-accent-bg: #f3f9ff;
    background-color: #f3f9ff !important;
}

.list-index-table .appointment-table-cell-confirm,
.list-index-table .appointment-table-cell-visit,
.list-index-table .appointment-table-cell-sale {
    min-width: 8.5rem;
    vertical-align: middle;
    overflow: visible;
}

.appointment-table-date {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.15;
}

.appointment-table-date-day {
    color: var(--isee-navy);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.appointment-table-date-wd {
    color: #7a93a8;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: lowercase;
}

.appointment-table-time-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}

.appointment-table-time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.4rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #eaf5ff 0%, #dcebff 100%);
    color: var(--isee-navy);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 0 0 1px rgba(8, 103, 189, 0.12);
}

.appointment-table-time-wrap .crm-badge {
    align-self: flex-start;
}

.appointment-table-client {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.appointment-table-meta-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appointment-table-meta-text {
    display: block;
    max-width: 9rem;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-table-status {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 10rem;
}

.appointment-table-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    min-height: 1.85rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eef5fb;
    color: #1e3a8a;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(8, 103, 189, 0.08);
    cursor: pointer;
    appearance: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.appointment-table-status-btn:hover {
    border-color: rgba(8, 103, 189, 0.22);
    box-shadow: 0 4px 12px rgba(7, 63, 135, 0.08);
}

.appointment-table-status-btn.dropdown-toggle::after {
    margin-left: auto;
    flex: 0 0 auto;
    opacity: 0.55;
    border-top-width: 0.28em;
    border-right-width: 0.28em;
    border-left-width: 0.28em;
}

.appointment-table-status-btn.is-readonly {
    cursor: default;
    color: #475569;
}

.appointment-table-status-btn.is-readonly::after {
    display: none;
}

.appointment-table-status.is-confirmed .appointment-table-status-btn,
.appointment-table-status.visit-tone-came .appointment-table-status-btn {
    color: #166534;
    background: #e8f8ee;
    box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.14);
}

.appointment-table-status.is-cancelled .appointment-table-status-btn,
.appointment-table-status.is-rescheduled .appointment-table-status-btn,
.appointment-table-status.visit-tone-missed .appointment-table-status-btn {
    color: #991b1b;
    background: #fdecec;
    box-shadow: inset 0 0 0 1px rgba(153, 27, 27, 0.14);
}

a.appointment-table-status-label {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
    cursor: pointer;
}

a.appointment-table-status-label:hover {
    color: inherit;
}

.appointment-table-status.is-pending .appointment-table-status-btn,
.appointment-table-status.visit-tone-pending .appointment-table-status-btn {
    color: #92400e;
    background: #fff7e8;
    box-shadow: inset 0 0 0 1px rgba(146, 64, 14, 0.12);
}

.appointment-table-status.is-saving .appointment-table-status-btn {
    opacity: 0.7;
    pointer-events: none;
}

.appointment-table-status-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-table-status-menu.dropdown-menu {
    --bs-dropdown-min-width: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 12rem !important;
    box-sizing: border-box;
    padding: 0.3rem;
    border: 1px solid var(--appointment-table-line, #d9e8f6);
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px rgba(7, 63, 135, 0.14);
    background: #fff;
}

.appointment-table-status-menu .dropdown-item {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #334155;
    padding: 0.4rem 0.55rem;
    border-bottom: 0;
}

.appointment-table-status-menu .dropdown-item:hover {
    background: #eef7ff;
    color: var(--isee-navy);
}

.appointment-table-status-menu .dropdown-item.active,
.appointment-table-status-menu .dropdown-item:active {
    background: #dcebff;
    color: var(--isee-navy);
}

.appointment-table-confirm,
.appointment-table-visit {
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.appointment-table-sale {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    max-width: 13rem;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.appointment-table-sale-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 1.85rem;
    padding: 0.28rem 0.7rem;
    border: 1px solid rgba(8, 103, 189, 0.18);
    border-radius: 999px;
    background: linear-gradient(180deg, #f4faff 0%, #e7f3ff 100%);
    color: var(--isee-blue);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.appointment-table-sale-btn:hover,
button.appointment-table-sale-btn:hover {
    color: var(--isee-navy);
    border-color: rgba(7, 63, 135, 0.28);
    background: #dff0ff;
    text-decoration: none;
}

.appointment-table-sale-btn.is-static {
    cursor: default;
    color: #7a93a8;
    border-color: #e2e8f0;
    background: #f8fafc;
    text-decoration: none;
}

.appointment-table-sale-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.appointment-table-sale-data.is-failed .appointment-table-sale-manager,
.appointment-table-sale-data.is-failed .appointment-table-sale-amount {
    color: #991b1b;
}

.appointment-table-sale-manager,
.appointment-table-sale-amount {
    color: #166534;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-table-cell-actions {
    max-width: 16rem;
}

.appointment-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.1rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.appointment-table-action:hover {
    text-decoration: none;
    border-color: rgba(15, 23, 42, 0.08);
    background: #e2e8f0;
}

.appointment-table-action.is-view {
    color: #334155;
    background: #eef2f7;
}

.appointment-table-action.is-edit {
    color: var(--isee-blue);
    background: #e7f3ff;
}

.appointment-table-action.is-edit:hover {
    color: var(--isee-navy);
    background: #d7ebff;
}

.appointment-table-action.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: auto;
    color: #64748b;
    background: #f1f5f9;
}

.appointment-table-action.is-reschedule {
    color: #a16207;
    background: #fff7e8;
}

.appointment-table-action.is-reschedule:hover {
    background: #ffefd1;
}

.appointment-table-action.is-delete {
    color: #b91c1c;
    background: #fdecec;
}

.appointment-table-action.is-delete:hover {
    background: #f9d8d8;
}

.appointment-list-table .appointment-table-operator-name {
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
}

.appointment-list-table .appointment-table-client-link {
    font-size: 0.86rem;
    font-weight: 700;
}

.appointment-list-table .appointment-table-client-phone {
    font-size: 0.72rem;
}

.appointment-table-client-link {
    display: block;
    color: var(--isee-blue);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
}

.appointment-table-client-link:hover {
    color: var(--isee-navy);
    text-decoration: underline;
}

.appointment-table-client-phone {
    color: #7a93a8;
    font-size: 0.78rem;
    line-height: 1.2;
}

.appointment-table-operator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.appointment-table-operator-name {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    background: #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.appointment-table-operator-name.has-user-color {
    --user-color: #64748b;
    color: #fff;
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--user-color) 78%, #ffffff) 0%,
        var(--user-color) 100%
    );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        0 4px 12px color-mix(in srgb, var(--user-color) 28%, transparent);
}

@media (max-width: 991.98px) {
    .appointment-list-table-card {
        border-radius: 0.85rem !important;
    }

    .appointment-list-table thead th,
    .appointment-list-table tbody td,
    .appointment-list-table .filters td {
        padding: 0.5rem 0.55rem;
    }

    .list-index-table .appointment-table-cell-confirm,
    .list-index-table .appointment-table-cell-visit,
    .list-index-table .appointment-table-cell-sale {
        min-width: 8.5rem;
    }

    .appointment-table-status,
    .appointment-table-confirm,
    .appointment-table-visit,
    .appointment-table-sale {
        max-width: none;
    }

    .appointment-table-meta-text {
        max-width: 7.5rem;
    }
}

.crm-card-recipe-trigger {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    width: calc(100% - 1.7rem);
    margin: 0 0.85rem 0.55rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.55rem;
    background: linear-gradient(180deg, rgba(234, 245, 255, 0.95), #fff);
    color: var(--isee-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.crm-card-recipe-trigger:hover,
.crm-card-recipe-trigger[aria-expanded="true"] {
    border-color: rgba(40, 168, 232, 0.45);
    box-shadow: 0 0 0 0.12rem rgba(40, 168, 232, 0.12);
    background: #fff;
}

.crm-card-recipe-trigger-label {
    color: var(--isee-blue);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
}

.crm-card-recipe-trigger-preview {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    color: #5d738c;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.crm-card-recipe-eye,
.crm-card-recipe-prism {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}

.crm-card-recipe-eye-label,
.crm-card-recipe-prism-label {
    flex: 0 0 auto;
    min-width: 2.6rem;
    color: var(--isee-navy);
    font-weight: 700;
    font-size: 0.72rem;
}

.crm-card-recipe-prism-label {
    min-width: 3.1rem;
    color: #6a8098;
    font-weight: 650;
}

.crm-card-recipe-eye-values,
.crm-card-recipe-prism-values {
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-card-recipe-prism {
    margin-top: 0.08rem;
    padding-top: 0.12rem;
    border-top: 1px dashed rgba(138, 160, 184, 0.45);
    color: #6a8098;
    font-size: 0.72rem;
}

.sale-table-recipe-trigger {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--isee-line);
    border-radius: 0.5rem;
    background: var(--isee-ice);
    color: var(--isee-blue);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sale-table-recipe-trigger:hover,
.sale-table-recipe-trigger[aria-expanded="true"] {
    border-color: rgba(40, 168, 232, 0.45);
    box-shadow: 0 0 0 0.12rem rgba(40, 168, 232, 0.12);
    background: #fff;
}

.sale-table-recipe-trigger-label {
    white-space: nowrap;
}

.sale-recipe-popover {
    position: fixed;
    z-index: 1085;
    max-height: min(70vh, 28rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.sale-recipe-popover-inner {
    border: 1px solid var(--isee-line);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(7, 63, 135, 0.18);
    padding: 0.7rem 0.75rem 0.8rem;
}

.sale-recipe-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    color: var(--isee-navy);
}

.sale-recipe-popover-close {
    border: 0;
    background: transparent;
    color: #8aa0b8;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 0.15rem;
}

.sale-recipe-popover-close:hover {
    color: var(--isee-ink);
}

.sale-recipe-popover-foot {
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--isee-line);
}

.sale-recipe-details--compact .table-responsive {
    margin-bottom: 0.55rem;
}

.sale-recipe-details--compact .sale-recipe-details-meta dd {
    margin-bottom: 0.3rem;
}

.sale-recipe-details--compact .recipe-rx-table th,
.sale-recipe-details--compact .recipe-rx-table td {
    padding: 0.35rem 0.45rem;
    font-size: 0.82rem;
}

.recipe-rx-prism {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sale-checkout-recipe-eye,
.sale-checkout-recipe-prism {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.sale-checkout-recipe-eye strong,
.sale-checkout-recipe-prism strong {
    flex: 0 0 auto;
    min-width: 3.4rem;
    font-size: 0.78rem;
}

.sale-checkout-recipe-prism {
    margin-top: 0.1rem;
    padding-top: 0.15rem;
    border-top: 1px dashed rgba(138, 160, 184, 0.4);
    color: #6a8098;
    font-size: 0.82rem;
}

.sale-checkout-recipe-prism.is-hidden {
    display: none;
}

.crm-card-status-form {
    flex: 1 1 9.5rem;
    min-width: 0;
    margin: 0;
}

.crm-card-quick-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    flex: 1 1 100%;
    width: 100%;
}

.crm-card-quick-fields .crm-card-status-form {
    flex: 1 1 auto;
}

.crm-card-status-label {
    display: block;
    margin-bottom: 0.2rem;
    color: #6a8098;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.crm-card-status-select {
    width: 100%;
    min-height: 2rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.65rem;
}

.crm-card-status-select.is-info {
    border-color: rgba(8, 103, 189, 0.28);
    color: var(--isee-blue);
    background-color: rgba(8, 103, 189, 0.08);
}

.crm-card-status-select.is-success {
    border-color: rgba(25, 135, 84, 0.28);
    color: #146c43;
    background-color: rgba(25, 135, 84, 0.1);
}

.crm-card-status-select.is-warning {
    border-color: rgba(255, 193, 7, 0.45);
    color: #9a6700;
    background-color: rgba(255, 193, 7, 0.16);
}

.crm-card-status-select.is-danger {
    border-color: rgba(220, 53, 69, 0.3);
    color: #b02a37;
    background-color: rgba(220, 53, 69, 0.1);
}

.crm-card-status-select.is-saving {
    opacity: 0.72;
    cursor: wait;
}

.crm-card-status-select.is-saved {
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.35);
}

.crm-card-status-readonly {
    display: flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.65rem;
    border: 1px solid transparent;
}

.crm-card-status-readonly.is-info {
    border-color: rgba(8, 103, 189, 0.28);
    color: var(--isee-blue);
    background-color: rgba(8, 103, 189, 0.08);
}

.crm-card-status-readonly.is-success {
    border-color: rgba(25, 135, 84, 0.28);
    color: #146c43;
    background-color: rgba(25, 135, 84, 0.1);
}

.crm-card-status-readonly.is-warning {
    border-color: rgba(255, 193, 7, 0.45);
    color: #9a6700;
    background-color: rgba(255, 193, 7, 0.16);
}

.crm-card-status-readonly.is-danger {
    border-color: rgba(220, 53, 69, 0.3);
    color: #b02a37;
    background-color: rgba(220, 53, 69, 0.1);
}

@media (max-width: 575.98px) {
    .crm-card-status-form {
        flex: 1 1 100%;
    }

    .crm-card-quick-fields {
        grid-template-columns: 1fr;
    }
}

.crm-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    margin-top: 1.5rem;
}

.crm-pager .list-index-page-size-wrap {
    margin-left: 0;
    margin-right: 0;
}

.crm-empty {
    padding: 2.4rem 1.4rem;
    text-align: center;
    color: #6b879f;
    border: 1px dashed rgba(8, 103, 189, 0.28);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 575.98px) {
    .crm-search-field {
        flex-wrap: wrap;
        padding: 0.75rem;
    }

    .crm-search-icon { display: none; }

    .crm-search-input {
        width: 100%;
        flex: 1 1 100%;
    }

    .crm-search-submit,
    .crm-search-clear {
        flex: 1 1 auto;
    }

    .crm-card-grid {
        grid-template-columns: 1fr;
    }

    .crm-cards,
    .crm-cards--compact,
    .clients-grid,
    .whats-new-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .crm-card,
    .client-list-card,
    .whats-new-card {
        min-width: 0;
        max-width: 100%;
    }
}



/* ÃÂÃÂÃÂ Comments ÃÂÃÂÃÂ */
.comment-section {
    --comment-thread-line: #cbd5e1;
    --comment-thread-bg: #fff;
}

.comment-section .comment-section-empty {
    margin-bottom: 0;
}

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-node {
    min-width: 0;
}

.comment-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.125rem;
    background: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.comment-item--reply {
    background: #f8fafc;
}

.comment-item--highlight {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.comment-item__text {
    white-space: pre-wrap;
    line-height: 1.55;
    color: #1e293b;
}

.comment-branch {
    list-style: none;
    margin: 0.625rem 0 0 0.75rem;
    padding: 0 0 0 1.25rem;
    border-left: 2px solid var(--comment-thread-line);
}

.comment-branch__entry {
    position: relative;
    margin: 0;
    padding: 0 0 0.75rem;
}

.comment-branch__entry:last-child {
    padding-bottom: 0;
}

.comment-branch__entry::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 1.125rem;
    width: 1.25rem;
    border-top: 2px solid var(--comment-thread-line);
}

.comment-branch__entry:last-child::after {
    content: '';
    position: absolute;
    left: -1.35rem;
    top: calc(1.125rem + 2px);
    bottom: 0;
    width: 4px;
    background: var(--comment-thread-bg);
}

.comment-reply-form:not(.show) {
    display: none;
}

.comment-reply-form.show {
    display: block;
}

.comment-form .form-text {
    font-size: 0.75rem;
}

@media (max-width: 575.98px) {
    .comment-branch {
        margin-left: 0.375rem;
        padding-left: 0.875rem;
    }

    .comment-branch__entry::before {
        left: -0.875rem;
        width: 0.875rem;
    }

    .comment-branch__entry:last-child::after {
        left: -0.95rem;
    }
}

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ What's new Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.whats-new {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
}

.whats-new-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.35rem);
    border: 1px solid rgba(7, 86, 166, 0.09);
    border-radius: 1.25rem;
    color: #fff;
    background: linear-gradient(125deg, var(--isee-navy), var(--isee-blue));
    box-shadow: 0 24px 54px rgba(7, 63, 135, 0.18);
}

.whats-new-hero::after {
    position: absolute;
    top: -8rem;
    right: -6rem;
    width: 18rem;
    height: 18rem;
    border: 2rem solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: '';
}

.whats-new-hero .home-kicker,
.whats-new-hero h1,
.whats-new-hero .home-copy,
.whats-new-hero-row {
    position: relative;
    z-index: 1;
}

.whats-new-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.whats-new-hero .home-copy {
    margin-top: 0.85rem;
    max-width: 42rem;
}

.whats-new-hero-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.whats-new-version {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border: 1px solid rgba(169, 229, 255, 0.45);
    border-radius: 999px;
    background: rgba(8, 28, 64, 0.28);
    color: #a9e5ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    white-space: nowrap;
}

.whats-new-lead {
    margin: 0;
    color: #4d6680;
    font-size: 1.02rem;
    line-height: 1.55;
}

.whats-new-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
    gap: 1rem;
}

.whats-new-card {
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.2rem 1.05rem;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 1.1rem;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 255, 0.92));
    box-shadow: 0 16px 36px rgba(7, 63, 135, 0.07);
}

.whats-new-card h2 {
    margin: 0 0 0.45rem;
    font-size: 1.12rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.whats-new-card h2 a {
    color: var(--isee-navy);
    text-decoration: none;
}

.whats-new-card h2 a:hover,
.whats-new-card h2 a:focus {
    color: var(--isee-blue);
    text-decoration: underline;
}

.whats-new-card p {
    margin: 0 0 0.7rem;
    color: #5f7f9c;
    font-size: 0.94rem;
    line-height: 1.45;
}

.whats-new-card ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--isee-ink);
    font-size: 0.92rem;
    line-height: 1.5;
}

.whats-new-card li + li {
    margin-top: 0.28rem;
}

.whats-new-card li a {
    font-weight: 650;
    text-decoration: none;
}

.whats-new-card li a:hover,
.whats-new-card li a:focus {
    text-decoration: underline;
}

.whats-new-note {
    padding: 1.15rem 1.25rem;
    border: 1px dashed rgba(8, 103, 189, 0.28);
    border-radius: 1.1rem;
    background: rgba(234, 245, 255, 0.72);
}

.whats-new-note h2 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: var(--isee-navy);
}

.whats-new-note p {
    margin: 0 0 0.65rem;
    color: #38536e;
    line-height: 1.55;
}

.whats-new-note-meta {
    color: #5f7f9c;
    font-size: 0.9rem;
}

@media (max-width: 575.98px) {
    .whats-new-hero {
        padding: 1.25rem 1.1rem 1.35rem;
    }

    .whats-new-grid {
        grid-template-columns: 1fr;
    }

    .whats-new-card,
    .whats-new-note {
        padding: 1rem 1.05rem;
    }

    .home-actions .btn {
        min-width: 0;
        flex: 1 1 calc(50% - 0.75rem);
    }
}

/* Dated release notes above the feature overview. */
.whats-new-history {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}
.whats-new-release { min-width: 0; overflow-wrap: anywhere; }
.whats-new-release-date {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--isee-ice);
    color: var(--isee-navy);
    font-size: 14px;
    font-weight: 600;
}
.whats-new-release h3,
.whats-new-release h4 { color: var(--isee-navy); }

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ Recipe diopter picker Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.recipe-rx-table th,
.recipe-rx-table td {
    vertical-align: middle;
}

.recipe-rx-table th:first-child,
.recipe-rx-table td:first-child {
    white-space: nowrap;
    min-width: 6.5rem;
}

.recipe-eye-badge {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    vertical-align: 0.05em;
}

.recipe-eye-badge--od {
    background: var(--isee-blue);
    box-shadow: 0 0 0 3px rgba(8, 103, 189, 0.16);
}

.recipe-eye-badge--os {
    background: #c44b5a;
    box-shadow: 0 0 0 3px rgba(196, 75, 90, 0.14);
}

.recipe-eye-hint {
    display: block;
    margin-top: 0.1rem;
    color: #7a8fa8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.diopter-picker-wrap {
    position: relative;
}

.diopter-picker-wrap--select::after {
    content: '';
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid #7a93ad;
    border-bottom: 1.5px solid #7a93ad;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: transform 0.15s ease;
}

.diopter-picker-wrap--select.is-open::after {
    transform: translateY(-20%) rotate(225deg);
}

.diopter-picker-wrap--select .diopter-picker-input {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    text-align: center;
    padding-right: 1.6rem !important;
    cursor: pointer;
    caret-color: var(--isee-blue);
}

.diopter-picker-input:not([readonly]) {
    cursor: text;
}

.diopter-picker-input.is-open {
    border-color: var(--isee-sky);
    box-shadow: 0 0 0 0.2rem rgba(40, 168, 232, 0.16);
}

.diopter-picker-input.is-diopter-neg {
    color: #c0392b;
}

.diopter-picker-input.is-diopter-pos {
    color: #1f8a4c;
}

.diopter-picker-input.is-diopter-zero {
    color: var(--isee-ink);
}

.diopter-picker-panel {
    position: fixed;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    max-height: min(22rem, calc(100vh - 1.5rem));
    overflow: hidden;
    border: 1px solid var(--isee-line);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(7, 63, 135, 0.18);
}

.diopter-picker-clear {
    flex: 0 0 auto;
    border: 0;
    border-radius: 0.85rem 0.85rem 0 0;
    background: linear-gradient(135deg, var(--isee-navy), var(--isee-blue));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.65rem 0.85rem;
    text-align: center;
}

.diopter-picker-clear:hover,
.diopter-picker-clear:focus-visible {
    filter: brightness(1.06);
    outline: none;
}

.diopter-picker-zero {
    flex: 0 0 auto;
    border: 0;
    border-bottom: 1px solid var(--isee-line);
    background: var(--isee-ice);
    color: var(--isee-ink);
    padding: 0.65rem 0.75rem;
    text-align: center;
}

.diopter-picker-zero span {
    color: #6a8098;
    font-weight: 500;
}

.diopter-picker-zero:hover,
.diopter-picker-zero:focus-visible {
    background: #dff0ff;
    outline: none;
}

.diopter-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.diopter-picker-grid--single {
    grid-template-columns: 1fr;
}

.diopter-picker-col {
    display: flex;
    flex-direction: column;
}

.diopter-picker-col--neg {
    border-right: 1px solid var(--isee-line);
}

.diopter-picker-value {
    border: 0;
    border-bottom: 1px solid rgba(217, 232, 246, 0.7);
    background: transparent;
    padding: 0.45rem 0.65rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
}

.diopter-picker-value.is-neg {
    color: #c0392b;
}

.diopter-picker-value.is-pos {
    color: #1f8a4c;
}

.diopter-picker-value:hover,
.diopter-picker-value:focus-visible {
    background: var(--isee-ice);
    outline: none;
}

.diopter-picker-value.is-selected {
    background: rgba(40, 168, 232, 0.14);
    box-shadow: inset 3px 0 0 var(--isee-sky);
}

.diopter-picker-custom {
    flex: 0 0 auto;
    margin: 0.55rem 0.65rem 0.7rem;
    border: 1.5px dashed #b7cce0;
    border-radius: 0.65rem;
    background: #f7fbff;
    color: var(--isee-blue);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
}

.diopter-picker-custom:hover,
.diopter-picker-custom:focus-visible {
    border-color: var(--isee-sky);
    background: var(--isee-ice);
    outline: none;
}

@media (max-width: 575.98px) {
    .recipe-rx-table th,
    .recipe-rx-table td {
        padding: 0.4rem 0.35rem;
        font-size: 0.82rem;
    }

    .recipe-eye-hint {
        display: none;
    }

    .diopter-picker-panel {
        max-height: min(18rem, calc(100vh - 1rem));
    }

    .diopter-picker-value {
        padding: 0.55rem 0.5rem;
        font-size: 1rem;
    }
}

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ List index: table / cards / calendar switch Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.list-index-toolbar {
    background: #fff;
}

.list-view-switch .btn {
    min-width: 6.25rem;
}

.list-index-sort {
    min-width: 11.5rem;
    width: auto;
    max-width: 18rem;
}

.list-index-table-card .grid-view {
    border: 0;
}

.list-index-table-card .table-responsive {
    margin: 0;
}

.list-index-table {
    width: 100%;
    margin-bottom: 0;
}

.list-index-table thead th {
    background: var(--isee-ice);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6a8098;
    font-weight: 700;
    border-bottom: 1px solid var(--isee-line);
    vertical-align: middle;
    white-space: nowrap;
}

.list-index-table thead th a {
    color: #6a8098;
    text-decoration: none;
}

.list-index-table thead th a:hover {
    color: var(--isee-blue);
}

.list-index-table tbody td {
    vertical-align: middle;
}

.list-index-table .filters td {
    background: #f7fbff;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    vertical-align: middle;
}

.list-index-grid .btn + .btn {
    margin-left: 0.35rem;
}

.list-index-summary {
    font-size: 0.875rem;
}

.list-index-page-size {
    width: auto;
    min-width: 4.5rem;
}

.sale-recipe-details-meta dt {
    color: #6a8098;
    font-size: 0.82rem;
    font-weight: 700;
}

.sale-recipe-details-meta dd {
    margin-bottom: 0.55rem;
}

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ Frame form (ÃÂ¾ÃÂ¿ÃÂÃÂ°ÃÂ²ÃÂ°) Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.frame-form-shell {
    max-width: 58rem;
    margin: 0 auto;
}

.frame-form-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 3vw, 2.15rem);
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.96));
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 18px 42px rgba(7, 63, 135, 0.1);
}

.frame-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--isee-navy), var(--isee-sky), var(--isee-blue));
}

.frame-form-header {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.9fr);
    gap: 1.25rem 1.75rem;
    align-items: end;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(7, 86, 166, 0.08);
}

.frame-form-title {
    margin: 0;
    color: var(--isee-navy);
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.frame-form-top-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 0.85rem;
}

.frame-form-field-label,
.frame-form .form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #4a6783;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
}

.frame-form-control {
    min-height: 2.65rem;
    border-color: #c5d9ec;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.frame-form-control:hover {
    border-color: #9ec7e8;
}

.frame-form-control:focus {
    border-color: var(--isee-sky);
    box-shadow: 0 0 0 0.22rem rgba(40, 168, 232, 0.18);
}

.frame-form-section {
    margin-bottom: 1.15rem;
}

.frame-form-section--choices,
.frame-form-section--prices {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(7, 86, 166, 0.08);
    border-radius: 1rem;
    background: linear-gradient(160deg, rgba(234, 245, 255, 0.55), rgba(255, 255, 255, 0.9));
}

.frame-form-section--prices {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(234, 245, 255, 0.45));
}

.frame-form-row--identity {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}

.frame-form-row--size-age {
    display: grid;
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
    gap: 1rem 1.35rem;
    align-items: end;
}

.frame-form-size-box {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid #c5d9ec;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.frame-form-size-input {
    width: 3.55rem;
    min-height: 2.35rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border-radius: 0.6rem;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.frame-form-size-input--temple {
    width: 4.15rem;
}

.frame-form-size-sep {
    width: 0.55rem;
    height: 0.55rem;
    border: 1.5px solid #9db8d0;
    border-radius: 0.12rem;
    background: transparent;
    flex: 0 0 auto;
}

.frame-form-size-hint {
    margin-top: 0.35rem;
    color: #7a93aa;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.frame-form-choices {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.frame-form-choice {
    display: grid;
    grid-template-columns: minmax(7rem, 9.5rem) minmax(0, 1fr);
    gap: 0.55rem 1rem;
    align-items: center;
}

.frame-form-choice-label {
    color: var(--isee-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

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

.frame-form-age .frame-form-choice-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.frame-form-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.frame-form-pill {
    margin: 0;
    padding: 0.48rem 1.05rem;
    border: 1px solid rgba(7, 86, 166, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--isee-ink);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition:
        transform 0.14s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
    user-select: none;
}

.frame-form-pill:hover {
    border-color: rgba(8, 103, 189, 0.45);
    color: var(--isee-blue);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(7, 63, 135, 0.08);
}

.btn-check:checked + .frame-form-pill {
    border-color: transparent;
    background: linear-gradient(135deg, var(--isee-navy) 0%, var(--isee-blue) 55%, var(--isee-sky) 140%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(7, 63, 135, 0.24);
    transform: translateY(-1px);
}

.btn-check:focus-visible + .frame-form-pill {
    outline: 2px solid var(--isee-sky);
    outline-offset: 2px;
}

.btn-check:disabled + .frame-form-pill,
.btn-check[disabled] + .frame-form-pill {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: rgba(7, 86, 166, 0.1);
    color: #8aa0b5;
    background: rgba(240, 245, 250, 0.85);
}

.appointment-form-section {
    margin-bottom: 1.15rem;
}

.appointment-form-section--choices,
.appointment-form-section--panel {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(7, 86, 166, 0.08);
    border-radius: 1rem;
    background: linear-gradient(160deg, rgba(234, 245, 255, 0.55), rgba(255, 255, 255, 0.9));
}

.appointment-form-section-title {
    margin: 0 0 0.75rem;
    color: var(--isee-navy);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.appointment-form-section--panel .frame-form-choice-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.appointment-form-choice--stack {
    grid-template-columns: 1fr;
    align-items: start;
}

.appointment-form-choice--stack .frame-form-choice-label {
    margin-bottom: 0.15rem;
}

.appointment-visit-kind-pills {
    gap: 0.4rem;
    flex-wrap: wrap;
}

.appointment-visit-kind-pills .frame-form-pill {
    min-width: 0;
    padding: 0.45rem 0.85rem;
}

.appointment-party-size {
    max-width: 16rem;
}

.appointment-party-size-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: #eef5fb;
}

.appointment-party-size-btn {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--isee-blue);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(7, 63, 135, 0.08);
}

.appointment-party-size-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.appointment-party-size-btn--plus {
    background: var(--isee-blue);
    color: #fff;
}

.appointment-party-size-stepper .appointment-party-size-input {
    width: 3rem;
    border: 0;
    background: transparent;
    text-align: center;
    font-weight: 700;
    box-shadow: none;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.appointment-party-size-stepper .appointment-party-size-input:focus {
    box-shadow: none;
}

.appointment-time-pills {
    gap: 0.4rem;
}

.appointment-time-pills .frame-form-pill {
    min-width: 4.35rem;
    padding: 0.45rem 0.7rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.appointment-time-pills .frame-form-pill.is-busy {
    border-color: rgba(180, 60, 60, 0.35);
    background: rgba(255, 232, 232, 0.95);
    color: #a13a3a;
    text-decoration: line-through;
}

.appointment-time-pills .frame-form-pill.is-needs-next {
    border-color: rgba(160, 110, 40, 0.4);
    background: rgba(255, 244, 220, 0.95);
    color: #8a5a12;
    text-decoration: line-through;
}

.appointment-time-pills .frame-form-pill.is-past {
    opacity: 0.4;
}

.frame-form-row--prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.frame-form-price-card {
    position: relative;
    padding: 0.85rem 0.9rem 0.95rem;
    border: 1px solid rgba(7, 86, 166, 0.1);
    border-radius: 0.9rem;
    background: #fff;
}

.frame-form-price-card--accent {
    border-color: rgba(8, 103, 189, 0.22);
    background: linear-gradient(180deg, #ffffff, #f0f8ff);
    box-shadow: 0 10px 22px rgba(7, 63, 135, 0.07);
}

.frame-form-price-card .frame-form-control {
    padding-right: 1.85rem;
}

.frame-form-currency {
    position: absolute;
    right: 1.4rem;
    top: calc(0.85rem + 1.55rem);
    color: #7a93aa;
    font-size: 0.95rem;
    font-weight: 700;
    pointer-events: none;
    line-height: 2.65rem;
}

.frame-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(7, 86, 166, 0.08);
}

.frame-form-meta {
    color: #6a8098;
    font-size: 0.86rem;
}

.frame-form-meta strong {
    color: var(--isee-ink);
    font-weight: 700;
}

.frame-form-meta-sep {
    margin: 0 0.35rem;
    opacity: 0.55;
}

.frame-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.frame-form-submit {
    min-width: 9.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    border: 0;
    box-shadow: 0 10px 22px rgba(7, 63, 135, 0.2);
}

.frame-form-errors {
    margin-bottom: 1.1rem;
}

.frame-form-row--meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: 36rem;
}

.frame-form--embedded .frame-form-section {
    margin-top: 0.85rem;
}

.frame-form--embedded .frame-form-section:first-of-type {
    margin-top: 0;
}

.frame-form-footer--embedded {
    margin-top: 1.1rem;
}

.brand-picker {
    position: relative;
}

.brand-picker-control {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
}

.brand-picker-control .brand-picker-search {
    flex: 1 1 auto;
    min-width: 0;
}

.brand-picker-add {
    flex: 0 0 auto;
    min-width: 2.65rem;
    font-weight: 700;
    line-height: 1;
}

.brand-picker-dropdown {
    position: fixed;
    z-index: 2000;
    max-height: 14rem;
    overflow: auto;
    padding: 0.35rem;
    border: 1px solid rgba(7, 86, 166, 0.16);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 40, 70, 0.12);
}

.brand-picker-option {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    color: var(--isee-ink, #16324f);
    font-size: 0.92rem;
}

.brand-picker-option:hover,
.brand-picker-option:focus {
    background: rgba(7, 86, 166, 0.08);
    outline: none;
}

.brand-picker-hint {
    margin-top: 0.35rem;
}

@media (max-width: 991.98px) {
    .frame-form-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .frame-form-top-meta {
        max-width: 28rem;
    }
}

@media (max-width: 767.98px) {
    .frame-form-card {
        padding: 1.15rem;
        border-radius: 1.1rem;
    }

    .frame-form-top-meta,
    .frame-form-row--identity,
    .frame-form-row--size-age,
    .frame-form-row--prices,
    .frame-form-row--meta {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .frame-form-choice {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .frame-form-pills {
        gap: 0.4rem;
    }

    .frame-form-pill {
        flex: 1 1 calc(50% - 0.4rem);
        text-align: center;
        padding: 0.55rem 0.7rem;
    }

    .appointment-form-section--choices,
    .appointment-form-section--panel {
        padding: 0.9rem;
        border-radius: 0.9rem;
    }

    .appointment-time-pills .frame-form-pill {
        flex: 1 1 calc(25% - 0.4rem);
        min-width: 3.75rem;
        padding: 0.5rem 0.4rem;
    }

    .frame-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .frame-form-actions {
        width: 100%;
    }

    .frame-form-actions .btn {
        flex: 1 1 auto;
    }

    .frame-form-size-box {
        width: 100%;
        justify-content: space-between;
    }

    .frame-form-size-input,
    .frame-form-size-input--temple {
        flex: 1 1 0;
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .sale-recipe-details .recipe-eye-hint {
        display: none;
    }

    .list-view-switch .btn {
        flex: 1 1 auto;
    }

    .list-index-sort {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .list-index-table .ps-3,
    .list-index-table thead th.ps-3,
    .list-index-table .filters td.ps-3 {
        padding-left: 0.75rem !important;
    }

    .list-index-table .pe-3,
    .list-index-table thead th.pe-3,
    .list-index-table .filters td.pe-3 {
        padding-right: 0.75rem !important;
    }
}

.appointment-custom-time-toggle {
    margin-bottom: 0;
}

.appointment-custom-time-input {
    max-width: 12rem;
}
/* Рабочая смена — виджет в шапке (как Битрикс24) */
.isee-navbar-work-shift .isee-work-shift-nav {
    width: auto;
}

.isee-work-shift-nav .isee-work-shift-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.28rem 0.7rem 0.28rem 0.55rem;
    border-radius: 0.55rem;
    background: rgba(7, 63, 135, 0.08);
    color: var(--isee-navy);
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.15;
}

.isee-work-shift-nav .isee-work-shift-toggle::after {
    margin-left: 0.15rem;
    opacity: 0.55;
}

.isee-work-shift-nav .isee-work-shift-toggle:hover,
.isee-work-shift-nav .isee-work-shift-toggle:focus,
.isee-work-shift-nav.show .isee-work-shift-toggle {
    background: rgba(7, 63, 135, 0.14);
    color: var(--isee-navy);
}

.isee-work-shift-timer {
    display: inline-flex;
    align-items: center;
    min-width: 2.6rem;
    color: var(--isee-navy);
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.isee-work-shift-state {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.isee-work-shift-state-icon {
    flex: 0 0 auto;
    width: 0.95rem;
    height: 0.95rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    position: relative;
    opacity: 0.85;
}

.isee-work-shift-state-icon::before {
    content: "";
    position: absolute;
    inset: 22%;
    background: currentColor;
    border-radius: 1px;
}

.isee-work-shift-nav[data-open="0"] .isee-work-shift-state-icon::before {
    inset: 28%;
    border-radius: 50%;
}

.isee-work-shift-nav[data-paused="1"] .isee-work-shift-state-icon::before {
    inset: 22% 30%;
    width: auto;
    background:
        linear-gradient(currentColor, currentColor) left / 28% 100% no-repeat,
        linear-gradient(currentColor, currentColor) right / 28% 100% no-repeat;
    border-radius: 0;
}

.isee-work-shift-state-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

.isee-work-shift-nav[data-open="1"][data-paused="0"] .isee-work-shift-toggle {
    background: rgba(8, 103, 189, 0.14);
    color: var(--isee-navy);
}

.isee-work-shift-nav[data-paused="1"] .isee-work-shift-toggle {
    background: rgba(217, 119, 6, 0.14);
    color: #9a5b08;
}

.isee-work-shift-menu {
    min-width: min(22rem, calc(100vw - 1.5rem));
    border: 1px solid var(--isee-line);
    border-radius: 0.9rem;
    box-shadow: 0 12px 28px rgba(7, 63, 135, 0.12);
}

.isee-work-shift-elapsed-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--isee-navy);
    line-height: 1.1;
}

.isee-work-shift-open-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

@media (min-width: 420px) {
    .isee-work-shift-open-actions {
        grid-template-columns: minmax(7rem, 0.85fr) minmax(0, 1.35fr);
    }

    .isee-work-shift-open-actions #isee-work-shift-close {
        grid-column: 2;
        grid-row: 1;
    }

    .isee-work-shift-open-actions #isee-work-shift-pause,
    .isee-work-shift-open-actions #isee-work-shift-resume {
        grid-column: 1;
        grid-row: 1;
    }
}

.btn-isee-pause,
.btn-isee-resume,
.btn-isee-finish {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.45rem;
}

.btn-isee-pause {
    background: #6b7280;
    border-color: #6b7280;
    color: #fff;
}

.btn-isee-pause:hover,
.btn-isee-pause:focus {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
}

.btn-isee-resume {
    background: var(--isee-blue);
    border-color: var(--isee-blue);
    color: #fff;
}

.btn-isee-resume:hover,
.btn-isee-resume:focus {
    background: var(--isee-navy);
    border-color: var(--isee-navy);
    color: #fff;
}

.btn-isee-finish {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-isee-finish:hover,
.btn-isee-finish:focus {
    background: #b02a37;
    border-color: #b02a37;
    color: #fff;
}

.isee-work-shift-btn-icon {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    flex: 0 0 auto;
}

.isee-work-shift-btn-icon--pause {
    background:
        linear-gradient(#fff, #fff) left / 30% 100% no-repeat,
        linear-gradient(#fff, #fff) right / 30% 100% no-repeat;
}

.isee-work-shift-btn-icon--play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.35rem 0 0.35rem 0.55rem;
    border-color: transparent transparent transparent #fff;
    background: transparent;
}

.isee-work-shift-btn-icon--stop {
    background: #fff;
    border-radius: 1px;
}

@media (max-width: 991.98px) {
    .isee-work-shift-nav {
        width: 100%;
        margin: 0.35rem 0;
    }

    .isee-work-shift-nav .isee-work-shift-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.55rem 0.75rem;
        border: 1px solid var(--isee-line);
        border-radius: 0.75rem;
        background: #fff;
    }

    .isee-work-shift-menu {
        width: 100%;
        max-width: none;
    }

    .isee-work-shift-open-actions {
        grid-template-columns: 1fr;
    }

    .isee-work-shift-open-actions #isee-work-shift-close,
    .isee-work-shift-open-actions #isee-work-shift-pause,
    .isee-work-shift-open-actions #isee-work-shift-resume {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ Access map (admin) Ã¢ÂÂÃ¢ÂÂÃ¢ÂÂ */
.access-map-hero {
    background: linear-gradient(145deg, rgba(234, 245, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.access-map-hero__nav {
    border-top: 1px solid rgba(217, 232, 246, 0.95);
}

.access-map-panel {
    background: rgba(255, 255, 255, 0.96);
}

.access-map-heading {
    color: var(--isee-navy);
}

.access-hierarchy {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 52rem;
    margin: 0 auto;
}

.access-hierarchy__node {
    width: 100%;
}

.access-hierarchy__connector {
    width: 2px;
    height: 1.35rem;
    background: linear-gradient(180deg, var(--isee-sky), var(--isee-navy));
    position: relative;
}

.access-hierarchy__connector::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--isee-navy);
    transform: translateX(-50%);
}

.access-hierarchy__branch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
}

.access-role {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--isee-line);
    background: #fff;
    box-shadow: 0 8px 22px rgba(7, 63, 135, 0.06);
}

.access-role strong {
    display: block;
    color: var(--isee-navy);
    margin-bottom: 0.15rem;
}

.access-role span:last-child {
    display: block;
    font-size: 0.875rem;
    color: #4d6784;
    line-height: 1.35;
}

.access-role__rank {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--isee-blue);
}

.access-role--admin {
    border-color: rgba(7, 63, 135, 0.35);
    background: linear-gradient(135deg, #eef5ff 0%, #fff 70%);
}

.access-role--admin .access-role__rank,
.access-th--admin {
    background: #073f87;
}

.access-role--director {
    border-color: rgba(8, 103, 189, 0.3);
    background: linear-gradient(135deg, #f0f8ff 0%, #fff 70%);
}

.access-role--director .access-role__rank,
.access-th--director {
    background: #0867bd;
}

.access-role--call {
    border-color: rgba(40, 168, 232, 0.35);
    background: linear-gradient(135deg, #f3fbff 0%, #fff 70%);
}

.access-role--call .access-role__rank,
.access-th--call {
    background: #1a93cf;
}

.access-role--optic {
    border-color: rgba(25, 135, 84, 0.28);
    background: linear-gradient(135deg, #f1faf5 0%, #fff 70%);
}

.access-role--optic .access-role__rank,
.access-th--optic {
    background: #198754;
}

.access-role--master {
    border-color: rgba(108, 117, 125, 0.3);
    background: linear-gradient(135deg, #f7f8f9 0%, #fff 70%);
}

.access-role--master .access-role__rank,
.access-th--master {
    background: #5c6770;
}

.access-role--target {
    border-color: rgba(111, 66, 193, 0.28);
    background: linear-gradient(135deg, #f7f2ff 0%, #fff 70%);
}

.access-role--target .access-role__rank,
.access-th--target {
    background: #6f42c1;
}

.access-role--viewer {
    border-color: rgba(15, 118, 110, 0.3);
    background: linear-gradient(135deg, #eefaf8 0%, #fff 70%);
}

.access-role--viewer .access-role__rank,
.access-th--viewer {
    background: #0f766e;
}

.access-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.access-scope-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-scope-card {
    padding: 1.1rem 1.15rem;
    border-radius: 0.95rem;
    border: 1px solid var(--isee-line);
    background: #fff;
}

.access-scope-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--isee-navy);
    margin-bottom: 0.85rem;
}

.access-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.35rem;
}

.access-flow__box {
    padding: 0.45rem 0.7rem;
    border-radius: 0.55rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--isee-ink);
    background: var(--isee-ice);
    border: 1px solid rgba(8, 103, 189, 0.14);
}

.access-flow__arrow {
    width: 1.1rem;
    height: 2px;
    background: var(--isee-blue);
    position: relative;
    flex: 0 0 auto;
}

.access-flow__arrow::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--isee-blue);
    transform: translateY(-50%);
}

.access-matrix-wrap {
    border: 1px solid var(--isee-line);
    border-radius: 0.85rem;
    overflow: auto;
    max-height: min(70vh, 42rem);
}

.access-matrix-table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    min-width: 44rem;
}

.access-matrix-table--wide {
    min-width: 58rem;
}

.access-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f4f9ff;
    border-bottom-width: 1px;
    vertical-align: middle;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.access-matrix-table tbody th[scope="row"] {
    font-weight: 500;
    color: var(--isee-ink);
    min-width: 14rem;
    background: #fff;
}

.access-matrix-table td {
    text-align: center;
    vertical-align: middle;
    background: #fff;
}

.access-matrix-group th {
    background: linear-gradient(90deg, #eaf5ff, #f8fbff);
    color: var(--isee-navy);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.access-th {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
}

.access-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.access-cell--yes {
    color: #0a7a4d;
    font-size: 1.05rem;
}

.access-cell--no {
    color: #9aa8b8;
}

.access-cell--part {
    display: inline-block;
    max-width: 9.5rem;
    padding: 0.25rem 0.45rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--isee-navy);
    background: #e9f5ff;
    text-align: center;
    white-space: normal;
}

.access-cell--later {
    display: inline-block;
    padding: 0.25rem 0.45rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #8a6d3b;
    background: #fff6df;
}

.access-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: #4d6784;
}

.access-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.access-diagrams {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.access-diagram {
    padding: 1.1rem 1.15rem;
    border-radius: 0.95rem;
    border: 1px solid var(--isee-line);
    background:
        linear-gradient(160deg, rgba(234, 245, 255, 0.85), rgba(255, 255, 255, 0.95));
}

.access-diagram h3 {
    color: var(--isee-navy);
    margin-bottom: 0.85rem;
}

.access-diagram__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: access-step;
}

.access-diagram__steps li {
    position: relative;
    padding: 0.65rem 0.75rem 0.65rem 2.35rem;
    margin-bottom: 0.55rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(8, 103, 189, 0.12);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--isee-ink);
}

.access-diagram__steps li:last-child {
    margin-bottom: 0;
}

.access-diagram__steps li::before {
    counter-increment: access-step;
    content: counter(access-step);
    position: absolute;
    left: 0.55rem;
    top: 0.65rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--isee-blue);
}

.access-diagram__start {
    border-color: rgba(8, 103, 189, 0.28) !important;
}

.access-diagram__end {
    background: #eef8f3 !important;
    border-color: rgba(10, 122, 77, 0.22) !important;
}

.access-diagram__steps code {
    font-size: 0.78em;
    color: var(--isee-blue);
}

@media (max-width: 1199.98px) {
    .access-scope-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .access-scope-grid,
    .access-scope-grid--3,
    .access-diagrams,
    .access-hierarchy__branch {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .access-map-panel .card-body,
    .access-map-hero .card-body {
        padding: 1.25rem !important;
    }

    .access-flow__arrow {
        display: none;
    }

    .access-flow__box {
        width: 100%;
    }

    .access-matrix-table tbody th[scope="row"] {
        min-width: 11rem;
        font-size: 0.84rem;
    }
}

/* ÃÂÃÂ°ÃÂ»ÃÂ¸ÃÂÃÂÃÂ° ÃÂÃÂ²ÃÂµÃÂÃÂ° ÃÂ¿ÃÂ¾ÃÂ»ÃÂÃÂ·ÃÂ¾ÃÂ²ÃÂ°ÃÂÃÂµÃÂ»ÃÂ */
.user-color-hint {
    font-size: 0.9rem;
    line-height: 1.35;
}

.user-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.user-color-swatch {
    --user-swatch: #64748b;
    position: relative;
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    border: 2px solid rgba(23, 53, 84, 0.12);
    background: var(--user-swatch);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.user-color-swatch--none {
    background:
        linear-gradient(
            135deg,
            transparent 46%,
            #c45b5b 46%,
            #c45b5b 54%,
            transparent 54%
        ),
        #f4f7fb;
}

.user-color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(7, 63, 135, 0.14);
}

.btn-check:checked + .user-color-swatch {
    border-color: var(--isee-navy);
    box-shadow:
        0 0 0 3px rgba(8, 103, 189, 0.22),
        0 8px 16px rgba(7, 63, 135, 0.18);
    transform: translateY(-1px);
}

.btn-check:checked + .user-color-swatch::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 0.55rem;
    height: 0.9rem;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.btn-check:checked + .user-color-swatch--none::after {
    border-color: var(--isee-navy);
    filter: none;
}

.btn-check:focus-visible + .user-color-swatch {
    outline: 2px solid var(--isee-sky);
    outline-offset: 3px;
}

.user-color-dot {
    --user-swatch: #64748b;
    display: inline-block;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: var(--user-swatch);
    border: 1px solid rgba(23, 53, 84, 0.12);
    vertical-align: middle;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.user-avatar {
    --user-avatar-color: #64748b;
    --user-avatar-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: var(--user-avatar-size);
    height: var(--user-avatar-size);
    border-radius: 999px;
    overflow: hidden;
    background: var(--user-avatar-color);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    vertical-align: middle;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.user-avatar--sm {
    --user-avatar-size: 1.55rem;
    font-size: 0.62rem;
}

.user-avatar--md {
    --user-avatar-size: 2.25rem;
    font-size: 0.78rem;
}

.user-avatar--lg {
    --user-avatar-size: 5.25rem;
    font-size: 1.4rem;
}

.user-shift-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
}

.user-shift-status--card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.user-shift-status__timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #146c43;
}

.user-shift-status--compact .user-shift-status__timer {
    font-size: 0.82rem;
}

.user-shift-status__timer.is-live {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.user-shift-status .crm-badge.is-warning + .user-shift-status__timer,
.user-shift-status__timer[data-paused="1"] {
    color: #9a6700;
}

.user-shift-status--card .user-shift-status__hint {
    line-height: 1.3;
}

@media (max-width: 575.98px) {
    .user-shift-status--compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.user-avatar--empty {
    background: #94a3b8;
}

.user-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar--nav {
    --user-avatar-size: 1.45rem;
    font-size: 0.58rem;
}

.user-avatar--board {
    --user-avatar-size: 1.35rem;
    font-size: 0.55rem;
}

.isee-navbar .navbar-nav.ms-auto .isee-account-profile-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-item__author-wrap {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .user-color-swatch {
        width: 2.6rem;
        height: 2.6rem;
    }

    .isee-navbar .navbar-nav.ms-auto .isee-account-profile-name {
        max-width: 7rem;
    }
}

/* Floating add-appointment button */
.isee-fab-add-appointment {
    position: fixed;
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    z-index: 2100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.75rem;
    height: 4.75rem;
    padding: 0;
    border: 0;
    border-radius: 1.1rem;
    background: transparent;
    color: inherit;
    line-height: 0;
    text-decoration: none !important;
    box-shadow: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.isee-fab-add-appointment-icon {
    display: block;
    width: 4.75rem;
    height: 4.75rem;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(7, 63, 135, 0.28));
}

.isee-fab-add-appointment:hover,
.isee-fab-add-appointment:focus {
    background: transparent;
    color: inherit;
    transform: translateY(-2px) scale(1.04);
}

.isee-fab-add-appointment:hover .isee-fab-add-appointment-icon,
.isee-fab-add-appointment:focus .isee-fab-add-appointment-icon {
    filter: drop-shadow(0 14px 22px rgba(7, 63, 135, 0.36));
}

.isee-fab-add-appointment:focus-visible {
    outline: 3px solid rgba(40, 168, 232, 0.55);
    outline-offset: 3px;
}

body.design-theme-new:has(.isee-fab-add-appointment) #main {
    padding-bottom: 5.5rem;
}

@media (max-width: 575.98px) {
    .isee-fab-add-appointment,
    .isee-fab-add-appointment-icon {
        width: 4.25rem;
        height: 4.25rem;
    }

    .isee-fab-add-appointment {
        right: max(0.6rem, env(safe-area-inset-right, 0px));
        bottom: max(0.6rem, env(safe-area-inset-bottom, 0px));
    }
}

.client-appointment-blocks .client-appointment-block-wrap:first-child {
    margin-top: 1rem;
}

/* Sale completed (paid) — blue tone */
.crm-card.sale-tone-paid {
    background: linear-gradient(165deg, #e8f3ff, #a8d4ff);
    border: 2px solid #1d7ad8;
}

.crm-card.sale-tone-paid:hover {
    border-color: #0d5fad;
    box-shadow: 0 20px 42px rgba(29, 122, 216, 0.22);
}

table.table tr.sale-tone-paid > td {
    background-color: rgba(168, 212, 255, 0.45) !important;
}

/* Sale prepaid (open remainder) — amber tone */
.crm-card.sale-tone-prepaid {
    background: linear-gradient(165deg, #fff8eb, #fde68a);
    border: 2px solid #d97706;
}

.crm-card.sale-tone-prepaid:hover {
    border-color: #b45309;
    box-shadow: 0 20px 42px rgba(217, 119, 6, 0.22);
}

table.table tr.sale-tone-prepaid > td {
    background-color: rgba(253, 230, 138, 0.5) !important;
}

/* --- Action log coverage map (admin) --- */
.action-log-map-table th {
    white-space: nowrap;
}
.action-log-map-list {
    padding-left: 1.15rem;
}
.action-log-map-list li + li {
    margin-top: 0.45rem;
}
.action-log-map-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.action-log-map-badge--log {
    color: #0f5132;
    background: #d1e7dd;
}
.action-log-map-badge--masked {
    color: #664d03;
    background: #fff3cd;
}
.action-log-map-badge--skip {
    color: #41464b;
    background: #e2e3e5;
}
.action-log-map-row--skip td {
    opacity: 0.72;
}
.action-log-map-entity + .action-log-map-entity {
    border-top: 1px solid rgba(217, 232, 246, 0.95);
    padding-top: 1.25rem;
    margin-top: 0.25rem;
}
@media (max-width: 767.98px) {
    .action-log-map-table {
        font-size: 0.875rem;
    }
}
