/* Quota IA — dashboard style page d'accueil CRM */

.ia-quota-home {
    padding-bottom: 24px;
}

.ia-quota-home-tabs {
    border-bottom: 1px solid #e8e8e8;
}

.ia-quota-home-tabs .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 10px 18px;
    margin-bottom: -1px;
}

.ia-quota-home-tabs .nav-link:hover {
    color: #5c65c7;
    border-color: transparent;
    background: transparent;
}

.ia-quota-home-tabs .nav-link.active {
    color: #5c65c7;
    border-bottom-color: #5c65c7;
    background: transparent;
}

.ia-quota-home .ia-quota-tab-panel[hidden] {
    display: none !important;
}

.ia-quota-home__intro {
    font-size: 14px;
    line-height: 1.5;
    max-width: 720px;
}

.ia-quota-home .ia-quota-dash-section--admin {
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
}

.ia-quota-home .ia-quota-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.ia-quota-home .ia-quota-cta-hint {
    flex: 1 1 100%;
    margin-top: 4px;
}

.ia-quota-home .ia-quota-channels-empty {
    padding: 12px 0;
}

.ia-quota-home .ia-quota-dash-section {
    margin-bottom: 28px;
}

.ia-quota-home .ia-quota-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 16px;
}

.ia-quota-home .ia-quota-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ia-quota-home .ia-quota-period-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #5c65c7;
    background: rgba(92, 101, 199, 0.1);
    border-radius: 4px;
}

/* Grille 4 stats — toujours alignée */
.ia-quota-home .ia-quota-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 1199px) {
    .ia-quota-home .ia-quota-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .ia-quota-home .ia-quota-stat-grid {
        grid-template-columns: 1fr;
    }
}

