:root {
    --page-background: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #edf1f5;
    --text: #17202a;
    --text-muted: #586575;
    --border: #d7dce2;
    --field-border: #7b8794;
    --header-background: #174ea6;
    --header-text: #ffffff;
    --primary: #174ea6;
    --primary-text: #ffffff;
    --danger: #a61b1b;
    --danger-border: #8b0000;
    --focus: #ffbf47;
    --success-background: #e7f6ec;
    --success-text: #247a3c;
    --error-background: #fdeaea;
    --error-text: #a61b1b;
    --warning-border: #d39b32;
    --warning-background: #fffaf0;
    --ok-border: #4e9b64;
    --ok-background: #f0faf3;
}

body[data-theme="red"] {
    --header-background: #6a2430;
    --primary: #bc465c;
    --danger: #8c1f32;
    --danger-border: #6f1827;
}

body[data-theme="green"] {
    --header-background: #173f32;
    --primary: #236b4e;
    --danger: #9b2525;
    --danger-border: #761b1b;
}

body[data-theme="purple"] {
    --header-background: #38204f;
    --primary: #68408c;
    --danger: #9a243e;
    --danger-border: #751a2e;
}

body[data-theme="black"] {
    --header-background: #000000;
    --primary: #1f1f1f;
    --primary-text: #ffffff;
    --danger: #8c1f32;
    --danger-border: #6f1827;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; background: var(--page-background); color: var(--text); }
.site-header { background: var(--header-background); color: var(--header-text); padding: 1rem; display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.header-top { display: flex; align-items: center; gap: 1rem; }
.brand-area { display: flex; align-items: center; min-height: 3rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 800; color: var(--header-text); text-decoration: none; }
.brand-logo { width: 3rem; height: 3rem; flex: 0 0 3rem; object-fit: contain; }
.brand-name { line-height: 1.2; }
.main-navigation { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.main-navigation[hidden] { display: none !important; }
.main-navigation a { color: var(--header-text); padding: .45rem .55rem; border-radius: .3rem; text-underline-offset: .2em; }
.main-navigation a[aria-current="page"] { background: rgba(255,255,255,.16); text-decoration-thickness: .14em; }
.menu-toggle { display: none; margin-left: auto; border-color: var(--header-text); background: transparent; color: var(--header-text); gap: .55rem; }
.menu-icon { display: inline-flex; width: 1.35rem; flex-direction: column; gap: .25rem; }
.menu-icon span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; }
main, footer { max-width: 1050px; margin: auto; padding: 1.25rem; }
main > h1 { margin-top: 0; margin-bottom: 1rem; line-height: 1.2; }
footer { color: var(--text-muted); font-size: .92rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; padding: 1rem; margin-bottom: 1rem; }
.narrow { max-width: 34rem; }
label { display: block; font-weight: 700; margin: .8rem 0 .3rem; }
input, select, button, .button { font: inherit; min-height: 44px; border-radius: .35rem; }
input, select { width: 100%; padding: .55rem; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); }
button, .button { display: inline-flex; align-items: center; justify-content: center; padding: .55rem .9rem; border: 2px solid var(--primary); background: var(--primary); color: var(--primary-text); text-decoration: none; font-weight: 700; cursor: pointer; }
.secondary { background: var(--surface); color: var(--primary); }
.danger { background: var(--danger); border-color: var(--danger-border); color: #fff; }
.toolbar, .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.format-action-row { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin-bottom: .75rem; }
.format-field { flex: 1 1 15rem; }
.format-action-row button { flex: 0 0 auto; }

.notice { padding: .8rem 1rem; margin: 1rem 0; border: 1px solid; border-radius: .4rem; }
.notice.success { color: var(--success-text); background: transparent; border-color: transparent; padding-left: 0; font-weight: 700; }
.notice.error { background: var(--error-background); color: var(--error-text); border-color: var(--danger); }
.success { background: var(--success-background); }
.error { background: var(--error-background); }
.hint { display: block; color: var(--text-muted); font-size: .92rem; margin-top: .3rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { background: var(--surface-muted); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.key-list { list-style: none; padding: 0; }
.key-list li { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.key-details { flex: 1 1 14rem; min-width: 0; }
.key-details strong, .key-details span { display: block; }
.key-details strong { overflow-wrap: anywhere; }
.key-list li span { color: var(--text-muted); }
.key-actions { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-left: auto; }
.key-rename-form { flex: 1 0 100%; display: grid; grid-template-columns: minmax(12rem, 22rem) auto; gap: .45rem .6rem; align-items: end; padding-top: .25rem; }
.key-rename-form label { grid-column: 1 / -1; margin: 0; }
.key-rename-form input[type="text"] { width: 100%; }
.key-rename-buttons { display: flex; gap: .6rem; flex-wrap: wrap; }
.inline-form { display: inline; }
.identity-key-choice { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.identity-key-choice input[type="checkbox"] { flex: 0 0 1.25rem; width: 1.25rem; min-width: 1.25rem; height: 1.25rem; min-height: 1.25rem; padding: 0; margin: .2rem 0 0; }
.identity-key-choice span { flex: 1 1 auto; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.status-panel { border: 1px solid var(--field-border); background: var(--surface); border-radius: .5rem; padding: 1rem; margin: 1rem 0; }
.status-panel.warning { border-color: var(--warning-border); background: var(--warning-background); }
.status-panel.ok { border-color: var(--ok-border); background: var(--ok-background); }
.status-text { font-weight: 800; margin: 1rem 0; }
.status-error { color: var(--error-text); }
.status-success { color: var(--success-text); }
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { display: inline-flex; min-height: 44px; align-items: center; padding: .55rem .9rem; border: 2px solid var(--primary); border-radius: .35rem; color: var(--primary); background: var(--surface); text-decoration: none; font-weight: 700; }
.tabs a[aria-current="page"] { background: var(--primary); color: var(--primary-text); }
details.roadmap-section { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; margin: .75rem 0; padding: .25rem .8rem; }
details.roadmap-section summary { cursor: pointer; font-weight: 800; padding: .75rem 0; }
.package-results { padding-left: 1.25rem; }

@media (max-width: 720px) {
    .site-header { display: block; padding: .8rem 1rem; }
    .header-top { width: 100%; }
    .brand-area { min-width: 0; flex: 1 1 auto; }
    .brand { min-width: 0; }
    .brand-name { overflow-wrap: anywhere; }
    .brand-logo { width: 2.6rem; height: 2.6rem; flex-basis: 2.6rem; }
    .menu-toggle { display: inline-flex; flex: 0 0 auto; }
    .main-navigation { margin-top: .75rem; flex-direction: column; align-items: stretch; gap: .25rem; }
    .main-navigation a { display: flex; align-items: center; min-height: 44px; padding: .6rem .7rem; }
    main, footer { padding: 1rem; }
    .table-wrap { border: 0; background: transparent; }
    table, thead, tbody, tr, th, td { display: block; }
    thead { position: absolute; left: -9999px; }
    tbody tr { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; margin-bottom: 1rem; padding: .75rem; }
    tbody th, tbody td { border: 0; padding: .4rem 0; }
    .actions button { flex: 1; }
    .key-actions { width: 100%; }
    .key-rename-form { width: 100%; grid-template-columns: 1fr; }
    .key-rename-form label, .key-rename-buttons { grid-column: 1; }
    .key-rename-buttons button { flex: 1 1 auto; }
    .key-actions button { flex: 1 1 auto; }
}


.installation-info {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .5rem 1rem;
    align-items: start;
}
.installation-info dt { font-weight: 700; }
.installation-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.installation-info code { overflow-wrap: anywhere; }
.installation-info button { margin-left: .5rem; }
@media (max-width: 640px) {
    .installation-info { grid-template-columns: 1fr; gap: .2rem; }
    .installation-info dd { margin-bottom: .7rem; }
    .installation-info button { display: block; margin: .5rem 0 0; }
}

.admin-sso-status{
  margin:.35rem 0 0;
  padding:.35rem .75rem;
  font-size:.92rem;
  font-weight:600;
}
