html {
    text-rendering: optimizeLegibility;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.crm-app-page {
    padding-bottom: 3.4rem !important;
}

.crm-site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-top: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.crm-site-footer:hover {
    border-top-color: rgba(37, 99, 235, 0.35);
    background: rgba(239, 246, 255, 0.96);
    color: #1d4ed8;
}

.dark .crm-site-footer {
    border-top-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.94);
    color: #cbd5e1;
    box-shadow: none;
}

.dark .crm-site-footer:hover {
    border-top-color: rgba(96, 165, 250, 0.45);
    background: rgba(30, 41, 59, 0.96);
    color: #93c5fd;
}

.country-picker {
    position: relative;
    z-index: 20;
}

.country-picker-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 80;
    overflow: hidden;
    border: 1px solid rgba(147, 197, 253, 0.65);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
}

.country-picker-head {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    color: #475569;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.country-picker-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.35rem;
}

.country-picker-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.7rem;
    padding: 0.62rem 0.75rem;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: left;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.country-picker-option:hover,
.country-picker-option:focus {
    background: #e0f2fe;
    color: #075985;
    outline: none;
}

.country-picker-empty {
    padding: 1rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
}

.dark .country-picker-menu {
    border-color: rgba(59, 130, 246, 0.38);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.dark .country-picker-head {
    border-bottom-color: rgba(51, 65, 85, 0.9);
    color: #94a3b8;
}

.dark .country-picker-option {
    color: #e2e8f0;
}

.dark .country-picker-option:hover,
.dark .country-picker-option:focus {
    background: rgba(37, 99, 235, 0.28);
    color: #bfdbfe;
}

.cnd-inner-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.55rem;
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.88));
}

.cnd-inner-tab {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(147, 197, 253, 0.62);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.86);
    padding: 0.65rem 1rem;
    color: #1e3a8a;
    font-size: 0.88rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.cnd-inner-tab.active {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.cnd-inner-tab span {
    min-width: 1.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    padding: 0.18rem 0.45rem;
    font-size: 0.72rem;
}

.cnd-inner-tab.active span {
    background: rgba(255, 255, 255, 0.2);
}

.cnd-nav-badge {
    display: inline-flex;
    min-width: 1.72rem;
    height: 1.55rem;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    background: #dc2626;
    padding: 0 0.42rem;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16), 0 8px 18px rgba(220, 38, 38, 0.22);
}

.cnd-tab-label-with-badge {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 0.45rem;
}

.cnd-tab-label-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cnd-live-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 242, 242, 0.94));
    padding: 0.95rem 1rem;
    color: #7c2d12;
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.cnd-live-alert p {
    margin: 0;
    font-size: 0.84rem;
}

.cnd-live-alert p + p {
    margin-top: 0.16rem;
    color: #92400e;
    font-weight: 750;
}

.cnd-live-alert-admin {
    border-color: rgba(96, 165, 250, 0.38);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(240, 253, 250, 0.94));
    color: #1e3a8a;
}

.cnd-live-alert-admin p + p {
    color: #1d4ed8;
}

.cnd-status-strip {
    display: flex !important;
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
    max-width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

.cnd-status-strip > span {
    display: inline-flex;
    min-height: 2.2rem;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.cnd-admin-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(112px, 1fr)) !important;
    gap: 0.7rem !important;
}

.cnd-admin-stats-grid > div {
    min-width: 0;
    padding: 0.8rem 0.9rem !important;
}

@media (max-width: 900px) {
    .cnd-status-strip {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .cnd-admin-stats-grid {
        display: flex !important;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .cnd-admin-stats-grid > div {
        flex: 0 0 132px;
    }
}

.cnd-live-dot {
    position: relative;
    margin-top: 0.18rem;
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.52);
    animation: cndPulse 1.35s ease-out infinite;
}

@keyframes cndPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.52);
    }
    75% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.cnd-unread-row {
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(239, 246, 255, 0.72)) !important;
    box-shadow: inset 4px 0 0 #f59e0b;
}

.dark .cnd-unread-row {
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.3), rgba(30, 41, 59, 0.82)) !important;
    box-shadow: inset 4px 0 0 #f59e0b;
}

.cnd-row-notice {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    background: #fef3c7;
    padding: 0.16rem 0.5rem;
    color: #92400e;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dark .cnd-row-notice {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.cnd-review-modal {
    max-height: min(90vh, 920px);
    display: flex;
    flex-direction: column;
}

.cnd-review-header,
.cnd-review-footer {
    flex: 0 0 auto;
}

.cnd-review-scroll {
    flex: 1 1 auto;
}

.cnd-review-panel {
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.cnd-review-controls {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(320px, 1fr) auto;
    gap: 0.8rem;
    align-items: end;
}

.cnd-review-feedback {
    min-height: 54px !important;
    resize: vertical;
}

.cnd-save-review-button {
    display: inline-flex;
    min-width: 128px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: end;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1d4ed8, #dc2626);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.18);
    transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.cnd-save-review-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 28px rgba(37, 99, 235, 0.24);
}

.cnd-save-review-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.dark .cnd-review-panel {
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

@media (max-width: 1023px) {
    .cnd-review-controls {
        grid-template-columns: 1fr;
    }

    .cnd-save-review-button {
        justify-self: stretch;
    }
}

.dark .cnd-inner-tabs {
    border-color: rgba(51, 65, 85, 0.9);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
}

.dark .cnd-live-alert {
    border-color: rgba(245, 158, 11, 0.36);
    background: linear-gradient(135deg, rgba(69, 26, 3, 0.58), rgba(88, 28, 28, 0.34));
    color: #fde68a;
}

.dark .cnd-live-alert p + p {
    color: #fcd34d;
}

.dark .cnd-live-alert-admin {
    border-color: rgba(96, 165, 250, 0.34);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.38), rgba(15, 118, 110, 0.22));
    color: #bfdbfe;
}

.dark .cnd-live-alert-admin p + p {
    color: #93c5fd;
}

.dark .cnd-inner-tab {
    border-color: rgba(51, 65, 85, 0.95);
    background: rgba(15, 23, 42, 0.82);
    color: #bfdbfe;
}

.attendance-report-panel {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.attendance-section-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.4rem;
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 1rem;
    background: rgba(239, 246, 255, 0.82);
}

.attendance-section-tab {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    padding: 0.6rem 1rem;
    color: #1e3a8a;
    font-size: 0.84rem;
    font-weight: 950;
    transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.attendance-section-tab[data-active="true"] {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.attendance-section-tab[data-active="false"]:hover {
    border-color: rgba(147, 197, 253, 0.72);
    background: rgba(255, 255, 255, 0.9);
}

.attendance-daily-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.attendance-daily-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.dark .attendance-section-tabs {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.72);
}

.dark .attendance-section-tab {
    color: #bfdbfe;
}

.dark .attendance-section-tab[data-active="false"]:hover {
    border-color: rgba(71, 85, 105, 0.9);
    background: rgba(30, 41, 59, 0.9);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-enter {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes criticalBlink {
    0%,
    100% {
        background-color: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.5);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 1);
    }
}

.animate-critical-blink {
    animation: criticalBlink 1s infinite;
    border-width: 2px !important;
}

@keyframes broadcastGlow {
    0%,
    100% {
        border-color: #ef4444;
        box-shadow: 0 0 5px #ef4444;
    }
    50% {
        border-color: #f87171;
        box-shadow: 0 0 25px #ef4444;
    }
}

.broadcast-new {
    animation: broadcastGlow 2s infinite;
    border: 2px solid #ef4444 !important;
}

@keyframes marqueeScroll {
    from {
        left: 100%;
        transform: translateX(0);
    }
    to {
        left: 0;
        transform: translateX(-100%);
    }
}

.animate-marquee {
    animation-iteration-count: infinite;
    animation-name: marqueeScroll;
    animation-timing-function: linear;
    cursor: default;
    display: inline-block;
    position: relative;
    white-space: nowrap;
    will-change: left, transform;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

.crm-main-wide {
    position: relative;
    left: 50%;
    width: min(calc(100vw - 1rem), 1880px);
    max-width: none;
    transform: translateX(-50%);
}

.crm-main-wide > header,
.crm-page-card {
    border-radius: 1.25rem !important;
}

.admin-global-search-input {
    min-height: 54px !important;
    padding-left: 3.15rem !important;
    padding-right: 1.25rem !important;
    border-radius: 1rem !important;
    font-size: 0.95rem !important;
}

.admin-global-search-icon {
    left: 1.05rem !important;
    top: 50% !important;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-date-filter {
    min-height: 54px;
    min-width: 330px;
}

.admin-date-filter input[type="date"] {
    width: 155px;
}

.agent-primary-tabs {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: stretch;
    flex-wrap: nowrap !important;
    gap: 0.55rem !important;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    border-color: rgba(147, 197, 253, 0.62) !important;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.12)) top / 100% 3px no-repeat,
        linear-gradient(135deg, rgba(239, 246, 255, 0.97) 0%, rgba(224, 242, 254, 0.94) 52%, rgba(236, 253, 245, 0.92) 100%) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
    scrollbar-width: thin;
}

.agent-primary-tabs::-webkit-scrollbar {
    height: 6px;
}

.agent-primary-tabs::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.28);
    border-radius: 999px;
}