.ia-quota-home .ia-quota-stat-card {
    margin-bottom: 0;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.ia-quota-home .ia-quota-stat-card .card-body {
    min-height: 88px;
}

.ia-quota-home .ia-quota-stat-num {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.ia-quota-home .ia-quota-stat-num--sm {
    font-size: 1.35rem;
}

.ia-quota-home .ia-quota-stat-icon {
    color: #5c65c7;
    font-size: 1.5rem;
}

.ia-quota-home .ia-quota-stat-progress {
    margin: 0;
    border-radius: 0;
    height: 3px;
    background: #eee;
}

/* Barres — palette unique */
.ia-quota-home .ia-quota-bar--ok {
    background-color: #5c65c7 !important;
}

.ia-quota-home .ia-quota-bar--warning {
    background-color: #f0ad4e !important;
}

.ia-quota-home .ia-quota-bar--danger {
    background-color: #dc3545 !important;
}

.ia-quota-home .ia-quota-bar--muted {
    background-color: #d4d4d4 !important;
}

.ia-quota-home .ia-quota-pool-alert {
    font-size: 13px;
    background: #fafafa;
}

/* Admin : canaux + allocation côte à côte */
.ia-quota-home .ia-quota-admin-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 991px) {
    .ia-quota-home .ia-quota-admin-panels {
        grid-template-columns: 1fr;
    }
}

.ia-quota-home .ia-quota-panel {
    margin-bottom: 0;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
}

.ia-quota-home .ia-quota-panel .card-title {
    font-weight: 600;
    color: #333;
}

.ia-quota-home .ia-quota-panel--alloc {
    min-width: 0;
}

.ia-quota-home .ia-quota-panel--alloc .card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ia-quota-home .ia-quota-alloc-form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ia-quota-home .ia-quota-alloc-form .form-group,
.ia-quota-home .ia-quota-alloc-form .control-label {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.ia-quota-home .ia-quota-alloc-form .form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    height: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 4px;
    box-sizing: border-box;
}

.ia-quota-home .ia-quota-alloc-form .control-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.ia-quota-home .ia-quota-alloc-form input[type="number"].form-control {
    padding-right: 10px;
}

.ia-quota-home .ia-quota-plan-hint,
.ia-quota-home .ia-quota-alloc-form .ia-quota-alloc-sum {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ia-quota-home .ia-quota-panel--alloc .ia-quota-alloc-form .sb-btn.sb-btn-primary {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    margin-top: auto;
    padding-left: 25px;
    padding-right: 25px;
    text-align: center;
}

/* Canaux */
.ia-quota-home .ia-quota-channel-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ia-quota-home .ia-quota-channel-item {
    padding-bottom: 4px;
}

.ia-quota-home .ia-quota-channel-item--empty .ia-quota-channel-name,
.ia-quota-home .ia-quota-channel-item--empty .ia-quota-channel-used {
    color: #999;
}

.ia-quota-home .ia-quota-channel-item--empty .ia-quota-channel-meta {
    font-style: italic;
}

.ia-quota-home .ia-quota-channel-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ia-quota-home .ia-quota-channel-used {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.ia-quota-home .ia-quota-channel-progress {
    height: 4px;
    margin-bottom: 6px;
    background: #eee;
}

.ia-quota-home .ia-quota-channel-meta {
    font-size: 12px;
}

.ia-quota-home .ia-quota-alloc-sum {
    font-size: 12px;
    color: #666;
    min-height: 18px;
}

.ia-quota-home .ia-quota-alloc-sum.is-invalid {
    color: #dc3545;
    font-weight: 500;
}

.ia-quota-home .ia-quota-plan-hint {
    font-size: 13px;
    color: #555;
    min-height: 38px;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    line-height: 1.4;
}

.ia-quota-home .ia-quota-alloc-form .form-group {
    margin-bottom: 14px;
    padding-left: 0;
    padding-right: 0;
}

.ia-quota-home .ia-quota-panel--alloc .btn-block {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Bandeau conversations */
.sb-board .ia-quota-banner {
    margin: 0 0 12px 0;
    padding: 12px 14px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 13px;
}

.sb-board .ia-quota-banner.ia-quota-banner--warning {
    background: #fff8e6;
    border-color: #f0e0b0;
}

.sb-board .ia-quota-banner.ia-quota-banner--exceeded {
    background: #fdecea;
    border-color: #f5c6cb;
}

.sb-board .ia-quota-banner a {
    color: #5c65c7;
}

/* Team contact modal — quota panel (palette /ai/quota) */
.contact-team-ia-quota-panel {
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 4px;
    padding: 16px;
}

.contact-team-ia-quota-panel__period {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: #666;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.contact-team-ia-quota-panel__scope-hint {
    font-size: 12px;
    color: #777;
    margin: 0 0 12px;
    line-height: 1.45;
}

.contact-team-ia-quota-panel__used {
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-team-ia-quota-panel__progress {
    height: 6px;
    margin-bottom: 12px;
    background: #eee;
    border-radius: 0;
}

.contact-team-ia-quota-panel__progress .ia-quota-bar--ok {
    background-color: #5c65c7 !important;
}

.contact-team-ia-quota-panel__progress .ia-quota-bar--warning {
    background-color: #f0ad4e !important;
}

.contact-team-ia-quota-panel__progress .ia-quota-bar--danger {
    background-color: #dc3545 !important;
}

.contact-team-ia-quota-panel__meta {
    margin-bottom: 10px;
}

.contact-team-ia-quota-panel__no-cap,
.contact-team-ia-quota-panel__pool {
    margin-bottom: 10px;
}

.contact-team-ia-quota-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 8px;
}

.contact-team-ia-quota-panel__org-link {
    font-size: 13px;
    color: #5c65c7;
    text-decoration: none;
}

.contact-team-ia-quota-panel__org-link:hover {
    text-decoration: underline;
    color: #4a52a8;
}

@media (max-width: 991.98px) {
    .contact-show-modal--split .contact-team-ia-quota-col {
        border-left: none !important;
        border-top: 1px solid #dee2e6;
        padding-left: 15px !important;
    }
}

/* ------------------------------------------------------------------
 * Dashboard quota IA — UI moderne (page d'accueil)
 * ------------------------------------------------------------------ */
.ia-q-dash {
    --iq-bg: #f8fafc;
    --iq-surface: #ffffff;
    --iq-border: rgba(15, 23, 42, 0.08);
    --iq-text: #0f172a;
    --iq-muted: #64748b;
    --iq-radius: 16px;
    --iq-radius-sm: 12px;
    --iq-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --iq-shadow-hover: 0 4px 6px rgba(15, 23, 42, 0.04), 0 16px 32px rgba(15, 23, 42, 0.08);
    --iq-info: #3b82f6;
    --iq-success: #10b981;
    --iq-warning: #f59e0b;
    --iq-danger: #ef4444;
    --iq-amber: #f59e0b;
    --iq-violet: #8b5cf6;
    --iq-slate: #64748b;
    padding-bottom: 24px;
    color: var(--iq-text);
}

.ia-q-dash .ia-quota-tab-panel[hidden] {
    display: none !important;
}

.ia-q-dash .min-w-0 {
    min-width: 0;
}

/* Toolbar: tabs + period picker */
.ia-q-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.ia-q-toolbar__period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

/* Period picker */
.ia-q-period {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ia-q-period__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 16px;
    color: var(--iq-text);
    text-decoration: none !important;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ia-q-period__nav:hover {
    background: #eef2f7;
    color: var(--iq-info);
}

.ia-q-period__nav--disabled {
    color: #cbd5e1;
    cursor: default;
    pointer-events: none;
}

.ia-q-period__picker {
    position: relative;
}

.ia-q-period__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--iq-text);
    background: #f8fafc;
    border: 1px solid var(--iq-border);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ia-q-period__trigger:hover,
.ia-q-period__trigger[aria-expanded="true"] {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.ia-q-period__trigger-label {
    white-space: nowrap;
}

.ia-q-period__trigger-badge {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--iq-info);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 999px;
}

.ia-q-period__trigger-caret {
    font-size: 11px;
    color: var(--iq-muted);
    transition: transform 0.15s ease;
}

.ia-q-period__trigger[aria-expanded="true"] .ia-q-period__trigger-caret {
    transform: rotate(180deg);
}

.ia-q-period__popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(18rem, calc(100vw - 2rem));
    padding: 12px;
    background: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.ia-q-period__year-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ia-q-period__year-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--iq-text);
}

.ia-q-period__year-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 14px;
    color: var(--iq-text);
    background: #f8fafc;
    border: 1px solid var(--iq-border);
    border-radius: 8px;
    cursor: pointer;
}

.ia-q-period__year-nav:hover:not(:disabled) {
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--iq-info);
}

