:root { color-scheme: dark; --cit-blue: #003E7E; --cit-teal: #3FBBA0; --cit-green: #73C167; --rail: #0A0B0E; --canvas: #0D0E12; --surface: #15171C; --surface-2: #1A1D24; --surface-hover: #1E222A; --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.13); --ring: rgba(255,255,255,.06); --fg-1: #F4F6F9; --fg-2: #AEB6C2; --fg-3: #94A3B8; --fg-4: #64748B; --accent: #3FBBA0; --accent-hover: #4FCEB2; --accent-soft: rgba(63,187,160,.14); --accent-line: rgba(63,187,160,.32); --good: #73C167; --warn: #F59E0B; --error: #F87171; --info: #579BFC; --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.34); --shadow-pop: 0 18px 50px rgba(0,0,0,.55); --glow: 0 0 0 4px rgba(63,187,160,.16); --grad-hero: radial-gradient(120% 140% at 0% 0%, rgba(63,187,160,.16) 0%, rgba(63,187,160,0) 46%), radial-gradient(120% 160% at 100% 0%, rgba(0,62,126,.30) 0%, rgba(0,62,126,0) 52%), linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)); --grad-logo: linear-gradient(155deg,#3FBBA0,#003E7E); --grad-bar: linear-gradient(180deg,#5BD3B8,#3FBBA0 55%,#2C7E9E); --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px; --mono: "JetBrains Mono", ui-monospace, monospace; --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html[data-theme="light"] { color-scheme: light; --rail: #0A1A2E; --canvas: #EEF3F9; --surface: #FFFFFF; --surface-2: #F6F9FC; --surface-hover: #F0F5FA; --border: rgba(10,37,64,.12); --border-strong: rgba(10,37,64,.20); --ring: rgba(255,255,255,.7); --fg-1: #0A2540; --fg-2: #3A5269; --fg-3: #475569; --fg-4: #64748B; --accent: #1F8F77; --accent-hover: #18876f; --accent-soft: rgba(31,143,119,.12); --accent-line: rgba(31,143,119,.30); --shadow-card: 0 1px 2px rgba(10,37,64,.06), 0 10px 28px rgba(10,37,64,.08); --shadow-pop: 0 18px 44px rgba(10,37,64,.18); --grad-hero: radial-gradient(120% 150% at 0% 0%, rgba(63,187,160,.18) 0%, rgba(63,187,160,0) 50%), radial-gradient(120% 160% at 100% 0%, rgba(0,62,126,.16) 0%, rgba(0,62,126,0) 55%), linear-gradient(180deg,#ffffff,#f4f9fd); }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--fg-1); background: var(--canvas); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--rail); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; height: 100vh; padding: 18px 14px; position: sticky; top: 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
html[data-theme="light"] .rail { --fg-2: #AFC0D2; --fg-3: #7E94AA; --fg-1: #ffffff; --border: rgba(255,255,255,.1); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--grad-logo); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.brand-name { font-size: 14px; font-weight: 800; color: var(--fg-1); line-height: 1.1; }
.brand-sub { color: var(--fg-3); font-family: var(--mono); font-size: 10px; margin-top: 2px; }
.nav-group-label { color: var(--fg-4); font-size: 10px; font-weight: 700; letter-spacing: .13em; padding: 14px 10px 6px; text-transform: uppercase; }
.nav-item { align-items: center; border-radius: var(--r-sm); color: var(--fg-2); display: flex; font-size: 13px; font-weight: 600; gap: 11px; padding: 9px 11px; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--fg-1); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item i, .nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-count { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--fg-3); background: rgba(255,255,255,.06); padding: 1px 7px; border-radius: var(--r-pill); }
.rail-cta { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: var(--r-sm); background: rgba(255,255,255,.04); border: 1px dashed var(--border-strong); color: var(--fg-2); font-size: 12.5px; font-weight: 700; transition: .15s; }
.rail-cta:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.rail-cta i, .rail-cta svg { width: 15px; height: 15px; }
.rail .user-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid var(--border); min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: var(--r-pill); background: linear-gradient(160deg,#73C167,#003E7E); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.user-name { color: var(--fg-1); font-size: 12.5px; font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { color: var(--fg-3); font-family: var(--mono); font-size: 10px; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 13px 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 82%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tb-title { display: flex; flex-direction: column; gap: 1px; min-width: 120px; }
.tb-crumb { color: var(--fg-3); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.tb-h { color: var(--fg-1); font-size: 17px; font-weight: 800; line-height: 1.1; }
.search { flex: 1; max-width: 380px; margin-left: 8px; position: relative; }
.search i, .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--fg-3); pointer-events: none; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--fg-1); font-size: 13px; font-family: var(--sans); outline: none; transition: .15s; min-height: 38px; }
html[data-theme="light"] .search input { background: var(--surface); }
.search input::placeholder { color: var(--fg-3); }
.search input:focus { border-color: var(--accent-line); box-shadow: var(--glow); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-right form { margin: 0; }
.content { padding: 26px 28px 56px; max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
section { margin: 0; }
h1, h2, h3, h4 { margin: 0 0 12px; letter-spacing: 0; }
h2 { font-size: clamp(24px, 2vw, 32px); }
h3 { font-size: 22px; }
h4 { font-size: 14px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { border-bottom: 1px solid var(--border-subtle); padding: 12px 14px; text-align: left; vertical-align: top; }
th { background: rgba(255, 255, 255, 0.04); color: var(--text-secondary); }
:root[data-theme="light"] th { background: rgba(0, 62, 126, 0.06); }
form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 8px 0; }
.stack, .login form { display: grid; gap: 12px; align-items: stretch; max-width: 720px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
label { display: grid; gap: 6px; color: var(--text-primary); font-weight: 800; }
input, select, textarea { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--border-hover); border-radius: 8px; padding: 9px 11px; font: inherit; color: var(--text-primary); background: var(--surface-input); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(63, 187, 160, 0.55); outline-offset: 2px; border-color: rgba(63, 187, 160, 0.68); }
textarea { min-height: 140px; }
fieldset { border: 1px solid var(--border-subtle); border-radius: 8px; padding: 10px; }
legend { font-weight: 800; }
.check { display: flex; grid-template-columns: none; align-items: center; gap: 6px; font-weight: 600; }
.check input { min-height: 0; }
.compact { gap: 6px; margin-top: 10px; }
button { min-height: 40px; border: 1px solid transparent; border-radius: 8px; background: var(--gradient-luxury); color: #ffffff; padding: 0 16px; font-weight: 800; cursor: pointer; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 20px rgba(0, 62, 126, 0.28); transition: filter 160ms ease, transform 160ms ease, border-color 160ms ease; }
button:hover { filter: brightness(1.06); transform: translateY(-1px); }
button:active { transform: translateY(0); }
.secondary-button, .theme-toggle { background: var(--surface-card); color: var(--text-primary); border-color: var(--border-subtle); box-shadow: none; }
.secondary-button:hover, .theme-toggle:hover { background: var(--surface-card-hover); border-color: var(--border-hover); }
.theme-toggle { min-width: 74px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading span { color: var(--text-muted); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.notice { color: var(--text-primary); background: rgba(63, 187, 160, 0.10); border: 1px solid rgba(63, 187, 160, 0.24); border-radius: 10px; padding: 12px 14px; font-weight: 800; }
.muted { color: var(--text-muted); }
.app-create-form { margin-bottom: 24px; padding: 18px; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 12px; }
.app-list { display: grid; gap: 18px; }
.app-card { scroll-margin-top: 18px; display: grid; gap: 18px; padding: 20px; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-card); }
.app-card:target { border-color: rgba(63, 187, 160, 0.72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 0 0 3px rgba(63, 187, 160, 0.14), var(--shadow-card); }
.app-card-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--border-subtle); padding-bottom: 16px; }
.app-card-header p { margin: 0; color: var(--text-muted); font-weight: 700; }
.app-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; min-height: 30px; border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 900; border: 1px solid var(--border-subtle); background: var(--surface-input); color: var(--text-secondary); }
.status-good { border-color: rgba(63, 187, 160, 0.34); color: var(--cit-teal); background: rgba(63, 187, 160, 0.08); }
.status-api-good { border-color: rgba(115, 193, 103, 0.42); color: #8ee985; background: rgba(115, 193, 103, 0.10); }
.status-neutral { border-color: var(--border-subtle); color: var(--text-muted); background: var(--surface-input); }
.status-missing { border-color: rgba(255, 155, 155, 0.28); color: #ffb7b7; background: rgba(155, 28, 28, 0.12); }
:root[data-theme="light"] .status-api-good { color: #1b6e3b; background: rgba(115, 193, 103, 0.14); }
:root[data-theme="light"] .status-missing { color: #8a1c1c; background: rgba(155, 28, 28, 0.06); }
.app-card-grid { display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1fr) minmax(360px, 1.5fr); gap: 18px; align-items: start; }
.app-card-grid > * { min-width: 0; }
.app-settings-form, .app-credentials-form, .credential-summary { display: grid; gap: 12px; min-width: 0; }
.credential-summary { align-content: start; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 10px; padding: 14px; background: rgba(255, 255, 255, 0.025); }
:root[data-theme="light"] .credential-summary { background: rgba(0, 62, 126, 0.03); }
.credential-summary p { margin: 0; min-width: 0; }
.secret-chip, .saved-secret { color: var(--text-secondary); font-weight: 800; }
.secret-chip { display: inline-flex; max-width: 100%; white-space: normal; overflow-wrap: anywhere; margin: 0 6px 6px 0; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 5px 8px; background: var(--surface-input); }
.credential-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; min-width: 0; }
.credential-field { display: grid; gap: 6px; min-width: 0; }
.test-status { color: var(--text-secondary); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border-subtle); padding-top: 16px; }
.app-actions form { margin: 0; }
.test-feedback { position: fixed; z-index: 20; right: 24px; bottom: 24px; width: min(720px, calc(100vw - 32px)); max-height: min(70vh, 680px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px; color: var(--text-primary); background: #18191d; border: 1px solid rgba(255, 255, 255, 0.18); border-left-width: 5px; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.48); }
:root[data-theme="light"] .test-feedback { background: #ffffff; border-color: rgba(0, 62, 126, 0.18); box-shadow: 0 16px 36px rgba(10, 37, 64, 0.18); }
.test-feedback-success { border-left-color: var(--cit-teal); }
.test-feedback-failure { border-left-color: #ff9b9b; }
.test-feedback strong { display: block; margin-bottom: 4px; }
.test-feedback p { margin: 0; color: var(--text-secondary); font-weight: 800; overflow-wrap: anywhere; }
.test-feedback a { color: var(--text-primary); font-weight: 900; }
.test-log { margin-top: 8px; color: var(--fg-2); font-size: 11.5px; font-weight: 700; }
.test-log summary { cursor: pointer; color: var(--fg-1); font-weight: 800; }
.test-log pre { margin: 8px 0 0; padding: 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 8px; color: var(--fg-2); }
.security-grid { display: grid; gap: 28px; min-width: 0; }
.glass-card, .security-panel, .login, .summary div { position: relative; overflow: hidden; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.security-panel { min-width: 0; margin: 0; padding: 24px; }
.password-reset-form, .local-user-form { display: grid; gap: 18px; align-items: stretch; margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; width: 100%; }
.field-row > * { min-width: 0; }
.access-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.local-user-form textarea { min-height: 120px; resize: vertical; }
.toggle-row { display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 999px; background: var(--surface-input); color: var(--text-secondary); }
.toggle-row input { width: 16px; min-height: 16px; accent-color: var(--cit-teal); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 2px; }
.form-actions button { min-width: 220px; }
.table-shell { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; margin-top: 24px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
:root[data-theme="light"] .table-shell { background: rgba(255, 255, 255, 0.82); }
.table-shell table { min-width: 1120px; }
.table-shell tr:last-child td { border-bottom: 0; }
.table-shell td:last-child { width: 300px; }
.test-users-table { min-width: 1320px; table-layout: fixed; }
.test-users-table th:nth-child(1), .test-users-table td:nth-child(1) { width: 210px; }
.test-users-table th:nth-child(2), .test-users-table td:nth-child(2) { width: 100px; }
.test-users-table th:nth-child(3), .test-users-table td:nth-child(3), .test-users-table th:nth-child(4), .test-users-table td:nth-child(4) { width: 220px; }
.test-users-table th:nth-child(5), .test-users-table td:nth-child(5) { width: 230px; }
.test-users-table th:nth-child(6), .test-users-table td:nth-child(6) { width: 90px; }
.test-users-table th:nth-child(7), .test-users-table td:nth-child(7) { width: 420px; }
.access-chip-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.access-chip { display: inline-flex; max-width: 100%; min-height: 26px; align-items: center; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 3px 8px; background: var(--surface-input); color: var(--text-secondary); font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
.tool-app-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.tool-app-tabs a { color: var(--text-secondary); font-weight: 900; text-decoration: none; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 9px 12px; background: var(--surface-card); }
.tool-app-tabs a:hover { color: var(--text-primary); background: var(--surface-card-hover); border-color: var(--border-hover); }
.tool-app-list { display: grid; gap: 18px; }
.tool-app-panel { scroll-margin-top: 18px; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.tool-app-panel:target { border-color: rgba(63, 187, 160, 0.72); box-shadow: 0 0 0 3px rgba(63, 187, 160, 0.14), var(--shadow-card); }
.tool-app-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tool-app-header p { margin: 0; color: var(--text-muted); font-weight: 700; }
.tool-bulk-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.tool-bulk-actions form { margin: 0; }
.tool-table-shell { margin-top: 0; }
.group-editor { margin-top: 8px; }
.group-editor summary { color: var(--text-secondary); cursor: pointer; font-weight: 900; }
.group-editor fieldset { display: grid; gap: 8px; margin-top: 8px; }
.manage-actions { display: grid; gap: 8px; min-width: 260px; }
.manage-actions form { margin: 0; }
.password-inline-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: 8px; align-items: center; }
.access-inline-form { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)) auto; gap: 10px; align-items: start; }
.identity-link-form { display: grid; gap: 10px; align-items: stretch; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
:root[data-theme="light"] .identity-link-form { background: rgba(0, 62, 126, 0.03); }
.identity-link-head { display: grid; gap: 2px; }
.identity-link-head strong { color: var(--text-primary); font-size: 13px; font-weight: 900; }
.identity-link-head span { color: var(--text-muted); font-size: 12px; font-weight: 700; line-height: 1.35; }
.identity-link-form label { color: var(--text-secondary); font-size: 12px; font-weight: 900; }
.identity-link-form input, .identity-link-form select { min-height: 38px; padding: 8px 10px; }
.identity-link-form button { justify-self: start; }
.preferred-provider-form { display: grid; grid-template-columns: minmax(116px, 1fr) auto; gap: 8px; align-items: center; }
.preferred-provider-form select { min-width: 0; }
.access-picker { display: grid; gap: 8px; min-width: 0; }
.access-picker details { position: relative; }
.access-picker summary { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; border: 1px solid var(--border-hover); border-radius: 8px; padding: 8px 10px; background: var(--surface-input); color: var(--text-primary); font-weight: 900; }
.access-picker summary::-webkit-details-marker { display: none; }
.access-picker summary::after { content: "Edit"; color: var(--cit-teal); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.access-picker summary strong { min-width: 24px; min-height: 24px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(63, 187, 160, 0.16); color: var(--cit-teal); font-size: 12px; }
.access-menu { width: 100%; max-height: 300px; overflow: auto; margin-top: 8px; border: 1px solid var(--border-hover); border-radius: 10px; padding: 10px; background: #17181c; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28); }
:root[data-theme="light"] .access-menu { background: #ffffff; box-shadow: 0 18px 36px rgba(10, 37, 64, 0.18); }
.access-menu-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.access-menu-actions button { flex: 1 1 0; min-height: 34px; padding-inline: 10px; }
.access-options { display: grid; gap: 6px; }
.access-option { display: flex; grid-template-columns: none; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.035); color: var(--text-secondary); font-size: 13px; font-weight: 900; }
:root[data-theme="light"] .access-option { background: rgba(0, 62, 126, 0.04); }
.access-option:hover { background: var(--surface-card-hover); color: var(--text-primary); }
.access-option input { width: 16px; min-height: 16px; accent-color: var(--cit-teal); flex: 0 0 auto; }
.access-option span { overflow-wrap: anywhere; }
.access-selected { min-height: 34px; max-height: 92px; overflow: auto; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 7px; background: rgba(255, 255, 255, 0.025); }
:root[data-theme="light"] .access-selected { background: rgba(0, 62, 126, 0.03); }
.password-inline-form input { min-height: 38px; }
.password-inline-form button, .compact-action button { min-height: 38px; padding-inline: 12px; }
.compact-action { display: flex; justify-content: flex-start; }
.inline-action { margin-top: 16px; }
.login { width: min(92vw, 400px); margin: 48px auto; padding: 36px 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--fg-1); box-shadow: var(--shadow-card); }
.login h1 { margin: 0 0 22px; text-align: center; color: var(--fg-1); font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.provider-login-stack { display: grid; gap: 14px; }
.provider-login-stack form { margin: 0; }
.provider-login { width: 100%; min-height: 46px; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 10px; border: 1px solid rgba(10, 10, 10, 0.14); border-radius: var(--r-sm); padding: 0 16px; background: #ffffff; color: #1a1a1a; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.provider-login:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); }
.provider-login > span:last-child { min-width: 0; text-align: left; overflow-wrap: anywhere; }
.provider-mark { width: 28px; height: 28px; display: inline-grid; place-items: center; justify-self: center; flex: 0 0 auto; }
.microsoft-mark, .google-mark { display: block; }
.sso-mark { color: #050505; }
.local-login-panel { display: grid; gap: 12px; margin-top: 6px; padding-top: 4px; }
.local-login-heading { color: rgba(247, 247, 248, 0.72); font-size: 13px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.local-login-form { display: grid; gap: 12px; }
.local-login-form label { display: grid; gap: 6px; color: rgba(247, 247, 248, 0.76); font-size: 13px; font-weight: 900; }
.local-login-form input { min-height: 50px; border-color: rgba(255, 255, 255, 0.18); background: #ffffff; color: #050505; }
.local-login-submit { min-height: 52px; border: 0; border-radius: 10px; background: var(--cit-teal); color: #05110f; font-weight: 900; cursor: pointer; }
.identity-provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.identity-provider-card { display: grid; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.identity-provider-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-primary); font-weight: 900; }
.identity-provider-head span { display: flex; align-items: center; gap: 8px; }
.identity-provider-head strong { color: var(--cit-teal); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.identity-setup-guide { display: grid; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid rgba(63, 187, 160, 0.28); border-radius: 10px; background: rgba(63, 187, 160, 0.08); }
.identity-setup-guide h4, .provider-setup strong { margin: 0; color: var(--text-primary); font-size: 14px; font-weight: 900; }
.identity-setup-guide ol, .provider-setup ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-secondary); line-height: 1.5; }
.identity-setup-guide p { margin: 0; color: var(--text-secondary); line-height: 1.5; }
.provider-setup { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-input); }
.provider-setup code { overflow-wrap: anywhere; }
.provider-capabilities { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-capabilities span, .filter-tab { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 5px 10px; background: var(--surface-input); color: var(--text-secondary); font-size: 12px; font-weight: 900; text-decoration: none; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-tab.active, .filter-tab:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-card-hover); }
.user-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.user-search label { color: var(--text-secondary); font-size: 12px; font-weight: 900; }
.user-search input { flex: 1 1 220px; max-width: 420px; }
.user-list-summary { margin: 0; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.user-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 14px 0; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.user-pagination .disabled { cursor: not-allowed; opacity: .45; }
.users-table-shell { margin-top: 24px; }
.users-table { min-width: 1340px; table-layout: fixed; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 210px; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 86px; }
.users-table th:nth-child(3), .users-table td:nth-child(3),
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 104px; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width: 180px; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width: 210px; }
.users-table th:nth-child(7), .users-table td:nth-child(7) { width: 96px; }
.users-table th:nth-child(8), .users-table td:nth-child(8) { width: 390px; }
.users-table .access-chip { min-height: 24px; padding: 2px 7px; font-size: 11px; line-height: 1.25; }
.users-table .manage-actions { min-width: 0; }
.users-table .access-inline-form { grid-template-columns: minmax(0, 1fr); }
.users-table .access-inline-form > button { grid-column: 1 / -1; justify-self: start; }
.user-cards { display: grid; gap: 14px; margin-top: 22px; }
.user-card { padding: 0; }
.user-card > summary { cursor: pointer; list-style: none; }
.user-card > summary::-webkit-details-marker { display: none; }
.user-card-head { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.user-card:not([open]) > .user-card-head { border-bottom: 0; }
.user-card-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
html[data-theme="light"] .user-card-head { background: var(--surface-2); }
.user-card-id { display: flex; align-items: center; gap: 12px; min-width: 220px; flex: 1 1 240px; }
.user-card-idtext { min-width: 0; }
.user-card-name { font-weight: 700; color: var(--fg-1); font-size: 14px; }
.user-card-email { font-family: var(--mono); font-size: 12px; color: var(--fg-3); word-break: break-all; }
.user-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-card-lastlogin { font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.user-card-lastlogin b { color: var(--fg-2); font-weight: 600; font-family: var(--mono); }
.user-card-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.user-card-toggle i { width: 15px; height: 15px; transition: transform .15s ease; }
.user-card[open] .user-card-toggle i { transform: rotate(180deg); }
.user-card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 24px; padding: 18px; align-items: start; }
.user-card-col { display: grid; gap: 16px; min-width: 0; align-content: start; }
.user-field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.user-field-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); font-weight: 700; }
.access-inline-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; align-content: start; }
.access-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.access-inline-form > button { justify-self: start; }
.user-card-foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px 16px; }
.user-card-foot:empty { display: none; }
.integration-setup-note { display: grid; gap: 14px; margin: 0 0 18px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.025); }
.integration-setup-note h4, .integration-section h4 { margin: 0 0 4px; }
.integration-setup-note p, .integration-section-head p { margin: 0; color: var(--fg-3); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.integration-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.integration-flow span { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--fg-2); background: rgba(255, 255, 255, 0.025); font-size: 12px; font-weight: 700; }
.integration-flow b { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.integration-section { display: grid; gap: 12px; margin-top: 20px; }
.integration-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.integration-create-form { padding: 16px; border: 1px solid var(--border); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.025); }
.default-integration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 0; }
.default-integration-card { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.default-integration-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.default-integration-meta { display: grid; gap: 8px; font-size: 12px; color: var(--fg-2); }
.default-integration-meta span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.default-integration-meta b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); }
.default-integration-card textarea { min-height: 126px; }
.integration-cards { display: grid; gap: 14px; margin-top: 0; }
.integration-card { padding: 0; }
.integration-form { display: grid; gap: 16px; padding: 18px; margin: 0; align-items: stretch; }
.integration-form textarea { min-height: 110px; }
.integration-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.015); }
.integration-secret-form { margin: 0; display: flex; justify-content: flex-end; }
.generated-secrets { display: grid; gap: 10px; margin-bottom: 18px; padding: 14px; border: 1px solid rgba(63, 187, 160, 0.28); border-radius: 10px; background: rgba(63, 187, 160, 0.08); }
.generated-secret-row { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(180px, 1fr) minmax(220px, 1.4fr); gap: 10px; align-items: center; min-width: 0; }
.generated-secret-row > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .integration-section-head, .integration-card-foot { display: grid; } .integration-secret-form, .integration-secret-form button { width: 100%; } }
@media (max-width: 980px) { .user-card-body { grid-template-columns: 1fr; } .access-pickers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .generated-secret-row { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .access-pickers { grid-template-columns: 1fr; } }
.dashboard-hero { display: grid; gap: 18px; }
.usage-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.summary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.summary div { padding: 12px; }
.usage-bars { display: grid; grid-template-columns: repeat(24, minmax(8px, 1fr)); gap: 5px; align-items: end; min-height: 118px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.usage-bar { display: flex; align-items: end; justify-content: center; min-width: 0; height: var(--bar-height); min-height: 8px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--cit-teal), var(--cit-blue)); color: white; font-size: 10px; font-weight: 900; }
.usage-bar-error { background: linear-gradient(180deg, #ff9b9b, #8a1c1c); }
.usage-bar span { opacity: 0; }
.usage-bar:hover span { opacity: 1; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-panel { min-width: 0; padding: 18px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.dashboard-table-shell { margin-top: 0; }
.dashboard-table-shell table { min-width: 620px; }
.connector-wizard, .connector-output { min-width: 0; padding: 22px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.connector-setup-note { display: grid; gap: 8px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(60, 192, 174, 0.08); }
.connector-setup-note h3 { margin: 0; font-size: 15px; }
.connector-setup-note p { margin: 0; color: var(--text-secondary); line-height: 1.5; }
.connector-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; margin: 0; }
.connector-form > * { min-width: 0; max-width: 100%; }
.connector-presets { display: flex; flex-wrap: wrap; gap: 10px; }
.connector-presets button { flex: 1 1 132px; min-width: 0; white-space: normal; }
.connector-form .form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: end; }
.connector-form .form-actions button { width: 100%; min-width: 0; }
.connector-output { display: grid; gap: 12px; }
.connector-output pre { max-width: 100%; min-width: 0; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0 0 8px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(0, 0, 0, 0.24); color: var(--text-primary); font-size: 13px; line-height: 1.45; }
:root[data-theme="light"] .connector-output pre { background: rgba(0, 62, 126, 0.05); }
.connector-table-shell table { min-width: 900px; }
.connector-field-shell table { min-width: 520px; }
dt { color: var(--text-muted); font-size: 12px; text-transform: uppercase; }
dd { margin: 4px 0 0; font-weight: 800; }
.error { color: #ff9b9b; font-weight: 700; }
:root[data-theme="light"] .error { color: #9b1c1c; }
code { color: var(--cit-teal); }
@media (max-width: 1100px) { .app-card-grid { grid-template-columns: 1fr; } .app-actions { justify-content: flex-start; } }
@media (max-width: 900px) { .nav-inner { align-items: flex-start; flex-direction: column; } .nav-actions { justify-content: flex-start; } .field-row, .access-row, .dashboard-grid { grid-template-columns: 1fr; } .form-actions { justify-content: stretch; } .form-actions button { width: 100%; } }
@media (max-width: 640px) { .login { border-radius: var(--r-lg); padding: 28px 20px; } .login h1 { font-size: 26px; } .provider-login { min-height: 44px; grid-template-columns: 20px 1fr; padding-inline: 14px; font-size: 14px; } .provider-mark { width: 20px; height: 20px; } .microsoft-mark { grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 2px; } }
@media (max-width: 640px) { main { padding: 24px 16px 40px; } header { padding-inline: 16px; } .nav-inner { padding-inline: 16px; } .nav-links, .nav-actions { width: 100%; } .nav-links a { flex: 1 1 auto; text-align: center; } .nav-actions > *, .nav-actions form, .nav-actions button { flex: 1 1 auto; } .app-card-header, .tool-app-header { display: grid; } .app-badges, .tool-bulk-actions { justify-content: flex-start; } .app-card, .tool-app-panel, .security-panel, .connector-wizard, .connector-output { padding: 18px; } .connector-form .form-actions { grid-template-columns: 1fr; } .section-heading { display: grid; gap: 4px; } .masthead { gap: 14px; } .brand-logo { width: 112px; } }

:root { --cit-dark: var(--canvas); --surface-canvas: var(--canvas); --surface-card: var(--surface); --surface-card-hover: var(--surface-hover); --surface-input: rgba(255,255,255,.04); --border-subtle: var(--border); --border-hover: var(--border-strong); --text-primary: var(--fg-1); --text-secondary: var(--fg-2); --text-muted: var(--fg-3); --gradient-luxury: var(--accent); }
html[data-theme="light"] { --surface-input: var(--surface); }
.brand-logo { width: 34px; height: 34px; }
h1, h2, h3, h4 { color: var(--fg-1); letter-spacing: 0; }
h2 { font-size: 15px; font-weight: 800; }
h3 { font-size: 13.5px; font-weight: 800; }
h4 { color: var(--fg-3); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
label { color: var(--fg-2); font-size: 12px; font-weight: 700; }
input, select, textarea { border: 1px solid var(--border); border-radius: var(--r-sm); background: rgba(255,255,255,.04); color: var(--fg-1); font: inherit; }
select { color-scheme: dark; }
select option, select optgroup { background: #17181C; color: #F4F6F9; }
select option:checked { background: #003E7E; color: #FFFFFF; }
html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: var(--surface); }
html[data-theme="light"] select { color-scheme: light; }
html[data-theme="light"] select option, html[data-theme="light"] select optgroup { background: #FFFFFF; color: #0A2540; }
html[data-theme="light"] select option:checked { background: #1F8F77; color: #FFFFFF; }
input::placeholder, textarea::placeholder { color: var(--fg-3); }
button, .btn, .secondary-button, .button-link { min-height: 38px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: rgba(255,255,255,.04); color: var(--fg-1); box-shadow: none; font-size: 13px; font-weight: 700; }
button:hover, .btn:hover, .secondary-button:hover, .button-link:hover { background: var(--surface-hover); border-color: var(--border-strong); filter: none; transform: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; cursor: pointer; transition: all .16s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.btn i, .btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: #08110F; border-color: transparent; box-shadow: 0 6px 18px rgba(63,187,160,.28); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.publish { background: rgba(255,255,255,.04); color: var(--fg-2); border-color: var(--border-subtle); box-shadow: none; }
.btn.publish:hover { background: var(--surface-hover); color: var(--fg-1); border-color: var(--border-strong); }
.btn.publish.needs-publish { background: var(--accent); color: #08110F; border-color: transparent; box-shadow: 0 6px 18px rgba(63,187,160,.28); }
.btn.publish.needs-publish:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { color: var(--fg-1); background: rgba(255,255,255,.05); }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.icon-btn { width: 36px; height: 36px; min-height: 36px; display: grid; place-items: center; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--fg-2); }
.icon-btn i, .icon-btn svg { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; }
.chip.teal { background: rgba(63,187,160,.15); color: var(--accent); }
.chip.green { background: rgba(115,193,103,.15); color: #8FD984; }
.chip.blue { background: rgba(87,155,252,.15); color: #8FB5FF; }
.chip.amber { background: rgba(245,158,11,.15); color: #FBBF24; }
.chip.red { background: rgba(248,113,113,.15); color: #FCA5A5; }
.chip.neutral { background: rgba(255,255,255,.06); color: var(--fg-2); }
.chip.mode { background: rgba(255,255,255,.05); color: var(--fg-2); font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; border: 1px solid var(--border); }
.pill i, .pill svg { width: 12px; height: 12px; }
.pill.ok { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.api { color: #8FD984; border-color: rgba(115,193,103,.35); background: rgba(115,193,103,.1); }
.pill.off { color: var(--fg-3); background: rgba(255,255,255,.04); }
.pill.miss { color: #FCA5A5; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.1); }
.panel, .security-panel, .connector-wizard, .connector-output, .login { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; overflow: hidden; position: relative; }
.panel.ring::after, .security-panel::after, .connector-wizard::after, .connector-output::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 var(--ring); pointer-events: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; }
.panel-body { max-width: 100%; overflow-x: auto; padding: 6px; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-label h2 { margin: 4px 0 0; font-size: 15px; }
.eyebrow { color: var(--fg-3); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
.hero-bg { position: absolute; inset: 0; background: var(--grad-hero); pointer-events: none; }
.hero-inner { position: relative; display: flex; align-items: center; gap: 28px; padding: 24px 26px; flex-wrap: wrap; }
.hero-text { min-width: 240px; flex: 1; }
.hero-text h1 { margin: 8px 0 6px; font-size: 25px; font-weight: 800; letter-spacing: 0; }
.hero-text p { margin: 0; color: var(--fg-2); font-size: 13.5px; max-width: 70ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.metric { padding: 15px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); overflow: hidden; text-decoration: none; }
.metric[href]:hover { border-color: var(--border-hover); background: var(--surface-card-hover); }
.metric .eyebrow { margin-bottom: 9px; }
.metric .val { color: var(--fg-1); font-size: 26px; font-weight: 800; line-height: 1; }
.metric .val small { color: var(--fg-3); font-size: 13px; margin-left: 3px; }
.metric .sub { color: var(--fg-3); display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; margin-top: 6px; }
.metric .sub.up { color: var(--good); }
.metric .sub.down { color: var(--error); }
.chart { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 6px; align-items: end; height: 140px; padding: 18px 18px 14px; }
.bar { position: relative; border-radius: 5px 5px 2px 2px; background: var(--grad-bar); min-height: 5px; }
.bar.err { background: linear-gradient(180deg,#FCA5A5,#B23B3B); }
.bar .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--fg-1); font-size: 11px; font-family: var(--mono); white-space: nowrap; padding: 5px 8px; border-radius: 6px; opacity: 0; pointer-events: none; box-shadow: var(--shadow-pop); z-index: 3; }
.bar:hover .tip { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; padding: 0 18px 14px; font-size: 10px; color: var(--fg-4); font-family: var(--mono); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); background: transparent; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--fg-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl .name { color: var(--fg-1); font-weight: 600; }
.tbl .mono, .mono { font-family: var(--mono); font-size: 12px; color: var(--fg-3); word-break: break-all; overflow-wrap: break-word; }
.tbl .num { font-variant-numeric: tabular-nums; color: var(--fg-1); font-weight: 600; }
.tbl .err-num { color: var(--error); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.app-list, .app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.app-card { display: flex; flex-direction: column; gap: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; transition: border-color .15s; }
.app-card:hover { border-color: var(--border-strong); }
.app-card.disabled { opacity: .72; }
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 18px 14px; background: var(--grad-hero); }
.app-ident { display: flex; gap: 13px; align-items: center; min-width: 0; }
.app-mark { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; color: var(--accent); font-weight: 800; font-size: 15px; font-family: var(--mono); }
.app-name { font-size: 15px; font-weight: 800; color: var(--fg-1); }
.app-sub { font-size: 11px; color: var(--fg-3); font-family: var(--mono); margin-top: 3px; }
.app-pills { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.app-card-body { padding: 14px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; border-top: 1px solid var(--border); }
.field-mini .eyebrow { margin-bottom: 5px; }
.field-mini .v { color: var(--fg-1); font-size: 13px; font-weight: 600; }
.field-mini .v.mono { color: var(--fg-2); font-size: 11.5px; word-break: break-word; }
.provider-statuses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.provider-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--fg-2); font-size: 11px; font-weight: 800; padding: 4px 10px; }
.provider-chip i, .provider-chip svg { width: 12px; height: 12px; }
.provider-ok, .cred-chip.api-ok { border-color: rgba(115,193,103,.46); background: rgba(115,193,103,.12); color: #b8f0ae; }
.provider-ok i, .provider-ok svg, .cred-chip.api-ok i, .cred-chip.api-ok svg { color: var(--good); }
.provider-fail, .cred-chip.api-fail { border-color: rgba(248,113,113,.48); background: rgba(248,113,113,.12); color: #fecaca; }
.provider-fail i, .provider-fail svg, .cred-chip.api-fail i, .cred-chip.api-fail svg { color: var(--error); }
.provider-missing, .cred-chip.api-missing { border-color: var(--border); background: rgba(255,255,255,.03); color: var(--fg-3); }
.provider-missing i, .provider-missing svg, .cred-chip.api-missing i, .cred-chip.api-missing svg { color: var(--fg-4); }
.cred-chips { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.cred-chip, .secret-chip, .access-chip, .group-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--fg-2); font-size: 11px; font-weight: 600; padding: 4px 10px; }
.cred-chip i, .cred-chip svg { width: 12px; height: 12px; color: var(--accent); }
.app-card-foot { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--border); background: rgba(255,255,255,.015); }
.app-card-foot .spacer { flex: 1; }
.switch { position: relative; width: 38px; height: 22px; min-height: 22px; padding: 0; border-radius: var(--r-pill); background: rgba(255,255,255,.12); border: 1px solid var(--border-strong); box-shadow: none; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 1.5px; left: 2px; width: 16px; height: 16px; border-radius: var(--r-pill); background: #fff; transition: .18s cubic-bezier(.2,.8,.2,1); }
.switch.on { background: var(--accent); border-color: transparent; }
.switch.on::after { transform: translateX(16px); }
.tabs, .tool-app-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tab, .tool-app-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); font-size: 12.5px; font-weight: 700; }
.tab.active, .tool-app-tabs a.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.tab .c { font-family: var(--mono); font-size: 11px; opacity: .8; }
.tool-app-panel { padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.tool-app-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.tool-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.tool-row:last-child { border-bottom: none; }
.tool-row:hover { background: rgba(255,255,255,.02); }
.tool-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--fg-1); word-break: break-all; overflow-wrap: break-word; }
.tool-desc { color: var(--fg-3); font-size: 12px; margin-top: 3px; }
.tool-tags { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.tool-right { display: flex; align-items: center; gap: 16px; }
.tool-calls { text-align: right; font-size: 11px; color: var(--fg-3); font-family: var(--mono); min-width: 64px; }
.tool-calls b { display: block; font-size: 15px; color: var(--fg-1); font-weight: 700; }
.tool-table-shell, .table-shell { border-color: var(--border); background: rgba(255,255,255,.025); max-width: 100%; overflow-x: auto; }
.access-option, .toggle-row { color: var(--fg-2); background: rgba(255,255,255,.035); border-color: var(--border); }
.notice { color: var(--fg-1); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-md); padding: 12px 14px; font-weight: 700; }
.muted { color: var(--fg-3); }
.error { color: #FCA5A5; }
code, pre { font-family: var(--mono); }
.mobile-menu-trigger { display: none; }
.mobile-menu-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 90; }
button:focus-visible, .btn:focus-visible, .secondary-button:focus-visible, .tab:focus-visible, .switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle i, .theme-toggle svg { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.theme-toggle:hover i { transform: rotate(45deg) scale(1.1); }
@media (max-width: 1180px) { .app-list, .app-grid, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .topbar { align-items: stretch; flex-direction: column; } .search { margin-left: 0; max-width: none; width: 100%; } .tb-right { margin-left: 0; flex-wrap: wrap; } .field-row, .access-row, .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .mobile-menu-trigger { display: grid; place-items: center; }
  .rail { position: fixed; left: -240px; top: 0; bottom: 0; z-index: 100; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-pop); display: flex !important; }
  .rail.open { transform: translateX(240px); }
  .rail.open ~ .mobile-menu-backdrop { display: block; }
  .content { padding: 20px 16px 40px; }
  .tool-row { grid-template-columns: 1fr; }
  .tool-right { justify-content: space-between; flex-wrap: wrap; }
  .dashboard-grid > *, .grid-2 > *, .panel-body > * { min-width: 0; }
}

/* Insights redesign: page header, sub-tabs, filters, suggestion/run cards. */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .hero-text { flex: 1; min-width: 240px; }
.subtabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.subtab { padding: 10px 4px; margin-right: 18px; font-size: 14px; font-weight: 700; color: var(--fg-3); border-bottom: 2px solid transparent; }
.subtab:hover { color: var(--fg-1); }
.subtab.active { color: var(--fg-1); border-bottom-color: var(--accent); }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-fields { margin: 0; flex: 1; min-width: 0; }
.filter-fields .search { flex: 1; min-width: 220px; max-width: 340px; margin-left: 0; }
.stage-tabs { display: inline-flex; gap: 4px; margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.stage-tab { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.stage-tab .c { font-family: var(--mono); font-size: 11px; opacity: .75; }
.stage-tab.active { background: var(--accent); color: #08110F; }
.suggestion-list, .run-list { display: flex; flex-direction: column; gap: 12px; }
.suggestion-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-card); }
.suggestion-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.suggestion-main { display: flex; gap: 12px; min-width: 0; }
.suggestion-body { min-width: 0; }
.suggestion-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.suggestion-title { font-size: 15px; font-weight: 700; color: var(--fg-1); }
.suggestion-evidence { margin: 6px 0 8px; color: var(--fg-2); font-size: 13px; max-width: 640px; }
.suggestion-recommend { margin: 0 0 8px; color: var(--fg-3); font-size: 13px; }
.suggestion-recommend b { color: var(--fg-1); }
.suggestion-detail { margin: 0 0 8px; font-size: 13px; }
.suggestion-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.suggestion-category { text-transform: capitalize; font-size: 11px; }
.suggestion-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.suggestion-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.suggestion-actions form { margin: 0; }
.severity-dot { width: 9px; height: 9px; margin-top: 6px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--fg-3); }
.severity-dot.high { background: var(--error); }
.severity-dot.medium { background: var(--warn); }
.severity-dot.low { background: var(--info); }
.run-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.run-time { min-width: 130px; font-size: 12px; color: var(--fg-3); }
.run-message { flex: 1; font-size: 13px; color: var(--fg-2); }
.run-count { font-size: 12px; font-weight: 700; }
.dot-good, .dot-bad { width: 9px; height: 9px; border-radius: var(--r-pill); flex-shrink: 0; }
.dot-good { background: var(--good); }
.dot-bad { background: var(--error); }
@media (max-width: 760px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .stage-tabs { margin-left: 0; width: 100%; justify-content: space-between; }
  .suggestion-head { flex-direction: column; }
  .suggestion-side { align-items: flex-start; width: 100%; }
  .suggestion-actions { justify-content: flex-start; }
}