.agent-primary-tabs .crm-tab-button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 54px !important;
    border: 1px solid rgba(147, 197, 253, 0.42) !important;
    border-radius: 1rem !important;
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.96), rgba(219, 234, 254, 0.7)) !important;
    color: #1e293b !important;
    font-size: 0.94rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.agent-primary-tabs .crm-tab-button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.42) !important;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.98), rgba(204, 251, 241, 0.82)) !important;
    color: #0f172a !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

.agent-primary-tabs .crm-tab-button[data-active="true"] {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%) !important;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.agent-primary-tabs .crm-tab-button[data-active="true"]:hover {
    color: #ffffff !important;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.26) !important;
}

.agent-primary-tabs .crm-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .agent-primary-tabs {
    border-color: rgba(30, 64, 175, 0.65) !important;
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.34), rgba(20, 184, 166, 0.2)) top / 100% 3px no-repeat,
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.96) 54%, rgba(15, 118, 110, 0.18) 100%) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(148, 163, 184, 0.15) !important;
}

.dark .agent-primary-tabs .crm-tab-button {
    border-color: rgba(51, 65, 85, 0.9) !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(30, 64, 175, 0.24)) !important;
    color: #cbd5e1 !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(148, 163, 184, 0.12) !important;
}

.dark .agent-primary-tabs .crm-tab-button:hover {
    border-color: rgba(96, 165, 250, 0.5) !important;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.38), rgba(15, 118, 110, 0.24)) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22) !important;
}

.dark .agent-primary-tabs .crm-tab-button[data-active="true"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 48%, #0f766e 100%) !important;
    color: #ffffff !important;
}

.agent-live-pill-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 44px;
    margin-left: auto;
    flex: 1 1 auto;
}

.next-lead-loading-card,
.next-lead-empty-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.95rem;
    min-height: 96px;
    padding: 1.3rem 1.5rem;
    border-radius: 1.15rem;
    text-align: center;
}

.next-lead-loading-card {
    border: 1px solid rgba(37, 99, 235, 0.24);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
        rgba(255, 255, 255, 0.94);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.next-lead-spinner {
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    border: 3px solid rgba(37, 99, 235, 0.16);
    border-top-color: #2563eb;
    border-radius: 999px;
    animation: nextLeadSpin 0.85s linear infinite;
}

.next-lead-loading-title,
.next-lead-empty-title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.2;
}

.next-lead-loading-subtitle,
.next-lead-empty-subtitle {
    margin: 0.28rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.35;
}

.next-lead-empty-card {
    flex-direction: column;
    gap: 0.2rem;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: rgba(248, 250, 252, 0.86);
}

@keyframes nextLeadSpin {
    to {
        transform: rotate(360deg);
    }
}

.dark .next-lead-loading-card {
    border-color: rgba(96, 165, 250, 0.28);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(20, 184, 166, 0.12)),
        rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(148, 163, 184, 0.14);
}

.dark .next-lead-spinner {
    border-color: rgba(96, 165, 250, 0.18);
    border-top-color: #60a5fa;
}

.dark .next-lead-loading-title,
.dark .next-lead-empty-title {
    color: #f8fafc;
}

.dark .next-lead-loading-subtitle,
.dark .next-lead-empty-subtitle {
    color: #94a3b8;
}

.dark .next-lead-empty-card {
    border-color: rgba(71, 85, 105, 0.7);
    background: rgba(15, 23, 42, 0.74);
}

.agent-workspace-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(147, 197, 253, 0.55) !important;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.08)) top / 100% 4px no-repeat,
        linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(239, 246, 255, 0.94) 48%, rgba(240, 253, 250, 0.92) 100%) !important;
    box-shadow: 0 18px 44px rgba(30, 64, 175, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

.agent-workspace-panel #agent-calling-panel {
    color: #0f172a !important;
}

.agent-lead-card {
    border-color: rgba(96, 165, 250, 0.32) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.54) 0%, rgba(239, 246, 255, 0.9) 46%, rgba(236, 253, 245, 0.72) 100%) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.agent-lead-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #14b8a6, #22c55e);
    opacity: 0.82;
    pointer-events: none;
}

.agent-lead-card > .w-full {
    position: relative;
    z-index: 1;
}

.agent-lead-card .lead-action-toolbar {
    border-color: rgba(147, 197, 253, 0.38);
    background: rgba(241, 245, 249, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.agent-lead-card .lead-note-input,
.agent-lead-card .lead-transfer-select {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.dark .agent-workspace-panel {
    border-color: rgba(30, 64, 175, 0.68) !important;
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.28), rgba(20, 184, 166, 0.16)) top / 100% 4px no-repeat,
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.94) 56%, rgba(13, 148, 136, 0.14) 100%) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(148, 163, 184, 0.13) !important;
}

.dark .agent-workspace-panel #agent-calling-panel {
    color: #f8fafc !important;
}

.dark .agent-lead-card {
    border-color: rgba(96, 165, 250, 0.28) !important;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82) 0%, rgba(30, 41, 59, 0.94) 52%, rgba(15, 118, 110, 0.2) 100%) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(148, 163, 184, 0.12) !important;
}

.dark .agent-lead-card .lead-action-toolbar {
    border-color: rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.52);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.dark .agent-lead-card .lead-note-input,
.dark .agent-lead-card .lead-transfer-select {
    background-color: rgba(15, 23, 42, 0.82) !important;
}

.admin-app-shell {
    --admin-sidebar-width: 285px;
    --admin-shell-gap: 1rem;
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
    gap: var(--admin-shell-gap);
    align-items: start;
}

.admin-app-shell.admin-sidebar-hidden {
    --admin-sidebar-width: 76px;
}

.admin-app-shell > header {
    grid-column: 1 / -1;
}

.admin-app-shell > :not(header):not(.admin-tab-sidebar) {
    grid-column: 2;
    min-width: 0;
    align-self: start;
}

.admin-app-shell .ui-surface:not(.mature-panel-card) {
    content-visibility: visible;
    contain-intrinsic-size: 0 0;
}

.admin-tab-sidebar {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 1rem;
    z-index: 30;
    height: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    scrollbar-width: thin;
}

.admin-tab-sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: calc(100vh - 2rem);
    border-right: 1px solid #e5edf7;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 10px 0 28px rgba(15, 23, 42, 0.04);
    pointer-events: none;
}

.admin-tab-sidebar-head {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.15rem 1.05rem 0.95rem;
    border-bottom: 1px solid #eef3f9;
    margin-bottom: 0.7rem;
}

.admin-tab-sidebar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.65rem;
}

