.ai-quota-card {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
}

.ai-quota-header {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ai-quota-heading {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ai-quota-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-quota-subtitle {
    font-size: 0.88rem;
    color: #475569;
    max-width: 46rem;
}

.ai-quota-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 0.48rem 0.78rem;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 700;
}

.ai-quota-status-pill.is-active {
    background: #ecfdf3;
    border-color: #86efac;
    color: #166534;
}

.ai-quota-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid #dbe3f0;
    background: rgba(255, 255, 255, 0.82);
}

.ai-quota-period {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ai-quota-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.ai-quota-meta-value {
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-quota-disclaimer {
    font-size: 0.78rem;
    color: #64748b;
}

.ai-quota-tiles {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ai-quota-tile {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe3f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.ai-quota-tile.file-processing {
    border-color: #bae6fd;
}

.ai-quota-tile.chat-interactions {
    border-color: #c7d2fe;
}

.ai-quota-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ai-quota-tile-label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.ai-quota-tile-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
}

.ai-quota-overage-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.56rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

.ai-quota-progress-shell {
    width: 100%;
    height: 0.72rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.ai-quota-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
}

.chat-interactions .ai-quota-progress-fill {
    background: linear-gradient(90deg, #4f46e5 0%, #2563eb 100%);
}

.ai-quota-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #475569;
}

.ai-quota-estimates {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-quota-estimate-card {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.ai-quota-estimate-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.ai-quota-estimate-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-quota-estimate-note {
    font-size: 0.78rem;
    color: #475569;
}

.ai-quota-estimate-card.actual-payg {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.9) 0%, rgba(240, 253, 244, 0.92) 100%);
    border-color: rgba(134, 239, 172, 0.55);
}

.ai-quota-actual-lines {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.ai-quota-actual-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: #334155;
}

.ai-quota-actual-line strong {
    color: #0f172a;
    font-size: 0.94rem;
}

.ai-quota-actual-line.total {
    margin-top: 0.1rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(134, 239, 172, 0.55);
}

.ai-quota-license-note {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid #dbe3f0;
}

.ai-quota-license-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-quota-license-text {
    font-size: 0.84rem;
    color: #475569;
}

@media (min-width: 768px) {
    .ai-quota-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .ai-quota-meta-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ai-quota-tiles {
        flex-direction: row;
    }

    .ai-quota-tile {
        flex: 1 1 0;
        min-width: 0;
    }

    .ai-quota-metrics {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .ai-quota-estimates {
        flex-direction: row;
    }

    .ai-quota-estimate-card {
        flex: 1 1 0;
    }
}