.ia-q-period__year-nav:disabled,
.ia-q-period__year-nav--disabled {
    color: #cbd5e1;
    cursor: default;
    opacity: 0.55;
}

.ia-q-period__months {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.ia-q-period__month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--iq-text);
    text-decoration: none !important;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ia-q-period__month:hover:not(.is-disabled) {
    background: #eef2f7;
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--iq-text);
}

.ia-q-period__month.is-selected {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
}

.ia-q-period__month.is-disabled {
    color: #cbd5e1;
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.ia-q-dash .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Segmented tabs */
.ia-q-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: #eef2f7;
    border-radius: 999px;
    border: 1px solid var(--iq-border);
}

.ia-q-tabs__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--iq-muted);
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ia-q-tabs__btn.is-active {
    color: var(--iq-text);
    background: var(--iq-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Section head */
.ia-q-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

.ia-q-section-head__title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ia-q-section-head__period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--iq-muted);
}

/* Status pill */
.ia-q-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ia-q-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.ia-q-pill--success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.ia-q-pill--warning { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.ia-q-pill--danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

/* Stat cards */
.ia-q-dash .ia-quota-stat-col {
    margin-bottom: 20px;
}

.ia-q-stat {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 20px 0;
    background: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: var(--iq-radius);
    box-shadow: var(--iq-shadow);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ia-q-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--iq-shadow-hover);
}

.ia-q-stat__top {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    min-height: 72px;
}

.ia-q-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
    flex-shrink: 0;
}

.ia-q-stat__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--iq-muted);
    margin-bottom: 6px;
}

.ia-q-stat__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    min-height: 1.925rem;
}

.ia-q-stat__track {
    flex-shrink: 0;
    margin-top: auto;
    height: 5px;
    background: #e2e8f0;
    border-radius: 999px 999px 0 0;
    overflow: hidden;
}

.ia-q-stat__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.ia-q-stat__fill--muted {
    opacity: 0.28;
}