.admin-tab-sidebar-logo {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.admin-tab-sidebar-text {
    min-width: 0;
}

.admin-tab-sidebar-title {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.admin-tab-sidebar-subtitle {
    display: block;
    margin-top: 0.25rem;
    color: #8a9ab0;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-sidebar-toggle {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: transparent;
    color: #64748b;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-sidebar-toggle:hover {
    border-color: #d9e7f7;
    background: #f3f8ff;
    color: #075fc0;
}

.admin-sidebar-toggle span {
    display: block;
    position: absolute;
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.admin-sidebar-toggle span:nth-child(1) {
    transform: translateY(-0.34rem);
}

.admin-sidebar-toggle span:nth-child(3) {
    transform: translateY(0.34rem);
}

.admin-tab-sidebar-list {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 0.32rem;
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    padding: 0 0.8rem 1rem;
}

.admin-tab-sidebar .crm-tab-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start !important;
    width: 100%;
    min-height: 44px !important;
    padding: 0.65rem 0.8rem !important;
    border: 1px solid transparent !important;
    border-radius: 0.8rem !important;
    background: transparent !important;
    color: #66758e !important;
    box-shadow: none !important;
    text-align: left;
    font-size: 0.92rem !important;
}

.admin-tab-sidebar .crm-tab-button::before {
    display: none;
}

.admin-tab-sidebar .crm-tab-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    margin-right: 0.75rem;
    color: currentColor;
}

.admin-tab-sidebar .crm-tab-label {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-tab-sidebar .crm-tab-label > span {
    display: inline-flex;
    min-width: 0;
    width: 100%;
    align-items: center;
}

.admin-tab-sidebar .cnd-nav-badge {
    flex: 0 0 auto;
    margin-left: auto;
}

.admin-tab-sidebar .crm-tab-button::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    right: -0.8rem;
    bottom: 0.55rem;
    width: 3px;
    border-radius: 999px 0 0 999px;
    background: transparent;
}

.admin-tab-sidebar .crm-tab-button:hover {
    background: #f4f8fd !important;
    color: #1e3a8a !important;
}

.admin-tab-sidebar .crm-tab-button[data-active="true"] {
    border-color: #d8ecff !important;
    background: #e7f5ff !important;
    color: #075fc0 !important;
    box-shadow: none !important;
}

.admin-tab-sidebar .crm-tab-button[data-active="true"]::after {
    background: #1685f4;
}

.admin-tab-sidebar[data-collapsed="true"] {
    padding: 0;
}

.admin-tab-sidebar[data-collapsed="true"] .admin-tab-sidebar-head {
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem 0.45rem;
}

.admin-tab-sidebar[data-collapsed="true"] .admin-tab-sidebar-logo {
    width: 2rem;
    height: 2rem;
}

.admin-tab-sidebar[data-collapsed="true"] .admin-tab-sidebar-text {
    display: none;
}

.admin-tab-sidebar[data-collapsed="true"] .admin-sidebar-toggle {
    width: 2.35rem;
    height: 2.35rem;
}

.admin-tab-sidebar[data-collapsed="true"] .admin-tab-sidebar-list {
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.45rem 0.75rem;
}

.admin-tab-sidebar[data-collapsed="true"] .crm-tab-button {
    justify-content: center !important;
    width: 2.75rem;
    min-height: 2.75rem !important;
    padding: 0 !important;
    border-radius: 0.9rem !important;
}

.admin-tab-sidebar[data-collapsed="true"] .crm-tab-icon {
    margin-right: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.admin-tab-sidebar[data-collapsed="true"] .crm-tab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.admin-tab-sidebar[data-collapsed="true"] .crm-tab-button::after {
    top: 0.55rem;
    right: -0.45rem;
    bottom: 0.55rem;
}

.dark .admin-tab-sidebar::before {
    border-right-color: #334155;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: none;
}

.dark .admin-tab-sidebar-head {
    border-bottom-color: #273449;
}

.dark .admin-tab-sidebar-title {
    color: #f8fafc;
}

.dark .admin-tab-sidebar-subtitle {
    color: #94a3b8;
}

.dark .admin-sidebar-toggle {
    color: #cbd5e1;
}

.dark .admin-sidebar-toggle:hover {
    border-color: #334155;
    background: rgba(30, 41, 59, 0.85);
    color: #93c5fd;
}

.dark .admin-tab-sidebar .crm-tab-button {
    color: #b7c4d8 !important;
}

.dark .admin-tab-sidebar .crm-tab-button::before {
    border-color: #64748b;
    background: #0f172a;
}

.dark .admin-tab-sidebar .crm-tab-button:hover {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #dbeafe !important;
}

.dark .admin-tab-sidebar .crm-tab-button[data-active="true"] {
    border-color: #1d4ed8 !important;
    background: rgba(14, 116, 255, 0.22) !important;
    color: #93c5fd !important;
}

@media (min-width: 1600px) {
    .crm-main-wide {
        width: calc(100vw - 1.25rem);
    }
}

.mature-panel-card {
    border-radius: 1.25rem !important;
}

.mature-panel-body {
    padding: 0.75rem;
}

.mature-table-wrap {
    max-height: calc(100vh - 245px) !important;
    min-height: 560px;
}

.mature-data-table {
    font-size: 0.8rem !important;
}

.mature-data-table th,
.mature-data-table td {
    padding: 0.55rem 0.65rem !important;
    vertical-align: top;
}

.mature-data-table select,
.mature-data-table button,
.mature-data-table a {
    min-height: 32px !important;
}

.mature-status-row {
    --mature-row-bg: rgba(226, 232, 240, 0.94);
    --mature-row-accent: #64748b;
    box-shadow: inset 4px 0 0 var(--mature-row-accent);
}

.mature-status-row > td {
    background-color: var(--mature-row-bg);
    transition: none !important;
}

.mature-status-row > td:first-child {
    border-left: 4px solid var(--mature-row-accent);
}

.mature-status-row:hover > td {
    background-color: var(--mature-row-bg) !important;
}

.mature-status-row-follow-up {
    --mature-row-bg: rgba(191, 219, 254, 0.86);
    --mature-row-accent: #1d4ed8;
}

.mature-status-row-mature-lead {
    --mature-row-bg: rgba(187, 247, 208, 0.86);
    --mature-row-accent: #047857;
}

.mature-status-row-no-answer {
    --mature-row-bg: rgba(253, 230, 138, 0.9);
    --mature-row-accent: #b45309;
}

.mature-status-row-pending {
    --mature-row-bg: rgba(153, 246, 228, 0.84);
    --mature-row-accent: #0f766e;
}

.mature-status-row-important-customer {
    --mature-row-bg: rgba(221, 214, 254, 0.88);
    --mature-row-accent: #6d28d9;
}

.mature-status-row-not-interested {
    --mature-row-bg: rgba(254, 205, 211, 0.9);
    --mature-row-accent: #be123c;
}

.mature-row-selected > td {
    background-color: rgba(219, 234, 254, 0.98) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.mature-contact-highlight {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.36rem 0.64rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.72));
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.015em;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(37, 99, 235, 0.08);
}

.mature-cm-note-highlight {
    display: inline-flex;
    align-items: flex-start;
    width: fit-content;
    max-width: 380px;
    padding: 0.38rem 0.58rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 0.7rem;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.98), rgba(236, 253, 245, 0.9));
    color: #075985;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.25;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 16px rgba(14, 165, 233, 0.07);
}

.mature-cm-note-highlight.is-empty {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.86);
    color: #94a3b8;
    font-weight: 750;
}

.dark .mature-contact-highlight {
    border-color: rgba(96, 165, 250, 0.32);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(30, 64, 175, 0.28));
    color: #e0f2fe;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.16), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.dark .mature-cm-note-highlight {
    border-color: rgba(45, 212, 191, 0.26);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(20, 83, 45, 0.32));
    color: #a7f3d0;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.14), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.dark .mature-cm-note-highlight.is-empty {
    border-color: rgba(71, 85, 105, 0.5);
    background: rgba(15, 23, 42, 0.78);
    color: #64748b;
}

.dark .mature-status-row {
    --mature-row-bg: rgba(30, 41, 59, 0.92);
    --mature-row-accent: #64748b;
}

.dark .mature-status-row-follow-up {
    --mature-row-bg: rgba(30, 64, 175, 0.42);
    --mature-row-accent: #60a5fa;
}

.dark .mature-status-row-mature-lead {
    --mature-row-bg: rgba(6, 95, 70, 0.42);
    --mature-row-accent: #34d399;
}

.dark .mature-status-row-no-answer {
    --mature-row-bg: rgba(146, 64, 14, 0.44);
    --mature-row-accent: #fbbf24;
}

.dark .mature-status-row-pending {
    --mature-row-bg: rgba(15, 118, 110, 0.42);
    --mature-row-accent: #2dd4bf;
}

.dark .mature-status-row-important-customer {
    --mature-row-bg: rgba(88, 28, 135, 0.46);
    --mature-row-accent: #c084fc;
}

.dark .mature-status-row-not-interested {
    --mature-row-bg: rgba(159, 18, 57, 0.46);
    --mature-row-accent: #fb7185;
}

.dark .mature-row-selected > td {
    background-color: rgba(30, 64, 175, 0.42) !important;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.mature-plan-cell {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .admin-app-shell {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        min-height: 0;
        background: transparent;
    }

    .admin-tab-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border: 1px solid #dbe8f7;
        border-radius: 1rem;
        padding: 0.55rem;
        box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
    }

    .admin-tab-sidebar::before {
        display: none;
    }

    .admin-tab-sidebar-head {
        display: none;
    }

    .admin-tab-sidebar-list {
        flex-direction: row;
        gap: 0.45rem;
        min-width: max-content;
    }

    .admin-tab-sidebar .crm-tab-button {
        width: auto;
        min-height: 40px !important;
        padding: 0.55rem 0.85rem !important;
        justify-content: center !important;
        font-size: 0.84rem !important;
    }

    .admin-tab-sidebar .crm-tab-button::before,
    .admin-tab-sidebar .crm-tab-button::after {
        display: none;
    }

    .dark .admin-tab-sidebar {
        border-color: #334155;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .crm-main-wide {
        width: min(100%, calc(100vw - 0.5rem));
    }

    .admin-date-filter {
        width: 100%;
        min-width: 0;
    }

    .admin-date-filter input[type="date"] {
        flex: 1;
        width: auto;
    }

    .admin-tab-sidebar .crm-tab-button {
        min-height: 38px !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.78rem !important;
    }

    .agent-primary-tabs {
        gap: 0.45rem !important;
        padding: 0.45rem !important;
        border-radius: 1rem !important;
    }

    .agent-primary-tabs .crm-tab-button {
        min-height: 48px !important;
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
        font-size: 0.82rem !important;
    }

    .agent-live-pill-row {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        padding-top: 0.1rem;
    }

    .next-lead-loading-card {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 1rem;
    }

    .next-lead-empty-card {
        padding: 1rem;
    }

    .mature-panel-body {
        padding: 0.55rem;
    }

    .mature-table-wrap {
        max-height: 70vh !important;
        min-height: 420px;
    }
}

