.aih-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
}

.aih-model-card {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-base-200);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aih-model-card:hover {
    border-color: var(--rz-base-300);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.aih-model-card--inactive { opacity: 0.55; }

.aih-model-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.aih-model-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
}

.aih-model-status--on  { color: var(--rz-success); background: color-mix(in srgb, var(--rz-success) 10%, transparent); }
.aih-model-status--off { color: var(--rz-text-tertiary-color); background: var(--rz-base-100); }

.aih-model-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    word-break: break-word;
}

.aih-model-model {
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--rz-text-secondary-color);
}

.aih-model-caps {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.aih-cap {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    background: var(--rz-base-100);
    border: 1px solid var(--rz-base-200);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.aih-cap .rzi { font-size: 0.75rem; }
.aih-cap--reasoning { color: #6366f1; background: color-mix(in srgb, #6366f1 8%, transparent); border-color: color-mix(in srgb, #6366f1 25%, transparent); }

.aih-model-quota-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--rz-text-tertiary-color);
}

.aih-model-quota-val { font-variant-numeric: tabular-nums; color: var(--rz-text-primary-color); font-weight: 600; }

.aih-model-usage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--rz-base-200);
    border-bottom: 1px solid var(--rz-base-200);
}

.aih-model-usage-stat { display: flex; flex-direction: column; gap: 0.1rem; }

.aih-model-usage-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.aih-model-usage-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-text-tertiary-color);
}

.aih-model-agents { display: flex; flex-direction: column; gap: 0.35rem; }

.aih-model-agents-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rz-text-tertiary-color);
    font-weight: 600;
}

.aih-model-agents-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.aih-model-agent-chip {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--rz-base-100);
    color: var(--rz-text-primary-color);
}

.aih-agent-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
