:root {
    --navy-950: #061923;
    --navy-900: #08222f;
    --navy-800: #103444;
    --teal-700: #0a6b64;
    --teal-600: #087f78;
    --teal-500: #0d9488;
    --teal-100: #ccfbf1;
    --sidebar-w: 264px;
    --sidebar-collapsed-w: 80px;
    --ink: #17272f;
    --muted: #6d7f87;
    --line: #dde6e9;
    --canvas: #f4f7f7;
    --surface: #ffffff;
    --success: #087f5b;
    --warning: #a15c08;
    --danger: #b42318;
    --shadow: 0 1px 2px rgba(6, 25, 35, .04), 0 12px 30px rgba(6, 25, 35, .045);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: -60px;
    left: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: white;
    color: var(--ink);
}

.skip-link:focus {
    top: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns .2s ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-w) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 100vh;
    flex-direction: column;
    gap: 2px;
    padding: 18px 14px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 6px;
}

.sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.brand-card {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border-radius: 11px;
    transition: background .15s;
}

.brand-card:hover {
    background: var(--canvas);
}

.brand-mark-compact {
    display: none;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    color: var(--navy-950);
    background: var(--teal-100);
    font-size: 15px;
    font-weight: 900;
}

.brand-wordmark {
    height: 26px;
    width: auto;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--canvas);
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.sidebar-toggle:hover {
    color: var(--ink);
    background: var(--teal-100);
}

.sidebar-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    transition: transform .18s ease;
}

.nav {
    margin-top: 18px;
}

.nav-label {
    margin: 0 10px 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.nav-section {
    margin-top: 22px;
}

.nav-section:first-child {
    margin-top: 0;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    margin: 2px 0;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 550;
    transition: background .15s, color .15s;
}

.nav a:hover {
    color: var(--ink);
    background: var(--canvas);
}

.nav a.active {
    color: var(--teal-700);
    background: var(--teal-100);
    font-weight: 650;
}

.nav-icon {
    width: 20px;
    flex: 0 0 auto;
    color: #9ab0b8;
    text-align: center;
}

.nav a:hover .nav-icon {
    color: var(--muted);
}

.nav a.active .nav-icon {
    color: var(--teal-600);
}

.nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-badge {
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 10px;
    font-weight: 750;
}

.nav-badge-warning {
    background: #fdf1dd;
    color: var(--warning);
}

.nav-badge-admin {
    background: var(--navy-900);
    color: #5eead4;
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}

.sidebar-version {
    padding: 0 10px;
}

.workspace-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 8px;
    color: #9ef5e8;
    background: var(--navy-800);
    font-weight: 800;
}

/* Collapsed sidebar: icon-only rail */
.sidebar-collapsed .brand-card {
    align-items: center;
}

.sidebar-collapsed .brand-mark-compact {
    display: grid;
}

.sidebar-collapsed .brand-wordmark,
.sidebar-collapsed .brand-subtitle,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .nav-text,
.sidebar-collapsed .nav-badge,
.sidebar-collapsed .sidebar-toggle-label,
.sidebar-collapsed .status-text,
.sidebar-collapsed .sidebar-version {
    display: none;
}

.sidebar-collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-collapsed .nav a,
.sidebar-collapsed .status-indicator {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.page-shell {
    min-height: 100vh;
    min-width: 0;
}

main {
    width: 100%;
    padding: 38px 42px 64px;
}

.mobile-header,
.icon-button.sidebar-close,
.scrim {
    display: none;
}


.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: var(--ink);
}

.icon-button:hover {
    background: rgba(0, 0, 0, .06);
}

.tw-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--navy-950);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(6, 25, 35, .25);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s, transform .22s;
}

.tw-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}


.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--teal-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -.035em;
}

.page-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
}

.button-primary {
    color: white;
    background: var(--navy-900);
    box-shadow: 0 5px 12px rgba(8, 34, 47, .14);
}