.mature-tab-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.mature-tab {
    min-height: 36px !important;
    padding: 0.5rem 0.8rem !important;
    border: 1px solid #d8e1ed;
    border-radius: 0.6rem;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mature-tab:hover {
    border-color: #b7c4d6;
    background: #e8eef7;
    color: #0f172a;
    transform: translateY(-1px);
}

.mature-tab[data-active="true"] {
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.mature-tab[data-tone="blue"][data-active="true"] {
    border-color: #1d4ed8;
    background: #2563eb;
}

.mature-tab[data-tone="amber"] {
    border-color: #f6c453;
    background: #fffbeb;
    color: #92400e;
}

.mature-tab[data-tone="amber"][data-active="true"] {
    border-color: #b45309;
    background: #d97706;
    color: #ffffff;
}

.mature-tab[data-tone="green"] {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #166534;
}

.mature-tab[data-tone="green"][data-active="true"] {
    border-color: #15803d;
    background: #16a34a;
    color: #ffffff;
}

.mature-tab[data-tone="rose"] {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.mature-tab[data-tone="rose"][data-active="true"] {
    border-color: #9f1239;
    background: #be123c;
    color: #ffffff;
}

.mature-tab[data-tone="red"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.mature-tab[data-tone="red"][data-active="true"] {
    border-color: #991b1b;
    background: #b91c1c;
    color: #ffffff;
}

.mature-tab[data-tone="violet"] {
    border-color: #ddd6fe;
    background: #f5f3ff;
    color: #5b21b6;
}

.mature-tab[data-tone="violet"][data-active="true"] {
    border-color: #6d28d9;
    background: #7c3aed;
    color: #ffffff;
}

.dark .mature-tab {
    border-color: #334155;
    background: #1e293b;
    color: #cbd5e1;
}

.dark .mature-tab:hover {
    border-color: #475569;
    background: #27364a;
    color: #f8fafc;
}

.dark .mature-tab[data-tone="amber"] {
    border-color: #92400e;
    background: rgba(146, 64, 14, 0.22);
    color: #fcd34d;
}

.dark .mature-tab[data-tone="green"] {
    border-color: #166534;
    background: rgba(22, 101, 52, 0.22);
    color: #86efac;
}

.dark .mature-tab[data-tone="rose"] {
    border-color: #9f1239;
    background: rgba(159, 18, 57, 0.22);
    color: #fda4af;
}

.dark .mature-tab[data-tone="red"] {
    border-color: #991b1b;
    background: rgba(153, 27, 27, 0.22);
    color: #fca5a5;
}

.dark .mature-tab[data-tone="violet"] {
    border-color: #6d28d9;
    background: rgba(109, 40, 217, 0.22);
    color: #c4b5fd;
}

.crm-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    align-items: end;
    width: 100%;
}

.crm-filter-grid-wide {
    grid-template-columns: repeat(9, minmax(0, 1fr));
}

.crm-filter-grid-admin-mature {
    grid-template-columns: minmax(130px, 0.9fr) minmax(120px, 0.75fr) minmax(120px, 0.75fr) minmax(140px, 0.9fr) minmax(150px, 0.95fr) minmax(260px, 2fr) minmax(100px, 0.65fr);
}

.crm-filter-grid-leads {
    grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 0.8fr) minmax(150px, 1fr) minmax(130px, 0.7fr) minmax(260px, 2fr) minmax(300px, auto);
}

.crm-filter-grid-summary {
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) auto;
}

.crm-filter-grid label {
    margin-bottom: 0.15rem !important;
    line-height: 1.1;
}

.crm-filter-grid > div {
    min-width: 0;
}

.crm-filter-grid input,
.crm-filter-grid select,
.crm-filter-grid button {
    min-height: 34px !important;
    height: 34px;
    font-size: 0.75rem;
}

.crm-filter-grid input,
.crm-filter-grid select {
    width: 100%;
    min-width: 0;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.crm-filter-action-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    justify-content: flex-end;
    align-items: end;
    min-width: 0;
}

.crm-filter-action-row button {
    white-space: nowrap;
    padding: 0.4rem 0.65rem !important;
}

.crm-filter-clear {
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1e40af;
    font-weight: 800;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.crm-filter-clear:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.dark .crm-filter-clear {
    border-color: #475569;
    background: #1e293b;
    color: #93c5fd;
}

.dark .crm-filter-clear:hover {
    background: #334155;
}

@media (max-width: 1380px) {
    .crm-filter-grid-wide {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .crm-filter-search {
        grid-column: span 2;
    }
}

@media (max-width: 1500px) and (min-width: 1201px) {
    .crm-filter-grid-leads {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .crm-filter-grid-leads .crm-filter-search,
    .crm-filter-grid-leads .crm-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 1200px) {
    .crm-filter-grid-leads {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .crm-filter-grid-leads .crm-filter-search,
    .crm-filter-grid-leads .crm-filter-actions {
        grid-column: span 3;
    }

    .crm-filter-action-row {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .crm-filter-grid-admin-mature,
    .crm-filter-grid-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-filter-grid-admin-mature .crm-filter-search,
    .crm-filter-grid-summary .crm-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .crm-filter-grid,
    .crm-filter-grid-wide,
    .crm-filter-grid-leads,
    .crm-filter-grid-admin-mature,
    .crm-filter-grid-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-filter-search,
    .crm-filter-actions {
        grid-column: span 2;
    }

    .crm-filter-action-row {
        flex-wrap: wrap;
    }
}

.mature-report-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.mature-report-chip {
    min-width: 0;
    min-height: 42px !important;
    padding: 0.45rem 0.65rem !important;
}

.mature-report-chip p:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mature-report-chip p:last-child {
    flex-shrink: 0;
    line-height: 1;
}

@media (max-width: 1280px) {
    .mature-report-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .mature-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.lead-action-toolbar,
.lead-status-actions,
.lead-callback-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.lead-status-actions button {
    min-height: 38px !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 0.65rem !important;
}

.lead-action-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto minmax(130px, 160px) auto;
    gap: 0.4rem;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.dark .lead-action-toolbar {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.45);
}

.lead-action-toolbar .lead-note-input,
.lead-action-toolbar .lead-transfer-select,
.lead-action-toolbar .lead-tool-button,
.lead-status-actions .lead-status-button,
.lead-callback-panel .lead-note-input,
.lead-callback-panel .lead-transfer-select,
.lead-callback-panel .lead-tool-button {
    min-height: 38px !important;
}

.lead-action-toolbar .lead-note-input {
    min-width: 0 !important;
}

.lead-action-toolbar .lead-transfer-select {
    width: 150px;
    min-width: 130px;
}

.lead-action-toolbar .lead-tool-button,
.lead-callback-panel .lead-tool-button {
    padding: 0.45rem 0.75rem !important;
    white-space: nowrap;
}

.lead-status-actions {
    gap: 0.4rem;
}

.lead-status-actions .lead-status-button {
    padding: 0.45rem 0.75rem !important;
    border-radius: 0.65rem !important;
}

.lead-callback-panel {
    padding: 0.5rem !important;
}

@media (max-width: 640px) {
    .lead-action-toolbar input,
    .lead-callback-panel input {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .lead-action-toolbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .lead-action-toolbar .lead-note-input {
        grid-column: 1 / -1;
    }

    .lead-action-toolbar .lead-transfer-select {
        width: 100%;
        grid-column: 1 / 3;
    }
}

input,
select,
button {
    min-height: 44px;
}

.ui-surface {
    content-visibility: auto;
    contain-intrinsic-size: 1px 320px;
}

.ui-scrollable {
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.overflow-x-auto,
.overflow-y-auto {
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* iOS glass theme: final visual layer, intentionally scoped to the CRM body. */
.crm-ios-glass-theme {
    --ios-text: #132238;
    --ios-muted: #5f7188;
    --ios-soft: #8aa0b8;
    --ios-blue: #007aff;
    --ios-blue-deep: #0a4fd8;
    --ios-teal: #00a6a6;
    --ios-green: #34c759;
    --ios-orange: #ff9500;
    --ios-red: #ff3b30;
    --ios-purple: #af52de;
    --ios-page-bg:
        linear-gradient(150deg, rgba(255, 255, 255, 0.82) 0%, rgba(237, 248, 255, 0.68) 34%, rgba(240, 253, 247, 0.64) 67%, rgba(255, 245, 248, 0.72) 100%),
        linear-gradient(180deg, #f7fbff 0%, #edf6ff 50%, #f9fbff 100%);
    --ios-glass-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48));
    --ios-glass-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(247, 251, 255, 0.56));
    --ios-glass-subtle: rgba(255, 255, 255, 0.44);
    --ios-glass-border: rgba(255, 255, 255, 0.72);
    --ios-hairline: rgba(116, 149, 185, 0.25);
    --ios-input-bg: rgba(255, 255, 255, 0.66);
    --ios-input-border: rgba(118, 163, 209, 0.34);
    --ios-table-head: rgba(234, 244, 255, 0.64);
    --ios-table-row: rgba(255, 255, 255, 0.28);
    --ios-shadow: 0 22px 55px rgba(46, 76, 119, 0.13), 0 6px 18px rgba(20, 58, 99, 0.06);
    --ios-shadow-soft: 0 12px 28px rgba(46, 76, 119, 0.1);
    --ios-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    --ios-blur: blur(22px) saturate(1.6);
    background: var(--ios-page-bg) !important;
    color: var(--ios-text);
}

.dark .crm-ios-glass-theme,
.crm-ios-glass-theme.dark {
    --ios-text: #f6f8fb;
    --ios-muted: #b8c3d3;
    --ios-soft: #8391a5;
    --ios-blue: #0a84ff;
    --ios-blue-deep: #5e9bff;
    --ios-teal: #64d2ff;
    --ios-green: #30d158;
    --ios-orange: #ff9f0a;
    --ios-red: #ff453a;
    --ios-purple: #bf5af2;
    --ios-page-bg:
        linear-gradient(155deg, rgba(8, 13, 24, 0.98) 0%, rgba(12, 19, 34, 0.96) 44%, rgba(18, 24, 40, 0.98) 100%),
        linear-gradient(180deg, #05070d 0%, #0b1220 58%, #111827 100%);
    --ios-glass-surface: linear-gradient(145deg, rgba(31, 41, 59, 0.62), rgba(8, 13, 24, 0.52));
    --ios-glass-panel: linear-gradient(145deg, rgba(36, 48, 70, 0.72), rgba(13, 20, 34, 0.58));
    --ios-glass-subtle: rgba(14, 22, 37, 0.44);
    --ios-glass-border: rgba(255, 255, 255, 0.13);
    --ios-hairline: rgba(199, 215, 255, 0.14);
    --ios-input-bg: rgba(13, 20, 34, 0.66);
    --ios-input-border: rgba(186, 205, 238, 0.17);
    --ios-table-head: rgba(28, 41, 61, 0.74);
    --ios-table-row: rgba(255, 255, 255, 0.035);
    --ios-shadow: 0 24px 58px rgba(0, 0, 0, 0.38), 0 8px 18px rgba(0, 0, 0, 0.2);
    --ios-shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.28);
    --ios-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    background: var(--ios-page-bg) !important;
    color: var(--ios-text);
}

html,
body.crm-ios-glass-theme {
    min-height: 100%;
}

body.crm-ios-glass-theme {
    background-attachment: fixed !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.crm-ios-glass-theme .crm-app-page {
    background: transparent !important;
    color: var(--ios-text) !important;
}

.crm-ios-glass-theme .crm-main-wide {
    isolation: isolate;
}

.crm-ios-glass-theme :is(.crm-main-wide > header, .crm-page-card, .mature-panel-card, .agent-workspace-panel, .agent-primary-tabs, .crm-site-footer, .country-picker-menu, .cnd-review-modal, .crm-modal-overlay > div, .toast-enter > div) {
    border-color: var(--ios-glass-border) !important;
    background: var(--ios-glass-panel) !important;
    box-shadow: var(--ios-shadow), var(--ios-inner-highlight) !important;
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
}

.crm-ios-glass-theme :is(.crm-filter-grid, .attendance-section-tabs, .cnd-inner-tabs, .lead-action-toolbar, .lead-callback-panel, .next-lead-loading-card, .next-lead-empty-card, .admin-date-filter, .admin-global-search > div.absolute, .overflow-x-auto.rounded-2xl, .overflow-y-auto.rounded-2xl) {
    border-color: var(--ios-hairline) !important;
    background: var(--ios-glass-surface) !important;
    box-shadow: var(--ios-shadow-soft), var(--ios-inner-highlight) !important;
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
}

.crm-ios-glass-theme .admin-tab-sidebar::before {
    border-right-color: var(--ios-hairline) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.42)) !important;
    box-shadow: 14px 0 38px rgba(46, 76, 119, 0.09), inset -1px 0 0 rgba(255, 255, 255, 0.62) !important;
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
}

.dark .crm-ios-glass-theme .admin-tab-sidebar::before {
    background: linear-gradient(180deg, rgba(22, 31, 48, 0.68), rgba(8, 13, 24, 0.48)) !important;
    box-shadow: 14px 0 42px rgba(0, 0, 0, 0.25), inset -1px 0 0 rgba(255, 255, 255, 0.08) !important;
}

.crm-ios-glass-theme :is(.crm-page-card, .mature-panel-card, .agent-workspace-panel, .crm-main-wide > header) {
    border-radius: 1.35rem !important;
}

.crm-ios-glass-theme .crm-site-footer {
    min-height: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 251, 255, 0.52)) !important;
    color: var(--ios-muted);
}

.dark .crm-ios-glass-theme .crm-site-footer {
    background: linear-gradient(145deg, rgba(21, 28, 42, 0.78), rgba(8, 13, 24, 0.62)) !important;
    color: #d8e1ef;
}

.crm-ios-glass-theme .crm-site-footer:hover {
    color: var(--ios-blue);
    border-top-color: rgba(10, 132, 255, 0.38) !important;
}

.crm-ios-glass-theme :is(input, select, textarea) {
    border-color: var(--ios-input-border) !important;
    background: var(--ios-input-bg) !important;
    color: var(--ios-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(12px) saturate(1.35);
    -webkit-backdrop-filter: blur(12px) saturate(1.35);
}

.dark .crm-ios-glass-theme :is(input, select, textarea) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.crm-ios-glass-theme :is(input, select, textarea)::placeholder {
    color: color-mix(in srgb, var(--ios-muted) 74%, transparent);
}

.crm-ios-glass-theme :is(input, select, textarea):focus {
    border-color: color-mix(in srgb, var(--ios-blue) 70%, white) !important;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.crm-ios-glass-theme button {
    backdrop-filter: blur(12px) saturate(1.35);
    -webkit-backdrop-filter: blur(12px) saturate(1.35);
}

.crm-ios-glass-theme :is(.crm-tab-button, .mature-tab, .attendance-section-tab, .cnd-inner-tab) {
    border-color: var(--ios-hairline) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.24)) !important;
    color: var(--ios-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 8px 20px rgba(46, 76, 119, 0.06) !important;
}

.dark .crm-ios-glass-theme :is(.crm-tab-button, .mature-tab, .attendance-section-tab, .cnd-inner-tab) {
    background: linear-gradient(145deg, rgba(38, 51, 74, 0.62), rgba(13, 20, 34, 0.38)) !important;
    color: #dbe7f7 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.crm-ios-glass-theme .crm-tab-button[data-active="true"],
.crm-ios-glass-theme .attendance-section-tab[data-active="true"],
.crm-ios-glass-theme .cnd-inner-tab.active {
    border-color: rgba(255, 255, 255, 0.34) !important;
    background: linear-gradient(135deg, #0b1f4d 0%, var(--ios-blue) 54%, var(--ios-teal) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 18px 34px rgba(10, 132, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.dark .crm-ios-glass-theme .crm-tab-button[data-active="true"],
.dark .crm-ios-glass-theme .attendance-section-tab[data-active="true"],
.dark .crm-ios-glass-theme .cnd-inner-tab.active {
    background: linear-gradient(135deg, #0a84ff 0%, #3b7cff 46%, #30d158 100%) !important;
    box-shadow: 0 18px 34px rgba(10, 132, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.crm-ios-glass-theme .agent-primary-tabs {
    padding: 0.55rem !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(235, 249, 255, 0.44)) !important;
}

.dark .crm-ios-glass-theme .agent-primary-tabs {
    background:
        linear-gradient(145deg, rgba(27, 39, 59, 0.72), rgba(9, 15, 26, 0.52)) !important;
}

.crm-ios-glass-theme .agent-primary-tabs .crm-tab-button:not([data-active="true"]) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)) !important;
}

.crm-ios-glass-theme .agent-primary-tabs .crm-tab-button:not([data-active="true"]):hover {
    border-color: rgba(10, 132, 255, 0.32) !important;
    background: linear-gradient(145deg, rgba(240, 249, 255, 0.82), rgba(236, 253, 245, 0.5)) !important;
}

.dark .crm-ios-glass-theme .agent-primary-tabs .crm-tab-button:not([data-active="true"]):hover {
    background: linear-gradient(145deg, rgba(38, 58, 89, 0.72), rgba(20, 83, 69, 0.34)) !important;
}

.crm-ios-glass-theme .admin-tab-sidebar .crm-tab-button:hover {
    background: rgba(255, 255, 255, 0.36) !important;
    color: var(--ios-blue-deep) !important;
}

.crm-ios-glass-theme .admin-tab-sidebar .crm-tab-button[data-active="true"] {
    border-color: rgba(10, 132, 255, 0.24) !important;
    background: rgba(219, 240, 255, 0.54) !important;
    color: var(--ios-blue-deep) !important;
}

.dark .crm-ios-glass-theme .admin-tab-sidebar .crm-tab-button:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #eaf3ff !important;
}

.dark .crm-ios-glass-theme .admin-tab-sidebar .crm-tab-button[data-active="true"] {
    border-color: rgba(10, 132, 255, 0.38) !important;
    background: rgba(10, 132, 255, 0.18) !important;
    color: #dbeafe !important;
}

.crm-ios-glass-theme .admin-tab-sidebar .crm-tab-button[data-active="true"]::after {
    background: var(--ios-blue) !important;
}

.crm-ios-glass-theme .admin-tab-sidebar-head {
    border-bottom-color: var(--ios-hairline) !important;
}

.crm-ios-glass-theme .admin-tab-sidebar-title,
.crm-ios-glass-theme h1,
.crm-ios-glass-theme h2,
.crm-ios-glass-theme h3 {
    color: var(--ios-text);
}

.crm-ios-glass-theme :is(p, label, td, th, span, div) {
    border-color: var(--ios-hairline);
}

.crm-ios-glass-theme :is(table) {
    background: transparent !important;
}

.crm-ios-glass-theme thead {
    background: var(--ios-table-head) !important;
    color: var(--ios-text) !important;
}

.crm-ios-glass-theme tbody tr:not(.mature-status-row):not(.cnd-unread-row) {
    background: var(--ios-table-row);
}

.crm-ios-glass-theme tbody tr:not(.mature-status-row):hover {
    background: rgba(255, 255, 255, 0.38) !important;
}

.dark .crm-ios-glass-theme tbody tr:not(.mature-status-row):hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

.crm-ios-glass-theme :is(.mature-status-row-follow-up, .mature-status-row-mature-lead, .mature-status-row-no-answer, .mature-status-row-pending, .mature-status-row-important-customer, .mature-status-row-not-interested) > td {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
}

.dark .crm-ios-glass-theme :is(.mature-status-row-follow-up, .mature-status-row-mature-lead, .mature-status-row-no-answer, .mature-status-row-pending, .mature-status-row-important-customer, .mature-status-row-not-interested) > td {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.crm-ios-glass-theme .mature-contact-highlight,
.crm-ios-glass-theme .mature-cm-note-highlight,
.crm-ios-glass-theme .mature-report-chip,
.crm-ios-glass-theme .cnd-live-alert,
.crm-ios-glass-theme .attendance-report-panel {
    border-color: var(--ios-hairline) !important;
    background: var(--ios-glass-surface) !important;
    box-shadow: var(--ios-shadow-soft), var(--ios-inner-highlight) !important;
    backdrop-filter: blur(16px) saturate(1.45);
    -webkit-backdrop-filter: blur(16px) saturate(1.45);
}

.crm-ios-glass-theme .mature-contact-highlight {
    color: #08366f !important;
    font-weight: 950;
}

.dark .crm-ios-glass-theme .mature-contact-highlight {
    color: #dbeafe !important;
}

.crm-ios-glass-theme .mature-cm-note-highlight {
    color: #075985 !important;
}

.dark .crm-ios-glass-theme .mature-cm-note-highlight {
    color: #b7f7ee !important;
}

.crm-ios-glass-theme .cnd-nav-badge {
    min-width: 1.85rem;
    height: 1.65rem;
    background: linear-gradient(135deg, var(--ios-red), #d70015) !important;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.15), 0 10px 22px rgba(255, 59, 48, 0.28) !important;
}

.crm-ios-glass-theme .cnd-save-review-button,
.crm-ios-glass-theme .cnd-inner-tab.active {
    background: linear-gradient(135deg, var(--ios-blue), var(--ios-purple), var(--ios-red)) !important;
}

.crm-ios-glass-theme .Stat,
.crm-ios-glass-theme article {
    border-color: var(--ios-glass-border) !important;
}

.crm-ios-glass-theme .crm-main-wide article {
    background: var(--ios-glass-panel) !important;
    box-shadow: var(--ios-shadow-soft), var(--ios-inner-highlight) !important;
    backdrop-filter: var(--ios-blur);
    -webkit-backdrop-filter: var(--ios-blur);
}

.crm-ios-glass-theme .admin-dashboard-top .rounded-2xl,
.crm-ios-glass-theme .mature-panel-card .rounded-2xl,
.crm-ios-glass-theme .agent-workspace-panel .rounded-2xl {
    border-color: var(--ios-hairline);
}

.crm-ios-glass-theme .next-lead-spinner {
    border-color: rgba(10, 132, 255, 0.16);
    border-top-color: var(--ios-blue);
}

.dark .crm-ios-glass-theme .next-lead-spinner {
    border-color: rgba(100, 210, 255, 0.18);
    border-top-color: var(--ios-teal);
}

@media (max-width: 1180px) {
    .crm-ios-glass-theme .admin-tab-sidebar {
        background: var(--ios-glass-panel) !important;
        backdrop-filter: var(--ios-blur);
        -webkit-backdrop-filter: var(--ios-blur);
    }
}

/* Glass correction pass: keep titles colorful, make surfaces clearer, and color only CM Status controls. */
.crm-ios-glass-theme {
    --ios-glass-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.24));
    --ios-glass-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(244, 251, 255, 0.32));
    --ios-glass-border: rgba(255, 255, 255, 0.64);
    --ios-input-bg: rgba(255, 255, 255, 0.46);
    --ios-table-row: rgba(255, 255, 255, 0.18);
    --ios-shadow: 0 24px 60px rgba(36, 62, 101, 0.14), 0 8px 22px rgba(10, 38, 76, 0.08);
}

.dark .crm-ios-glass-theme,
.crm-ios-glass-theme.dark {
    --ios-glass-surface: linear-gradient(145deg, rgba(42, 55, 79, 0.48), rgba(8, 13, 24, 0.34));
    --ios-glass-panel: linear-gradient(145deg, rgba(42, 55, 79, 0.56), rgba(8, 13, 24, 0.38));
    --ios-input-bg: rgba(13, 20, 34, 0.5);
    --ios-table-row: rgba(255, 255, 255, 0.028);
}

.crm-ios-glass-theme :is(.crm-main-wide > header, .crm-page-card, .mature-panel-card, .agent-workspace-panel, .agent-primary-tabs, .crm-site-footer, .country-picker-menu, .cnd-review-modal, .crm-modal-overlay > div, .toast-enter > div) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.06)),
        var(--ios-glass-panel) !important;
    outline: 1px solid rgba(255, 255, 255, 0.32);
}

.dark .crm-ios-glass-theme :is(.crm-main-wide > header, .crm-page-card, .mature-panel-card, .agent-workspace-panel, .agent-primary-tabs, .crm-site-footer, .country-picker-menu, .cnd-review-modal, .crm-modal-overlay > div, .toast-enter > div) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.015)),
        var(--ios-glass-panel) !important;
    outline-color: rgba(255, 255, 255, 0.08);
}

