* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
}
header {
    min-height: 80px;
    padding: 18px 40px;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
header nav a {
    color: #e5e7eb;
    text-decoration: none;
}
header nav a:hover {
    text-decoration: underline;
}
main {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 24px;
}
a {
    color: var(--brand-action);
    text-underline-offset: 4px;
}
h1 {
    font-size: 30px;
    letter-spacing: -1px;
    margin-top: 0;
}
h2 {
    font-size: 20px;
}
p {
    line-height: 1.6;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin: 18px 0;
    box-shadow: var(--card-shadow);
}
.login {
    max-width: 480px;
    margin: 8vh auto;
    padding: 36px;
    border-top: 3px solid var(--brand-primary);
}
.login h1 {
    font-size: 26px;
}
label {
    display: block;
    margin: 20px 0 8px;
    font-weight: 600;
}
input,
select,
button {
    font: inherit;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    max-width: 100%;
}
input,
select {
    background: var(--surface);
    color: var(--ink);
}
input:not([type="checkbox"]),
select {
    width: 100%;
}
label input {
    margin-top: 8px;
}
button {
    background: var(--brand-action);
    border-color: var(--brand-action);
    color: white;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
}
button:hover {
    background: var(--brand-hover);
}
.login button {
    width: 100%;
}
.error {
    background: #fff0ec;
    color: #8c3020;
    padding: 14px;
    border-radius: 8px;
}
.success {
    background: #e0f2e5;
    color: #25623d;
    padding: 14px;
    border-radius: 8px;
}
.muted,
small {
    color: var(--muted);
}
.row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 16px;
}
.row > * {
    min-width: 0;
}
form p {
    margin-bottom: 0;
}
details summary {
    cursor: pointer;
    font-weight: 600;
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}
.page-heading h1 {
    margin: 6px 0 8px;
}
.page-heading p {
    margin: 0;
}
.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted);
}
.count-badge {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--surface);
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px;
}
header nav a {
    padding: 8px 12px;
    border-radius: 6px;
}
header nav a[aria-current="page"] {
    background: #ffffff12;
    color: white;
}
.create-account {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}
.create-account > summary,
.account-entry > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
}
.create-account > summary::-webkit-details-marker,
.account-entry > summary::-webkit-details-marker {
    display: none;
}
.create-account > summary:focus-visible,
.account-entry > summary:focus-visible {
    outline-offset: -4px;
    border-radius: 8px;
}
.create-account > summary:hover,
.account-entry > summary:hover {
    background: #fafbfc;
}
.create-account > summary > .disclosure-arrow {
    margin-left: auto;
}
.create-account small,
.account-identity small {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
}
.create-icon,
.account-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--brand-tint);
    color: var(--brand-action);
    font-size: 18px;
    font-weight: 650;
}
.create-icon {
    font-size: 26px;
    font-weight: 400;
}
.accounts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}
.accounts-list {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
}
.panel-heading h2 {
    margin: 0;
    font-size: 16px;
}
.panel-heading > span {
    font-size: 12px;
}
.account-entry {
    border-top: 1px solid var(--border);
}
.account-identity {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.account-identity strong {
    font-size: 15px;
}
.account-status {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.account-status.active {
    color: #226a42;
    background: #e7f4eb;
}
.account-status.inactive {
    color: #636773;
    background: #f0f1f3;
}
.edit-account {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.disclosure-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.15s;
}
details[open] > summary .disclosure-arrow {
    transform: rotate(180deg);
}
.account-form {
    padding: 24px;
    border-top: 1px solid var(--border);
    background: #fcfcfd;
}
.account-fields {
    display: grid;
    grid-template-columns: 1fr 0.75fr 1fr;
    gap: 20px;
}
.edit-fields {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}
.account-form label {
    margin: 0;
    font-size: 12px;
}
.account-form input:not([type="checkbox"]),
.account-form select {
    margin-top: 9px;
    font-size: 14px;
    height: 44px;
}
.account-form small {
    font-weight: 400;
    font-size: 11px;
}
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}
.form-footer p {
    margin: 0;
    font-size: 12px;
}
.form-footer button {
    margin: 0;
    flex-shrink: 0;
}
.check-field {
    display: flex;
    gap: 9px;
    align-items: center;
}
.check-field input {
    margin: 0;
    width: 16px;
    height: 16px;
}
.roles-guide {
    padding: 24px;
    background: #f1f3f5;
    border-radius: 12px;
}
.roles-guide .eyebrow {
    margin: 0 0 10px;
}
.roles-guide h2 {
    font-size: 16px;
    margin: 0 0 24px;
}
.roles-guide dl {
    margin: 0;
}
.roles-guide dl > div + div {
    border-top: 1px solid #dde1e5;
    padding-top: 18px;
    margin-top: 18px;
}
.roles-guide dt {
    font-size: 12px;
    font-weight: 650;
}
.roles-guide dd {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 0 0;
    line-height: 1.65;
}
@media (max-width: 900px) {
    .accounts-layout {
        grid-template-columns: 1fr;
    }
    .roles-guide dl {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .roles-guide dl > div + div {
        border: 0;
        margin: 0;
        padding: 0;
    }
}
small {
    display: block;
    margin-top: 8px;
    line-height: 1.6;
}
@media (max-width: 650px) {
    .page-heading {
        align-items: flex-start;
        gap: 12px;
    }
    .page-heading h1 {
        font-size: 25px;
    }
    .account-fields,
    .edit-fields,
    .roles-guide dl {
        grid-template-columns: 1fr;
    }
    .create-account > summary,
    .account-entry > summary,
    .panel-heading,
    .account-form {
        padding: 18px;
    }
    .panel-heading > span {
        display: none;
    }
    .account-entry > summary {
        gap: 10px;
        flex-wrap: wrap;
    }
    .form-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .form-footer button {
        width: 100%;
    }
    .edit-account {
        margin-left: auto;
    }
    header {
        padding: 18px 20px;
    }
    .row {
        grid-template-columns: 1fr;
    }
    main {
        margin-top: 24px;
        padding: 0 16px;
    }
    .card {
        padding: 24px;
    }
    .login {
        margin: 32px auto;
    }
}
