:root {
    --aps-ink: #1d1d1f;
    --aps-sidebar: #0f0f0f;
    --aps-canvas: #eceef4;
    --aps-panel: #ffffff;
    --aps-line: #e5e7eb;
    --aps-line-soft: #edeef1;
    --aps-muted: #92949e;
    --aps-slate: #5f6168;
    --aps-brand: #296ce2;
    --aps-brand-bg: #e0eafc;
    --aps-danger: #d83a3a;
    --aps-danger-bg: #fff1f1;
    --aps-ok: #1fa75c;
    --aps-ok-bg: #ecfdf5;
    --aps-warn: #bf8708;
    --aps-warn-bg: #fffbeb;
}

html,
body {
    background: var(--aps-canvas);
    color: var(--aps-ink);
    font-family: Inter, Sarabun, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

body {
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d4d6dd;
    border: 2px solid var(--aps-canvas);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bfc2cb;
}

h1:focus {
    outline: none;
}

.validation-message {
    color: #b91c1c;
}

.notification-page {
    padding-top: 28px;
}

.notification-shell {
    margin: 0 auto;
    max-width: 896px;
    width: min(100%, 896px);
}

.notification-tabs {
    align-items: center;
    background: #f4f5f7;
    border: 1px solid var(--aps-line);
    border-radius: 12px;
    display: flex;
    gap: 4px;
    margin: 0 auto 20px;
    padding: 4px;
}

.notification-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--aps-slate);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.notification-tab:hover:not(.is-active) {
    background: #edeef1;
    color: var(--aps-ink);
}

.notification-tab.is-active {
    background: var(--aps-ink);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
    color: #fff;
}

.notification-tab-count {
    align-items: center;
    background: #e5e7eb;
    border-radius: 999px;
    color: var(--aps-muted);
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
}

.notification-tab.is-active .notification-tab-count {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    background: var(--aps-panel);
    border: 1px solid var(--aps-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    overflow: hidden;
}

.notification-card-approved {
    border-color: rgba(31, 167, 92, .25);
}

.notification-card-rejected {
    border-color: rgba(216, 58, 58, .25);
}

.notification-card-urgent {
    border-color: rgba(191, 135, 8, .3);
}

.notification-body,
.notification-batch-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    text-align: left;
    width: 100%;
}

.notification-batch-head:hover {
    background: rgba(244, 245, 247, .55);
}

.notification-icon {
    align-items: center;
    background: #f4f5f7;
    border-radius: 10px;
    color: var(--aps-slate);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.notification-icon-warn {
    background: #fffbeb;
    color: var(--aps-warn);
}

.notification-icon-ok {
    background: #ecfdf5;
    color: var(--aps-ok);
}

.notification-icon-danger {
    background: #fff1f1;
    color: var(--aps-danger);
}

.notification-icon-info {
    background: #f4f5f7;
    color: var(--aps-slate);
}

.notification-icon-batch {
    background: var(--aps-brand-bg);
    color: var(--aps-brand);
}

.notification-content,
.notification-batch-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.notification-heading-row,
.notification-pill-row,
.notification-preview-row,
.notification-event-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-heading-row {
    margin-bottom: 8px;
}

.notification-badge,
.notification-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    min-height: 22px;
    padding: 0 10px;
}

.notification-badge-warn,
.notification-pill-warn {
    background: #fffbeb;
    color: var(--aps-warn);
}

.notification-badge-green,
.notification-pill-ok {
    background: #ecfdf5;
    color: var(--aps-ok);
}

.notification-badge-danger,
.notification-pill-danger {
    background: #fff1f1;
    color: var(--aps-danger);
}

.notification-badge-blue {
    background: var(--aps-brand-bg);
    color: var(--aps-brand);
}

.notification-badge-default,
.notification-pill-default {
    background: #f4f5f7;
    color: var(--aps-slate);
}

.notification-muted {
    color: var(--aps-muted);
    font-size: 12px;
    font-weight: 600;
}