.crm-ios-glass-theme .bg-clip-text.text-transparent,
.crm-ios-glass-theme h1.bg-clip-text,
.crm-ios-glass-theme h1.text-transparent {
    background-image: linear-gradient(90deg, #072b83 0%, #007aff 38%, #039d91 66%, #e11d2e 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

.dark .crm-ios-glass-theme .bg-clip-text.text-transparent,
.dark .crm-ios-glass-theme h1.bg-clip-text,
.dark .crm-ios-glass-theme h1.text-transparent {
    background-image: linear-gradient(90deg, #64d2ff 0%, #0a84ff 34%, #30d158 66%, #ff453a 100%) !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

.crm-ios-glass-theme .mature-status-row {
    box-shadow: none !important;
}

.crm-ios-glass-theme .mature-status-row > td {
    background-color: var(--ios-table-row) !important;
    background-image: none !important;
    transition: none !important;
}

.crm-ios-glass-theme .mature-status-row > td:first-child {
    border-left: 0 !important;
}

.crm-ios-glass-theme .mature-status-row:hover > td {
    background-color: var(--ios-table-row) !important;
    background-image: none !important;
}

.crm-ios-glass-theme .mature-status-row select,
.crm-ios-glass-theme .mature-status-row .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(241, 245, 249, 0.88);
    --cm-bg-2: rgba(226, 232, 240, 0.6);
    --cm-border: rgba(100, 116, 139, 0.34);
    --cm-text: #334155;
    --cm-glow: rgba(100, 116, 139, 0.14);
    border-color: var(--cm-border) !important;
    background: linear-gradient(145deg, var(--cm-bg-1), var(--cm-bg-2)) !important;
    color: var(--cm-text) !important;
    font-weight: 950 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 22px var(--cm-glow) !important;
    backdrop-filter: blur(14px) saturate(1.45);
    -webkit-backdrop-filter: blur(14px) saturate(1.45);
}

.crm-ios-glass-theme .mature-status-row-follow-up select,
.crm-ios-glass-theme .mature-status-row-follow-up .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(219, 239, 255, 0.94);
    --cm-bg-2: rgba(169, 211, 255, 0.72);
    --cm-border: rgba(0, 122, 255, 0.46);
    --cm-text: #073b7a;
    --cm-glow: rgba(0, 122, 255, 0.18);
}

.crm-ios-glass-theme .mature-status-row-mature-lead select,
.crm-ios-glass-theme .mature-status-row-mature-lead .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(220, 252, 231, 0.94);
    --cm-bg-2: rgba(134, 239, 172, 0.68);
    --cm-border: rgba(52, 199, 89, 0.48);
    --cm-text: #07572a;
    --cm-glow: rgba(52, 199, 89, 0.18);
}

.crm-ios-glass-theme .mature-status-row-no-answer select,
.crm-ios-glass-theme .mature-status-row-no-answer .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(255, 247, 214, 0.96);
    --cm-bg-2: rgba(255, 214, 102, 0.72);
    --cm-border: rgba(255, 149, 0, 0.5);
    --cm-text: #7a3d00;
    --cm-glow: rgba(255, 149, 0, 0.18);
}