.ia-q-stat--info .ia-q-stat__icon { color: var(--iq-info); background: rgba(59, 130, 246, 0.12); }
.ia-q-stat--info .ia-q-stat__fill { background: linear-gradient(90deg, #60a5fa, var(--iq-info)); }
.ia-q-stat--success .ia-q-stat__icon { color: var(--iq-success); background: rgba(16, 185, 129, 0.12); }
.ia-q-stat--success .ia-q-stat__fill { background: linear-gradient(90deg, #34d399, var(--iq-success)); }
.ia-q-stat--warning .ia-q-stat__icon { color: var(--iq-warning); background: rgba(245, 158, 11, 0.14); }
.ia-q-stat--warning .ia-q-stat__fill { background: linear-gradient(90deg, #fbbf24, var(--iq-warning)); }
.ia-q-stat--danger .ia-q-stat__icon { color: var(--iq-danger); background: rgba(239, 68, 68, 0.12); }
.ia-q-stat--danger .ia-q-stat__fill { background: linear-gradient(90deg, #f87171, var(--iq-danger)); }
.ia-q-stat--amber .ia-q-stat__icon { color: var(--iq-amber); background: rgba(245, 158, 11, 0.14); }
.ia-q-stat--amber .ia-q-stat__fill { background: linear-gradient(90deg, #fbbf24, var(--iq-amber)); }

/* Pool tenant */
.ia-q-pool {
    padding: 16px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid var(--iq-border);
    border-radius: var(--iq-radius-sm);
}

.ia-q-pool__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
    font-size: 13px;
}

.ia-q-pool__head strong { font-weight: 700; }
.ia-q-pool__head span { color: var(--iq-muted); font-variant-numeric: tabular-nums; }

.ia-q-pool__track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.ia-q-pool__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, var(--iq-info));
}

.ia-q-pool__track--warning .ia-q-pool__fill {
    background: linear-gradient(90deg, #fbbf24, var(--iq-warning));
}

.ia-q-pool__track--danger .ia-q-pool__fill {
    background: linear-gradient(90deg, #f87171, var(--iq-danger));
}

/* Alert */
.ia-q-alert {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--iq-radius-sm);
    border: 1px solid transparent;
}

.ia-q-alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.ia-q-alert--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ia-q-alert__icon {
    font-size: 22px;
    line-height: 1;
    opacity: 0.9;
}

.ia-q-alert__hint {
    font-size: 13px;
    opacity: 0.85;
}

.ia-q-footnote {
    max-width: 42rem;
    font-size: 13px;
    line-height: 1.6;
    color: var(--iq-muted);
}

/* Panel canaux */
.ia-q-panel {
    padding: 28px 28px 24px;
    background: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: var(--iq-radius);
    box-shadow: var(--iq-shadow);
}

.ia-q-panel__head {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--iq-border);
}

.ia-q-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ia-q-panel .ia-q-channel-grid {
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: -4px;
}

.ia-q-panel__sub {
    font-size: 13px;
    color: var(--iq-muted);
}

/* Channel tiles */
.ia-q-channel {
    height: 100%;
    padding: 18px;
    background: var(--iq-surface);
    border: 1px solid var(--iq-border);
    border-radius: var(--iq-radius-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ia-q-channel:not(.ia-q-channel--idle):hover {
    transform: translateY(-2px);
    box-shadow: var(--iq-shadow-hover);
}

.ia-q-channel--idle {
    opacity: 0.72;
    background: #f8fafc;
}

.ia-q-channel__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ia-q-channel__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 18px;
    flex-shrink: 0;
}

.ia-q-channel__name {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ia-q-channel__hint {
    font-size: 12px;
    color: var(--iq-muted);
}

.ia-q-channel__value {
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.ia-q-channel__track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.ia-q-channel__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.ia-q-channel__pool {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--iq-muted);
}

.ia-q-channel--blue .ia-q-channel__icon { color: #2563eb; background: rgba(59, 130, 246, 0.14); }
.ia-q-channel--blue .ia-q-channel__fill { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.ia-q-channel--green .ia-q-channel__icon { color: #059669; background: rgba(16, 185, 129, 0.14); }
.ia-q-channel--green .ia-q-channel__fill { background: linear-gradient(90deg, #34d399, #10b981); }
.ia-q-channel--slate .ia-q-channel__icon { color: #475569; background: rgba(100, 116, 139, 0.14); }
.ia-q-channel--slate .ia-q-channel__fill { background: linear-gradient(90deg, #94a3b8, #64748b); }
.ia-q-channel--amber .ia-q-channel__icon { color: #d97706; background: rgba(245, 158, 11, 0.16); }
.ia-q-channel--amber .ia-q-channel__fill { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.ia-q-channel--violet .ia-q-channel__icon { color: #7c3aed; background: rgba(139, 92, 246, 0.14); }
.ia-q-channel--violet .ia-q-channel__fill { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }

/* Empty states */
.ia-q-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--iq-muted);
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: var(--iq-radius);
}

.ia-q-empty--compact {
    padding: 32px 20px;
}

.ia-q-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    font-size: 24px;
    color: var(--iq-muted);
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--iq-shadow);
}

@media (max-width: 991.98px) {
    .ia-q-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ia-q-toolbar__period {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .ia-q-period {
        width: 100%;
        justify-content: center;
    }

    .ia-q-period__popover {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .ia-q-tabs {
        width: 100%;
        justify-content: stretch;
    }

    .ia-q-tabs__btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .ia-q-stat__value {
        font-size: 1.45rem;
    }

    .ia-q-period__trigger-label {
        max-width: 7.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}