.button-primary:hover {
    background: var(--navy-800);
}

.button-secondary {
    border-color: var(--line);
    background: white;
    color: var(--ink);
}

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

.metric-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 146px;
    padding: 19px 20px;
}

.metric-card.featured {
    border-color: #b9dcd9;
    background: linear-gradient(145deg, #faffff, #edf9f7);
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.metric-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    color: var(--teal-600);
    background: #e5f5f3;
}

.metric-icon.success {
    color: var(--success);
}

.metric-value {
    display: block;
    margin-top: 17px;
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.04em;
}

.metric-unit {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}

.section {
    margin-top: 18px;
}

.panel {
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 75px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.015em;
}

.panel-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.text-link {
    color: var(--teal-600);
    font-size: 12px;
    font-weight: 750;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th {
    padding: 11px 20px;
    color: #819198;
    background: #fafcfc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    height: 58px;
    padding: 10px 20px;
    border-top: 1px solid #edf1f2;
    color: #44565e;
    font-size: 12px;
}

.data-table tbody tr:hover {
    background: #fbfdfd;
}

.payment-ref,
code {
    color: #244c5b;
    font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}

code {
    padding: 4px 7px;
    border-radius: 5px;
    background: #f0f4f5;
}

.currency,
.quiet {
    color: #8a999f;
    font-size: 10px;
}

.status-pill,
.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f3;
    color: #66777e;
    font-size: 10px;
    font-weight: 750;
    text-transform: capitalize;
}

.status-pill>span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-active,
.status-paid,
.status-completed,
.status-settled,
.status-funds_held,
.status-delivery_pending,
.status-delivered {
    color: var(--success);
    background: #eaf8f2;
}

.status-pending,
.status-processing,
.status-release_pending,
.status-settlement_processing,
.status-retrying {
    color: var(--warning);
    background: #fff6e8;
}

.status-failed,
.status-rejected,
.status-cancelled,
.status-suspended {
    color: var(--danger);
    background: #fff0ee;
}

.mode-live {
    color: #7142a1;
    background: #f4edfa;
}

.mode-test {
    color: #4b6873;
    background: #edf3f5;
}

.empty-state {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    white-space: normal;
    text-align: center;
}

.empty-state>span {
    margin-bottom: 8px;
    color: #9bb0b8;
    font-size: 24px;
}

.empty-state strong {
    color: var(--ink);
}

.empty-state p {
    margin: 3px 0 0;
    color: var(--muted);
}

.empty-state.small {
    min-height: 125px;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.count-badge {
    min-width: 25px;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--teal-600);
    background: #e5f5f3;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.compact-table td {
    height: 54px;
}

.truncate {
    display: block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-type {
    color: #244c5b;
    font-weight: 650;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 230px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
}

.search-field:focus-within {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}

.search-field input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 12px;
}

.table-tools,
.filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-tools {
    margin-left: auto;
}

.copy-reference {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    border: 0;
    color: #94a3a8;
    background: transparent;
    cursor: pointer;
}

.copy-reference:hover {
    color: var(--teal-600);
}

.filtered-empty {
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--muted);
    text-align: center;
}

.filtered-empty:not([hidden]) {
    display: flex;
}

.filtered-empty>span {
    font-size: 25px;
}

.filtered-empty strong {
    margin-top: 8px;
    color: var(--ink);
}

.filtered-empty p {
    margin: 3px 0 0;
}

.center-state {
    display: flex;
    min-height: calc(100vh - 100px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.center-state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 16px;
    color: var(--navy-950);
    background: #5eead4;
    font-size: 24px;
    font-weight: 900;
}

.center-state h1 {
    font-size: 28px;
}

.center-state>p:not(.eyebrow) {
    max-width: 430px;
    margin: 10px 0 22px;
    color: var(--muted);
}

.regulation-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #cbe3df;
    border-radius: 999px;
    color: #35645f;
    background: #f1faf8;
    font-size: 10px;
    font-weight: 750;
}