.crm-ios-glass-theme .mature-status-row-pending select,
.crm-ios-glass-theme .mature-status-row-pending .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(204, 251, 241, 0.94);
    --cm-bg-2: rgba(94, 234, 212, 0.64);
    --cm-border: rgba(0, 166, 166, 0.5);
    --cm-text: #07575a;
    --cm-glow: rgba(0, 166, 166, 0.18);
}

.crm-ios-glass-theme .mature-status-row-important-customer select,
.crm-ios-glass-theme .mature-status-row-important-customer .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(243, 232, 255, 0.95);
    --cm-bg-2: rgba(216, 180, 254, 0.66);
    --cm-border: rgba(175, 82, 222, 0.5);
    --cm-text: #5b1586;
    --cm-glow: rgba(175, 82, 222, 0.18);
}

.crm-ios-glass-theme .mature-status-row-not-interested select,
.crm-ios-glass-theme .mature-status-row-not-interested .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(255, 228, 230, 0.96);
    --cm-bg-2: rgba(253, 164, 175, 0.66);
    --cm-border: rgba(255, 59, 48, 0.48);
    --cm-text: #8f1620;
    --cm-glow: rgba(255, 59, 48, 0.18);
}

.dark .crm-ios-glass-theme .mature-status-row select,
.dark .crm-ios-glass-theme .mature-status-row .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(45, 55, 72, 0.7);
    --cm-bg-2: rgba(15, 23, 42, 0.48);
    --cm-border: rgba(148, 163, 184, 0.28);
    --cm-text: #e2e8f0;
    --cm-glow: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px var(--cm-glow) !important;
}

