:root {
    color-scheme: dark;
    --bg: #0e1219;
    --panel: #151c25;
    --raised: #1b2430;
    --line: #2b3542;
    --text: #edf3f4;
    --muted: #a4b0be;
    --mint: #73dec1;
    --mint-dark: #152f2d;
    --amber: #e4bc72;
    --error: #ffc5bb;
    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;
    font-size: 14px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--mint);
}
button {
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 15px;
    background: var(--raised);
    color: var(--text);
    white-space: nowrap;
}
button:hover {
    background: #293643;
}
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.primary {
    background: var(--mint);
    border-color: var(--mint);
    color: #0c2824;
    font-weight: 650;
}
.primary:hover {
    background: #91ead2;
}
.quiet {
    background: transparent;
}
.danger {
    color: var(--error);
}
input,
select,
textarea {
    width: 100%;
    border: 1px solid #394757;
    border-radius: 6px;
    background: #101720;
    color: var(--text);
    padding: 11px 12px;
    min-height: 42px;
}
input::placeholder {
    color: #7f8d9d;
}
input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    accent-color: var(--mint);
}
input[readonly] {
    color: var(--muted);
}
label {
    display: block;
    font-size: 13px;
    font-weight: 550;
}
label input,
label select,
label textarea {
    margin-top: 8px;
}
h1,
h2,
p {
    margin: 0;
}
h1 {
    font-size: 30px;
    letter-spacing: -0.7px;
    font-weight: 650;
}
h2 {
    font-size: 19px;
    font-weight: 600;
}
p {
    line-height: 1.6;
}
.muted {
    color: var(--muted);
}
.small {
    font-size: 12px;
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 650;
    color: var(--mint);
    margin-bottom: 10px;
}
.brand-plate {
    background: #e8f0ee;
    border-radius: 8px;
    width: 230px;
    height: 136px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.brand-plate img {
    width: 230px;
    height: auto;
    display: block;
}
.brand-plate.compact {
    width: 126px;
    height: 59px;
}
.brand-plate.compact img {
    width: 143px;
}
.topbar {
    height: 85px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 40px;
}
.workspace-label {
    font-size: 13px;
    display: flex;
    gap: 14px;
}
.account {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}
.account form {
    margin: 0;
}
.workspace {
    max-width: 1480px;
    margin: 0 auto;
    padding: 36px 40px;
}
.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}
.page-intro h1 {
    margin-bottom: 7px;
}
.foundation-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
}
.tabs {
    display: flex;
    gap: 3px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    margin-bottom: 24px;
}
.tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    border-radius: 0;
    color: var(--muted);
    padding: 13px 17px;
}
.tabs button[aria-selected="true"] {
    color: var(--mint);
    border-color: var(--mint);
}
.tabs button:hover {
    color: var(--text);
    background: var(--raised);
}
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 23px 24px 18px;
    gap: 16px;
}
.panel-heading p {
    font-size: 13px;
    margin-top: 6px;
}
.table-tools {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 0 24px 20px;
}
.search-label {
    width: 300px;
}
.search-label input {
    margin: 0;
}
#record-count {
    margin-left: auto;
}
.table-scroll {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}
th {
    color: #bec9d5;
    font-size: 11px;
    font-weight: 600;
    background: #1b2531;
    padding: 13px 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
td {
    padding: 15px 18px;
    border-bottom: 1px solid #27313d;
    max-width: 340px;
    overflow-wrap: anywhere;
}
tbody tr:hover {
    background: #1d2d32;
}
td:first-child {
    font-weight: 550;
}
.row-actions {
    display: flex;
    gap: 4px;
}
.row-actions button {
    padding: 6px 9px;
    font-size: 12px;
    border-color: transparent;
}
.row-actions button:first-child {
    color: var(--mint);
}
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    background: #29313c;
    color: #c6d0dc;
    white-space: nowrap;
}
.badge.good {
    color: var(--mint);
    background: var(--mint-dark);
}
.badge.pending {
    color: var(--amber);
    background: #332e23;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 12px;
}
.pagination > div {
    display: flex;
    gap: 8px;
}
.pagination button {
    font-size: 12px;
    padding: 8px 12px;
}
.empty {
    padding: 58px 24px;
    text-align: center;
}
.empty h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 550;
}
.workspace-footnote {
    font-size: 11px;
    color: #8494a4;
    margin-top: 18px;
}
.notice,
.error {
    padding: 12px 16px;
    border-radius: 5px;
    margin: 0 24px 18px;
    background: var(--mint-dark);
    color: var(--mint);
    line-height: 1.5;
}
.error {
    background: #38262a;
    color: var(--error);
}
[hidden] {
    display: none !important;
}
dialog {
    padding: 0;
    width: min(710px, calc(100% - 28px));
    border: 1px solid #445363;
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 28px 100px #0009;
    max-height: 90dvh;
}
dialog::backdrop {
    background: #03080dbc;
    backdrop-filter: blur(3px);
}
.modal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}
.modal-heading button {
    padding: 6px 9px;
}
.modal-body {
    padding: 24px;
    max-height: 58dvh;
    overflow-y: auto;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-grid .wide {
    grid-column: 1/-1;
}
.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.check-label input {
    margin: 0;
}
.modal-tabs {
    padding: 0 12px;
    margin: 0;
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}
.modal-footer > span {
    margin-right: auto;
    max-width: 320px;
}
.modal-error {
    margin-bottom: 12px;
}
.permissions-table select {
    min-height: 32px;
    padding: 5px;
    font-size: 12px;
}
.permissions-table td,
.permissions-table th {
    padding: 10px 8px;
}
.permissions-table td:first-child {
    font-size: 12px;
}
.read-details {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px 18px;
    margin: 0;
}
.read-details dt {
    color: var(--muted);
}
.read-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.inline-tools {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.inline-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
}
.system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 8px 24px 24px;
}
.system-item {
    background: #101720;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px;
}
.system-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}
.system-item strong {
    font-weight: 550;
}
.login-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 70px;
    max-width: 1180px;
    padding: 60px;
    margin: auto;
}
.login-intro .brand-plate {
    margin-bottom: 44px;
}
.login-intro h1 {
    font-size: 38px;
    line-height: 1.25;
    margin-bottom: 18px;
}
.login-intro .foundation-tag {
    margin-top: 38px;
}
.login-card {
    padding: 36px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.login-card h2 {
    font-size: 26px;
    margin-bottom: 8px;
}
.login-card form {
    margin: 28px 0 20px;
}
.login-card label {
    margin-bottom: 19px;
}
.login-card .error {
    margin: 20px 0 0;
}
.full {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
#twofactor-content {
    margin-top: 18px;
}
#twofactor-content code {
    display: block;
    overflow-wrap: anywhere;
    padding: 12px;
    background: var(--bg);
    line-height: 1.8;
}
#twofactor-content input {
    margin: 14px 0;
}
#twofactor-status {
    margin-top: 16px;
    color: var(--mint);
}
@media (max-width: 850px) {
    .workspace {
        padding: 24px 20px;
    }
    .topbar {
        padding: 0 20px;
        gap: 15px;
    }
    .workspace-label {
        display: none;
    }
    .login-shell {
        padding: 30px;
        gap: 35px;
    }
    .login-intro h1 {
        font-size: 29px;
    }
    .login-card {
        padding: 25px;
    }
    .tabs button {
        padding: 12px;
    }
    .system-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 580px) {
    .topbar {
        height: 76px;
    }
    .account {
        gap: 0;
    }
    .account button {
        font-size: 12px;
        padding: 8px;
    }
    .workspace {
        padding: 22px 12px;
    }
    .page-intro {
        align-items: flex-start;
    }
    .page-intro > .foundation-tag {
        display: none;
    }
    h1 {
        font-size: 26px;
    }
    .panel-heading {
        padding: 20px 16px;
    }
    .panel-heading p {
        max-width: 230px;
    }
    .table-tools {
        padding: 0 16px 16px;
    }
    .search-label {
        width: 100%;
    }
    #record-count {
        white-space: nowrap;
    }
    .pagination {
        padding: 14px 16px;
    }
    .pagination > div {
        gap: 4px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .modal-body {
        padding: 18px;
    }
    .modal-heading,
    .modal-footer {
        padding: 15px 18px;
    }
    .modal-footer > span {
        max-width: 150px;
        font-size: 11px;
    }
    .system-grid {
        grid-template-columns: 1fr;
        padding: 8px 16px 20px;
    }
    .login-shell {
        display: block;
        padding: 30px 20px;
    }
    .login-intro .brand-plate {
        width: 155px;
        height: 95px;
        margin-bottom: 25px;
    }
    .login-intro .brand-plate img {
        width: 165px;
    }
    .login-intro h1 {
        font-size: 26px;
    }
    .login-intro > .muted,
    .login-intro > .foundation-tag {
        display: none;
    }
    .login-card {
        margin-top: 30px;
    }
    .read-details {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .read-details dd {
        margin-bottom: 12px;
    }
}
