:root { --bulma-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --bulma-primary-h: 13deg; --bulma-primary-s: 88%; --bulma-primary-l: 56%; --app-accent: #f1592c; --app-background: #f4f3f1; --app-dark: #171818; --app-muted: #666; --bulma-scheme-main: #fff; --bulma-text: #171818; --bulma-text-strong: #171818; color-scheme: light; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--app-background); color: var(--app-dark); }
.app-header { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; padding: 0 3rem; background: #fff; border-bottom: 1px solid #e5e3df; }
.app-brand { font-size: 1.5rem; letter-spacing: -.06em; color: var(--app-dark); }
.app-brand strong { color: var(--app-accent); font-weight: 650; }
.environment-tag { color: #565550; background: #f4f3f1; border-radius: 2rem; padding: .35rem .8rem; font-size: .75rem; }
.app-main { width: 100%; margin: 0 auto; padding: 2rem clamp(1rem, 2.5vw, 3rem); flex: 1; min-width: 0; }
.eyebrow { color: #ac3715; margin-bottom: .8rem; font-size: .68rem; font-weight: 700; letter-spacing: .12em; }
.title { color: var(--app-dark); letter-spacing: -.035em; }
.box { box-shadow: none; border: 1px solid #e5e3df; border-radius: .75rem; padding: 1.75rem; background: #fff; }
.status-description { font-size: .875rem; color: var(--app-muted); line-height: 1.65; }
.status-line { display: flex; gap: .6rem; align-items: center; margin: 1.75rem 0 .5rem; font-weight: 600; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #c27b1d; }
.status-dot.is-ready { background: #32835b; }
#system-status .button { margin-top: 1.25rem; }
.app-footer { display: flex; justify-content: space-between; padding: 1.5rem 3rem; font-size: .75rem; color: var(--app-muted); border-top: 1px solid #e5e3df; }
@media (max-width: 768px) { .app-header { padding: 0 1.25rem; } .app-footer { padding: 1.5rem 1.25rem; gap: .75rem; flex-direction: column; } }

.app-nav { display: flex; gap: 1.5rem; }
.app-nav a { color: var(--app-dark); font-weight: 600; }
.table small { overflow-wrap: anywhere; font-size: .7rem; color: var(--app-muted); }
code { overflow-wrap: anywhere; }
#issued-key, #issued-token { display: block; user-select: all; margin-top: 1rem; overflow-wrap: anywhere; }
.pagination { gap: 1rem; justify-content: space-between; align-items: center; }
@media (max-width: 900px) { .app-header { flex-wrap: wrap; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; } .app-header form span { display: none; } }

/* Public pages keep readable lines; management tables use the viewport. */
.public-main { max-width: 42rem; padding-top: clamp(2rem, 8vh, 5rem); }
.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .75rem; background: white; z-index: 10; }
.skip-link:focus { top: .5rem; }
:focus-visible { outline: 2px solid #485fc7; outline-offset: 3px; }
[aria-busy="true"] { cursor: progress; }
.form-errors { border-left: 3px solid #b42535; padding-left: .75rem; }
.table-container { max-width: 100%; }
.tabs { max-width: 100%; }
.app-table th:first-child { min-width: 12rem; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
.page-toolbar .title, .page-toolbar .buttons { margin: 0; }
.environment-summary { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1.5rem; color: var(--app-muted); font-size: .875rem; }
.app-table { background: #fff; border: 1px solid #e5e3df; }
.app-table td, .app-table th { padding: .85rem 1rem; vertical-align: middle; }
.app-table small { display: block; margin-top: .25rem; }
.app-table .name-column { min-width: 12rem; }
.app-table .date-column { width: 12rem; white-space: nowrap; font-size: .875rem; }
.app-table .size-column { width: 7rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-table .state-column { width: 10rem; white-space: nowrap; }
.app-table .actions-column { width: 1%; white-space: nowrap; }
.empty-cell { padding: 2rem !important; color: var(--app-muted); }
.row-actions { display: flex; align-items: center; gap: .4rem; }
.icon-button { width: 2.1rem; padding: .25rem; }
.public-key { overflow-wrap: anywhere; font-size: .8rem; }
.action-menu { position: fixed; inset: auto; margin: 0; padding: .35rem; border: 1px solid #ddd; border-radius: .5rem; width: 220px; box-shadow: 0 6px 24px #0002; background: #fff; }
.action-menu button { display: block; width: 100%; padding: .65rem; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--app-dark); font: inherit; }
.action-menu button:hover, .action-menu button:focus-visible { background: #f4f3f1; }
.app-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); border: 0; border-radius: .75rem; padding: 0; background: #fff; color: var(--app-dark); box-shadow: 0 20px 70px #0003; }
.app-dialog::backdrop { background: #17181880; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid #e5e3df; }
.dialog-header .title { margin: 0; }
.dialog-body { padding: 1.5rem; }
.dialog-form { display: grid; gap: 1rem; }
.dialog-form > label, .form-columns label { display: grid; gap: .35rem; }
.dialog-form .check-label { display: block; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.permission-options { display: grid; gap: .65rem; border: 1px solid #e5e3df; padding: 1rem; border-radius: .4rem; }
.permission-options legend { padding: 0 .4rem; font-weight: 600; }
.issued-secret { display: block; padding: 1rem; user-select: all; overflow-wrap: anywhere; border: 1px solid #e5e3df; border-radius: .4rem; }
.selection-search, .selection-pages { display: flex; gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .form-columns { grid-template-columns: 1fr; } .dialog-header, .dialog-body { padding: 1rem; } .page-toolbar > .buttons { width: 100%; } }