.dark .crm-ios-glass-theme .mature-status-row-follow-up select,
.dark .crm-ios-glass-theme .mature-status-row-follow-up .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(10, 132, 255, 0.34);
    --cm-bg-2: rgba(10, 64, 140, 0.4);
    --cm-border: rgba(100, 210, 255, 0.42);
    --cm-text: #dbeafe;
}

.dark .crm-ios-glass-theme .mature-status-row-mature-lead select,
.dark .crm-ios-glass-theme .mature-status-row-mature-lead .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(48, 209, 88, 0.28);
    --cm-bg-2: rgba(12, 92, 47, 0.4);
    --cm-border: rgba(48, 209, 88, 0.4);
    --cm-text: #dcfce7;
}

.dark .crm-ios-glass-theme .mature-status-row-no-answer select,
.dark .crm-ios-glass-theme .mature-status-row-no-answer .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(255, 159, 10, 0.3);
    --cm-bg-2: rgba(120, 60, 0, 0.4);
    --cm-border: rgba(255, 214, 10, 0.4);
    --cm-text: #fef3c7;
}

.dark .crm-ios-glass-theme .mature-status-row-pending select,
.dark .crm-ios-glass-theme .mature-status-row-pending .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(100, 210, 255, 0.28);
    --cm-bg-2: rgba(12, 83, 90, 0.42);
    --cm-border: rgba(100, 210, 255, 0.4);
    --cm-text: #ccfbf1;
}

.dark .crm-ios-glass-theme .mature-status-row-important-customer select,
.dark .crm-ios-glass-theme .mature-status-row-important-customer .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(191, 90, 242, 0.3);
    --cm-bg-2: rgba(77, 29, 107, 0.42);
    --cm-border: rgba(191, 90, 242, 0.42);
    --cm-text: #f3e8ff;
}

.dark .crm-ios-glass-theme .mature-status-row-not-interested select,
.dark .crm-ios-glass-theme .mature-status-row-not-interested .inline-flex.w-fit.rounded-xl {
    --cm-bg-1: rgba(255, 69, 58, 0.3);
    --cm-bg-2: rgba(115, 22, 31, 0.42);
    --cm-border: rgba(255, 105, 97, 0.42);
    --cm-text: #ffe4e6;
}

/* Glass depth pass: modal/history/table surfaces should read like real iPhone frosted glass. */
body.crm-ios-glass-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(0, 122, 255, 0.14) 0%, transparent 28%),
        linear-gradient(245deg, rgba(52, 199, 89, 0.12) 0%, transparent 34%),
        linear-gradient(18deg, rgba(255, 59, 48, 0.1) 0%, transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(233, 246, 255, 0.56));
}

.dark body.crm-ios-glass-theme::before,
body.crm-ios-glass-theme.dark::before {
    background:
        linear-gradient(115deg, rgba(10, 132, 255, 0.18) 0%, transparent 32%),
        linear-gradient(245deg, rgba(48, 209, 88, 0.12) 0%, transparent 36%),
        linear-gradient(18deg, rgba(191, 90, 242, 0.14) 0%, transparent 34%),
        linear-gradient(180deg, rgba(7, 12, 23, 0.96), rgba(10, 17, 31, 0.98));
}

.crm-ios-glass-theme .crm-modal-overlay {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.38), rgba(30, 41, 59, 0.2)),
        rgba(15, 23, 42, 0.24) !important;
    backdrop-filter: blur(32px) saturate(1.8) !important;
    -webkit-backdrop-filter: blur(32px) saturate(1.8) !important;
}

.crm-ios-glass-theme .crm-modal-overlay > div {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.66) !important;
    background: rgba(255, 255, 255, 0.34) !important;
    box-shadow:
        0 34px 80px rgba(12, 30, 58, 0.34),
        0 10px 28px rgba(12, 30, 58, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 -1px 0 rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(30px) saturate(1.95) brightness(1.03) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.95) brightness(1.03) !important;
}

.crm-ios-glass-theme .crm-modal-overlay > div::before {
    content: "";
    position: absolute;
    inset: -38%;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(122deg, rgba(0, 122, 255, 0.24) 0%, rgba(0, 122, 255, 0) 42%),
        linear-gradient(236deg, rgba(52, 199, 89, 0.19) 0%, rgba(52, 199, 89, 0) 44%),
        linear-gradient(16deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 59, 48, 0) 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
    filter: blur(28px);
    opacity: 0.95;
    transform: rotate(-2deg);
}

.crm-ios-glass-theme .crm-modal-overlay > div > *,
.crm-ios-glass-theme .crm-modal-overlay > div > form > * {
    position: relative;
    z-index: 1;
}

.crm-ios-glass-theme .crm-modal-overlay > div > div,
.crm-ios-glass-theme .crm-modal-overlay > div > form > div {
    border-color: rgba(255, 255, 255, 0.34) !important;
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(24px) saturate(1.65) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.65) !important;
}

.crm-ios-glass-theme .crm-modal-overlay > div > div:first-child,
.crm-ios-glass-theme .crm-modal-overlay > div > form > div:first-child,
.crm-ios-glass-theme .cnd-review-header {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.18)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.crm-ios-glass-theme .crm-modal-overlay > div > div:last-child,
.crm-ios-glass-theme .crm-modal-overlay > div > form > div:last-child,
.crm-ios-glass-theme .cnd-review-footer {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.14)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.crm-ios-glass-theme .crm-modal-overlay :is(div.rounded-2xl, div.rounded-xl):not(.inline-flex),
.crm-ios-glass-theme .crm-modal-overlay :is(table, thead, tbody, tr, td, th) {
    border-color: rgba(255, 255, 255, 0.32) !important;
    background-color: transparent !important;
}

.crm-ios-glass-theme .crm-modal-overlay div.rounded-2xl:not(.inline-flex),
.crm-ios-glass-theme .crm-modal-overlay div.rounded-xl:not(.inline-flex) {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 12px 26px rgba(24, 54, 91, 0.11) !important;
    backdrop-filter: blur(20px) saturate(1.7) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.7) !important;
}

.crm-ios-glass-theme .crm-modal-overlay table {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 28px rgba(24, 54, 91, 0.1) !important;
    backdrop-filter: blur(20px) saturate(1.65) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.65) !important;
}

.crm-ios-glass-theme .crm-modal-overlay thead {
    background: linear-gradient(145deg, rgba(235, 246, 255, 0.62), rgba(255, 255, 255, 0.24)) !important;
}

.crm-ios-glass-theme .crm-modal-overlay tbody tr {
    background: rgba(255, 255, 255, 0.12) !important;
}

.crm-ios-glass-theme .crm-modal-overlay tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.2) !important;
}

.crm-ios-glass-theme .crm-modal-overlay tbody tr:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.crm-ios-glass-theme .crm-modal-overlay :is(.text-slate-800, .text-slate-900) {
    color: #132238 !important;
}

.crm-ios-glass-theme .crm-modal-overlay :is(.text-slate-500, .text-slate-600, .text-slate-700) {
    color: #40536c !important;
}

.crm-ios-glass-theme .crm-modal-overlay .text-blue-600 {
    color: #0066f5 !important;
}

.crm-ios-glass-theme .crm-modal-overlay button:not(.cnd-save-review-button) {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 12px 24px rgba(24, 54, 91, 0.1);
}

.dark .crm-ios-glass-theme .crm-modal-overlay {
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.58), rgba(15, 23, 42, 0.34)),
        rgba(2, 6, 23, 0.34) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay > div {
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(10, 16, 29, 0.48) !important;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.55),
        0 10px 28px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay > div::before {
    background:
        linear-gradient(122deg, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0) 44%),
        linear-gradient(236deg, rgba(48, 209, 88, 0.13) 0%, rgba(48, 209, 88, 0) 44%),
        linear-gradient(16deg, rgba(191, 90, 242, 0.15) 0%, rgba(191, 90, 242, 0) 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    opacity: 0.9;
}