.notification-card h3 {
    color: var(--aps-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 9px;
}

.notification-system-text {
    color: var(--aps-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.notification-event-meta {
    color: var(--aps-muted);
    font-size: 12px;
    font-weight: 600;
}

.notification-event-meta span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.notification-footer {
    align-items: center;
    background: #f4f5f7;
    border-top: 1px solid var(--aps-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px 20px;
}

.notification-footer span {
    color: var(--aps-muted);
    font-size: 12px;
    font-weight: 600;
}

.notification-action {
    align-items: center;
    background: var(--aps-ink);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    transition: background .15s ease;
}

.notification-action:hover {
    background: #2d2d2d;
}

.notification-preview-row {
    margin-top: 10px;
}

.notification-preview-row span {
    background: #f4f5f7;
    border: 1px solid var(--aps-line);
    border-radius: 6px;
    color: var(--aps-slate);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    padding: 4px 9px;
}

.notification-preview-row em {
    color: var(--aps-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.notification-chevron {
    color: var(--aps-slate);
    flex: 0 0 auto;
    margin-top: 4px;
    transition: transform .2s ease;
}

.notification-chevron.is-expanded {
    transform: rotate(180deg);
}

.notification-batch-list {
    border-top: 1px solid var(--aps-line);
}

.notification-batch-row {
    align-items: center;
    display: flex;
    gap: 12px;
    min-height: 46px;
    padding: 10px 20px;
}

.notification-batch-row:not(:last-child) {
    border-bottom: 1px solid #f0f1f4;
}

.notification-batch-row:hover {
    background: #f4f5f7;
}

.notification-row-no {
    color: var(--aps-muted);
    flex: 0 0 22px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.notification-batch-event {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.notification-batch-event strong {
    color: var(--aps-ink);
    font-size: 12px;
}

.notification-batch-event small {
    color: var(--aps-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
}

.notification-empty {
    color: var(--aps-muted);
    font-size: 13px;
    padding: 64px 0;
    text-align: center;
}

.approval-token-stage {
    background: var(--aps-canvas);
    min-height: 100dvh;
}

.approval-token-card {
    text-align: center;
}

.approval-token-card h1 {
    font-size: 22px;
    margin: 0 0 12px;
}

.approval-token-card p {
    color: var(--aps-slate);
    margin: 0 0 20px;
}

.mud-layout.aps-shell {
    --aps-active-sidebar-width: 248px;
    --aps-sidebar-expanded-width: 248px;
    --aps-sidebar-collapsed-width: 72px;
    background: var(--aps-canvas);
    min-height: 100dvh;
}

.mud-layout.aps-shell.aps-shell-collapsed {
    --aps-active-sidebar-width: var(--aps-sidebar-collapsed-width);
}

html.aps-sidebar-collapsed .mud-layout.aps-shell {
    --aps-active-sidebar-width: var(--aps-sidebar-collapsed-width);
}

.aps-sidebar.mud-drawer {
    background: var(--aps-sidebar);
    border-right: 1px solid rgba(255, 255, 255, .07);
    color: #fff;
    height: calc(100% - 68px) !important;
    top: 68px !important;
    transition: width .18s ease;
    width: var(--aps-active-sidebar-width) !important;
}

.aps-shell .mud-main-content {
    margin-left: var(--aps-active-sidebar-width) !important;
    padding-top: 68px !important;
    transition: margin-left .18s ease;
}

.aps-sidebar .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.aps-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    border-right: 1px solid rgba(255, 255, 255, .07);
    display: flex;
    gap: 12px;
    height: 68px;
    justify-content: space-between;
    margin-left: -28px;
    padding: 0 16px;
    transition: width .18s ease, padding .18s ease;
    width: var(--aps-active-sidebar-width);
    flex-shrink: 0;
}

.aps-brand-main {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.aps-logo,
.login-logo {
    align-items: center;
    background: #000;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    line-height: 1;
    width: 40px;
}

.aps-brand-copy {
    line-height: 1.15;
    min-width: 0;
}

.aps-brand-copy div {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.aps-brand-copy span {
    color: rgba(255, 255, 255, .32);
    font-size: 11px;
}

.aps-sidebar-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: rgba(255, 255, 255, .62);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: 34px;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    transition: background .15s, color .15s;
    width: 34px;
}

.aps-sidebar-toggle:hover,
.aps-sidebar-toggle:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    outline: none;
}

.aps-sidebar-toggle .mud-icon-root {
    transition: transform .18s ease;
}

.aps-shell-collapsed .aps-sidebar-toggle .mud-icon-root,
html.aps-sidebar-collapsed .aps-sidebar-toggle .mud-icon-root {
    transform: rotate(180deg);
}

.aps-powered {
    border-top: 1px solid rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .32);
    font-size: 10px;
    line-height: 1.4;
    padding: 16px 14px;
    text-align: center;
}

.aps-powered strong {
    color: rgba(255, 255, 255, .6);
    font-weight: 600;
}

.aps-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    transition: padding .18s ease;
}

.aps-nav::-webkit-scrollbar {
    width: 5px;
}

.aps-nav::-webkit-scrollbar-track {
    background: var(--aps-sidebar);
}

.aps-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border: 0;
}

.aps-nav-section {
    color: rgba(255, 255, 255, .32);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 16px 12px 6px;
}

.aps-nav-item {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, .7);
    display: flex;
    font-size: 13px;
    font-weight: 500;
    gap: 12px;
    height: 40px;
    padding: 0 12px;
    position: relative;
    text-decoration: none;
    transition: background .15s, color .15s, width .18s ease, padding .18s ease;
}

.aps-nav-item span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aps-nav-item .mud-icon-root {
    color: rgba(255, 255, 255, .38);
    flex-shrink: 0;
}

.aps-nav-item:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.aps-nav-item:hover .mud-icon-root,
.aps-nav-item.active .mud-icon-root {
    color: #fff;
}

.aps-nav-item.active {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.aps-nav-item em {
    align-items: center;
    background: var(--aps-danger);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    min-width: 20px;
}

.aps-shell-collapsed .aps-brand,
html.aps-sidebar-collapsed .aps-brand {
    justify-content: center;
    padding: 0;
}

.aps-shell-collapsed .aps-brand-main,
.aps-shell-collapsed .aps-powered,
.aps-shell-collapsed .aps-nav-section,
html.aps-sidebar-collapsed .aps-brand-main,
html.aps-sidebar-collapsed .aps-powered,
html.aps-sidebar-collapsed .aps-nav-section,
.aps-shell-collapsed .aps-nav-item span,
html.aps-sidebar-collapsed .aps-nav-item span {
    display: none;
}

.aps-shell-collapsed .aps-sidebar-toggle,
html.aps-sidebar-collapsed .aps-sidebar-toggle {
    margin-left: 0;
}

.aps-shell-collapsed .aps-nav,
html.aps-sidebar-collapsed .aps-nav {
    padding: 20px 0;
}

.aps-shell-collapsed .aps-nav-item,
html.aps-sidebar-collapsed .aps-nav-item {
    gap: 0;
    height: 44px;
    justify-content: center;
    margin: 0 auto 12px;
    padding: 0;
    width: 44px;
}

.aps-shell-collapsed .aps-nav-item .mud-icon-root,
html.aps-sidebar-collapsed .aps-nav-item .mud-icon-root {
    margin: 0;
}

.aps-shell-collapsed .aps-nav-item.active,
html.aps-sidebar-collapsed .aps-nav-item.active {
    background: rgba(255, 255, 255, .14);
}

.aps-shell-collapsed .aps-nav-item em,
html.aps-sidebar-collapsed .aps-nav-item em {
    font-size: 0;
    height: 10px;
    min-width: 0;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 10px;
}

.aps-topbar.mud-appbar {
    background: var(--aps-sidebar);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #fff;
    height: 68px;
    padding: 0;
}

.aps-topbar .mud-toolbar {
    height: 68px;
    min-height: 68px;
    padding-left: 28px;
    padding-right: 28px;
}

.aps-page-title {
    margin-left: 42px;
    min-width: 0;
}

.aps-page-title h1 {
    color: #fff;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.25;
    margin: 0;
    max-width: min(44vw, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aps-breadcrumb {
    align-items: center;
    color: rgba(255, 255, 255, .38);
    display: flex;
    font-size: 12px;
    gap: 6px;
    margin-top: 3px;
}

.aps-breadcrumb a {
    color: rgba(255, 255, 255, .38);
    text-decoration: none;
    transition: color .15s;
}

.aps-breadcrumb a:hover {
    color: #fff;
}

.aps-icon-button.mud-icon-button {
    border-radius: 12px;
    color: rgba(255, 255, 255, .65);
}

.aps-icon-button.mud-icon-button:hover,
.aps-profile-trigger:hover {
    background: rgba(255, 255, 255, .08);
}

.aps-notification-badge {
    align-items: center;
    background: var(--aps-danger);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 9px;
    font-weight: 800;
    height: 16px;
    justify-content: center;
    margin-left: -14px;
    margin-top: -24px;
    min-width: 16px;
    padding: 0 4px;
    position: relative;
}

.aps-topbar-divider {
    background: rgba(255, 255, 255, .1);
    height: 24px;
    margin: 0 10px;
    width: 1px;
}

.aps-profile-wrapper {
    position: relative;
}

.aps-profile-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 10px;
    list-style: none;
    min-height: 44px;
    padding: 6px 10px;
}

.aps-profile-trigger::-webkit-details-marker {
    display: none;
}

.aps-avatar {
    align-items: center;
    background: var(--aps-brand-bg);
    border-radius: 999px;
    color: var(--aps-brand);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.aps-profile-copy {
    display: block;
    line-height: 1.05;
    max-width: 170px;
    min-width: 0;
    text-align: left;
}

.aps-profile-copy strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aps-profile-copy small {
    color: rgba(255, 255, 255, .6);
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

.aps-profile-dropdown {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .14);
    color: var(--aps-ink);
    display: none;
    min-width: 240px;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    z-index: 50;
}

.aps-profile-wrapper[open] .aps-profile-dropdown {
    display: block;
}

.aps-profile-menu-head {
    background: #f4f5f7;
    border-bottom: 1px solid var(--aps-line);
    padding: 12px 16px;
}

.aps-profile-menu-head strong {
    color: #000;
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aps-profile-menu-head span,
.aps-profile-menu-head small {
    color: #000;
    display: block;
    font-size: 12px;
    line-height: 1.3;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aps-profile-menu-items {
    background: #fff;
    padding: 6px 0;
}

.aps-profile-menu-item {
    align-items: center;
    color: #000;
    display: flex;
    font-size: 14px;
    gap: 10px;
    min-height: 40px;
    padding: 8px 16px;
    text-decoration: none;
    transition: background .15s;
}

.aps-profile-menu-item:hover {
    background: var(--aps-canvas);
    color: #000;
}

.aps-profile-menu-item.danger {
    color: var(--aps-danger);
}

.aps-profile-menu-item.danger:hover {
    background: var(--aps-danger-bg);
    color: var(--aps-danger);
}

.aps-profile-menu-divider {
    background: var(--aps-line);
    height: 1px;
    margin: 6px 16px;
}

.aps-content {
    height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 28px !important;
}

.aps-page-head {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.aps-page-head h2 {
    color: var(--aps-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.aps-page-head p,
.aps-table-head p {
    color: var(--aps-muted);
    font-size: 13px;
    margin: 5px 0 0;
}

.aps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.aps-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    gap: 8px;
    height: 38px;
    justify-content: center;
    padding: 0 14px;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.aps-btn-primary {
    background: var(--aps-brand);
    color: #fff;
}

.aps-btn-primary:hover {
    background: #1f5ed1;
}

.aps-btn-secondary {
    background: #fff;
    border-color: var(--aps-line);
    color: var(--aps-slate);
}

.aps-btn-secondary:hover {
    border-color: #94a3b8;
    color: var(--aps-ink);
}

.aps-filter-panel,
.aps-table-panel,
.aps-metric-card {
    background: var(--aps-panel);
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.aps-filter-panel {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    margin-bottom: 18px;
    padding: 16px;
}

.aps-filter-panel label {
    color: var(--aps-slate);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 650;
    gap: 6px;
}

.aps-filter-panel input,
.aps-filter-panel select {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    color: var(--aps-ink);
    font: inherit;
    font-size: 13px;
    height: 38px;
    outline: none;
    padding: 0 11px;
}

.aps-filter-panel input:focus,
.aps-filter-panel select:focus {
    border-color: var(--aps-brand);
    box-shadow: 0 0 0 3px rgba(41, 108, 226, .16);
}

.aps-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.aps-metric-card {
    min-height: 88px;
    padding: 16px;
}

.aps-metric-card span {
    color: var(--aps-muted);
    display: block;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 8px;
}

.aps-metric-card strong {
    color: var(--aps-ink);
    display: block;
    font-size: 22px;
    font-weight: 750;
    line-height: 1.2;
}

.aps-table-panel {
    overflow: hidden;
}

.aps-table-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--aps-line-soft);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
}

.aps-table-head h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.aps-table-scroll {
    overflow-x: auto;
}

.aps-grid-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    min-width: 760px;
    width: 100%;
}

.aps-grid-table th,
.aps-grid-table td {
    border-bottom: 1px solid var(--aps-line-soft);
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.aps-grid-table th {
    background: #f9fafb;
    color: var(--aps-slate);
    font-size: 11.5px;
    font-weight: 750;
}

.aps-grid-table tr:last-child td {
    border-bottom: 0;
}

.text-right {
    text-align: right !important;
}

.frozen-row {
    background: repeating-linear-gradient(45deg, #f8f8f9, #f8f8f9 8px, #f4f4f6 8px, #f4f4f6 16px);
}

.aps-status {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    height: 24px;
    padding: 0 9px;
    white-space: nowrap;
}

.aps-status.ok {
    background: var(--aps-ok-bg);
    border-color: rgba(31, 167, 92, .22);
    color: var(--aps-ok);
}

.aps-status.warn {
    background: var(--aps-warn-bg);
    border-color: rgba(191, 135, 8, .28);
    color: var(--aps-warn);
}

.aps-status.info {
    background: var(--aps-brand-bg);
    border-color: rgba(41, 108, 226, .24);
    color: var(--aps-brand);
}

.aps-icon-action {
    align-items: center;
    background: transparent;
    border: 1px solid var(--aps-line);
    border-radius: 7px;
    color: var(--aps-slate);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.aps-icon-action:hover {
    background: var(--aps-brand-bg);
    border-color: rgba(41, 108, 226, .28);
    color: var(--aps-brand);
}

.aps-segment {
    background: #f4f5f7;
    border: 1px solid var(--aps-line);
    border-radius: 9px;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
}

.aps-segment button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--aps-slate);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    height: 30px;
    padding: 0 12px;
}

.aps-segment button.active {
    background: var(--aps-brand);
    box-shadow: 0 1px 3px rgba(41, 108, 226, .3);
    color: #fff;
}

.aps-my-profile {
    margin: 10px auto 0;
    max-width: 600px;
}

.aps-my-profile-card {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    overflow: hidden;
}

.aps-my-profile-hero {
    align-items: center;
    background: var(--aps-ink);
    display: flex;
    gap: 26px;
    min-height: 182px;
    padding: 44px 44px 38px;
}

.aps-my-profile-avatar {
    align-items: center;
    background: var(--aps-brand-bg);
    border-radius: 14px;
    color: var(--aps-brand);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 800;
    height: 76px;
    justify-content: center;
    width: 76px;
}

.aps-my-profile-display {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.aps-my-profile-title {
    color: rgba(255, 255, 255, .55);
    font-size: 15px;
    font-weight: 550;
    margin-top: 8px;
}

.aps-my-profile-badge {
    align-items: center;
    background: #e0eafc;
    border-radius: 999px;
    color: var(--aps-brand);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 28px;
    letter-spacing: .01em;
    margin-top: 16px;
    padding: 0 14px;
    text-transform: uppercase;
}

.aps-my-profile-body {
    padding: 34px 44px 32px;
}

.aps-my-profile-body h2 {
    font-size: 17px;
    margin: 0 0 6px;
}

.aps-my-profile-body p {
    color: var(--aps-muted);
    font-size: 13px;
    margin: 0;
}

.aps-my-profile-list {
    display: grid;
    gap: 22px;
    margin: 0;
}

.aps-my-profile-list div {
    align-items: center;
    display: grid;
    grid-template-columns: 132px 1fr;
}

.aps-my-profile-list dt {
    color: var(--aps-muted);
    font-size: 14px;
    font-weight: 500;
}

.aps-my-profile-list dd {
    color: var(--aps-ink);
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.aps-my-profile-note {
    background: #f9fafb;
    border-top: 1px solid var(--aps-line);
    color: var(--aps-muted);
    font-size: 13px;
    padding: 20px 44px;
}

.aps-my-profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 26px;
}

.aps-my-profile-logout {
    align-items: center;
    border: 1px solid rgba(216, 58, 58, .2);
    border-radius: 10px;
    color: var(--aps-danger);
    display: inline-flex;
    font-size: 15px;
    font-weight: 700;
    gap: 10px;
    height: 48px;
    padding: 0 22px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.aps-my-profile-logout:hover {
    background: var(--aps-danger-bg);
    border-color: rgba(216, 58, 58, .34);
    color: var(--aps-danger);
}

.aps-user-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.aps-user-toolbar-end {
    justify-content: flex-end;
}

.aps-user-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.aps-user-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    height: 36px;
    justify-content: center;
    padding: 0 14px;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.aps-user-btn-ink {
    background: var(--aps-ink);
    color: #fff;
}

.aps-user-btn-ink:hover {
    background: #0f0f10;
}

.aps-user-btn-light {
    background: #fff;
    border-color: var(--aps-line);
    color: var(--aps-slate);
}

.aps-user-btn-light:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-user-filter,
.aps-user-table-card,
.aps-user-detail-card {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.aps-user-filter {
    margin-bottom: 16px;
    padding: 14px 16px;
}

.aps-user-filter-row {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aps-user-filter label,
.aps-user-field {
    color: var(--aps-slate);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 650;
    gap: 6px;
}

.aps-user-filter select,
.aps-user-filter input,
.aps-user-field input,
.aps-user-field select {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    height: 36px;
    outline: none;
    padding: 0 12px;
    transition: border-color .15s, box-shadow .15s;
}

.aps-user-filter select,
.aps-user-field select {
    cursor: pointer;
    padding-right: 30px;
}

.aps-user-filter input {
    width: 176px;
}

.aps-user-filter input:focus,
.aps-user-filter select:focus,
.aps-user-field input:focus,
.aps-user-field select:focus {
    border-color: var(--aps-brand);
    box-shadow: 0 0 0 3px rgba(41, 108, 226, .16);
}

.aps-user-message {
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 14px;
    padding: 10px 13px;
}

.aps-user-message.ok {
    background: var(--aps-ok-bg);
    border-color: rgba(31, 167, 92, .22);
    color: var(--aps-ok);
}

.aps-user-message.warn {
    background: var(--aps-danger-bg);
    border-color: rgba(216, 58, 58, .2);
    color: var(--aps-danger);
}

.aps-user-table-card {
    overflow: hidden;
}

.aps-user-table-scroll {
    overflow-x: auto;
}

.aps-user-table {
    border-collapse: collapse;
    font-size: 13px;
    min-width: 920px;
    text-align: left;
    width: 100%;
}

.aps-user-table th {
    background: #f4f5f7;
    border-bottom: 1px solid var(--aps-line);
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 650;
    padding: 12px 16px;
    white-space: nowrap;
}

.aps-user-table td {
    border-bottom: 1px solid var(--aps-line);
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

.aps-user-table tr:last-child td {
    border-bottom: 0;
}

.aps-user-table tbody tr {
    transition: background .15s;
}

.aps-user-table tbody tr:hover {
    background: #f4f5f7;
}

.aps-user-table tbody tr.is-inactive {
    opacity: .6;
}

.aps-user-role-col {
    width: 110px;
}

.aps-user-status-col {
    width: 90px;
}

.aps-user-login-col {
    width: 160px;
}

.aps-user-actions-col {
    width: 170px;
}

.aps-user-cell {
    align-items: center;
    display: flex;
    gap: 10px;
}

.aps-user-cell span {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 600;
}

.aps-user-avatar {
    align-items: center;
    background: var(--aps-brand-bg);
    border-radius: 999px;
    color: var(--aps-brand);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.aps-user-muted {
    color: var(--aps-slate);
    font-size: 12px;
}

.aps-user-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.aps-user-badge-stack {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aps-user-badge {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    min-height: 22px;
    padding: 2px 8px;
    white-space: nowrap;
}

.aps-user-badge.blue {
    background: var(--aps-brand-bg);
    color: var(--aps-brand);
}

.aps-user-badge.green {
    background: var(--aps-ok-bg);
    color: var(--aps-ok);
}

.aps-user-badge.default {
    background: #f4f5f7;
    color: var(--aps-muted);
}

.aps-user-view {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--aps-brand);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    padding: 4px 10px;
    transition: background .15s;
}

.aps-user-view:hover {
    background: var(--aps-brand-bg);
}

.aps-user-footer {
    background: #f9fafb;
    border-top: 1px solid var(--aps-line);
    color: var(--aps-muted);
    font-size: 11px;
    padding: 12px 16px;
}

.aps-user-empty {
    color: var(--aps-muted);
    font-size: 13px;
    padding: 32px 16px !important;
    text-align: center;
}

.aps-user-detail {
    margin: 0 auto;
    max-width: 640px;
}

.aps-user-detail-card {
    overflow: hidden;
}

.aps-user-detail-head {
    border-bottom: 1px solid var(--aps-line);
    padding: 20px 28px;
}

.aps-user-detail-head h3 {
    color: var(--aps-ink);
    font-size: 16px;
    font-weight: 650;
    margin: 0;
}

.aps-user-detail-head p {
    color: var(--aps-muted);
    font-size: 12px;
    margin: 4px 0 0;
}

.aps-user-form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 24px 28px 28px;
}

.aps-user-field > span {
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 650;
}

.aps-user-field p {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    min-height: 24px;
}

.aps-user-field .required {
    color: var(--aps-danger);
    margin-left: 2px;
}

.aps-user-role-picker {
    grid-column: span 2;
}

.aps-user-role-options {
    display: grid;
    gap: 8px;
}

.aps-user-role-options label {
    align-items: center;
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-ink);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 600;
    gap: 12px;
    min-height: 38px;
    padding: 8px 12px;
    transition: border-color .15s, background .15s;
}

.aps-user-role-options label:hover {
    background: #f9fbff;
    border-color: var(--aps-brand);
}

.aps-user-role-options input,
.aps-user-radio-row input {
    accent-color: var(--aps-brand);
}

.aps-user-role-picker small {
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 500;
}

.aps-user-radio-row {
    align-items: center;
    display: flex;
    gap: 22px;
    min-height: 36px;
}

.aps-user-radio-row label {
    align-items: center;
    color: var(--aps-ink);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 500;
    gap: 8px;
}

.aps-user-kebab {
    position: relative;
}

.aps-user-kebab-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-slate);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: background .15s, color .15s;
    width: 36px;
}

.aps-user-kebab-btn:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-user-menu {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
    min-width: 176px;
    overflow: hidden;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
}

.aps-user-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--aps-danger);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    gap: 8px;
    padding: 9px 12px;
    text-align: left;
    transition: background .15s;
    width: 100%;
}

.aps-user-menu button:hover {
    background: var(--aps-danger-bg);
}

.aps-role-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.aps-role-toolbar-end {
    justify-content: flex-end;
}

.aps-role-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.aps-role-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    height: 36px;
    justify-content: center;
    padding: 0 14px;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.aps-role-btn-ink {
    background: var(--aps-ink);
    color: #fff;
}

.aps-role-btn-ink:hover {
    background: #0f0f10;
}

.aps-role-btn-light {
    background: #fff;
    border-color: var(--aps-line);
    color: var(--aps-slate);
}

.aps-role-btn-light:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-role-filter,
.aps-role-table-card,
.aps-role-detail-card {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.aps-role-filter {
    margin-bottom: 16px;
    padding: 14px 16px;
}

.aps-role-filter-row {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aps-role-filter label,
.aps-role-field {
    color: var(--aps-slate);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 650;
    gap: 6px;
}

.aps-role-filter select,
.aps-role-filter input,
.aps-role-field input {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    height: 36px;
    outline: none;
    padding: 0 12px;
    transition: border-color .15s, box-shadow .15s;
}

.aps-role-filter select {
    cursor: pointer;
    padding-right: 30px;
}

.aps-role-filter input {
    width: 176px;
}

.aps-role-filter input:focus,
.aps-role-filter select:focus,
.aps-role-field input:focus {
    border-color: var(--aps-brand);
    box-shadow: 0 0 0 3px rgba(41, 108, 226, .16);
}

.aps-role-message {
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 14px;
    padding: 10px 13px;
}

.aps-role-message.ok {
    background: var(--aps-ok-bg);
    border-color: rgba(31, 167, 92, .22);
    color: var(--aps-ok);
}

.aps-role-message.warn {
    background: var(--aps-danger-bg);
    border-color: rgba(216, 58, 58, .2);
    color: var(--aps-danger);
}

.aps-role-table-card {
    margin-bottom: 24px;
    overflow: hidden;
}

.aps-role-table-scroll {
    overflow-x: auto;
}

.aps-role-table,
.aps-role-matrix {
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    width: 100%;
}

.aps-role-table {
    min-width: 820px;
}

.aps-role-table th,
.aps-role-matrix th {
    background: #f4f5f7;
    border-bottom: 1px solid var(--aps-line);
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 650;
    padding: 12px 16px;
    white-space: nowrap;
}

.aps-role-table td {
    border-bottom: 1px solid var(--aps-line);
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

.aps-role-table tr:last-child td {
    border-bottom: 0;
}

.aps-role-table tbody tr {
    transition: background .15s;
}

.aps-role-table tbody tr:hover {
    background: #f4f5f7;
}

.aps-role-table tbody tr.is-inactive {
    opacity: .6;
}

.aps-role-name-col {
    width: 160px;
}

.aps-role-users-col {
    text-align: center;
    width: 80px;
}

.aps-role-status-col {
    width: 100px;
}

.aps-role-created-col,
.aps-role-actions-col {
    width: 140px;
}

.aps-role-name {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 800;
}

.aps-role-muted {
    color: var(--aps-slate);
    font-size: 12px;
}

.aps-role-users {
    color: var(--aps-ink);
    font-size: 13px;
    text-align: center;
}

.aps-role-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    min-height: 22px;
    padding: 2px 10px;
    white-space: nowrap;
}

.aps-role-badge.green {
    background: var(--aps-ok-bg);
    color: var(--aps-ok);
}

.aps-role-badge.default {
    background: #f4f5f7;
    color: var(--aps-muted);
}

.aps-role-view {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--aps-brand);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    padding: 4px 10px;
    transition: background .15s;
}

.aps-role-view:hover {
    background: var(--aps-brand-bg);
}

.aps-role-empty {
    color: var(--aps-muted);
    font-size: 13px;
    padding: 32px 16px !important;
    text-align: center;
}

.aps-role-detail {
    margin: 0 auto;
    max-width: 768px;
}

.aps-role-detail-card {
    overflow: hidden;
}

.aps-role-detail-head {
    align-items: center;
    border-bottom: 1px solid var(--aps-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 20px 28px;
}

.aps-role-detail-head h3 {
    color: var(--aps-ink);
    font-size: 16px;
    font-weight: 650;
    margin: 0;
}

.aps-role-detail-head p {
    color: var(--aps-muted);
    font-size: 12px;
    margin: 4px 0 0;
}

.aps-role-stats {
    border-bottom: 1px solid var(--aps-line);
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 20px 28px;
}

.aps-role-stats span,
.aps-role-field > span {
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 650;
}

.aps-role-stats p,
.aps-role-field p {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 500;
    margin: 6px 0 0;
}

.aps-role-edit-fields {
    display: grid;
    gap: 16px;
    padding: 24px 28px 18px;
}

.aps-role-field .required {
    color: var(--aps-danger);
    margin-left: 2px;
}

.aps-role-radio-row {
    align-items: center;
    display: flex;
    gap: 20px;
    min-height: 36px;
}

.aps-role-radio-row label {
    align-items: center;
    color: var(--aps-ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 500;
    gap: 8px;
}

.aps-role-radio-row input,
.aps-role-matrix input {
    accent-color: var(--aps-brand);
}

.aps-role-matrix-wrap {
    padding: 20px 28px 24px;
}

.aps-role-section-title {
    color: var(--aps-slate);
    font-size: 12px;
    font-weight: 650;
    margin: 0 0 14px;
}

.aps-role-matrix {
    font-size: 12px;
    min-width: 680px;
}

.aps-role-matrix th {
    padding: 10px 12px;
    text-align: center;
    width: 80px;
}

.aps-role-matrix th:first-child {
    text-align: left;
    width: auto;
}

.aps-role-matrix td {
    border-bottom: 1px solid var(--aps-line);
    color: var(--aps-ink);
    padding: 10px 12px;
    vertical-align: middle;
}

.aps-role-matrix td:not(:first-child) {
    text-align: center;
}

.aps-role-matrix tbody tr:not(.aps-role-group-row):hover {
    background: #f4f5f7;
}

.aps-role-group-row td {
    background: #f9fafb;
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.aps-role-matrix input {
    height: 16px;
    width: 16px;
}

.aps-role-kebab {
    position: relative;
}

.aps-role-kebab-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-slate);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: background .15s, color .15s;
    width: 36px;
}

.aps-role-kebab-btn:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-role-menu {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
    min-width: 176px;
    overflow: hidden;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
}

.aps-role-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--aps-danger);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    gap: 8px;
    padding: 9px 12px;
    text-align: left;
    transition: background .15s;
    width: 100%;
}

.aps-role-menu button:hover {
    background: var(--aps-danger-bg);
}

.aps-approve-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.aps-approve-toolbar-end {
    justify-content: flex-end;
}

.aps-approve-toolbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.aps-approve-btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    height: 36px;
    justify-content: center;
    padding: 0 14px;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.aps-approve-btn-ink {
    background: var(--aps-ink);
    color: #fff;
}

.aps-approve-btn-ink:hover {
    background: #0f0f10;
}

.aps-approve-btn-light {
    background: #fff;
    border-color: var(--aps-line);
    color: var(--aps-slate);
}

.aps-approve-btn-light:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-approve-table-card,
.aps-approve-detail-card {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    overflow: hidden;
}

.aps-approve-table-scroll {
    overflow-x: auto;
}

.aps-approve-table {
    border-collapse: collapse;
    font-size: 13px;
    min-width: 760px;
    text-align: left;
    width: 100%;
}

.aps-approve-table th {
    background: #f4f5f7;
    border-bottom: 1px solid var(--aps-line);
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 650;
    padding: 12px 16px;
    white-space: nowrap;
}

.aps-approve-table td {
    border-bottom: 1px solid var(--aps-line);
    padding: 12px 16px;
    vertical-align: middle;
    white-space: nowrap;
}

.aps-approve-table tr:last-child td {
    border-bottom: 0;
}

.aps-approve-table tbody tr:hover {
    background: #f4f5f7;
}

.aps-approve-table tbody tr.is-inactive {
    opacity: .6;
}

.aps-approve-status-col,
.aps-approve-actions-col {
    width: 90px;
}

.aps-approve-user-cell {
    align-items: center;
    display: flex;
    gap: 10px;
}

.aps-approve-user-cell span {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 600;
}

.aps-approve-avatar {
    align-items: center;
    background: var(--aps-brand-bg);
    border-radius: 999px;
    color: var(--aps-brand);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.aps-approve-avatar.small {
    font-size: 11px;
    height: 28px;
    width: 28px;
}

.aps-approve-muted {
    color: var(--aps-slate);
    font-size: 12px;
}

.aps-approve-badge {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    min-height: 22px;
    padding: 2px 8px;
    white-space: nowrap;
}

.aps-approve-badge.green {
    background: var(--aps-ok-bg);
    color: var(--aps-ok);
}

.aps-approve-badge.default {
    background: #f4f5f7;
    color: var(--aps-muted);
}

.aps-approve-view {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--aps-brand);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    padding: 4px 10px;
    transition: background .15s;
}

.aps-approve-view:hover {
    background: var(--aps-brand-bg);
}

.aps-approve-empty {
    color: var(--aps-muted);
    font-size: 13px;
    padding: 32px 16px !important;
    text-align: center;
}

.aps-approve-info {
    align-items: flex-start;
    background: var(--aps-brand-bg);
    border-left: 4px solid var(--aps-brand);
    border-radius: 8px;
    color: var(--aps-brand);
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding: 14px;
}

.aps-approve-info p {
    font-size: 12.5px;
    line-height: 1.45;
    margin: 0;
}

.aps-approve-message {
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 14px;
    padding: 10px 13px;
}

.aps-approve-message.ok {
    background: var(--aps-ok-bg);
    border-color: rgba(31, 167, 92, .22);
    color: var(--aps-ok);
}

.aps-approve-message.warn {
    background: var(--aps-danger-bg);
    border-color: rgba(216, 58, 58, .2);
    color: var(--aps-danger);
}

.aps-approve-detail {
    margin: 0 auto;
    max-width: 576px;
}

.aps-approve-detail-head {
    border-bottom: 1px solid var(--aps-line);
    padding: 20px 28px;
}

.aps-approve-detail-head h3 {
    color: var(--aps-ink);
    font-size: 16px;
    font-weight: 650;
    margin: 0;
}

.aps-approve-detail-head p {
    color: var(--aps-muted);
    font-size: 12px;
    margin: 4px 0 0;
}

.aps-approve-add-body {
    display: grid;
    gap: 16px;
    padding: 24px 28px;
}

.aps-approve-form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 24px 28px;
}

.aps-approve-field {
    color: var(--aps-slate);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 650;
    gap: 6px;
}

.aps-approve-field > span {
    color: var(--aps-slate);
    font-size: 12px;
    font-weight: 650;
}

.aps-approve-field input {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    height: 40px;
    outline: none;
    padding: 0 12px;
    transition: border-color .15s, box-shadow .15s;
}

.aps-approve-field input:focus {
    border-color: var(--aps-brand);
    box-shadow: 0 0 0 3px rgba(41, 108, 226, .16);
}

.aps-approve-field p {
    color: var(--aps-ink);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    min-height: 24px;
}

.aps-approve-field .required {
    color: var(--aps-danger);
    margin-left: 2px;
}

.aps-approve-search-list {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .12);
    max-height: 220px;
    overflow-y: auto;
}

.aps-approve-search-list button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--aps-ink);
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
    transition: background .15s;
    width: 100%;
}

.aps-approve-search-list button:hover {
    background: var(--aps-brand-bg);
}

.aps-approve-search-empty {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-muted);
    font-size: 13px;
    padding: 12px;
}

.aps-approve-search-list strong,
.aps-approve-selected strong {
    color: var(--aps-ink);
    display: block;
    font-size: 13px;
    font-weight: 650;
}

.aps-approve-search-list small,
.aps-approve-selected small {
    color: var(--aps-muted);
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.aps-approve-selected {
    background: #f4f5f7;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    padding: 12px 16px;
}

.aps-approve-selected p {
    color: var(--aps-muted);
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 8px;
}

.aps-approve-selected div {
    align-items: center;
    display: flex;
    gap: 12px;
}

.aps-approve-radio-row {
    align-items: center;
    display: flex;
    gap: 20px;
    min-height: 24px;
}

.aps-approve-radio-row label {
    align-items: center;
    color: var(--aps-ink);
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 500;
    gap: 8px;
}

.aps-approve-radio-row input {
    accent-color: var(--aps-brand);
}

.aps-approve-kebab {
    position: relative;
}

.aps-approve-kebab-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    color: var(--aps-slate);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: background .15s, color .15s;
    width: 36px;
}

.aps-approve-kebab-btn:hover {
    background: #f4f5f7;
    color: var(--aps-ink);
}

.aps-approve-menu {
    background: #fff;
    border: 1px solid var(--aps-line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .16);
    min-width: 176px;
    overflow: hidden;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
}

.aps-approve-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--aps-danger);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    gap: 8px;
    padding: 9px 12px;
    text-align: left;
    transition: background .15s;
    width: 100%;
}

.aps-approve-menu button:hover {
    background: var(--aps-danger-bg);
}

.login-stage {
    align-items: center;
    background: #0a0a0a;
    color: rgba(255, 255, 255, .9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 40px 24px 32px;
    position: relative;
}

.login-stage::before {
    background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, rgba(10, 10, 10, .75) 75%, rgba(10, 10, 10, .97) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.login-bg-canvas {
    height: 100%;
    inset: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.login-scanline {
    animation: scan 6s cubic-bezier(.4, 0, .6, 1) infinite;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.04) 20%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 80%, transparent 100%);
    height: 2px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 2;
}

@keyframes scan {
    0% { opacity: 0; top: -2px; }
    5% { opacity: 1; }
    95% { opacity: .4; }
    100% { opacity: 0; top: 100%; }
}

.login-brand {
    align-items: center;
    animation: enter .55s cubic-bezier(.16, 1, .3, 1) both;
    display: flex;
    gap: 18px;
    margin-bottom: 44px;
    position: relative;
    z-index: 3;
}

.login-logo-mark {
    filter: invert(1);
    flex-shrink: 0;
    height: 64px;
    width: 64px;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-brand-name {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1;
}

.login-brand-tagline {
    color: rgba(255, 255, 255, .28);
    font-size: 11px;
    letter-spacing: .06em;
    margin-top: 4px;
}

.login-card {
    animation: enter .55s cubic-bezier(.16, 1, .3, 1) both .08s;
    background: #111112;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.05) inset, 0 1px 0 rgba(255,255,255,.1) inset, 0 24px 64px -16px rgba(0,0,0,.9), 0 8px 24px -8px rgba(0,0,0,.6);
    max-width: 400px;
    padding: 36px 36px 32px;
    position: relative;
    width: 100%;
    z-index: 3;
}

.login-card-heading,
.login-card h1 {
    color: #fff;
    font-size: 17px;
    font-weight: 650;
    margin: 0 0 4px;
}

.login-card-sub {
    color: rgba(255, 255, 255, .45);
    font-size: 13px;
    margin: 0 0 28px;
}

.login-field {
    margin-bottom: 14px;
}

.login-field label {
    align-items: center;
    color: rgba(255, 255, 255, .45);
    display: flex;
    font-size: 12px;
    font-weight: 550;
    margin-bottom: 7px;
}

.login-field-wrap {
    position: relative;
}

.login-field input {
    background: #171718;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 9px;
    color: rgba(255, 255, 255, .9);
    font: inherit;
    font-size: 14px;
    height: 46px;
    outline: none;
    padding: 0 42px 0 14px;
    transition: background .15s, border-color .15s, box-shadow .15s;
    width: 100%;
}

.login-field input::placeholder {
    color: rgba(255, 255, 255, .2);
}

.login-field input:hover,
.login-field input:focus {
    background: #1c1c1e;
}

.login-field input:focus {
    border-color: rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .05);
}

.login-pwd-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: rgba(255, 255, 255, .28);
    cursor: pointer;
    display: flex;
    height: 28px;
    justify-content: center;
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    transition: background .15s, color .15s;
    width: 28px;
}

.login-pwd-toggle:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .6);
}

.login-pwd-toggle:focus-visible {
    outline: 1px solid rgba(255, 255, 255, .22);
    outline-offset: 1px;
}

.login-error {
    align-items: center;
    background: rgba(224, 96, 96, .08);
    border: 1px solid rgba(224, 96, 96, .2);
    border-radius: 8px;
    color: #e06060;
    display: flex;
    font-size: 12.5px;
    gap: 8px;
    margin-bottom: 14px;
    padding: 9px 13px;
}

.login-submit {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.12) inset;
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    height: 48px;
    justify-content: center;
    margin-top: 6px;
    transition: background .15s, transform .1s;
    width: 100%;
}

.login-submit:hover {
    background: #f2f2f2;
}

.login-submit:active {
    transform: scale(.985);
}

.login-note {
    color: rgba(255, 255, 255, .28);
    font-size: 11.5px;
    line-height: 1.55;
    margin-top: 18px;
    text-align: center;
}

.login-footer {
    align-items: center;
    animation: enter .55s cubic-bezier(.16, 1, .3, 1) both .18s;
    color: rgba(255, 255, 255, .28);
    display: flex;
    flex-direction: column;
    font-size: 11px;
    gap: 4px;
    margin-top: 40px;
    position: relative;
    z-index: 3;
}

.login-powered-by {
    align-items: center;
    border-radius: 8px;
    display: flex;
    gap: 9px;
    padding: 6px 10px;
    text-decoration: none;
    transition: background .15s;
}

.login-powered-by:hover {
    background: rgba(255, 255, 255, .05);
}

.login-powered-by span {
    color: rgba(255, 255, 255, .28);
    font-size: 11px;
    white-space: nowrap;
}

.login-powered-logo {
    height: 44px;
    opacity: .45;
    transition: opacity .15s;
    width: auto;
}

.login-powered-by:hover .login-powered-logo {
    opacity: .65;
}

.login-footer p {
    color: rgba(255, 255, 255, .18);
    font-size: 10.5px;
    margin: 0;
}

@keyframes enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

#blazor-error-ui {
    background: #b91c1c;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    color: white;
    display: none;
    left: 0;
    padding: .75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

@media (max-width: 960px) {
    .aps-topbar .mud-toolbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .aps-brand {
        margin-left: -16px;
    }

    .aps-content {
        padding: 18px !important;
    }

    .aps-filter-panel,
    .aps-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .aps-page-head,
    .aps-table-head {
        flex-direction: column;
    }

    .aps-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .aps-filter-panel,
    .aps-metrics {
        grid-template-columns: 1fr;
    }

    .aps-my-profile {
        margin-top: 0;
        max-width: 100%;
    }

    .aps-my-profile-hero {
        align-items: flex-start;
        gap: 16px;
        min-height: auto;
        padding: 28px 24px;
    }

    .aps-my-profile-avatar {
        height: 58px;
        width: 58px;
    }

    .aps-my-profile-display {
        font-size: 19px;
    }

    .aps-my-profile-body {
        padding: 26px 24px;
    }

    .aps-my-profile-list {
        gap: 18px;
    }

    .aps-my-profile-list div {
        align-items: flex-start;
        gap: 6px;
        grid-template-columns: 1fr;
    }

    .aps-my-profile-note {
        padding: 18px 24px;
    }

    .aps-user-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-user-toolbar-end {
        align-items: flex-end;
    }

    .aps-user-toolbar-actions {
        justify-content: flex-start;
    }

    .aps-user-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-user-filter input,
    .aps-user-filter select {
        width: 100%;
    }

    .aps-user-detail {
        max-width: 100%;
    }

    .aps-user-detail-head {
        padding: 18px 22px;
    }

    .aps-user-form-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .aps-user-role-picker {
        grid-column: auto;
    }

    .aps-role-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-role-toolbar-end {
        align-items: flex-end;
    }

    .aps-role-toolbar-actions {
        justify-content: flex-start;
    }

    .aps-role-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-role-filter input,
    .aps-role-filter select {
        width: 100%;
    }

    .aps-role-detail {
        max-width: 100%;
    }

    .aps-role-detail-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 22px;
    }

    .aps-role-stats {
        grid-template-columns: 1fr;
        padding: 18px 22px;
    }

    .aps-role-edit-fields,
    .aps-role-matrix-wrap {
        padding-left: 22px;
        padding-right: 22px;
    }

    .aps-approve-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-approve-toolbar-end {
        align-items: flex-end;
    }

    .aps-approve-toolbar-actions {
        justify-content: flex-start;
    }

    .aps-approve-detail {
        max-width: 100%;
    }

    .aps-approve-detail-head {
        padding: 18px 22px;
    }

    .aps-approve-add-body,
    .aps-approve-form-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .aps-profile-copy,
    .aps-topbar-divider {
        display: none;
    }

    .aps-page-title h1 {
        max-width: 48vw;
    }

    .login-stage {
        padding: 32px 16px 28px;
    }

    .login-brand {
        gap: 14px;
        margin-bottom: 36px;
    }

    .login-logo-mark {
        height: 52px;
        width: 52px;
    }

    .login-brand-name {
        font-size: 22px;
    }

    .login-card {
        border-radius: 14px;
        padding: 28px 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-brand,
    .login-card,
    .login-footer,
    .login-scanline {
        animation: none;
    }
}
