@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

body {
    background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 48%, #f5f7fb 100%);
    color: #1c2434;
    font-family: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-search-open,
body.mobile-fab-open,
body.mobile-camera-open {
    overflow: hidden;
}

.guest-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.mobile-pull-indicator,
.mobile-system-toast,
.mobile-filter-backdrop,
.mobile-camera-backdrop {
    display: none;
}

.mobile-pull-indicator {
    position: fixed;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    z-index: 70;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    color: #0f3f7a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-pull-indicator.is-ready {
    color: #059669;
}

.mobile-system-toast {
    position: fixed;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    z-index: 75;
    min-width: 220px;
    max-width: min(92vw, 380px);
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.26);
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-system-toast[data-tone="success"] {
    background: rgba(5, 150, 105, 0.96);
}

.mobile-system-toast[data-tone="warning"] {
    background: rgba(180, 83, 9, 0.96);
}

.mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 57;
    background: rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(4px);
}

.mobile-camera-backdrop {
    position: fixed;
    inset: 0;
    z-index: 64;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(5px);
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #152238 100%);
    color: #fff;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: width 0.22s ease, padding 0.22s ease;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 28px;
}

.sidebar-brand-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sidebar-brand-copy {
    min-width: 0;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sidebar-brand h1 {
    font-size: 1rem;
    margin: 0;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-collapse-button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    flex-shrink: 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.sidebar-group-toggle strong {
    font-size: 1rem;
    line-height: 1;
}

.sidebar-group-toggle.is-open {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-group-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 10px;
}

.sidebar-footer-card {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-compact {
    position: relative;
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.sidebar-profile-button {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.5rem;
}

.sidebar-profile-panel {
    position: absolute;
    right: 0;
    bottom: 62px;
    width: 260px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(20, 32, 55, 0.98), rgba(12, 22, 40, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 34px rgba(3, 9, 20, 0.34);
    z-index: 5;
}

.sidebar-footer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-footer-meta {
    margin-top: 12px;
}

.sidebar-hand-mode .btn.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.sidebar-footer-card small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.72);
}

.mobile-bottom-nav {
    display: none;
}

.mobile-nav-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.78rem;
    min-width: 58px;
}

.mobile-nav-button {
    border: 0;
    background: transparent;
}

.mobile-nav-link i {
    font-size: 1.2rem;
}

.mobile-nav-link.active {
    color: #0f3f7a;
}

.mobile-menu-backdrop,
.mobile-menu-panel,
.mobile-search-backdrop,
.mobile-search-modal,
.mobile-fab-backdrop,
.mobile-fab-sheet,
.mobile-camera-modal,
.mobile-fab-button {
    display: none;
}

.mobile-menu-panel {
    position: fixed;
    inset: auto 10px 86px 10px;
    z-index: 60;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(4px);
}

.mobile-search-backdrop,
.mobile-fab-backdrop {
    position: fixed;
    inset: 0;
    z-index: 58;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(5px);
}

.mobile-camera-modal {
    position: fixed;
    inset: 24px 16px 110px 16px;
    z-index: 65;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.mobile-search-modal {
    position: fixed;
    inset: 16px 10px 98px 10px;
    z-index: 62;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.mobile-search-head,
.mobile-fab-sheet-head,
.mobile-camera-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-camera-body {
    position: relative;
    height: calc(100% - 73px);
    background: #020617;
}

.mobile-camera-body video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-camera-empty {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    text-align: center;
    font-weight: 600;
}

.mobile-search-body {
    padding: 16px;
    overflow-y: auto;
    max-height: 100%;
}

.mobile-search-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
}

.mobile-search-tool {
    min-width: 46px;
    border-radius: 14px;
}

.mobile-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-section-title {
    margin-bottom: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.mobile-recent-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #1f2937;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
}

.mobile-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    text-decoration: none;
    color: #1f2937;
}

.mobile-search-icon,
.mobile-fab-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.mobile-search-empty {
    padding: 18px;
    text-align: center;
    color: #64748b;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 18px;
}

.mobile-fab-button {
    position: fixed;
    right: 16px;
    bottom: 86px;
    z-index: 61;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.34);
    font-size: 1.4rem;
}

.mobile-fab-sheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 92px;
    z-index: 63;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.mobile-fab-pinned {
    padding: 16px 16px 0;
}

.mobile-fab-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
}

.mobile-fab-action-card {
    position: relative;
}

.mobile-fab-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
}

.mobile-fab-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    color: #64748b;
}

.mobile-fab-pin.is-pinned {
    color: #0f3f7a;
}

.ripple-host {
    position: relative;
    overflow: hidden;
}

.ui-ripple {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transform: translate(-50%, -50%) scale(0);
    animation: ui-ripple 0.55s ease-out forwards;
    pointer-events: none;
}

@keyframes ui-ripple {
    to {
        transform: translate(-50%, -50%) scale(16);
        opacity: 0;
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-menu-scroll {
    max-height: min(62vh, 580px);
    overflow-y: auto;
    padding: 16px 14px 18px;
}

.mobile-menu-panel .sidebar-link {
    color: #1f2937;
}

.mobile-menu-panel .sidebar-link:hover,
.mobile-menu-panel .sidebar-link.active {
    background: rgba(14, 165, 233, 0.1);
    color: #0f3f7a;
}

.mobile-menu-panel .sidebar-group-toggle {
    background: #f8fbfe;
    color: #1f2937;
    border-color: rgba(148, 163, 184, 0.18);
}

.mobile-menu-panel .sidebar-group-toggle.is-open {
    background: rgba(14, 165, 233, 0.08);
}

.mobile-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.mobile-setting-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    cursor: pointer;
}

.mobile-setting-tile .form-check-input {
    margin: 0;
}

.mobile-setting-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.launcher-settings-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.launcher-pinned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
}

.launcher-pinned-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f2d57;
    cursor: pointer;
}

.launcher-pinned-tile .form-check-input {
    margin: 0;
}

.launcher-pinned-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.settings-tool-panels {
    display: grid;
    gap: 12px;
}

.settings-tool-panel {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 251, 255, 0.95) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.settings-tool-head {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    color: #0f2d57;
}

.settings-tool-panel.is-open .settings-tool-head {
    background: linear-gradient(180deg, #e9f3ff 0%, #dceaff 100%);
}

.settings-tool-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.settings-tool-title i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    font-size: 0.95rem;
}

.settings-tool-title strong {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.settings-tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #0d3a70;
    border: 1px solid rgba(15, 63, 122, 0.22);
    background: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 900;
}

.settings-tool-body {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.business-day-card {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.business-day-card-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #0f2d57;
}

.business-day-card-head i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
}

.migration-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    overflow: auto;
}

.migration-table {
    margin-bottom: 0;
    min-width: 1080px;
}

.migration-table thead th {
    background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    color: #0f2d57;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.migration-table td {
    border-color: rgba(148, 163, 184, 0.2);
    vertical-align: top;
}

.migration-inline-grid {
    display: grid;
    grid-template-columns: minmax(130px, 160px) minmax(170px, 220px) minmax(220px, 1fr) minmax(120px, 150px);
    gap: 8px;
    align-items: center;
}

.migration-result.alert {
    margin-bottom: 0;
    padding: 8px 10px;
    font-size: 0.84rem;
}

.migration-progress .progress {
    background: rgba(15, 23, 42, 0.08);
}

.migration-progress .progress-bar {
    font-size: 0.72rem;
    font-weight: 700;
}

.sms-template-table td {
    vertical-align: top;
}

.sms-template-create-row {
    background: rgba(14, 165, 233, 0.05);
}

.deploy-gate-panel .settings-tool-body {
    position: relative;
}

