.design-dialog {
	width: min(600px, calc(100vw - 32px));
}
.design-dialog.wide {
	width: min(900px, calc(100vw - 32px));
}
.design-dialog .stack {
	gap: 16px;
}
.design-dialog .field {
	margin: 0;
}
.design-dialog .dialog-error {
	margin: 0 20px 12px;
}
.design-dialog .modal-bd > details {
	border: 1px solid var(--border);
	border-radius: 9px;
	padding: 12px;
}
.design-dialog summary {
	cursor: pointer;
}
.design-dialog pre {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.native-chat-page {
	height: 100%;
	min-height: 600px;
}
.native-chat-grid {
	height: 100%;
	align-items: start;
	grid-template-columns: minmax(0, 1fr);
}
.native-chat-grid.settings-open {
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}
.native-chat-page .chat-settings-trigger {
	display: inline-flex;
}
.chat-header-actions {
	justify-content: flex-end;
}
.chat-mock-indicator {
	border: 1px solid color-mix(in oklch, var(--warn) 45%, transparent);
	padding: 4px 9px;
}
.native-dialogue {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	min-height: 560px;
	overflow: hidden;
}
.native-dialogue.card,
.chat-settings-card.card {
	margin-bottom: 0;
}
.native-thread-scroll {
	flex: 1;
	min-height: 0;
	overflow: auto;
	scroll-behavior: smooth;
}
.native-composer-wrap {
	border-top: 1px solid var(--border);
	flex: none;
}
.native-composer-tools {
	gap: 8px;
	margin-top: 6px;
}
.native-composer-tools > .row {
	min-width: 0;
}
[data-model-chip] {
	max-width: 235px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.native-settings {
	gap: 14px;
}
.native-settings .field {
	margin: 0;
}
.native-settings .muted {
	margin: 0;
}
.chat-settings-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: 100%;
	min-height: 0;
	overflow: hidden;
}
.chat-settings-card > .card-hd {
	flex: none;
}
.chat-settings-card > .card-bd {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.chat-welcome {
	align-self: center;
	margin: auto;
	padding: 70px 24px;
	text-align: center;
	color: var(--muted);
	max-width: 420px;
}
.chat-welcome-mark {
	width: 48px;
	height: 48px;
	border: 1px solid var(--border);
	background: var(--surface);
	border-radius: 14px;
	display: grid;
	place-items: center;
	margin: 0 auto 18px;
	color: var(--accent);
}
.chat-welcome h3 {
	margin: 0 0 10px;
	color: var(--fg);
	font-size: 17px;
	font-weight: 600;
}
.chat-welcome p {
	font-size: 13px;
	line-height: 1.7;
	margin: 0;
}
.native-chat-page .msg {
	min-width: 120px;
	max-width: 78%;
	overflow-wrap: anywhere;
}
.native-chat-page .msg-body p {
	color: inherit;
	margin: 0 0 10px;
}
.native-chat-page .msg-body > :first-child {
	margin-top: 0;
}
.native-chat-page .msg-body > :last-child {
	margin-bottom: 0;
}
.native-chat-page .katex-display {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0;
}
.native-chat-page .msg-body pre {
	background: oklch(24% 0.02 250);
	color: oklch(90% 0.01 250);
	padding: 12px 14px;
	border-radius: 8px;
	overflow: auto;
	font: 12px/1.7 var(--font-mono);
	margin: 10px 0;
}
.native-chat-page .msg-body :not(pre) > code {
	background: var(--surface);
	border: 1px solid var(--border);
	padding: 1px 5px;
	border-radius: 5px;
	font: 12px var(--font-mono);
}
.native-chat-page .msg-body pre code {
	background: none;
	padding: 0;
}
.native-chat-page .msg-body ul,
.native-chat-page .msg-body ol {
	padding-left: 22px;
	margin: 8px 0;
}
.native-chat-page .msg-body table {
	display: block;
	max-width: 100%;
	overflow: auto;
}
.native-chat-page .msg-body a {
	color: var(--accent);
	text-decoration: underline;
}
.native-chat-page .msg-body blockquote {
	border-left: 3px solid var(--border-strong);
	margin: 8px 0;
	padding-left: 12px;
	color: var(--muted);
}
.chat-image {
	max-width: 100%;
	max-height: 360px;
	border-radius: 9px;
	cursor: zoom-in;
}
.chat-image-full {
	max-width: 100%;
	max-height: 75dvh;
	object-fit: contain;
}
.chat-error {
	outline: 1px solid var(--danger);
}
.chat-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.chat-attachments > div {
	position: relative;
	margin-bottom: 10px;
}
.chat-attachments img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--border);
}
.chat-attachments button {
	position: absolute;
	right: -5px;
	top: -5px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 50%;
	width: 20px;
	height: 20px;
}
.chat-pending-tools {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.chat-tool-result {
	background: var(--info-soft);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 14px;
}
.chat-tool-result textarea {
	margin: 10px 0;
}
.chat-tool-call {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px;
	margin: 8px 0;
	font-size: 12px;
}
.chat-tool-call summary {
	display: flex;
	gap: 7px;
	cursor: pointer;
	flex-wrap: wrap;
}
.native-raw {
	display: flex;
	flex: 1;
	min-height: 0;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	overflow: auto;
}
.native-chat-page .msg-actions {
	top: 4px;
	right: 4px;
}
.native-table {
	width: 100%;
}
.native-table th > button[data-sort] {
	display: block;
	padding: 0;
	text-align: inherit;
	letter-spacing: inherit;
}
.native-table td {
	vertical-align: middle;
}
.native-table .row {
	gap: 6px;
}
.native-table .cell-main {
	font-size: 13px;
}
.native-table .cell-sub {
	max-width: 330px;
	overflow-wrap: anywhere;
	white-space: normal;
}
.native-key-row {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	gap: 12px 14px;
	padding: 18px;
	border-bottom: 1px solid var(--border);
}
.native-key-row:last-child {
	border-bottom: 0;
}
.native-key-row:has([data-select-key]:checked) {
	background: color-mix(in oklch, var(--accent) 4%, var(--surface));
}
.native-key-select {
	padding-top: 3px;
}
.native-key-select input {
	margin: 0;
	accent-color: var(--accent);
}
.native-key-account {
	min-width: 0;
}
.native-key-title {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}
.native-key-identity {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 5px;
	font-size: 12px;
	color: var(--muted);
	overflow-wrap: anywhere;
}
.native-key-error {
	margin-top: 6px;
	font-size: 11px;
	color: var(--danger);
	overflow-wrap: anywhere;
}
.native-key-actions {
	align-self: start;
	justify-content: flex-end;
}
.native-key-quota {
	grid-column: 2 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	min-width: 0;
}
.native-key-quota-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	max-width: 150px;
}
.key-quota-status {
	font-size: 11px;
	overflow-wrap: anywhere;
}
.key-quota-windows {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.key-quota-window {
	min-width: 0;
	padding: 11px 12px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 8px;
}
.key-quota-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 12px;
}
.key-quota-heading .muted {
	font-size: 11px;
}
.key-quota-percent {
	font-weight: 600;
}
.key-quota-percent span {
	font-weight: 400;
	font-size: 11px;
	color: var(--muted);
}
.key-quota-scope {
	font-size: 11px;
	margin-bottom: 8px;
	overflow-wrap: anywhere;
}
.key-quota-window .meter {
	margin-top: 8px;
	background: var(--border);
}
.key-quota-foot {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 3px 10px;
	margin-top: 7px;
	font-size: 11px;
	color: var(--muted);
}
.key-quota-updated,
.key-quota-empty {
	font-size: 11px;
	margin-top: 7px;
}
@media (max-width: 820px) {
	.native-key-row {
		grid-template-columns: 20px minmax(0, 1fr);
	}
	.native-key-actions {
		grid-column: 2;
		grid-row: 3;
	}
	.native-key-quota {
		grid-template-columns: minmax(0, 1fr);
	}
	.native-key-quota-actions {
		flex-direction: row;
		align-items: center;
		max-width: none;
	}
	.key-quota-windows {
		grid-template-columns: minmax(0, 1fr);
	}
}
.native-meta {
	margin-top: 10px;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface-2);
	font: 12px/1.7 var(--font-mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	max-height: 55dvh;
	overflow: auto;
}
.native-models {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.native-provider-card,
.native-provider-card .card-hd > .row,
.native-provider-card .card-hd > .row > div,
.native-provider-card .native-models,
.native-provider-card .model-row {
	min-width: 0;
}
.native-provider-card .card-hd > .row > div,
.native-provider-card .model-row .grow {
	overflow-wrap: anywhere;
}
.native-provider-card .card-hd > .btn,
.native-provider-card .provider-mark {
	flex-shrink: 0;
}
.native-provider-card .model-row {
	align-items: flex-start;
}
.native-provider-card .model-row .al {
	margin-top: 4px;
	font-size: 11.5px;
	line-height: 1.6;
	color: var(--muted);
}
.native-model-actions {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: 4px;
}
.native-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}
.native-toolbar .field {
	min-width: 140px;
}
.usage-toolbar {
	justify-content: flex-end;
}
.usage-range-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 18px;
}
.usage-refresh {
	min-width: 88px;
}
.usage-filter-fields {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 14px;
}
.usage-filter-fields .field {
	margin: 0;
	min-width: 0;
}
.usage-grouping {
	padding: 16px 18px;
	border-bottom: 1px solid var(--border);
}
.usage-grouping-title {
	font-weight: 600;
}
.usage-dimensions {
	margin-top: 10px;
}
.native-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-top: 1px solid var(--border);
}
.native-checks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	max-height: 320px;
	overflow: auto;
}
.native-checks label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
}
.native-checks input {
	margin-top: 4px;
}
.native-metric {
	font: 600 28px var(--font-mono);
	margin: 8px 0;
}
.native-chart-row {
	display: grid;
	grid-template-columns: 140px 1fr 90px;
	gap: 12px;
	align-items: center;
	font-size: 12px;
	margin: 12px 0;
}
.native-chart-row .meter {
	height: 9px;
}
.native-steps {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.native-step {
	display: flex;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--border);
}
.native-step .n {
	flex: none;
	width: 25px;
	height: 25px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: var(--accent);
	background: var(--accent-soft);
	font: 12px var(--font-mono);
}
.native-step > div:last-child {
	min-width: 0;
	flex: 1;
}
.native-step .field {
	margin-top: 12px;
}
.provider-health-note {
	color: var(--muted);
	font-size: 11px;
}
.provider-mark,
.auth-mark {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	flex: none;
	background: var(--surface-2);
	border-radius: 9px;
	color: var(--muted);
	font: 600 12px var(--font-mono);
}
.overview-bars {
	height: 190px;
	display: flex;
	align-items: flex-end;
	gap: 4px;
}
.overview-bars > div {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	gap: 1px;
}
.quota-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 18px;
}
.quota-toolbar h2 {
	margin: 0 0 5px;
	font-size: 16px;
}
.quota-toolbar p,
.quota-shared-note {
	margin: 0;
}
.quota-sort {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
}
.quota-sort .select {
	width: auto;
	min-width: 120px;
}
.quota-bundles {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.quota-bundle {
	overflow: hidden;
}
.quota-bundle > summary {
	list-style: none;
}
.quota-bundle > summary::-webkit-details-marker {
	display: none;
}
.quota-bundle-summary {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	cursor: pointer;
}
.quota-bundle-summary:hover {
	background: var(--surface-2);
}
.quota-bundle-summary:focus-visible,
.quota-unused > summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: -3px;
}
.quota-bundle-title {
	flex: 1;
	min-width: 0;
}
.quota-bundle-title h2 {
	margin: 0;
	font-size: 15px;
	overflow-wrap: anywhere;
}
.quota-bundle-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 16px;
	margin-top: 7px;
	font-size: 11.5px;
	color: var(--muted);
}
.quota-bundle-status {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 14px;
	font-size: 12px;
}
.quota-chevron {
	font-size: 22px;
	color: var(--muted);
	transition: transform .15s;
}
.quota-bundle[open] > summary .quota-chevron {
	transform: rotate(90deg);
}
.quota-bundle-body {
	border-top: 1px solid var(--border);
}
.quota-policy + .quota-policy {
	border-top: 1px solid var(--border);
}
.quota-policy-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 24px;
	padding: 18px 20px 12px;
}
.quota-policy-heading h3 {
	margin: 0;
	font-size: 13px;
	overflow-wrap: anywhere;
}
.quota-scope {
	padding: 3px 8px;
	border-radius: 5px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 10.5px;
}
.quota-window {
	margin-top: 6px;
	font-size: 11px;
	color: var(--muted);
}
.quota-limits {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	max-width: 580px;
	font-size: 11.5px;
	color: var(--muted);
}
.quota-limits b {
	color: var(--fg);
	font-weight: 500;
}
.quota-shared-note {
	padding: 0 20px 10px;
	font-size: 11.5px;
	line-height: 1.6;
}
.quota-table-wrap {
	border: 0;
	border-radius: 0;
}
.quota-usage-table th,
.quota-usage-table td {
	padding: 11px 20px;
	white-space: nowrap;
}
.quota-usage-table th:first-child,
.quota-usage-table td:first-child {
	width: 28%;
	min-width: 170px;
}
.quota-usage-table th:not(:first-child):not(:last-child),
.quota-usage-table td:not(:first-child):not(:last-child) {
	text-align: right;
}
.quota-usage-table th:last-child,
.quota-usage-table td:last-child {
	min-width: 150px;
}
.quota-identity {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
	white-space: normal;
	max-width: 320px;
	overflow-wrap: anywhere;
}
.quota-identity b {
	font-size: 12px;
	font-weight: 500;
}
.quota-identity-id {
	font-size: 10.5px;
	color: var(--muted);
}
.quota-utilization {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
}
.quota-limit-status {
	font-size: 10px;
	color: var(--danger);
}
.quota-exhausted {
	background: color-mix(in oklch, var(--danger) 3%, var(--surface));
}
.quota-usage-table .meter {
	height: 4px;
	max-width: 180px;
	background: var(--border);
}
.quota-unused > summary {
	padding: 12px 20px;
	font-size: 12px;
	color: var(--muted);
	cursor: pointer;
	background: var(--surface-2);
}
.quota-unused > summary .mono {
	margin-left: 8px;
}
@media (max-width: 700px) {
	.quota-bundle-summary {
		flex-wrap: wrap;
		gap: 10px;
		padding: 16px;
	}
	.quota-bundle-title {
		flex-basis: calc(100% - 32px);
	}
	.quota-bundle-status {
		order: 1;
		justify-content: flex-start;
		flex-basis: 100%;
	}
	.quota-policy-heading {
		padding: 16px;
	}
	.quota-shared-note {
		padding-inline: 16px;
	}
}
.native-bundle-picker {
	display: grid;
	grid-template-columns: minmax(0, 1fr) max-content;
	align-items: center;
	gap: 10px;
}
.native-bundle-picker > .select {
	min-width: 0;
	height: 36px;
}
.native-bundle-picker > .btn {
	height: 36px;
	padding-inline: 12px;
	justify-content: center;
	white-space: nowrap;
}
.native-user-binding {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px;
	margin-top: 10px;
}
.native-user-binding .row {
	flex-wrap: wrap;
}
@media (max-width: 1180px) {
	.native-chat-grid,
	.native-chat-grid.settings-open {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 820px) {
	.native-chat-page {
		min-height: 650px;
	}
	.native-chat-page .chat-sessions {
		max-height: 155px;
	}
	.native-dialogue > .card-hd {
		gap: 8px;
		flex-wrap: wrap;
	}
	.native-chat-page .chat-shell {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
	}
	[data-model-chip] {
		max-width: 150px;
	}
	.native-chat-page .msg {
		max-width: 96%;
	}
	.native-checks {
		grid-template-columns: 1fr;
	}
	.native-chart-row {
		grid-template-columns: 90px 1fr 65px;
	}
}
