/* Tokens de IA, Aprovações de IA and Auditoria de IA (wms-mcp, Blazor only): layout and colors only, tokens of theme.css (sizes of fields and buttons come
   from forms.css). The box of the token shown once reuses .integration-key (integrations.css). */
.mcp-layout {
    grid-template-columns: minmax(340px, 1fr) minmax(0, 1.7fr)
}

@media(max-width:1000px) {
    .mcp-layout {
        grid-template-columns: 1fr
    }
}

.mcp-all {
    margin: 8px 0
}

.mcp-tabs {
    margin-bottom: 14px
}

.mcp-mono {
    font-family: ui-monospace, monospace;
    overflow-wrap: anywhere
}

.mcp-details {
    margin-bottom: 12px
}

.mcp-note {
    font-size: 10px;
    line-height: 1.6;
    color: var(--text-2);
    margin: 8px 0 0
}

.mcp-text {
    height: auto;
    min-height: 34px;
    resize: vertical;
    font-size: 11px;
    line-height: 1.5;
    padding-top: 6px;
    padding-bottom: 6px
}

.mcp-untrusted {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--warning-border);
    background: var(--warning-faint);
    color: var(--warning-text);
    font-size: 10px
}

.compact-chip.mcp-status.is-warning {
    background: var(--warning-soft);
    color: var(--warning-text)
}

.compact-chip.mcp-status.is-success {
    background: var(--success-soft);
    color: var(--success-text)
}

.compact-chip.mcp-status.is-danger {
    background: var(--danger-soft);
    color: var(--danger-text)
}

.compact-chip.mcp-status.is-muted {
    background: var(--chip-neutral-bg);
    color: var(--chip-neutral-text)
}

.mcp-filters {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(160px, .7fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px
}

.mcp-filters label {
    margin-bottom: 4px
}

@media(max-width:800px) {
    .mcp-filters {
        grid-template-columns: 1fr
    }
}

.mcp-audit {
    table-layout: fixed;
    /* Fixed widths of the columns: below this the user and the tool columns collapsed to zero on a phone (375 px); the grid scrolls sideways instead. */
    min-width: 930px
}

.mcp-audit th:nth-child(1) {
    width: 130px
}

.mcp-audit th:nth-child(3) {
    width: 80px
}

.mcp-audit th:nth-child(5) {
    /* The longest outcome chip ("Aguardando aprovação") fits without covering the duration (r2). */
    width: 170px
}

.mcp-audit th:nth-child(6) {
    width: 80px
}

.stock-grid.mcp-audit td {
    /* .stock-grid keeps one line per cell (nowrap, also td:last-child): the long cells of the audit (details, prefix) wrap inside their column. */
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top
}

.stock-grid.mcp-audit td .compact-chip {
    white-space: nowrap
}

.mcp-audit td small {
    display: block;
    color: var(--text-muted)
}

/* OAuth consent of an AI client (/oauth/consent, static page): one card centered on the page. */
.mcp-consent-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: var(--bg)
}

.mcp-consent {
    width: min(560px, 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm)
}

.mcp-consent h1 {
    /* The global h1 (styles.css) is the big page title with letter-spacing -3px: here it is the title of a card, like .profile-form-title h2. */
    font: 700 16px 'Manrope', sans-serif;
    letter-spacing: normal;
    margin: 0
}

.mcp-consent-lead {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-2);
    margin: 12px 0
}

.mcp-consent-form {
    display: grid;
    gap: 12px;
    margin-top: 12px
}

.mcp-consent-continue {
    display: inline-flex;
    align-items: center;
    text-decoration: none
}