.deploy-gate-lock {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(100, 116, 139, 0.45);
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.deploy-gate-content {
    padding-top: 4px;
}

.deploy-gate-panel.is-unlocked .settings-tool-head .settings-tool-title i {
    background: linear-gradient(135deg, #0ea85d, #22c55e);
}

@media (max-width: 991.98px) {
    .migration-inline-grid {
        grid-template-columns: 1fr;
    }

    .migration-table {
        min-width: 860px;
    }
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: 0.2s ease;
}

.sidebar-link i,
.sidebar-group-toggle i {
    flex-shrink: 0;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding-bottom: 44px;
}

.panel-theme-xp .app-main {
    --xp-desktop-bg:
        radial-gradient(120% 100% at 50% 120%, rgba(46, 150, 57, 0.24) 0%, rgba(52, 165, 66, 0.2) 30%, rgba(93, 189, 96, 0.06) 54%, rgba(133, 206, 247, 0.14) 64%, rgba(111, 183, 238, 0.26) 100%),
        linear-gradient(180deg, #9dd3ff 0%, #74b4eb 46%, #5ca5e2 100%);
    background: var(--xp-desktop-bg);
}

.panel-theme-xp .xp-desktop-launcher {
    background: var(--xp-desktop-bg);
}

.app-content {
    position: relative;
    padding-top: 0 !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.app-content.xp-workspace-mode {
    position: relative;
    min-height: calc(100vh - 104px);
    padding-bottom: 0 !important;
}

.app-content.xp-workspace-mode > .xp-main-top-module {
    /* Izoh: Ishchi stol blokini fon bo'ylab teng kenglikda cho'zamiz. */
    width: calc(100% + 56px);
    margin-left: -28px;
    margin-right: -28px;
}

.app-content.xp-workspace-mode > .xp-main-top-module .xp-main-top-head,
.app-content.xp-workspace-mode > .xp-main-top-module .xp-desktop-launcher {
    border-left-width: 0;
    border-right-width: 0;
    border-radius: 0;
}

.xp-main-top-module {
    margin-bottom: 10px;
}

.xp-main-top-module.xp-main-top-modal {
    /* Izoh: ASOSIY TOP ishchi stoli flow'dan chiqadi va modal ko'rinishda ochiladi. */
    position: fixed;
    inset: 0 0 40px 0;
    margin: 0 !important;
    z-index: 1284;
    display: none;
    pointer-events: none;
}

.xp-main-top-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border: 1px solid rgba(12, 68, 122, 0.35);
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(24, 92, 164, 0.96) 0%, rgba(10, 62, 122, 0.98) 100%);
    color: #fff;
}

.xp-main-top-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.xp-main-top-title i {
    font-size: 0.9rem;
}

.xp-main-top-title span {
    opacity: 0.88;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}

.xp-main-top-module.is-workspace-full {
    min-height: calc(100vh - 104px);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.xp-main-top-module.is-desktop-expanded {
    min-height: calc(100vh - 104px);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

body.xp-desktop-full .app-content {
    /* Izoh: Desktop to'liq rejimida chet paddingsiz butun maydon ishlatiladi. */
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

body.xp-desktop-full .xp-main-top-module.xp-main-top-modal.is-desktop-expanded {
    display: flex;
    pointer-events: auto;
}

body.xp-desktop-full .xp-main-top-module.xp-main-top-modal.is-desktop-expanded {
    width: 100%;
    min-height: calc(100vh - 40px);
    margin: 0;
}

body.xp-desktop-full .xp-main-top-module.xp-main-top-modal.is-desktop-expanded .xp-desktop-launcher {
    width: 100% !important;
    min-height: 100%;
    height: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
}

body.xp-desktop-full .xp-main-top-module.xp-main-top-modal.is-desktop-expanded .xp-desktop-board {
    flex: 1;
    height: auto !important;
    min-height: 0;
}

body.sidebar-hidden .sidebar {
    display: none !important;
}

body.sidebar-hidden .app-wrapper {
    display: block;
}

.xp-start-menu {
    position: fixed;
    left: 6px;
    bottom: 40px;
    width: 290px;
    max-height: min(88vh, 840px);
    z-index: 1300;
    border: 1px solid #003c74;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.35);
    background: #f4f8ff;
}

.xp-start-menu-head {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #fff;
    background: linear-gradient(180deg, #1f5ea9 0%, #0b3d81 100%);
}

.xp-start-menu-head small {
    opacity: 0.86;
    font-size: 0.72rem;
}

.xp-workday-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.xp-workday-badge {
    font-size: 0.62rem;
    border-radius: 999px;
    padding: 1px 7px;
    font-weight: 800;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
}

.xp-workday-badge.is-open {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(134, 239, 172, 0.55);
    color: #e2ffe8;
}

.xp-workday-badge.is-closed {
    background: rgba(239, 68, 68, 0.24);
    border-color: rgba(252, 165, 165, 0.65);
    color: #ffe6e6;
}

.xp-workday-perm i {
    margin-right: 4px;
}

.xp-start-menu-body {
    padding: 10px;
    display: grid;
    gap: 6px;
    max-height: calc(min(88vh, 840px) - 94px);
    overflow-y: auto;
}

.xp-start-link {
    width: 100%;
    border: 0;
    text-decoration: none;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #c5d7f2;
    color: #0b2f62;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.86rem;
    font-weight: 700;
}

.xp-start-link:hover {
    background: #e8f1fe;
}

.xp-start-link-danger {
    color: #8a1b1b;
}

.xp-start-logout {
    margin: 0;
}

.xp-start-quick {
    display: grid;
    gap: 6px;
    margin-bottom: 8px;
}

.xp-start-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4b6489;
    margin-bottom: 5px;
}

.xp-start-role-shortcuts,
.xp-start-recent-wrap,
.xp-start-business-day {
    border: 1px solid #c5d7f2;
    border-radius: 9px;
    background: #ffffff;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.xp-start-day-form {
    display: grid;
    gap: 6px;
}

.xp-start-day-label {
    font-size: 0.73rem;
    color: #38557c;
    font-weight: 700;
}

.xp-start-link-warning {
    color: #7b3300;
    border-color: #efc08f;
    background: linear-gradient(180deg, #fff8f1 0%, #fff1e4 100%);
}

.xp-start-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.xp-start-shortcut-btn {
    width: 100%;
    text-align: left;
    border: 1px solid #c5d7f2;
    background: #f9fcff;
}

.xp-start-recent-wrap {
    margin-bottom: 2px;
}

.xp-start-recent-box {
    display: grid;
    gap: 5px;
}

.xp-start-recent-head {
    font-size: 0.76rem;
    font-weight: 800;
    color: #143c74;
}

.xp-start-recent-list {
    display: grid;
    gap: 4px;
}

.xp-start-recent-link {
    border: 1px solid #d8e5f8;
    border-radius: 7px;
    background: #f9fcff;
    color: #123666;
    text-decoration: none;
    display: grid;
    gap: 1px;
    padding: 6px 8px;
    line-height: 1.28;
}

.xp-start-recent-link:hover {
    background: #eaf3ff;
    border-color: #c8ddf8;
}

.xp-start-recent-link small {
    color: #5b7396;
}

.xp-start-groups {
    display: grid;
    gap: 6px;
}

.xp-start-group {
    border: 1px solid #c5d7f2;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.xp-start-group-toggle {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #f7fbff 0%, #e3eefc 100%);
    color: #10376d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

.xp-start-group-toggle.is-open {
    background: linear-gradient(180deg, #dbeafe 0%, #c8def9 100%);
}

.xp-start-group-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.xp-start-group-icon {
    font-weight: 900;
    font-size: 0.92rem;
    line-height: 1;
}

.xp-start-group-body {
    display: grid;
    gap: 4px;
    padding: 6px;
    border-top: 1px solid #d8e5f8;
    background: #f9fcff;
}

.xp-start-sub-link {
    width: 100%;
    text-decoration: none;
    border-radius: 7px;
    border: 1px solid transparent;
    color: #0d3566;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.xp-start-sub-link:hover {
    background: #eaf3ff;
    border-color: #c8ddf8;
}

.business-day-alert {
    margin: 0 0 14px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
    color: #7f1d1d;
    border-radius: 12px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.business-day-alert i {
    font-size: 1.05rem;
}

.is-day-locked-link {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.is-day-locked {
    opacity: 0.82;
}

.xp-taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40px;
    z-index: 1290;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    border-top: 1px solid #0b3f8f;
    background: linear-gradient(180deg, #2f79c9 0%, #0d4ca1 55%, #0a3c87 100%);
}

.xp-start-button {
    height: 34px;
    min-width: 84px;
    border: 1px solid #0e5f12;
    border-radius: 18px;
    background: linear-gradient(180deg, #58c13f 0%, #2d8a1f 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.xp-show-desktop-button,
.xp-sidebar-toggle-button {
    height: 32px;
    width: 38px;
    border: 1px solid #1d4c8f;
    border-radius: 6px;
    background: linear-gradient(180deg, #d9ebff 0%, #9dc7f6 100%);
    color: #062d5d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
}

.xp-show-desktop-button.is-active,
.xp-sidebar-toggle-button.is-active {
    background: linear-gradient(180deg, #ffffff 0%, #c9e2ff 100%);
}

.xp-desktop-state-pill {
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    color: #f1f7ff;
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.xp-desktop-state-pill.is-open {
    border-color: rgba(134, 239, 172, 0.64);
    background: rgba(34, 197, 94, 0.2);
    color: #e4ffe8;
}

.xp-desktop-state-pill.is-closed {
    border-color: rgba(191, 219, 254, 0.45);
    background: rgba(255, 255, 255, 0.14);
}

.xp-window-list {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.xp-window-list::-webkit-scrollbar {
    display: none;
}

.xp-task-button {
    height: 32px;
    min-width: 148px;
    max-width: 240px;
    border: 1px solid #1d4c8f;
    border-radius: 6px;
    background: linear-gradient(180deg, #d9ebff 0%, #9dc7f6 100%);
    color: #052a57;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xp-task-button.is-active {
    background: linear-gradient(180deg, #ffffff 0%, #c9e2ff 100%);
}

.xp-task-button.is-minimized {
    opacity: 0.84;
}

.xp-task-button-ghost {
    border-style: dashed;
    opacity: 0.9;
}

.xp-task-button i {
    flex-shrink: 0;
}

.xp-tray {
    height: 34px;
    min-width: 126px;
    border: 1px solid #1f5b9d;
    border-radius: 6px;
    background: linear-gradient(180deg, #7bb6ee 0%, #4f92d5 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 6px;
}

.xp-chat-button {
    position: relative;
    border: 0;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.xp-chat-badge {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.64rem;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.xp-chat-badge.is-visible {
    display: inline-flex;
}

.xp-clock-button {
    border: 0;
    background: transparent;
    color: inherit;
    height: 100%;
    width: 100%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.xp-clock {
    font-size: 0.82rem;
    font-weight: 700;
}

.xp-task-context-menu {
    position: fixed;
    z-index: 1400;
    min-width: 148px;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #1d4c8f;
    background: linear-gradient(180deg, #f7fbff 0%, #e4effd 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.xp-task-menu-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #083164;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.xp-task-menu-item:hover {
    background: #eaf3ff;
    border-color: #c8ddf8;
}

.xp-task-preview-tooltip {
    position: fixed;
    z-index: 1390;
    max-width: 260px;
    border-radius: 8px;
    border: 1px solid #174a86;
    background: linear-gradient(180deg, #ffffff 0%, #eaf3ff 100%);
    color: #083164;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: pre-line;
    padding: 7px 9px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.xp-tray-panel {
    position: fixed;
    right: 8px;
    bottom: 42px;
    width: 252px;
    z-index: 1310;
    border: 1px solid #1b4c88;
    border-radius: 10px 10px 0 0;
    background: #f4f8ff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.xp-tray-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: #fff;
    background: linear-gradient(180deg, #1f5ea9 0%, #0b3d81 100%);
    font-size: 0.82rem;
}

.xp-tray-close {
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.xp-tray-calendar,
.xp-tray-tools,
.xp-tray-rates,
.xp-tray-foot {
    padding: 8px 10px;
}

.xp-tray-tools {
    border-top: 1px solid #d6e3f7;
    border-bottom: 1px solid #d6e3f7;
}

.xp-tray-tool {
    width: 100%;
    border: 1px solid #c5d7f2;
    border-radius: 8px;
    background: #fff;
    color: #0b2f62;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.xp-tray-rates {
    display: grid;
    gap: 6px;
}

.xp-tray-updated {
    padding: 0 10px 8px;
    font-size: 0.72rem;
    color: #456188;
    font-weight: 700;
}

.xp-tray-weather {
    margin: 0 10px 8px;
    border: 1px solid #d6e3f7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.xp-tray-weather-head {
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #eef5ff;
    color: #0e366b;
    font-size: 0.76rem;
    font-weight: 800;
}

.xp-tray-weather-body {
    padding: 8px;
    display: grid;
    gap: 2px;
}

.xp-tray-weather-body strong {
    font-size: 1rem;
    color: #0e366b;
}

.xp-tray-weather-body small {
    color: #567394;
}

.xp-rate-row {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #d8e5f8;
    border-radius: 7px;
    background: #fff;
    color: #123666;
    padding: 6px 8px;
    font-size: 0.78rem;
}

.xp-rate-row strong {
    font-size: 0.8rem;
}

.xp-tray-foot {
    border-top: 1px solid #d6e3f7;
}

.xp-tray-refresh {
    width: 100%;
    border: 1px solid #c5d7f2;
    border-radius: 7px;
    background: #fff;
    color: #0b2f62;
    padding: 6px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.xp-calculator-panel {
    position: fixed;
    right: 10px;
    bottom: 42px;
    width: 244px;
    z-index: 1325;
    border: 1px solid #1b4c88;
    border-radius: 10px 10px 0 0;
    background: #f4f8ff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.xp-calc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    color: #fff;
    background: linear-gradient(180deg, #1f5ea9 0%, #0b3d81 100%);
    font-size: 0.8rem;
}

.xp-calc-close {
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.xp-calc-display {
    margin: 10px;
    border: 1px solid #b7d0ef;
    border-radius: 8px;
    background: #fff;
    color: #0f2f58;
    font-size: 1.22rem;
    font-weight: 800;
    padding: 12px 10px;
    text-align: right;
    min-height: 48px;
}

.xp-calc-grid {
    padding: 0 10px 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.xp-calc-grid button,
.xp-calc-foot button {
    border: 1px solid #c5d7f2;
    border-radius: 8px;
    background: #fff;
    color: #0b2f62;
    font-size: 0.9rem;
    font-weight: 800;
    min-height: 34px;
}

.xp-calc-foot {
    padding: 0 10px 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.xp-chat-panel {
    position: fixed;
    right: 12px;
    bottom: 42px;
    width: min(740px, calc(100vw - 22px));
    height: min(72vh, 580px);
    z-index: 1328;
    border: 1px solid #1b4c88;
    border-radius: 10px 10px 0 0;
    background: #f4f8ff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.xp-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: #fff;
    background: linear-gradient(180deg, #1f5ea9 0%, #0b3d81 100%);
    font-size: 0.82rem;
}

.xp-chat-close {
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.xp-chat-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.xp-chat-contacts-wrap {
    border-right: 1px solid #d4e3f8;
    background: #f7fbff;
    padding: 8px;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
}

.xp-chat-contacts {
    overflow-y: auto;
    display: grid;
    gap: 6px;
}

.xp-chat-contact {
    border: 1px solid #c8dcf6;
    border-radius: 10px;
    background: #fff;
    color: #113867;
    width: 100%;
    text-align: left;
    padding: 6px 8px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.xp-chat-contact.is-active {
    background: #eaf3ff;
    border-color: #8db7ea;
}

.xp-chat-contact-check {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0d59c7;
}

.xp-chat-contact-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.xp-chat-presence {
    font-size: 0.66rem;
    font-weight: 700;
    color: #4b6891;
    white-space: nowrap;
}

.xp-chat-presence.is-online {
    color: #0a8f4a;
}

.xp-chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #2f79c9 0%, #0d4ca1 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.xp-chat-contact-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.xp-chat-contact-copy strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.xp-chat-contact-copy small {
    color: #567394;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xp-chat-contact-meta {
    display: grid;
    gap: 3px;
    justify-items: end;
}

.xp-chat-contact-meta small {
    font-size: 0.68rem;
    color: #567394;
}

.xp-chat-dot {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.67rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.xp-chat-messages-wrap {
    display: grid;
    grid-template-rows: 1fr auto auto;
    min-height: 0;
    background: #fff;
}

.xp-chat-send-mode {
    border-top: 1px solid #d6e3f7;
    background: linear-gradient(180deg, #f8fcff 0%, #edf4ff 100%);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.xp-chat-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #254a74;
}

.xp-chat-mode-option input {
    margin: 0;
    accent-color: #0d59c7;
}

.xp-chat-typing {
    border-top: 1px solid #d6e3f7;
    background: #f2f8ff;
    color: #275385;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 5px 10px;
}

.xp-chat-messages {
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-chat-message {
    align-self: flex-start;
    max-width: 82%;
    display: grid;
    gap: 2px;
}

.xp-chat-message.is-mine {
    align-self: flex-end;
}

.xp-chat-bubble {
    border: 1px solid #c8dcf6;
    border-radius: 10px;
    background: #f6fbff;
    color: #113867;
    font-size: 0.82rem;
    padding: 8px 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.xp-chat-file-link {
    margin-top: 6px;
    border: 1px solid #bdd4f2;
    border-radius: 8px;
    padding: 5px 7px;
    text-decoration: none;
    color: #0f3f7a;
    background: #edf5ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
}

.xp-chat-message.is-mine .xp-chat-bubble {
    background: #e1efff;
    border-color: #a7c8ee;
}

.xp-chat-message small {
    font-size: 0.68rem;
    color: #6b84a2;
    text-align: right;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.xp-chat-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    color: #7a93b1;
    font-size: 0.72rem;
}

.xp-chat-read.is-read {
    color: #0d59c7;
}

body[data-chat-send-mode="single"] .xp-chat-contact-check {
    display: none;
}

.xp-chat-send {
    border-top: 1px solid #d6e3f7;
    background: #f7fbff;
    padding: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 8px;
}

.xp-chat-send .form-control {
    font-size: 0.8rem;
}

.xp-chat-emoji-picker {
    border-top: 1px solid #d6e3f7;
    background: linear-gradient(180deg, #fbfdff 0%, #f0f7ff 100%);
    padding: 8px;
}

.xp-chat-emoji-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.xp-chat-emoji-head strong {
    font-size: 0.75rem;
    color: #1f4a7d;
}

.xp-chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}

.xp-chat-emoji-item {
    border: 1px solid #c8dcf6;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    line-height: 1;
    padding: 7px 0;
}

.xp-chat-emoji-item:hover {
    background: #e9f2ff;
}

[data-chat-emoji-button].active {
    border-color: #8fb4e3;
    background: #e7f1ff;
    color: #0d4f9f;
}

@media (max-width: 575.98px) {
    .xp-chat-emoji-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.xp-chat-empty {
    border: 1px dashed #c8dcf6;
    border-radius: 10px;
    color: #6480a0;
    font-size: 0.78rem;
    text-align: center;
    padding: 10px 8px;
}

.xp-push-stack {
    position: fixed;
    right: 10px;
    bottom: 44px;
    z-index: 1335;
    width: min(300px, calc(100vw - 20px));
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.xp-push-item {
    border: 1px solid #1b4c88;
    border-radius: 8px;
    background: linear-gradient(180deg, #f9fcff 0%, #eaf3ff 100%);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    color: #0f2f58;
    padding: 8px 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.xp-push-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.xp-push-title {
    font-size: 0.78rem;
    font-weight: 800;
}

.xp-push-text {
    font-size: 0.74rem;
    color: #34577f;
}

.xp-context-panel {
    position: sticky;
    top: 0;
    z-index: 1020;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    border: 1px solid #1f5a9d;
    border-radius: 10px;
    background: linear-gradient(180deg, #f9fcff 0%, #edf5ff 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.xp-context-panel.xp-context-panel-desktop-top {
    /* Izoh: Desktop amallar paneli doim yuqorida turadi. */
    top: 0;
    z-index: 1025;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.xp-desktop-launcher + .xp-context-panel.xp-context-panel-desktop-top {
    margin-top: 0 !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.xp-desktop-launcher {
    position: relative;
    margin-bottom: 10px;
    border: 1px solid #2e6db3;
    border-radius: 10px;
    overflow: hidden;
    background:
        radial-gradient(120% 95% at 50% 125%, #2d8b2d 0%, #2f9f2f 32%, #57b957 60%, #7ecf78 76%, rgba(126, 207, 120, 0.05) 100%),
        linear-gradient(180deg, #9fd4ff 0%, #7cbcf3 40%, #58a3e6 100%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    min-width: min(620px, 100%);
    width: 100%;
}

.xp-desktop-launcher.is-workspace-full {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    margin-bottom: 0;
}

.xp-desktop-launcher.is-desktop-expanded {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    min-height: 100%;
    height: 100%;
    margin-bottom: 0;
}

body.xp-desktop-full .xp-desktop-launcher.is-desktop-expanded {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
}

.xp-desktop-launcher::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(250px 74px at 18% 20%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.08) 70%, transparent 100%),
        radial-gradient(280px 86px at 65% 15%, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.09) 70%, transparent 100%),
        radial-gradient(160px 54px at 85% 26%, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
    pointer-events: none;
}

.xp-desktop-launcher.is-hidden {
    display: none;
}

.xp-desktop-launcher-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(11, 58, 111, 0.36);
    background: linear-gradient(180deg, rgba(31, 108, 184, 0.94) 0%, rgba(14, 76, 148, 0.95) 100%);
    color: #fff;
}

.xp-desktop-identity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.xp-desktop-chip-top {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(191, 219, 254, 0.85);
    color: #f8fbff;
}

.xp-desktop-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 2px 8px;
    white-space: nowrap;
}

.xp-desktop-chip.is-open {
    border-color: rgba(134, 239, 172, 0.65);
    background: rgba(34, 197, 94, 0.2);
}

.xp-desktop-chip.is-closed {
    border-color: rgba(252, 165, 165, 0.65);
    background: rgba(239, 68, 68, 0.26);
}

.xp-desktop-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.xp-desktop-search {
    width: min(260px, 52vw);
    height: 28px;
    font-size: 0.74rem;
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.94);
}

.xp-desktop-reset-btn {
    height: 28px;
    width: 30px;
    padding: 0;
    border-radius: 8px;
}

.xp-desktop-pinned {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(12, 56, 110, 0.28);
    background: linear-gradient(180deg, rgba(9, 45, 92, 0.36) 0%, rgba(6, 36, 81, 0.22) 100%);
}

.xp-desktop-pinned-item {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xp-desktop-pinned-item i {
    font-size: 0.86rem;
}

.xp-desktop-pinned-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.xp-desktop-board {
    position: relative;
    min-height: 240px;
    height: 320px;
    overflow: hidden;
    padding: 10px 10px 14px;
}

.xp-desktop-launcher.is-workspace-full .xp-desktop-board {
    flex: 1;
    height: auto;
    min-height: 0;
}

.xp-desktop-launcher.is-desktop-expanded .xp-desktop-board {
    flex: 1;
    height: auto !important;
    min-height: 0;
}

.xp-desktop-launcher.is-workspace-full .xp-desktop-resize-handle {
    display: none;
}

.xp-desktop-launcher.is-desktop-expanded .xp-desktop-resize-handle {
    display: none;
}

.xp-desktop-icon {
    position: absolute;
    width: 98px;
    min-height: 84px;
    padding: 6px 4px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    text-decoration: none;
    color: #fff;
    text-align: center;
    user-select: none;
    touch-action: none;
    cursor: default;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.xp-desktop-launcher.size-small .xp-desktop-icon {
    width: 86px;
    min-height: 74px;
}

.xp-desktop-launcher.size-small .xp-desktop-icon-glyph {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
}

.xp-desktop-launcher.size-small .xp-desktop-icon-title {
    font-size: 0.64rem;
}

.xp-desktop-launcher.size-large .xp-desktop-icon {
    width: 118px;
    min-height: 96px;
}

.xp-desktop-launcher.size-large .xp-desktop-icon-glyph {
    width: 48px;
    height: 48px;
    font-size: 1.48rem;
}

.xp-desktop-launcher.size-large .xp-desktop-icon-title {
    font-size: 0.78rem;
}

.xp-desktop-icon:hover {
    background: rgba(255, 255, 255, 0.16);
}

.xp-desktop-icon.is-dragging {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.28);
}

.xp-desktop-icon-glyph {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 100%);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.xp-desktop-icon-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0 2px;
}

.xp-desktop-resize-handle {
    position: absolute;
    z-index: 3;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(6, 36, 81, 0.45);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.72rem;
}

.xp-desktop-resize-corner {
    right: 8px;
    bottom: 8px;
    cursor: nwse-resize;
}

.xp-desktop-resize-right {
    right: 7px;
    top: calc(50% + 16px);
    transform: translateY(-50%);
    cursor: ew-resize;
}

.xp-desktop-resize-top {
    top: 48px;
    right: 36px;
    cursor: ns-resize;
}

.xp-desktop-resize-handle:hover {
    background: rgba(255, 255, 255, 0.28);
}

body.xp-desktop-resizing,
body.xp-desktop-resizing * {
    user-select: none !important;
}

body.xp-desktop-resizing[data-xp-resize-mode="corner"],
body.xp-desktop-resizing[data-xp-resize-mode="corner"] * {
    cursor: nwse-resize !important;
}

body.xp-desktop-resizing[data-xp-resize-mode="right"],
body.xp-desktop-resizing[data-xp-resize-mode="right"] * {
    cursor: ew-resize !important;
}

body.xp-desktop-resizing[data-xp-resize-mode="top"],
body.xp-desktop-resizing[data-xp-resize-mode="top"] * {
    cursor: ns-resize !important;
}

.access-toolbar-row {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.access-toolbar-row .form-control,
.access-toolbar-row .form-select {
    height: 36px;
    font-size: 0.84rem;
}

.access-grid-shell {
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: #fff;
}

.access-grid-table {
    margin: 0;
    min-width: 1060px;
    table-layout: fixed;
}

.access-grid-table th,
.access-grid-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.access-grid-table th:not(:last-child),
.access-grid-table td:not(:last-child) {
    border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.access-grid-table thead th {
    position: relative;
    background: linear-gradient(180deg, #eef5ff 0%, #dce9fb 100%);
    color: #0d345f;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px 10px;
    user-select: none;
}

.access-grid-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.access-grid-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.access-grid-tool {
    border: 0;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    color: #1d4b80;
    font-size: 0.74rem;
}

.access-grid-tool.is-active {
    background: #0d59c7;
    color: #fff;
}

.access-grid-table tbody tr:nth-child(odd) {
    background: linear-gradient(180deg, rgba(252, 254, 255, 1) 0%, rgba(245, 250, 255, 1) 100%);
}

.access-grid-table tbody tr:nth-child(even) {
    background: linear-gradient(180deg, rgba(247, 252, 255, 1) 0%, rgba(239, 247, 255, 1) 100%);
}

.access-grid-table tbody tr:hover {
    background: linear-gradient(180deg, #e7f1ff 0%, #dceaff 100%);
}

.access-grid-table tbody tr.is-selected {
    background: linear-gradient(180deg, #cfe3ff 0%, #bfd9ff 100%) !important;
}

.access-grid-table td {
    font-size: 0.83rem;
    padding: 7px 10px;
    vertical-align: middle;
}

.debt-row-indicator {
    display: inline-block;
    width: 14px;
    margin-right: 6px;
    color: #0d4ca1;
    opacity: 0;
    font-size: 0.7rem;
    transform: translateX(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.access-grid-table tr.is-selected .debt-row-indicator {
    opacity: 1;
    transform: translateX(0);
}

.debt-control-panel .access-grid-shell:focus {
    outline: 2px solid rgba(13, 76, 161, 0.26);
    outline-offset: 2px;
}

.debt-control-panel {
    --debt-row-min-height: 37.8px;
    --debt-row-padding-y: 7px;
}

.debt-control-panel .access-grid-table td {
    min-height: var(--debt-row-min-height);
    padding-top: var(--debt-row-padding-y);
    padding-bottom: var(--debt-row-padding-y);
}

.debt-grid-controls .btn.btn-primary {
    color: #fff;
}

.debt-row-size-group {
    width: 196px;
}

.debt-journal-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.debt-journal-stage.is-left {
    grid-template-columns: auto minmax(0, 1fr);
}

.debt-journal-stage.is-left .debt-main-col {
    order: 2;
}

.debt-journal-stage.is-left .debt-detail-dock {
    order: 1;
}

.debt-main-col {
    min-width: 0;
}

.debt-detail-dock {
    position: sticky;
    top: 66px;
    z-index: 20;
    width: var(--debt-detail-width, 440px);
    max-height: calc(100vh - 128px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: start;
    container-type: inline-size;
}

.debt-detail-dock.is-left {
    left: auto;
    right: auto;
}

.debt-detail-dock.is-hidden {
    display: none;
}

.debt-detail-resize-handle {
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    background: linear-gradient(90deg, rgba(173, 197, 230, 0.14), rgba(173, 197, 230, 0.02));
    border-right: 1px solid rgba(148, 163, 184, 0.28);
}

.debt-detail-dock.is-left .debt-detail-resize-handle {
    left: auto;
    right: -4px;
    border-right: 0;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.debt-detail-resize-handle:hover {
    background: linear-gradient(90deg, rgba(118, 157, 209, 0.42), rgba(118, 157, 209, 0.08));
}

.debt-detail-body {
    overflow: auto;
    height: 100%;
    font-size: 0.92rem;
}

.debt-detail-flat-block {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 8px 10px;
}

.debt-detail-line {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
}

.debt-detail-line strong,
.debt-detail-line span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.debt-detail-line:last-child {
    border-bottom: 0;
}

.debt-detail-dock .table {
    width: 100%;
    table-layout: fixed;
}

.debt-detail-dock .table th,
.debt-detail-dock .table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 4px 6px;
    font-size: 0.84rem;
}

@container (max-width: 430px) {
    .debt-detail-body {
        font-size: 0.84rem;
        padding: 10px !important;
    }

    .debt-detail-flat-block {
        padding: 6px 8px;
    }

    .debt-detail-line {
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 6px;
        padding: 3px 0;
    }

    .debt-detail-dock .btn {
        font-size: 0.8rem;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
    }

    .debt-detail-dock .table th,
    .debt-detail-dock .table td {
        font-size: 0.76rem;
        padding: 3px 5px;
    }
}

@container (max-width: 360px) {
    .debt-detail-body {
        font-size: 0.78rem;
    }

    .debt-detail-line {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .debt-detail-dock .table th,
    .debt-detail-dock .table td {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
}

.debt-detail-modal-content {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.debt-detail-modal-bar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.debt-detail-modal-dialog {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

body.debt-detail-resizing,
body.debt-detail-resizing * {
    cursor: ew-resize !important;
    user-select: none !important;
}

.access-grid-resizer {
    position: absolute;
    right: -2px;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
}

.access-grid-table.is-resizing,
.access-grid-table.is-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

.xp-context-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-bottom: 1px solid #c4daf5;
    background: linear-gradient(180deg, #2f79c9 0%, #0d4ca1 58%, #0a3c87 100%);
}

.xp-context-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.xp-context-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.xp-context-btn {
    border: 1px solid #184782;
    border-radius: 6px;
    background: linear-gradient(180deg, #eef6ff 0%, #c8def9 100%);
    color: #083164;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 26px;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.xp-context-btn:hover {
    filter: brightness(0.98);
}

.dashboard-card,
.panel-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-card {
    padding: 22px;
}

.contracts-journal-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.contracts-journal-head {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(237, 245, 255, 0.94) 100%);
    border-radius: 14px;
    padding: 8px 8px 0;
}

.contracts-journal-scroll {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    overflow: auto;
    max-height: clamp(340px, 58vh, 760px);
}

.journal-shell .contracts-journal-scroll {
    max-height: none;
}

.contracts-journal-scroll .table {
    margin-bottom: 0;
}

.contracts-journal-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f2f6fb;
}

.contracts-journal-pagination {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.96) 38%);
    padding-top: 8px;
}

.contracts-journal-pagination .table-pagination {
    margin-top: 0 !important;
}

.journal-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 360px;
    overflow: hidden;
}

.journal-shell > .contracts-journal-head {
    flex-shrink: 0;
}

.journal-shell-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
}

.journal-shell-scroll .table {
    margin-bottom: 0;
}

.journal-shell-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f2f6fb;
}

.journal-shell-pagination {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.96) 38%);
    padding-top: 8px;
    margin-top: auto;
    flex-shrink: 0;
}

.journal-shell-pagination .table-pagination {
    margin-top: 0 !important;
}

.dashboard-stat {
    font-size: 1.6rem;
    font-weight: 700;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.journal-view-toggle {
    display: none;
}

.filter-body {
    margin-bottom: 18px;
}

.filter-sheet-header {
    display: none;
}

.filter-inline {
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: end;
}

.filter-inline > [class*="col-"] {
    flex: 0 0 auto;
}

.filter-body form.row {
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: end;
}

.filter-body form.row > [class*="col-"] {
    flex: 0 0 auto;
}

.login-card {
    max-width: 460px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 28px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    padding: 38px;
}

.table thead th {
    background: #f8fbff;
    color: #64748b;
    font-weight: 600;
}

.table td[data-label]::before {
    content: attr(data-label);
    display: none;
}

.overdue-badge {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.line-item-table input,
.line-item-table select {
    min-width: 110px;
}

.contract-shell {
    position: relative;
}

.contract-shell .section-header {
    margin-bottom: 8px;
}

.contract-shell .section-header h5 {
    margin-bottom: 0 !important;
    font-size: 0.94rem;
}

.contract-shell .inner-frame {
    padding: 14px;
}

.contract-shell .section-header small {
    display: none !important;
}

.contract-inline-grid {
    row-gap: 10px !important;
}

.contract-inline-field {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.contract-inline-field.is-multiline {
    align-items: start;
}

.contract-inline-field .form-label {
    margin: 0;
    font-weight: 800;
    font-size: 0.88rem;
    color: #1f2937;
}

.contract-inline-field .form-control,
.contract-inline-field .form-select,
.contract-inline-field .input-group {
    min-width: 0;
}

.contract-shell .form-control,
.contract-shell .form-select,
.contract-shell .input-group-text {
    min-height: 38px;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.contract-shell textarea.form-control {
    min-height: 88px;
}

.contract-inline-action {
    display: flex;
    align-items: stretch;
}

.contract-inline-action .btn {
    width: 100%;
    min-height: 38px;
}

.compact-crud-form {
    row-gap: 10px !important;
}

.compact-crud-field {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.compact-crud-field.is-multiline {
    align-items: start;
}

.compact-crud-field .form-label {
    margin: 0;
    font-weight: 800;
    font-size: 0.88rem;
    color: #1f2937;
}

.compact-crud-field .form-control,
.compact-crud-field .form-select,
.compact-crud-field .input-group,
.compact-crud-field .form-check {
    min-width: 0;
}

.compact-crud-form .form-control,
.compact-crud-form .form-select,
.compact-crud-form .input-group-text {
    min-height: 38px;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.compact-crud-form textarea.form-control {
    min-height: 88px;
}

.compact-crud-actions {
    display: flex;
    justify-content: flex-end;
}

.permission-editor-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-module-card {
    height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    padding: 14px;
}

.permission-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    margin-bottom: 10px;
}

.permission-module-head h6 {
    letter-spacing: 0.04em;
    font-size: 0.76rem;
    font-weight: 800;
    color: #334155 !important;
}

.permission-list {
    display: grid;
    gap: 8px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 9px 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.permission-item:hover {
    border-color: rgba(14, 165, 233, 0.32);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.12);
}

.permission-item .form-check-input {
    margin: 0;
    flex-shrink: 0;
}

.permission-item-text {
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}

.permission-item .form-check-input:checked + .permission-item-text {
    color: #0f3f7a;
}

.permission-menu-grid {
    row-gap: 10px;
}

.permission-menu-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.permission-menu-card:hover {
    border-color: rgba(14, 165, 233, 0.32);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.permission-menu-card .form-check-input {
    margin-top: 2px;
    flex-shrink: 0;
}

.permission-menu-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.permission-menu-meta strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.permission-menu-meta small {
    font-size: 0.76rem;
    color: #64748b !important;
    overflow-wrap: anywhere;
}

.floating-modal-stage {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.floating-workspace-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
}

.floating-modal-stage.is-window-minimized {
    pointer-events: none;
}

.floating-modal-stage.is-window-minimized .floating-workspace-backdrop {
    display: none;
}

.floating-form-window {
    position: relative;
    z-index: 1;
    width: min(1400px, calc(100vw - 56px));
    height: min(92vh, 960px);
    max-height: calc(100vh - 40px);
    background: rgba(244, 248, 252, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
    overflow: auto;
    resize: both;
    min-width: min(920px, calc(100vw - 24px));
    min-height: min(680px, calc(100vh - 24px));
    padding: 6px;
}

.floating-form-window.is-positioned {
    position: absolute;
}

.floating-form-window.is-maximized {
    resize: none;
}

.floating-form-window.is-minimized {
    display: none !important;
}

.floating-auto-window {
    width: min(1320px, calc(100vw - 46px));
    min-width: min(920px, calc(100vw - 20px));
    height: min(90vh, 920px);
}

.floating-auto-content {
    padding: 8px 10px 10px;
}

.floating-auto-window .compact-toolbar,
.floating-auto-window .app-screen-actions {
    display: flex !important;
}

.window-control-bar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    padding: 1px 1px 2px;
    background: linear-gradient(180deg, #2f79c9 0%, #0d4ca1 58%, #0a3c87 100%);
    border-radius: 14px 14px 0 0;
    cursor: move;
    user-select: none;
}

.window-w-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 6px;
    background: rgba(8, 32, 78, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.window-w-controls,
.window-btn,
.window-btn i {
    cursor: default;
}

.window-btn {
    border: 1px solid #1f4f89;
    border-radius: 4px;
    background: linear-gradient(180deg, #f6fbff 0%, #cfe5ff 100%);
    color: #0b2f62;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.16s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.window-btn-min,
.window-btn-max {
    width: 34px;
    height: 28px;
    font-size: 0.95rem;
}

.window-btn-close {
    height: 28px;
    width: 34px;
    font-size: 0.78rem;
    background: linear-gradient(180deg, #ffb2b2 0%, #e25656 100%);
    color: #fff;
    border-color: #8a1f1f;
}

.window-btn-min:hover,
.window-btn-max:hover {
    filter: brightness(0.95);
}

.window-btn-close:hover {
    filter: brightness(1.05);
}

.modal-content {
    border-radius: 10px;
    border: 1px solid #1f5a9d;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
}

.modal-header {
    background: linear-gradient(180deg, #2f79c9 0%, #0d4ca1 58%, #0a3c87 100%);
    color: #fff;
    border-bottom: 1px solid #0a3a78;
}

.modal-header .modal-title {
    font-size: 0.92rem;
    font-weight: 800;
}

.modal-header .btn-close {
    width: 28px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #8a1f1f;
    background:
        linear-gradient(180deg, #ffb2b2 0%, #e25656 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-width='2' d='M3 3l10 10M13 3L3 13'/%3E%3C/svg%3E") center/10px 10px no-repeat;
    opacity: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.floating-window-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 8px 18px;
    margin-bottom: 12px;
    background: rgba(244, 248, 252, 0.96);
}

.floating-window-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.floating-window-actions {
    display: flex;
    gap: 8px;
}

.compact-toolbar {
    display: flex;
    justify-content: flex-end;
}

.btn-close-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.contract-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(7, 22, 43, 0.96), rgba(15, 44, 78, 0.92));
    color: #fff;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.contract-hero .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.eyebrow {
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
    color: #8bdcff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.soft-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
}

.contract-frame {
    border-radius: 28px;
    overflow: hidden;
}

.contract-frame.panel-card {
    padding-top: 10px !important;
}

.contract-tabs {
    gap: 10px;
    flex-wrap: wrap;
}

.contract-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    color: #334155;
    background: #eef3f8;
    border: 1px solid transparent;
    font-weight: 700;
}

.contract-tabs .nav-link i {
    font-size: 1rem;
}

.contract-tabs .nav-link.active {
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.25);
}

.inner-frame {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.customer-preview,
.preview-empty {
    min-height: 152px;
    border-radius: 18px;
    padding: 20px;
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f6fb 100%);
    border: 1px dashed rgba(59, 130, 246, 0.24);
}

.preview-empty {
    display: grid;
    place-items: center;
    color: #64748b;
    text-align: center;
}

.timeline-hint {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hint-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fbfe;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 540px;
}

.catalog-sidebar {
    padding: 24px 18px;
    background: linear-gradient(180deg, #f7fafc, #eef4f9);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-chip {
    text-align: left;
    border: 0;
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    color: #334155;
    font-weight: 600;
}

.category-chip.active {
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
}

.catalog-content {
    padding: 24px;
}

.inline-product-builder {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbfe 0%, #f2f7fc 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.inline-product-builder .contract-inline-field {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
}

.inline-product-builder .contract-inline-field .form-label {
    font-size: 0.8rem;
    font-weight: 800;
}

.product-picker-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.payment-type-table td {
    vertical-align: top;
}

.payment-type-create-row {
    background: rgba(15, 118, 110, 0.05);
}

.payment-type-badge {
    --payment-type-color: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--payment-type-color) 12%, white);
    color: var(--payment-type-color);
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid color-mix(in srgb, var(--payment-type-color) 26%, white);
}

.pos-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pos-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(7, 22, 43, 0.98), rgba(15, 63, 122, 0.95));
    color: #fff;
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.16);
}

.pos-eyebrow {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 800;
    color: #86efac;
    margin-bottom: 6px;
}

.pos-hero .text-muted {
    color: rgba(255, 255, 255, 0.76) !important;
}

.pos-hero-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pos-hero-badge {
    min-width: 130px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.pos-hero-badge span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.68);
}

.pos-hero-badge strong {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.9fr);
    gap: 16px;
    min-height: 620px;
}

.pos-products-panel,
.pos-cart-panel {
    padding: 18px;
}

.pos-products-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.1fr) 180px minmax(220px, 0.9fr);
    gap: 12px;
    align-items: end;
}

.pos-customer-box,
.pos-date-box,
.pos-note-box {
    min-width: 0;
}

.pos-search-strip .input-group-text {
    background: #eef6ff;
    border-color: rgba(59, 130, 246, 0.18);
    color: #0f3f7a;
}

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

.pos-category-chip {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.84rem;
    font-weight: 800;
}

.pos-category-chip.is-active {
    background: linear-gradient(135deg, #0f766e, #22c55e);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 20px rgba(34, 197, 94, 0.18);
}

.pos-products-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pos-products-meta {
    font-size: 0.84rem;
    color: #64748b;
    font-weight: 700;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    align-content: start;
    min-height: 380px;
}

.pos-product-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 168px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pos-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.12);
}

.pos-product-card.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.pos-product-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.pos-product-category {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #0f3f7a;
    font-size: 0.74rem;
    font-weight: 800;
}

.pos-product-stock {
    font-size: 0.72rem;
    color: #0f766e;
    font-weight: 700;
}

.pos-product-stock.is-empty {
    color: #b91c1c;
}

.pos-product-card strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.pos-product-card small {
    color: #64748b;
}

.pos-product-price {
    margin-top: auto;
    font-size: 1.02rem;
    font-weight: 900;
    color: #0f766e;
}

.pos-products-empty,
.pos-payment-empty,
.pos-cart-empty {
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    color: #64748b;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pos-cart-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-mode-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pos-mode-chip {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
}

.pos-mode-chip.is-active {
    background: linear-gradient(135deg, #0f3f7a, #0ea5e9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 16px 28px rgba(14, 165, 233, 0.18);
}

.pos-payment-box {
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.pos-payment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pos-payment-card {
    --pos-payment-color: #0f766e;
    border: 1px solid color-mix(in srgb, var(--pos-payment-color) 28%, white);
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--pos-payment-color) 7%, white) 100%);
    color: #1f2937;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 96px;
}

.pos-payment-card i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--pos-payment-color);
}

.pos-payment-card strong {
    font-size: 0.88rem;
}

.pos-payment-card small {
    color: #64748b;
    font-size: 0.74rem;
}

.pos-payment-card.is-active {
    box-shadow: 0 16px 28px color-mix(in srgb, var(--pos-payment-color) 22%, transparent);
    transform: translateY(-1px);
}

.pos-cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pos-cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 240px;
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.pos-cart-item {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pos-cart-item-head,
.pos-cart-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.pos-cart-item-head small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.pos-cart-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.pos-cart-item-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #475569;
}

.pos-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pos-summary-box {
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.pos-summary-box span {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 800;
}

.pos-summary-box strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 0.98rem;
}

.pos-summary-box.is-accent {
    background: linear-gradient(135deg, #0f766e, #22c55e);
    color: #fff;
    border-color: transparent;
}

.pos-summary-box.is-accent span,
.pos-summary-box.is-accent strong {
    color: #fff;
}

.pos-action-stack {
    display: grid;
    gap: 10px;
}

@media (max-width: 1199.98px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .pos-cart-list {
        max-height: 320px;
    }
}

@media (max-width: 991.98px) {
    .pos-hero,
    .pos-toolbar,
    .pos-cart-item-grid,
    .pos-summary-grid,
    .pos-payment-grid {
        grid-template-columns: 1fr;
    }

    .pos-hero {
        flex-direction: column;
    }

    .pos-hero-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* POS v2: savat yuqorida, mahsulot jadvali pastda, o'ngda to'lov sidebar */
.pos-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.95fr);
    align-items: start;
}

.pos-main {
    display: grid;
    gap: 14px;
}

.pos-shell {
    font-size: 0.93rem;
}

.pos-setup-panel,
.pos-cart-top,
.pos-products-panel,
.pos-sidebar {
    padding: 16px;
}

.pos-setup-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr);
    gap: 12px;
    align-items: end;
}

.pos-setup-grid #posCustomerField.is-hidden {
    display: none;
}

.pos-setup-panel.is-hidden {
    display: none;
}

.pos-shell .form-label {
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.pos-section-head {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.pos-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.pos-cart-table thead th,
.pos-product-table thead th {
    background: #f8fbff;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    padding: 8px 10px;
}

.pos-cart-table td,
.pos-product-table td {
    vertical-align: middle;
    font-size: 0.79rem;
    padding: 7px 10px;
}

.pos-cart-table-wrap {
    max-height: 255px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
}

.pos-cart-table {
    margin-bottom: 0;
}

.pos-cart-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.25);
}

.pos-product-row.is-empty {
    opacity: 0.62;
}

.pos-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-installment-hint {
    border-radius: 14px;
    border: 1px dashed rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
    color: #0f3f7a;
    padding: 10px 12px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.pos-product-table .btn,
.pos-cart-table .btn {
    --bs-btn-padding-y: 0.2rem;
    --bs-btn-padding-x: 0.42rem;
}

.pos-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pos-summary-box.is-accent {
    grid-column: 1 / -1;
}

@media (max-width: 1199.98px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .pos-setup-grid,
    .pos-filter-grid,
    .pos-summary-grid {
        grid-template-columns: 1fr;
    }
}

.product-picker-table thead th {
    background: #f8fbfe;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.product-picker-row {
    cursor: pointer;
}

.product-picker-row.is-empty {
    opacity: 0.64;
}

.product-picker-row:hover td {
    background: rgba(14, 165, 233, 0.06);
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.search-box {
    min-width: 320px;
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.product-tile.is-empty {
    opacity: 0.66;
}

.product-tile-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-tile-head span,
.product-tile-meta {
    font-size: 0.86rem;
    color: #64748b;
}

.product-tile-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f3f7a;
}

.contract-items-table td {
    vertical-align: middle;
}

.contract-items-table {
    min-width: 980px;
}

.contract-items-table th {
    white-space: nowrap;
    font-size: 0.83rem;
}

.contract-items-table td:first-child {
    min-width: 220px;
}

.contract-items-table td:nth-child(2) {
    min-width: 160px;
}

.contract-items-table .qty-input {
    min-width: 92px;
}

.contract-items-table .price-input {
    min-width: 130px;
}

.contract-items-table .row-total {
    white-space: nowrap;
    font-weight: 700;
}

.schedule-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.schedule-summary-item {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, #f8fbfe 0%, #f2f7fc 100%);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-summary-item span {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 700;
}

.schedule-summary-item strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.calc-box {
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbfe 0%, #eef5fb 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.calc-box small {
    display: inline-block;
    color: #64748b;
    margin: 0;
    font-weight: 800;
    font-size: 0.85rem;
}

.calc-box strong {
    font-size: 1rem;
    font-weight: 500;
}

.calc-box.danger {
    background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: rgba(239, 68, 68, 0.18);
}

.bank-notes {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.doc-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    justify-content: center;
    min-height: 148px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
    text-decoration: none;
    color: #122033;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.doc-tile i {
    font-size: 1.35rem;
    color: #0ea5e9;
}

.doc-tile small {
    color: #64748b;
}

.doc-tile.disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.meta-box {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #f9fbfd;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
}

.meta-box small {
    display: inline-block;
    color: #1f2937;
    margin: 0;
    min-width: 116px;
    font-weight: 800;
    font-size: 0.86rem;
}

.meta-box strong {
    font-weight: 500;
    font-size: 0.96rem;
}

.contract-show-shell .inner-frame {
    min-height: 100%;
}

.app-screen-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.app-screen-eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0ea5e9;
}

.app-screen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.app-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.app-stat-card {
    padding: 18px;
}

.mobile-screen-tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    padding-bottom: 6px;
}

.compact-show-hero {
    padding: 22px;
    border-radius: 22px;
}

.mobile-form-card {
    position: relative;
}

.sidebar.is-collapsed {
    width: 94px;
    padding-left: 10px;
    padding-right: 10px;
}

.sidebar.is-collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.is-collapsed .sidebar-brand-copy,
.sidebar.is-collapsed .sidebar-link span,
.sidebar.is-collapsed .sidebar-group-toggle span,
.sidebar.is-collapsed .sidebar-group-toggle strong,
.sidebar.is-collapsed .sidebar-footer-meta,
.sidebar.is-collapsed .sidebar-hand-mode {
    display: none;
}

.sidebar.is-collapsed .sidebar-scroll {
    padding-right: 0;
}

.sidebar.is-collapsed .sidebar-brand-main {
    justify-content: center;
}

.sidebar.is-collapsed .sidebar-link,
.sidebar.is-collapsed .sidebar-group-toggle,
.sidebar.is-collapsed .sidebar-profile-button {
    justify-content: center;
}

.sidebar.is-collapsed .sidebar-group-body {
    padding-left: 0;
}

.sidebar.is-collapsed .sidebar-collapse-button {
    position: absolute;
    top: 24px;
    right: 10px;
}

.sidebar.is-collapsed .sidebar-footer-compact {
    justify-content: center;
}

.sidebar.is-collapsed .sidebar-profile-panel[hidden] {
    display: none;
}

.mobile-form-topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 8px;
    background: inherit;
}

body.dark-mode {
    background: linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e293b 100%);
    color: #e5e7eb;
}

body.dark-mode .topbar,
body.dark-mode .dashboard-card,
body.dark-mode .panel-card,
body.dark-mode .login-card {
    background: rgba(15, 23, 42, 0.88);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .table {
    color: #e5e7eb;
}

body.dark-mode .table thead th {
    background: #172033;
    color: #cbd5e1;
}

body.dark-mode .inner-frame,
body.dark-mode .customer-preview,
body.dark-mode .preview-empty,
body.dark-mode .hint-row,
body.dark-mode .category-chip,
body.dark-mode .product-tile,
body.dark-mode .calc-box,
body.dark-mode .doc-tile,
body.dark-mode .meta-box {
    background: rgba(15, 23, 42, 0.88);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .category-chip.active,
body.dark-mode .contract-tabs .nav-link.active {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

body.dark-mode .contract-tabs .nav-link {
    background: rgba(255, 255, 255, 0.06);
    color: #dbeafe;
}

body.dark-mode .floating-form-window,
body.dark-mode .floating-window-header {
    background: rgba(8, 15, 28, 0.96);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .window-control-bar {
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.96) 0%, rgba(8, 15, 28, 0.84) 100%);
}

body.dark-mode .window-w-controls {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .window-btn {
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #31445f 0%, #1c2e45 100%);
}

body.dark-mode .window-btn-min:hover,
body.dark-mode .window-btn-max:hover {
    filter: brightness(1.08);
}

body.dark-mode .window-btn-close {
    background: linear-gradient(180deg, #d26a6a 0%, #9d2e2e 100%);
    color: #fff;
}

body.dark-mode .modal-content {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
}

body.dark-mode .modal-header {
    background: linear-gradient(180deg, #1f395e 0%, #132846 100%);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .xp-start-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark-mode .xp-main-top-head {
    background: linear-gradient(180deg, rgba(35, 57, 87, 0.96) 0%, rgba(15, 28, 48, 0.98) 100%);
    border-color: rgba(148, 163, 184, 0.3);
}

body.dark-mode .xp-desktop-chip-top {
    border-color: rgba(148, 163, 184, 0.5);
    background: rgba(148, 163, 184, 0.18);
}

body.dark-mode .xp-start-link {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

body.dark-mode .xp-start-group {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.92);
}

body.dark-mode .xp-start-group-toggle {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    color: #e2e8f0;
}

body.dark-mode .xp-start-group-toggle.is-open {
    background: linear-gradient(180deg, rgba(70, 98, 138, 0.95) 0%, rgba(45, 68, 102, 0.95) 100%);
}

body.dark-mode .xp-start-group-body {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.92);
}

body.dark-mode .xp-start-sub-link {
    color: #e2e8f0;
}

body.dark-mode .xp-start-sub-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .xp-taskbar {
    border-top-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, #233859 0%, #162840 55%, #111b2b 100%);
}

body.dark-mode .xp-task-button {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, #31445f 0%, #1e3048 100%);
    color: #e2e8f0;
}

body.dark-mode .xp-task-button.is-active {
    background: linear-gradient(180deg, #46628a 0%, #2d4466 100%);
}

body.dark-mode .xp-show-desktop-button,
body.dark-mode .xp-sidebar-toggle-button {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, #31445f 0%, #1e3048 100%);
    color: #e2e8f0;
}

body.dark-mode .xp-show-desktop-button.is-active,
body.dark-mode .xp-sidebar-toggle-button.is-active {
    background: linear-gradient(180deg, #46628a 0%, #2d4466 100%);
}

body.dark-mode .xp-tray {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #3c5d84 0%, #274468 100%);
}

body.dark-mode .xp-chat-button {
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .xp-task-context-menu,
body.dark-mode .xp-task-preview-tooltip,
body.dark-mode .xp-tray-panel {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
}

body.dark-mode .xp-task-menu-item,
body.dark-mode .xp-tray-tool,
body.dark-mode .xp-tray-refresh {
    color: #e2e8f0;
}

body.dark-mode .xp-task-menu-item:hover,
body.dark-mode .xp-tray-tool:hover,
body.dark-mode .xp-tray-refresh:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .xp-rate-row {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(30, 41, 59, 0.92);
    color: #e2e8f0;
}

body.dark-mode .xp-tray-updated {
    color: #9fb4cc;
}

body.dark-mode .xp-tray-weather {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(30, 41, 59, 0.92);
}

body.dark-mode .xp-tray-weather-head {
    background: rgba(70, 98, 138, 0.28);
    color: #d8e8ff;
}

body.dark-mode .xp-tray-weather-body strong {
    color: #e2e8f0;
}

body.dark-mode .xp-tray-weather-body small {
    color: #9fb4cc;
}

body.dark-mode .xp-calculator-panel,
body.dark-mode .xp-chat-panel {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.96);
}

body.dark-mode .xp-calc-display,
body.dark-mode .xp-calc-grid button,
body.dark-mode .xp-calc-foot button {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(30, 41, 59, 0.92);
    color: #e2e8f0;
}

body.dark-mode .xp-chat-contacts-wrap,
body.dark-mode .xp-chat-send {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .xp-chat-contact,
body.dark-mode .xp-chat-bubble {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(30, 41, 59, 0.92);
    color: #e2e8f0;
}

body.dark-mode .xp-chat-contact-copy small,
body.dark-mode .xp-chat-message small,
body.dark-mode .xp-chat-empty {
    color: #9fb4cc;
}

body.dark-mode .xp-chat-presence {
    color: #8fb4db;
}

body.dark-mode .xp-chat-presence.is-online {
    color: #67e8a2;
}

body.dark-mode .xp-chat-messages-wrap {
    background: rgba(15, 23, 42, 0.88);
}

body.dark-mode .xp-chat-typing {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.92);
    color: #9fb4cc;
}

body.dark-mode .xp-chat-file-link {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(70, 98, 138, 0.26);
    color: #d7e9ff;
}

body.dark-mode .xp-chat-send-mode {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.9);
}

body.dark-mode .xp-chat-mode-option {
    color: #c7d7ea;
}

body.dark-mode .xp-chat-emoji-picker {
    border-top-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.9);
}

body.dark-mode .xp-chat-emoji-head strong {
    color: #d6e6fb;
}

body.dark-mode .xp-chat-emoji-item {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(30, 41, 59, 0.92);
    color: #e2e8f0;
}

body.dark-mode .xp-chat-emoji-item:hover {
    background: rgba(37, 99, 235, 0.3);
}

body.dark-mode [data-chat-emoji-button].active {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(37, 99, 235, 0.25);
    color: #d7e9ff;
}

body.dark-mode .xp-push-item {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.96);
    color: #d7e9ff;
}

body.dark-mode .xp-push-text {
    color: #9fb4cc;
}

body.dark-mode .xp-context-panel {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.94);
}

body.dark-mode .xp-context-head {
    border-bottom-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #1f395e 0%, #132846 100%);
}

body.dark-mode .xp-context-btn {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #31445f 0%, #1e3048 100%);
    color: #e2e8f0;
}

body.dark-mode .access-grid-shell {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .access-grid-table thead th {
    background: linear-gradient(180deg, rgba(44, 59, 80, 0.95) 0%, rgba(31, 46, 68, 0.96) 100%);
    color: #e2e8f0;
}

body.dark-mode .access-grid-table tbody tr:nth-child(odd),
body.dark-mode .access-grid-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.74);
}

body.dark-mode .access-grid-table tbody tr:hover {
    background: rgba(30, 58, 95, 0.9);
}

body.dark-mode .access-grid-table tbody tr.is-selected {
    background: linear-gradient(180deg, #213c68 0%, #1d355a 100%) !important;
}

body.dark-mode .access-grid-table th,
body.dark-mode .access-grid-table td {
    border-bottom-color: rgba(71, 85, 105, 0.45);
}

body.dark-mode .access-grid-table th:not(:last-child),
body.dark-mode .access-grid-table td:not(:last-child) {
    border-right-color: rgba(71, 85, 105, 0.42);
}

body.dark-mode .debt-row-indicator {
    color: #8fc1ff;
}

body.dark-mode .debt-detail-resize-handle {
    background: linear-gradient(90deg, rgba(43, 65, 98, 0.45), rgba(43, 65, 98, 0.08));
    border-right-color: rgba(71, 85, 105, 0.45);
}

body.dark-mode .debt-detail-dock.is-left .debt-detail-resize-handle {
    border-left-color: rgba(71, 85, 105, 0.45);
}

body.dark-mode .debt-detail-flat-block {
    border-color: rgba(71, 85, 105, 0.45);
    background: rgba(15, 23, 42, 0.78);
}

body.dark-mode .debt-detail-line {
    border-bottom-color: rgba(71, 85, 105, 0.45);
}

body.dark-mode .catalog-sidebar {
    background: linear-gradient(180deg, #0f172a, #152238);
    border-right-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .product-picker-table-wrap,
body.dark-mode .product-picker-table thead th {
    background: rgba(15, 23, 42, 0.88);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .inline-product-builder {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .schedule-summary-item {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .schedule-summary-item span {
    color: #94a3b8;
}

body.dark-mode .schedule-summary-item strong {
    color: #e2e8f0;
}

body.dark-mode .permission-module-card,
body.dark-mode .permission-menu-card,
body.dark-mode .permission-item {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(255, 255, 255, 0.09);
}

body.dark-mode .permission-module-head {
    border-color: rgba(255, 255, 255, 0.09);
}

body.dark-mode .permission-module-head h6,
body.dark-mode .permission-item-text,
body.dark-mode .permission-menu-meta strong {
    color: #e2e8f0 !important;
}

body.dark-mode .permission-menu-meta small {
    color: #94a3b8 !important;
}

body.dark-mode .product-picker-row:hover td {
    background: rgba(14, 165, 233, 0.14);
}

body.dark-mode .sidebar-profile-button,
body.dark-mode .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mobile-nav-link {
    color: #cbd5e1;
}

body.dark-mode .mobile-menu-panel,
body.dark-mode .mobile-menu-header,
body.dark-mode .mobile-setting-tile,
body.dark-mode .launcher-pinned-tile,
body.dark-mode .mobile-search-modal,
body.dark-mode .mobile-fab-sheet,
body.dark-mode .mobile-camera-modal,
body.dark-mode .mobile-search-head,
body.dark-mode .mobile-fab-sheet-head,
body.dark-mode .mobile-camera-head {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mobile-menu-panel .sidebar-link {
    color: #e5e7eb;
}

body.dark-mode .mobile-menu-panel .sidebar-link:hover,
body.dark-mode .mobile-menu-panel .sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

body.dark-mode .mobile-menu-panel .sidebar-group-toggle {
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mobile-search-item,
body.dark-mode .mobile-fab-action {
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mobile-recent-chip,
body.dark-mode .mobile-fab-pin {
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .settings-tool-panel {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .settings-tool-head {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(22, 32, 49, 0.95) 100%);
    color: #e2e8f0;
}

body.dark-mode .settings-tool-panel.is-open .settings-tool-head {
    background: linear-gradient(180deg, rgba(70, 98, 138, 0.95) 0%, rgba(45, 68, 102, 0.95) 100%);
}

body.dark-mode .settings-tool-icon {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(30, 41, 59, 0.9);
}

body.dark-mode .settings-tool-body {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .launcher-pinned-icon {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

body.dark-mode .xp-desktop-chip {
    border-color: rgba(255, 255, 255, 0.28);
}

body.dark-mode .xp-desktop-search {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.16);
    color: #dbeafe;
}

body.dark-mode .xp-desktop-pinned-item {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .migration-table-wrap {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .migration-table thead th {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(22, 32, 49, 0.95) 100%);
    color: #e2e8f0;
}

body.dark-mode .migration-table td {
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .deploy-gate-lock {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(21, 32, 48, 0.9) 100%);
}

body.dark-mode .sms-template-create-row {
    background: rgba(14, 165, 233, 0.12);
}

.panel-theme-mac .xp-taskbar {
    border-top-color: #8d8d8d;
    background: linear-gradient(180deg, #efefef 0%, #d5d5d5 60%, #bcbcbc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel-theme-mac .xp-start-button {
    border-color: #7f7f7f;
    border-radius: 10px;
    background: linear-gradient(180deg, #fdfdfd 0%, #d9d9d9 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-show-desktop-button,
.panel-theme-mac .xp-sidebar-toggle-button {
    border-color: #9ba4ad;
    border-radius: 9px;
    background: linear-gradient(180deg, #fdfdfd 0%, #dce1e8 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-task-button {
    border-color: #9ba4ad;
    border-radius: 9px;
    background: linear-gradient(180deg, #fdfdfd 0%, #dce1e8 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-task-button.is-active {
    background: linear-gradient(180deg, #ffffff 0%, #c7d8ef 100%);
}

.panel-theme-mac .xp-tray {
    border-color: #8d9ba8;
    background: linear-gradient(180deg, #fdfdfd 0%, #dce3ea 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-chat-button {
    background: rgba(15, 23, 42, 0.06);
}

.panel-theme-mac .xp-start-menu,
.panel-theme-mac .xp-tray-panel,
.panel-theme-mac .xp-task-context-menu,
.panel-theme-mac .xp-task-preview-tooltip {
    border-color: #9ba4ad;
    border-radius: 12px;
    background: linear-gradient(180deg, #fdfdfd 0%, #e7eaef 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-start-menu-head,
.panel-theme-mac .xp-tray-head {
    color: #1f2937;
    background: linear-gradient(180deg, #f8f8f8 0%, #d7d7d7 100%);
}

.panel-theme-mac .xp-start-link,
.panel-theme-mac .xp-start-sub-link,
.panel-theme-mac .xp-task-menu-item,
.panel-theme-mac .xp-tray-tool,
.panel-theme-mac .xp-tray-refresh,
.panel-theme-mac .xp-rate-row {
    border-color: #b8c1cc;
    background: linear-gradient(180deg, #ffffff 0%, #edf1f5 100%);
    color: #1f2937;
}

.panel-theme-mac .xp-calculator-panel,
.panel-theme-mac .xp-chat-panel {
    border-color: #9ba4ad;
    background: linear-gradient(180deg, #fdfdfd 0%, #e7eaef 100%);
}

.panel-theme-mac .window-control-bar {
    background: linear-gradient(180deg, #f4f4f4 0%, #d7d7d7 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.panel-theme-mac .window-w-controls {
    margin-right: auto;
    margin-left: 4px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.panel-theme-mac .window-btn {
    border-radius: 999px;
    width: 14px !important;
    height: 14px !important;
    font-size: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: none;
    padding: 0;
}

.panel-theme-mac .window-btn i {
    display: none;
}

.panel-theme-mac .window-btn-close {
    background: #ff5f56;
}

.panel-theme-mac .window-btn-min {
    background: #ffbd2e;
}

.panel-theme-mac .window-btn-max {
    background: #27c93f;
}

body.dark-mode .mobile-search-empty {
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .mobile-screen-tabs {
    background: rgba(15, 23, 42, 0.92);
}

body.dark-mode .mobile-system-toast {
    background: rgba(30, 41, 59, 0.96);
}

body.one-hand-left .mobile-fab-button {
    left: 16px;
    right: auto;
}

body.one-hand-left .mobile-system-toast {
    left: 18px;
    right: auto;
    transform: none;
}

@media (max-width: 991.98px) {
    .xp-taskbar,
    .xp-start-menu,
    .xp-context-panel,
    .xp-main-top-module,
    .xp-desktop-launcher,
    .xp-task-context-menu,
    .xp-task-preview-tooltip,
    .xp-tray-panel,
    .xp-calculator-panel,
    .xp-chat-panel,
    .xp-push-stack {
        display: none !important;
    }

    .app-main {
        padding-bottom: 0;
    }

    .app-wrapper {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .app-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-bottom: 88px !important;
    }

    .contracts-journal-head,
    .contracts-journal-pagination {
        position: static;
    }

    .contracts-journal-scroll {
        max-height: none;
    }

    .contract-hero,
    .wizard-footer,
    .catalog-toolbar,
    .table-pagination,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header {
        margin-bottom: 12px;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .launcher-settings-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .launcher-pinned-grid {
        grid-template-columns: 1fr;
    }

    .floating-form-window {
        width: 100%;
        height: min(100%, calc(100vh - 16px));
        max-height: calc(100vh - 16px);
        min-width: 0;
        min-height: 0;
        resize: none;
        padding: 10px;
        border-radius: 22px;
    }

    .floating-modal-stage {
        padding: 8px;
        align-items: stretch;
    }

    .catalog-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        padding: 14px 12px;
    }

    .calc-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .debt-detail-dock {
        position: static;
        left: auto;
        right: auto;
        bottom: auto;
        top: auto;
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin-top: 12px !important;
    }

    .debt-journal-stage,
    .debt-journal-stage.is-left {
        grid-template-columns: 1fr;
    }

    .debt-journal-stage.is-left .debt-main-col,
    .debt-journal-stage.is-left .debt-detail-dock {
        order: initial;
    }

    .debt-row-size-group {
        width: 146px;
    }

    .debt-detail-line {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .debt-detail-resize-handle {
        display: none;
    }

    .debt-detail-body {
        max-height: none !important;
        overflow: visible;
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 50%;
        bottom: 10px;
        transform: translateX(-50%);
        z-index: 40;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
        overflow-x: auto;
        width: min(calc(100vw - 20px), 440px);
        scrollbar-width: none;
    }

    .mobile-bottom-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-menu-backdrop:not([hidden]),
    .mobile-menu-panel:not([hidden]),
    .mobile-search-backdrop:not([hidden]),
    .mobile-search-modal:not([hidden]),
    .mobile-fab-backdrop:not([hidden]),
    .mobile-fab-sheet:not([hidden]),
    .mobile-camera-backdrop:not([hidden]),
    .mobile-camera-modal:not([hidden]),
    .mobile-fab-button:not([hidden]) {
        display: block;
    }

    .panel-card,
    .dashboard-card,
    .inner-frame {
        border-radius: 18px;
    }

    .panel-card {
        padding: 14px !important;
    }

    .inner-frame {
        padding: 14px;
    }

    .contract-inline-field {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 8px;
    }

    .meta-box {
        min-height: auto;
    }

    .compact-toolbar .btn,
    .section-header .btn,
    .filter-body .btn,
    .wizard-footer .btn {
        font-size: 0.82rem;
        padding: 0.5rem 0.8rem;
    }

    .journal-view-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px;
        border-radius: 14px;
        background: #eef4fb;
        border: 1px solid rgba(148, 163, 184, 0.18);
    }

    .journal-view-btn {
        border: 0;
        background: transparent;
        color: #64748b;
        border-radius: 10px;
        padding: 7px 10px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.76rem;
        font-weight: 700;
    }

    .journal-view-btn.active {
        background: #fff;
        color: #0f3f7a;
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    }

    .section-header h4,
    .section-header h5 {
        font-size: 1rem;
    }

    .section-header small,
    .text-muted,
    .form-label,
    .table,
    .btn,
    .form-control,
    .form-select {
        font-size: 0.84rem;
    }

    .form-control,
    .form-select {
        min-height: 40px;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .form-select-lg,
    .form-control-lg {
        min-height: 42px;
        font-size: 0.9rem;
    }

    .contract-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .schedule-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contract-tabs .nav-link {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.8rem;
        text-align: center;
    }

    .contract-tabs .nav-link span {
        display: none;
    }

    .contract-tabs .nav-link i {
        margin: 0;
        font-size: 1.05rem;
    }

    .filter-body {
        margin-bottom: 12px;
    }

    .filter-inline,
    .filter-body form.row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
    }

    .filter-inline > [class*="col-"],
    .filter-body form.row > [class*="col-"] {
        flex: initial;
        width: auto;
        max-width: none;
    }

    .filter-body .col-md-auto,
    .filter-body .col-lg-auto,
    .filter-body .col-auto,
    .filter-body .flex-shrink-0 {
        grid-column: 1 / -1;
    }

    .table-responsive {
        overflow: visible;
    }

    .access-toolbar-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .access-grid-shell {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .journal-mode-cards .adaptive-table thead,
    .journal-mode-list .adaptive-table thead {
        display: none;
    }

    .journal-mode-cards .adaptive-table,
    .journal-mode-cards .adaptive-table tbody,
    .journal-mode-cards .adaptive-table tr,
    .journal-mode-cards .adaptive-table td,
    .journal-mode-list .adaptive-table,
    .journal-mode-list .adaptive-table tbody,
    .journal-mode-list .adaptive-table tr,
    .journal-mode-list .adaptive-table td {
        display: block;
        width: 100%;
    }

    .journal-mode-cards .adaptive-table tbody,
    .journal-mode-list .adaptive-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .journal-mode-cards .adaptive-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
        padding: 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
    }

    .journal-mode-list .adaptive-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
    }

    .journal-mode-cards .adaptive-table td,
    .journal-mode-list .adaptive-table td {
        border: 0;
        padding: 0;
        min-width: 0;
    }

    .journal-mode-cards .adaptive-table td[data-label]::before,
    .journal-mode-list .adaptive-table td[data-label]::before {
        display: block;
        margin-bottom: 3px;
        color: #64748b;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .journal-mode-cards .adaptive-table td.text-end,
    .journal-mode-list .adaptive-table td.text-end {
        grid-column: 1 / -1;
        text-align: left !important;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        padding-top: 4px;
    }

    .journal-mode-cards .adaptive-table td.text-end::before,
    .journal-mode-list .adaptive-table td.text-end::before {
        width: 100%;
    }

    .journal-mode-table .table-responsive {
        overflow-x: auto;
    }

    .journal-mode-table .adaptive-table {
        min-width: 680px;
    }

    .btn-icon-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 12px;
    }

    .btn-icon-mobile .btn-label {
        display: none;
    }

    .btn-icon-mobile i {
        font-size: 1rem;
        margin: 0 !important;
    }

    .table-pagination {
        gap: 10px;
        padding-top: 12px;
    }

    .customer-preview,
    .preview-empty {
        min-height: 110px;
        padding: 14px;
    }

    .docs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .app-screen-header {
        align-items: flex-start;
    }

    .app-screen-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .app-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-stat-card {
        padding: 14px;
    }

    .doc-tile {
        min-height: 118px;
        padding: 14px;
        border-radius: 16px;
    }

    .mobile-form-grid > .col-12:last-child,
    .mobile-form-grid > .mt-4:last-child {
        margin-top: 0 !important;
    }

    .mobile-form-submit {
        position: sticky;
        bottom: 0;
        z-index: 3;
        padding-top: 12px;
        background: linear-gradient(180deg, rgba(244, 248, 252, 0) 0%, rgba(244, 248, 252, 0.96) 30%);
    }

    .mobile-form-submit .btn {
        width: 100%;
        min-height: 44px;
        border-radius: 14px;
        font-weight: 700;
    }

    .mobile-stepper-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .mobile-stepper-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-stepper-tabs .nav-link {
        white-space: nowrap;
        min-width: max-content;
    }

    body.dark-mode .journal-view-toggle {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
    }

    body.dark-mode .journal-view-btn {
        color: #cbd5e1;
    }

    body.dark-mode .journal-view-btn.active {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

    body.dark-mode .journal-mode-cards .adaptive-table tr,
    body.dark-mode .journal-mode-list .adaptive-table tr {
        background: rgba(15, 23, 42, 0.88);
        border-color: rgba(255, 255, 255, 0.08);
    }

    body.dark-mode .journal-mode-cards .adaptive-table td[data-label]::before,
    body.dark-mode .journal-mode-list .adaptive-table td[data-label]::before {
        color: #94a3b8;
    }

    body.dark-mode .mobile-form-submit {
        background: linear-gradient(180deg, rgba(8, 15, 28, 0) 0%, rgba(8, 15, 28, 0.96) 30%);
    }

    .filter-body.filter-sheet.is-mobile-open {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 84px;
        z-index: 59;
        margin: 0;
        padding: 16px 14px 14px;
        border-radius: 22px 22px 18px 18px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
        max-height: min(68vh, 540px);
        overflow-y: auto;
    }

    .filter-body.filter-sheet.is-mobile-open .filter-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 12px;
    }

    .mobile-pull-indicator:not([hidden]),
    .mobile-system-toast:not([hidden]),
    .mobile-filter-backdrop:not([hidden]),
    .mobile-camera-backdrop:not([hidden]) {
        display: block;
    }

    .mobile-pull-indicator:not([hidden]) {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    .app-content {
        padding-top: 10px !important;
    }

    .filter-inline,
    .filter-body form.row,
    .contract-tabs {
        grid-template-columns: 1fr;
    }

    .contract-inline-field,
    .meta-box {
        grid-template-columns: 1fr;
        display: grid;
        gap: 4px;
    }

    .compact-crud-field {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .contract-inline-field .form-label,
    .meta-box small,
    .compact-crud-field .form-label {
        min-width: 0;
    }

    .adaptive-table tr {
        gap: 8px;
        padding: 10px;
    }

    .mobile-bottom-nav {
        left: 50%;
        width: calc(100vw - 16px);
        bottom: 8px;
        padding: 8px 10px;
        border-radius: 16px;
    }

    .mobile-nav-link {
        min-width: 54px;
        font-size: 0.72rem;
    }

    .section-header > div > small,
    .app-screen-header small,
    .floating-window-title small,
    .compact-show-hero .text-muted,
    .panel-card > .text-muted {
        display: none !important;
    }

    .mobile-search-modal {
        inset: 10px 8px 86px 8px;
        border-radius: 20px;
    }

    .mobile-camera-modal {
        inset: 10px 8px 92px 8px;
        border-radius: 20px;
    }

    .mobile-fab-button {
        right: 12px;
        bottom: 82px;
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    body.one-hand-left .mobile-fab-button {
        left: 12px;
        right: auto;
    }

    .mobile-fab-sheet {
        left: 8px;
        right: 8px;
        bottom: 88px;
        border-radius: 20px;
    }

    .mobile-fab-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }

    .window-control-bar {
        padding-bottom: 6px;
    }

    .window-btn-close {
        width: 30px;
        height: 26px;
        font-size: 0.7rem;
    }

    .filter-body.filter-sheet.is-mobile-open {
        left: 8px;
        right: 8px;
        bottom: 82px;
        border-radius: 20px 20px 16px 16px;
        padding: 14px 12px 12px;
    }

    .app-screen-header {
        padding: 14px !important;
        border-radius: 18px;
    }

    .app-screen-header h4 {
        font-size: 1rem;
    }

    .app-screen-eyebrow {
        font-size: 0.64rem;
    }

    .app-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .app-stat-card {
        padding: 12px;
    }

    .app-stat-card .dashboard-stat {
        font-size: 1.08rem;
    }

    .catalog-content {
        padding: 14px 12px;
    }

    .inline-product-builder {
        padding: 12px;
    }

    .wizard-footer {
        position: sticky;
        bottom: 0;
        z-index: 3;
        padding: 12px 0 0;
        background: linear-gradient(180deg, rgba(244, 248, 252, 0) 0%, rgba(244, 248, 252, 0.96) 26%);
    }

    body.dark-mode .wizard-footer {
        background: linear-gradient(180deg, rgba(8, 15, 28, 0) 0%, rgba(8, 15, 28, 0.96) 26%);
    }

    .mobile-system-toast {
        bottom: 90px;
        max-width: calc(100vw - 24px);
        font-size: 0.82rem;
    }
}

/* CRM moduli uchun pipeline va kartochka stillari */
.crm-kpi-card {
    position: relative;
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.25);
    height: 100%;
}

.crm-kpi-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin-bottom: 6px;
}

.crm-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.crm-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.crm-stage-column {
    border-radius: 14px;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.crm-stage-column.is-drop-target {
    border-color: #0ea5e9;
    background: #ecfeff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.13);
}

.crm-stage-head {
    padding: 12px 14px;
    border-bottom: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.crm-stage-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.crm-stage-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #475569;
}

.crm-stage-cards {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
}

.crm-empty-slot {
    font-size: 0.82rem;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.crm-deal-card {
    border-radius: 12px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    padding: 10px;
    cursor: grab;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.crm-deal-card:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.crm-deal-card.is-dragging {
    opacity: 0.65;
    transform: rotate(1deg);
    cursor: grabbing;
}

.crm-deal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.crm-deal-title {
    font-size: 0.87rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.crm-priority-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 600;
    background: #e2e8f0;
    color: #1e293b;
}

.crm-priority-badge[data-priority="yuqori"] {
    background: #fee2e2;
    color: #b91c1c;
}

.crm-priority-badge[data-priority="normal"] {
    background: #dbeafe;
    color: #1d4ed8;
}

.crm-priority-badge[data-priority="past"] {
    background: #fef3c7;
    color: #92400e;
}

.crm-deal-meta {
    font-size: 0.78rem;
    color: #475569;
    margin-bottom: 6px;
}

.crm-deal-meta strong {
    color: #0f172a;
    font-size: 0.84rem;
}

.crm-deal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.72rem;
    color: #64748b;
}

.crm-stage-sort-table tr.is-dragging {
    opacity: 0.6;
}

.crm-stage-sort-table tr.is-drop-target td {
    background: #ecfeff;
}

.crm-activity-list {
    display: grid;
    gap: 8px;
}

.crm-activity-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.crm-activity-item small {
    color: #64748b;
}

body.dark-mode .crm-kpi-card {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(34, 197, 94, 0.12));
    border-color: rgba(56, 189, 248, 0.3);
}

body.dark-mode .crm-kpi-title {
    color: #94a3b8;
}

body.dark-mode .crm-kpi-value {
    color: #e2e8f0;
}

body.dark-mode .crm-stage-column {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
}

body.dark-mode .crm-stage-column.is-drop-target {
    border-color: rgba(56, 189, 248, 0.8);
    background: rgba(6, 182, 212, 0.15);
}

body.dark-mode .crm-stage-head {
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

body.dark-mode .crm-stage-title,
body.dark-mode .crm-deal-title,
body.dark-mode .crm-deal-meta strong {
    color: #f8fafc;
}

body.dark-mode .crm-stage-meta,
body.dark-mode .crm-deal-meta,
body.dark-mode .crm-deal-foot,
body.dark-mode .crm-empty-slot,
body.dark-mode .crm-activity-item small {
    color: #cbd5e1;
}

body.dark-mode .crm-deal-card,
body.dark-mode .crm-activity-item {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.35);
}

@media (max-width: 991.98px) {
    .crm-stage-grid {
        grid-template-columns: 1fr;
    }
}
.report-builder-shell {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-builder-form .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.report-builder-fields {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 0.9rem;
    background: #ffffff;
}

.report-builder-field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.55rem 0.9rem;
}

.report-builder-field-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: #1e293b;
    user-select: none;
}

.report-builder-field-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.report-builder-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #e2e8f0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.report-builder-table tbody td {
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .report-builder-field-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .report-builder-table tbody td {
        white-space: normal;
    }
}