.regulation-badge>span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--teal-600);
    font-size: 8px;
}

.trust-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    padding: 17px 19px;
    border: 1px solid #b9ddd7;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #f3fcfa, #fff);
    box-shadow: var(--shadow);
}

.trust-notice-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--teal-600);
    background: #dcf5f0;
    font-size: 20px;
}

.trust-notice strong {
    display: block;
    font-size: 13px;
}

.trust-notice p {
    max-width: 780px;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.trust-notice a {
    margin-left: auto;
    color: var(--teal-600);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 750;
}

.metric-label-value {
    display: block;
    margin-top: 18px;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.protection-flow {
    padding: 10px 20px 20px;
}

.protection-flow>div {
    position: relative;
    display: flex;
    gap: 13px;
    padding: 12px 0;
}

.protection-flow>div:not(:last-child):before {
    content: '';
    position: absolute;
    top: 39px;
    bottom: -8px;
    left: 14px;
    border-left: 1px dashed #bdd4d2;
}

.protection-flow i {
    display: grid;
    z-index: 1;
    flex: 0 0 29px;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 50%;
    color: var(--teal-600);
    background: #e6f7f3;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.protection-flow strong,
.protection-flow small {
    display: block;
}

.protection-flow strong {
    font-size: 12px;
}

.protection-flow small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.window-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    padding: 20px 20px 12px;
}

.window-cards>div {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fafcfc;
}

.window-cards span,
.window-cards small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.window-cards strong {
    display: block;
    margin: 12px 0 2px;
    color: var(--teal-600);
    font-size: 31px;
    line-height: 1;
}

.panel-note {
    margin: 0;
    padding: 5px 20px 20px;
    color: var(--muted);
    font-size: 10px;
}

.account-list {
    padding: 8px 20px;
}

.account-list>div:not(.empty-state) {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 65px;
    border-bottom: 1px solid #edf1f2;
}

.account-list>div:last-child {
    border-bottom: 0;
}

.account-list>div>span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.account-list strong,
.account-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-list strong {
    font-size: 11px;
}

.account-list small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.account-icon {
    display: grid;
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 9px;
    color: var(--teal-600);
    background: #e9f7f4;
    font-weight: 800;
}

.regulatory-footnote {
    max-width: 760px;
    margin: 25px auto 0;
    color: #8a999f;
    font-size: 9px;
    text-align: center;
}

.member-list,
.activity-list {
    padding: 8px 20px;
}

.member-list>div:not(.empty-state),
.activity-list>div:not(.empty-state) {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid #edf1f2;
}

.member-list>div:last-child,
.activity-list>div:last-child {
    border: 0;
}

.member-avatar,
.activity-icon {
    display: grid;
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 9px;
    color: var(--teal-600);
    background: #e8f7f4;
    font-size: 10px;
    font-weight: 800;
}

.member-list>div>span:nth-child(2),
.activity-list>div>span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.member-list strong,
.member-list small,
.activity-list strong,
.activity-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-list strong,
.activity-list strong {
    font-size: 11px;
}

.member-list small,
.activity-list small,
.activity-list time {
    color: var(--muted);
    font-size: 9px;
}

.role-badge {
    padding: 4px 7px;
    border-radius: 6px;
    color: #536b74;
    background: #eef3f4;
    font-size: 9px;
    font-weight: 750;
}

.role-guide {
    padding: 10px 20px;
}

.role-guide>div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f2;
    font-size: 10px;
}

.role-guide b {
    flex: 0 0 95px;
}

.role-guide span {
    color: var(--muted);
    text-align: right;
}

.secret-reveal {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #9fd7cc;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #edf9f6, #fff);
    box-shadow: var(--shadow);
}

.secret-reveal>div:first-child {
    display: flex;
    align-items: center;
    gap: 11px;
}

.secret-reveal>div:first-child>span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    color: var(--success);
    background: #dff5ee;
    font-weight: 800;
}