.dark .crm-ios-glass-theme .crm-modal-overlay > div > div,
.dark .crm-ios-glass-theme .crm-modal-overlay > div > form > div {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(11, 18, 32, 0.28) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay > div > div:first-child,
.dark .crm-ios-glass-theme .crm-modal-overlay > div > form > div:first-child,
.dark .crm-ios-glass-theme .cnd-review-header {
    background: linear-gradient(145deg, rgba(48, 63, 90, 0.46), rgba(8, 13, 24, 0.2)) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay > div > div:last-child,
.dark .crm-ios-glass-theme .crm-modal-overlay > div > form > div:last-child,
.dark .crm-ios-glass-theme .cnd-review-footer {
    background: linear-gradient(145deg, rgba(48, 63, 90, 0.34), rgba(8, 13, 24, 0.18)) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay div.rounded-2xl:not(.inline-flex),
.dark .crm-ios-glass-theme .crm-modal-overlay div.rounded-xl:not(.inline-flex) {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: linear-gradient(145deg, rgba(42, 55, 79, 0.42), rgba(8, 13, 24, 0.2)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.24) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay table {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(8, 13, 24, 0.22) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay thead {
    background: linear-gradient(145deg, rgba(56, 72, 100, 0.5), rgba(15, 23, 42, 0.22)) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay tbody tr {
    background: rgba(255, 255, 255, 0.035) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.055) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay tbody tr:hover {
    background: rgba(255, 255, 255, 0.085) !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay :is(.text-slate-800, .text-slate-900, .text-slate-100, .text-slate-200) {
    color: #f6f8fb !important;
}

.dark .crm-ios-glass-theme .crm-modal-overlay :is(.text-slate-500, .text-slate-600, .text-slate-700, .text-slate-300, .text-slate-400) {
    color: #b8c3d3 !important;
}

/* Chrome UI audit pass: denser glass layout, static rows, and status-only colors. */
.crm-ios-glass-theme {
    --ios-glass-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(232, 246, 255, 0.38));
    --ios-glass-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(230, 247, 255, 0.36));
    --ios-glass-border: rgba(255, 255, 255, 0.76);
    --ios-input-bg: rgba(255, 255, 255, 0.62);
    --ios-table-row: rgba(255, 255, 255, 0.22);
}

.dark .crm-ios-glass-theme,
.crm-ios-glass-theme.dark {
    --ios-glass-surface: linear-gradient(145deg, rgba(36, 48, 70, 0.72), rgba(8, 13, 24, 0.42));
    --ios-glass-panel: linear-gradient(145deg, rgba(42, 55, 79, 0.74), rgba(8, 13, 24, 0.46));
    --ios-input-bg: rgba(15, 23, 42, 0.62);
    --ios-table-row: rgba(255, 255, 255, 0.04);
}

.crm-ios-glass-theme :is(.crm-main-wide > header, .crm-page-card, .mature-panel-card, .agent-workspace-panel, .agent-primary-tabs, .crm-site-footer, .country-picker-menu, .cnd-review-modal, .crm-modal-overlay > div, .toast-enter > div) {
    border-color: var(--ios-glass-border) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08)),
        var(--ios-glass-panel) !important;
    box-shadow:
        0 24px 58px rgba(36, 62, 101, 0.14),
        0 8px 22px rgba(10, 38, 76, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(24px) saturate(1.75);
    -webkit-backdrop-filter: blur(24px) saturate(1.75);
}

.dark .crm-ios-glass-theme :is(.crm-main-wide > header, .crm-page-card, .mature-panel-card, .agent-workspace-panel, .agent-primary-tabs, .crm-site-footer, .country-picker-menu, .cnd-review-modal, .crm-modal-overlay > div, .toast-enter > div) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02)),
        var(--ios-glass-panel) !important;
    box-shadow:
        0 24px 62px rgba(0, 0, 0, 0.42),
        0 8px 22px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.crm-ios-glass-theme .agent-primary-tabs {
    align-items: center;
    gap: 0.6rem !important;
}

.crm-ios-glass-theme .agent-primary-tabs .crm-tab-button {
    min-height: 52px !important;
    transform: none !important;
}

.crm-ios-glass-theme .agent-primary-tabs .crm-tab-button:hover {
    transform: none !important;
}

.crm-ios-glass-theme .mature-report-grid {
    grid-template-columns: repeat(8, minmax(104px, 1fr)) !important;
    gap: 0.45rem !important;
}

.crm-ios-glass-theme .mature-report-chip {
    min-height: 38px !important;
    padding: 0.42rem 0.58rem !important;
    border-radius: 0.7rem !important;
}

.crm-ios-glass-theme .mature-report-chip p:first-child {
    font-size: 0.64rem !important;
}

.crm-ios-glass-theme .mature-report-chip p:last-child {
    font-size: 1.05rem !important;
}

@media (max-width: 1100px) {
    .crm-ios-glass-theme .mature-report-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .crm-ios-glass-theme .mature-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.crm-ios-glass-theme .mature-status-row,
.crm-ios-glass-theme .mature-status-row:hover {
    box-shadow: none !important;
}

.crm-ios-glass-theme .mature-status-row > td,
.crm-ios-glass-theme .mature-status-row:hover > td {
    border-left: 0 !important;
    background: var(--ios-table-row) !important;
    background-image: none !important;
    transition: none !important;
}

.crm-ios-glass-theme tbody tr:not(.mature-status-row):not(.cnd-unread-row):hover,
.dark .crm-ios-glass-theme tbody tr:not(.mature-status-row):not(.cnd-unread-row):hover {
    background: var(--ios-table-row) !important;
}

.crm-ios-glass-theme .mature-status-row {
    --cm-bg-1: rgba(241, 245, 249, 0.96);
    --cm-bg-2: rgba(203, 213, 225, 0.76);
    --cm-border: rgba(100, 116, 139, 0.42);
    --cm-text: #26364d;
    --cm-glow: rgba(100, 116, 139, 0.16);
}

.crm-ios-glass-theme .mature-status-row select:not(.mature-cm-status-control) {
    border-color: rgba(148, 163, 184, 0.36) !important;
    background: var(--ios-input-bg) !important;
    color: inherit !important;
    box-shadow: none !important;
}

.crm-ios-glass-theme .mature-status-row-follow-up {
    --cm-bg-1: rgba(202, 232, 255, 0.98);
    --cm-bg-2: rgba(112, 181, 255, 0.78);
    --cm-border: rgba(0, 122, 255, 0.62);
    --cm-text: #06346b;
    --cm-glow: rgba(0, 122, 255, 0.22);
}

.crm-ios-glass-theme .mature-status-row-mature-lead {
    --cm-bg-1: rgba(197, 250, 218, 0.98);
    --cm-bg-2: rgba(79, 219, 124, 0.74);
    --cm-border: rgba(34, 197, 94, 0.62);
    --cm-text: #064b26;
    --cm-glow: rgba(34, 197, 94, 0.2);
}

.crm-ios-glass-theme .mature-status-row-no-answer {
    --cm-bg-1: rgba(255, 239, 184, 0.98);
    --cm-bg-2: rgba(255, 187, 51, 0.76);
    --cm-border: rgba(245, 158, 11, 0.66);
    --cm-text: #713600;
    --cm-glow: rgba(245, 158, 11, 0.22);
}

.crm-ios-glass-theme .mature-status-row-pending {
    --cm-bg-1: rgba(187, 247, 239, 0.98);
    --cm-bg-2: rgba(45, 212, 191, 0.72);
    --cm-border: rgba(20, 184, 166, 0.66);
    --cm-text: #064e55;
    --cm-glow: rgba(20, 184, 166, 0.2);
}

.crm-ios-glass-theme .mature-status-row-important-customer {
    --cm-bg-1: rgba(236, 221, 255, 0.98);
    --cm-bg-2: rgba(190, 132, 255, 0.72);
    --cm-border: rgba(147, 51, 234, 0.62);
    --cm-text: #581c87;
    --cm-glow: rgba(147, 51, 234, 0.2);
}

.crm-ios-glass-theme .mature-status-row-not-interested {
    --cm-bg-1: rgba(255, 218, 224, 0.98);
    --cm-bg-2: rgba(251, 113, 133, 0.72);
    --cm-border: rgba(225, 29, 72, 0.62);
    --cm-text: #861430;
    --cm-glow: rgba(225, 29, 72, 0.2);
}

.crm-ios-glass-theme .mature-status-row :is(.mature-cm-status-control, .inline-flex.w-fit.rounded-xl) {
    border-color: var(--cm-border) !important;
    background: linear-gradient(145deg, var(--cm-bg-1), var(--cm-bg-2)) !important;
    color: var(--cm-text) !important;
    font-weight: 950 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 10px 22px var(--cm-glow) !important;
    backdrop-filter: blur(14px) saturate(1.5);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

.dark .crm-ios-glass-theme .mature-status-row :is(.mature-cm-status-control, .inline-flex.w-fit.rounded-xl) {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

.crm-ios-glass-theme .cnd-status-strip {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
}

.crm-ios-glass-theme .cnd-status-strip > span {
    min-width: max-content;
}