.secret-reveal strong,
.secret-reveal p {
    display: block;
    margin: 0;
}

.secret-reveal p {
    color: var(--muted);
    font-size: 10px;
}

.secret-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.secret-value code {
    flex: 1;
    padding: 12px;
    overflow-x: auto;
    border: 1px solid #cadfdb;
    background: #fff;
    white-space: nowrap;
}

.secret-value button {
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--teal-600);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.key-create-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: #fafcfc;
}

.key-create-form label {
    min-width: 0;
    flex: 1;
}

.key-create-form label:nth-child(2) {
    flex: 0 0 90px;
}

.key-create-form label>span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
}

.key-create-form input,
.key-create-form select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: #fff;
    font-size: 11px;
}

.key-create-form input:focus,
.key-create-form select:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}

.key-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-actions button {
    padding: 0;
    border: 0;
    color: var(--teal-600);
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 750;
}

.key-actions .danger-link {
    color: var(--danger);
}

.key-revoked {
    display: block;
    color: var(--danger);
    font-size: 8px;
}

.profile-id {
    color: var(--muted);
    font: 650 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 18px;
    padding: 22px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(115deg, var(--navy-950), #0e3b49);
    box-shadow: 0 16px 38px rgba(6, 25, 35, .13);
}

.profile-monogram {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(94, 234, 212, .25);
    border-radius: 15px;
    color: var(--mint, #5eead4);
    background: rgba(255, 255, 255, .07);
    font-size: 23px;
    font-weight: 850;
}

.profile-hero h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
}

.profile-hero p {
    margin: 2px 0 8px;
    color: #9eb3bb;
    font-size: 11px;
}

.profile-hero>div:nth-child(2)>div {
    display: flex;
    gap: 6px;
}

.profile-hero>div:nth-child(2)>div span {
    padding: 3px 7px;
    border-radius: 5px;
    color: #add0d2;
    background: rgba(255, 255, 255, .07);
    font-size: 8px;
    font-weight: 750;
}

.readiness-ring {
    display: grid;
    width: 78px;
    height: 78px;
    margin-left: auto;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at center, #0d3542 58%, transparent 60%), conic-gradient(#5eead4 calc(var(--progress)*1%), rgba(255, 255, 255, .12) 0);
}

.readiness-ring strong,
.readiness-ring small {
    display: block;
    line-height: 1.15;
}

.readiness-ring strong {
    font-size: 17px;
}

.readiness-ring small {
    color: #95aeb6;
    font-size: 7px;
}

.profile-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #f0d5a7;
    border-radius: 11px;
    background: #fff9ee;
}

.profile-alert>span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 50%;
    color: #9e660d;
    background: #fbe8c3;
    font-weight: 800;
}

.profile-alert strong {
    font-size: 11px;
}

.profile-alert p {
    margin: 1px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr);
    gap: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
}

.detail-grid>div {
    min-width: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #edf1f2;
}

.detail-grid>div:nth-child(odd) {
    border-right: 1px solid #edf1f2;
}

.detail-grid dt,
.side-details dt {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.detail-grid dd,
.side-details dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 650;
}

.verification-mark {
    color: var(--warning);
    font-size: 9px;
    font-weight: 750;
}

.verification-mark.complete {
    color: var(--success);
}

.document-list,
.owner-list {
    padding: 8px 20px;
}

.document-list>div:not(.empty-state),
.owner-list>div:not(.empty-state) {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf1f2;
}

.document-list>div:last-child,
.owner-list>div:last-child {
    border: 0;
}

.document-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    color: var(--teal-600);
    background: #e8f7f4;
}

.document-list>div>span:nth-child(2),
.owner-list>div>span:nth-child(2) {
    min-width: 0;
    flex: 1
}

.document-list strong,
.document-list small,
.owner-list strong,
.owner-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.document-list strong,
.owner-list strong {
    font-size: 10px
}

.document-list small,
.owner-list small {
    color: var(--muted);
    font-size: 8px
}

.checklist {
    padding: 12px 20px
}

.checklist>div {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f2;
    color: #7b8c91;
    font-size: 10px;
    font-weight: 650
}

.checklist>div:last-child {
    border: 0
}

.checklist span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: #eef2f3
}

.checklist .done {
    color: var(--ink)
}

.checklist .done span {
    color: var(--success);
    background: #e5f6ef
}

.side-details {
    margin: 0;
    padding: 9px 20px
}

.side-details>div {
    padding: 9px 0;
    border-bottom: 1px solid #edf1f2
}

.side-details>div:last-child {
    border: 0
}

.side-details a {
    color: var(--teal-600)
}

@media (max-width: 1080px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .two-column-grid,
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-shell,
    .app-shell.sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-w);
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    .menu-open .sidebar {
        transform: translateX(0);
    }

    .menu-open .scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 15;
        background: rgba(2, 16, 23, .48);
        backdrop-filter: blur(2px);
    }

    .icon-button.sidebar-close {
        display: grid;
        color: var(--muted);
    }

    .sidebar-toggle {
        display: none;
    }

    main {
        padding: 26px 17px 48px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .metric-value {
        font-size: 23px;
    }

    .toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-tools {
        width: 100%;
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .filter-chips {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .tw-filter-chip {
        flex: 0 0 auto;
    }

    .search-field {
        width: 100%;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .trust-notice {
        align-items: flex-start;
    }

    .trust-notice a {
        display: none;
    }

    .key-create-form {
        align-items: stretch;
        flex-direction: column;
    }

    .key-create-form label:nth-child(2) {
        flex-basis: auto;
    }

    .secret-value {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-hero {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .readiness-ring {
        margin-left: 0
    }

    .detail-grid {
        grid-template-columns: 1fr
    }

    .detail-grid>div:nth-child(odd) {
        border-right: 0
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 120px;
    }

    .header-actions .button {
        flex: 1;
    }

    .window-cards {
        grid-template-columns: 1fr;
    }

    .regulation-badge {
        white-space: normal;
    }
}

@media print {

    .sidebar,
    .mobile-header,
    .header-actions,
    .search-field {
        display: none !important;
    }

    .page-shell {
        margin: 0;
    }

    main {
        padding: 0;
    }

    .panel,
    .metric-card {
        box-shadow: none;
    }
}
*:focus-visible {
    outline: 3px solid rgba(18, 151, 126, .35);
    outline-offset: 3px;
}

.data-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    background: #f8fbfa;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


.portal-messages{display:grid;gap:8px;margin:0 0 18px}.portal-message{border:1px solid var(--line);border-radius:10px;background:#fff;padding:12px 14px;font-weight:650}.portal-message-success{border-color:#a7e6d2;background:#effcf9;color:#087f5b}.portal-message-error{border-color:#fecaca;background:#fef2f2;color:#b42318}
.webhook-create-form {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfa;
}

.webhook-create-form label>span,
.webhook-create-form legend {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.webhook-create-form input[type=url],
.webhook-create-form input[name=description] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbdadd;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
}

.webhook-create-form fieldset {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1/-1;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.webhook-create-form fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid #cbdadd;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.webhook-create-form fieldset label:hover {
    border-color: var(--teal-500);
}

.webhook-create-form fieldset label:has(input:checked) {
    border-color: var(--teal-500);
    background: var(--teal-100);
    color: var(--teal-700);
}

.webhook-create-form fieldset input[type=checkbox] {
    accent-color: var(--teal-600);
}

.webhook-create-form>button {
    width: max-content;
}

.webhook-create-form>p {
    align-self: center;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 760px) {
    .webhook-create-form {
        grid-template-columns: 1fr;
    }

    .webhook-create-form>button {
        width: 100%;
    }
}

/* Webhook delivery / merchant-response inspector */
.data-table td .wh-evt{display:block;margin-top:3px;font-size:10.5px;color:var(--muted)}
.data-table td .muted{color:var(--muted)}
.wh-response{max-width:340px}
.wh-response>summary{cursor:pointer;color:var(--teal-600);font-weight:650;font-size:12px;list-style:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wh-response>summary::-webkit-details-marker{display:none}
.wh-response>summary::before{content:"▸ ";color:var(--muted)}
.wh-response[open]>summary::before{content:"▾ "}
.wh-body{margin:8px 0 0;padding:10px 12px;max-height:220px;overflow:auto;border-radius:8px;background:#0b2934;color:#cfe6e4;font:11.5px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word}
.wh-body.wh-headers{background:#0e3540;color:#9fbcc1;font-size:11px}

.payment-detail-header {
    align-items: center;
}

.payment-detail-header > div,
.payment-detail-grid > *,
.timeline-event > div {
    min-width: 0;
}

.payment-detail-header .eyebrow a {
    color: var(--teal-600);
}

.payment-detail-header .eyebrow a:hover {
    text-decoration: underline;
}

.payment-detail-header h1 {
    overflow-wrap: anywhere;
    font-size: clamp(22px, 2.6vw, 34px);
}

.payment-detail-header > .status-pill {
    flex: 0 0 auto;
    padding: 7px 11px;
}

.payment-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr);
    gap: 20px;
    align-items: start;
}

.detail-stack {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.payment-summary-card,
.timeline-card,
.delivery-confirm-card,
.payout-destination-card {
    padding: 0;
}

.delivery-confirm-card {
    position: sticky;
    top: 24px;
}

.payment-summary-card .panel-head,
.timeline-card .panel-head,
.delivery-confirm-card .panel-head,
.payout-destination-card .panel-head {
    padding: 18px 22px;
}

.payout-route {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 20px 20px 14px;
}

.payout-route-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #e5f5f3;
    color: var(--teal-600);
    font-size: 20px;
}

.payout-route small,
.payout-route p {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.payout-route strong {
    display: block;
    margin: 2px 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.payout-route-note {
    margin: 0 20px 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.payout-route-note strong {
    color: var(--ink);
}

.payment-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.payment-facts > div {
    min-width: 0;
    padding: 17px 22px;
    border-bottom: 1px solid var(--line);
}

.payment-facts > div:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.payment-facts > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.payment-facts dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.payment-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-weight: 700;
}

.payment-facts dd.payment-ref {
    font-size: 11px;
    line-height: 1.6;
}

.payment-timeline {
    margin: 0;
    padding: 22px;
    list-style: none;
}

.timeline-event {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 24px;
}

.timeline-event:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 13px;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: var(--line);
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border: 3px solid #b7c9c6;
    border-radius: 50%;
    background: var(--surface);
}

.timeline-event.is-current .timeline-dot {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(18, 151, 126, .12);
}

.timeline-event strong {
    display: block;
}

.timeline-event time {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.timeline-event p {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    color: var(--muted);
}

.secure-notice,
.confirmation-complete,
.confirmation-locked,
.confirmation-waiting {
    margin: 20px;
    padding: 14px;
    border: 1px solid #bfe8dc;
    border-radius: 10px;
    background: #effcf9;
    color: #075f50;
}

.secure-notice {
    margin-bottom: 0;
}

.secure-notice + .secure-notice {
    margin-top: 12px;
}

.secure-notice .copy-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.secure-notice .copy-row input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #bfe8dc;
    border-radius: 8px;
    background: #fff;
    color: #075f50;
    font-size: 12px;
}

.secure-notice .copy-row .button {
    flex: none;
    white-space: nowrap;
}

.secure-notice p,
.confirmation-complete p,
.confirmation-locked p,
.confirmation-waiting p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

.confirmation-locked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #9f241c;
}

.confirmation-waiting {
    border-color: var(--line);
    background: #f5f7f7;
    color: var(--muted);
}

.confirmation-complete > span {
    display: grid;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    place-items: center;
    border-radius: 50%;
    background: var(--success);
    color: white;
}

.delivery-code-form {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.delivery-code-form label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.delivery-code-form input {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid #cbdadd;
    border-radius: 9px;
    outline: 0;
    background: var(--surface);
    color: var(--ink);
}

.delivery-code-form input:hover {
    border-color: #9fb5bb;
}

.delivery-code-form input:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.delivery-code-form input[name="secure_code"] {
    font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .22em;
}

.delivery-code-form label:has(em) input {
    border-color: var(--danger);
}

.delivery-code-form em {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 12px;
    font-style: normal;
}

.delivery-code-form small {
    color: var(--muted);
    line-height: 1.45;
    text-align: center;
}

.delivery-code-form .button {
    width: 100%;
    min-height: 46px;
    white-space: normal;
}

@media (max-width: 980px) {
    .payment-detail-grid {
        grid-template-columns: 1fr;
    }

    .delivery-confirm-card {
        position: static;
    }
}

@media (max-width: 560px) {
    .payment-detail-header {
        align-items: flex-start;
    }

    .payment-facts {
        grid-template-columns: 1fr;
    }

    .payment-facts > div,
    .payment-facts > div:nth-child(odd),
    .payment-facts > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .payment-facts > div:last-child {
        border-bottom: 0;
    }

    .payment-summary-card .panel-head,
    .timeline-card .panel-head,
    .delivery-confirm-card .panel-head,
    .payout-destination-card .panel-head,
    .payment-facts > div,
    .payment-timeline,
    .delivery-code-form {
        padding-right: 16px;
        padding-left: 16px;
    }

    .secure-notice,
    .confirmation-complete,
    .confirmation-locked,
    .confirmation-waiting {
        margin-right: 16px;
        margin-left: 16px;
    }
}

/* ---------------------------------------------------------------------------
   Billing — plan usage meter & plan selection
   --------------------------------------------------------------------------- */

.usage-meter {
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f2;
}

.usage-meter-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.usage-meter-head span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.usage-meter-head strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.usage-meter-track {
    height: 8px;
    border-radius: 999px;
    background: #e6edee;
    overflow: hidden;
}

.usage-meter-fill {
    height: 100%;
    min-width: 4px;
    border-radius: 999px;
    background: var(--teal-500);
    transition: width .4s ease;
}

.usage-meter-fill.is-warn { background: var(--warning); }
.usage-meter-fill.is-high { background: var(--danger); }

.usage-meter-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 20px;
}

.plan-option {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.plan-option.is-current {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 1px var(--teal-500) inset;
}

.plan-option.is-featured {
    border-color: var(--navy-800);
}

.plan-option-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.plan-option-tag {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--teal-100);
    color: var(--teal-600);
}

.plan-option-price {
    font-size: 22px;
    font-weight: 750;
    color: var(--ink);
    line-height: 1.1;
}

.plan-option-price small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
}

.plan-option-desc {
    margin: 0;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--muted);
    flex: 1;
}

.plan-option ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 5px;
}

.plan-option li {
    position: relative;
    padding-left: 16px;
    font-size: 10px;
    color: var(--ink);
}

.plan-option li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal-600);
    font-weight: 700;
}

.plan-form-inline {
    display: grid;
    gap: 14px;
    padding: 0 20px 20px;
    max-width: 460px;
}

.plan-form-inline label {
    display: grid;
    gap: 5px;
    font-size: 10px;
    font-weight: 650;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.plan-form-inline input,
.plan-form-inline select,
.plan-form-inline textarea {
    font: inherit;
    font-size: 12px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
}

.plan-form-inline input:focus,
.plan-form-inline select:focus,
.plan-form-inline textarea:focus {
    outline: 2px solid var(--teal-500);
    outline-offset: 1px;
    border-color: var(--teal-500);
}
