@charset "UTF-8";

:root {
    --nav: #061a31;
    --nav-selected: #104d8d;
    --nav-ink: #c6d7e9;
    --ink: #07133f;
    --quiet: #526d98;
    --blue: #006edc;
    --blue-strong: #004b9e;
    --canvas: #f3f9ff;
    --surface: #fff;
    --line: #d9e7f5;
    --radius: 16px;
    --radius-control: 8px;
    --shadow: 0 5px 16px rgba(20, 74, 128, .06);
    --green: #066746;
    --green-bg: #e3f7ee;
    --yellow: #725000;
    --yellow-bg: #fff5cd;
    --orange: #8c4400;
    --orange-bg: #ffeddd;
    --red: #a61b36;
    --red-bg: #ffe6ec;
    --slate: #415873;
    --slate-bg: #edf2f7;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button[disabled] { opacity: .5; cursor: wait; }
a { color: var(--blue-strong); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1591ed; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 9; padding: 12px; background: white; }

.loading { padding: 3rem; color: var(--quiet); }
.brand { display: block; color: inherit; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 212px minmax(0, 1fr); }
.sidebar { background: var(--nav); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; min-height: 100%; }
.sidebar .brand { margin: 3px 8px 30px; }
.sidebar .brand small { color: #aac8e0; }
.navigation { display: grid; gap: 5px; }
.navigation button {
    width: 100%; display: flex; align-items: center; gap: 13px; border: 0; text-align: left;
    padding: 11px 12px; min-height: 44px; white-space: nowrap;
    background: transparent; border-radius: 8px; color: var(--nav-ink); font-weight: 600;
}
.navigation button:hover { background: #102b47; color: #fff; }
.navigation button[aria-current=page] { background: var(--nav-selected); color: #fff; box-shadow: inset 3px 0 #18b7ff, 0 7px 22px #004a9730; }
.nav-icon { width: 22px; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; color: #9cd0ff; }
.stage { min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: 76px; padding: 0 clamp(16px, 3vw, 33px); background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar fieldset { display: flex; align-items: center; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.topbar select { width: auto; min-width: 125px; }
.topbar .button { min-height: 36px; }
.topbar .account { display: flex; gap: 8px; align-items: center; }
.account-name { color: var(--quiet); max-width: 130px; overflow: hidden; text-overflow: ellipsis; }

.content { max-width: 1520px; margin-inline: auto; padding: 23px clamp(16px, 3vw, 30px) 48px; }
.page-header {
    display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
    gap: 10px 20px; margin-bottom: 20px;
}
.page-header h1 { margin: 0; font-size: clamp(27px, 3vw, 41px); line-height: 1.2; letter-spacing: -.045em; }
.page-header p { color: var(--quiet); margin: 5px 0 0; max-width: 72ch; line-height: 1.5; }

.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); margin-bottom: 17px; min-width: 0; }
.panel-header { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.panel-header p { margin: 4px 0 0; color: var(--quiet); font-size: 13px; }
.panel-body { padding: 19px 20px; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 17px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.stat { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px 17px; }
.stat small { display: block; color: var(--quiet); font-size: 13px; font-weight: 600; }
.stat strong { display: block; margin-top: 5px; font-size: clamp(19px, 2.5vw, 28px); line-height: 1.15; font-variant-numeric: tabular-nums; }

.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 13px;
    border: 1px solid #b9cde1; border-radius: var(--radius-control); background: #fff; color: var(--ink);
    font-weight: 650; text-align: center; text-decoration: none; line-height: 1.2;
}
.button:hover { background: #eef6fd; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button.primary:hover { background: var(--blue-strong); border-color: var(--blue-strong); }
.button.small { min-height: 32px; font-size: 13px; padding: 5px 9px; }
.button.danger { color: var(--red); border-color: #e1b7c0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.toolbar > label { min-width: 135px; max-width: 280px; }
.notice {
    padding: 11px 14px; margin-bottom: 15px; border-radius: var(--radius-control); color: var(--blue-strong);
    border: 1px solid #c0d9f6; background: #e9f4ff; line-height: 1.5;
}
.notice.error { border-color: #e2b6c0; background: var(--red-bg); color: var(--red); }
.notice.success { border-color: #b1dfcd; background: var(--green-bg); color: var(--green); }
.notice.warning { border-color: #e4ca8a; background: var(--yellow-bg); color: var(--yellow); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--quiet); background: #f3f8fd; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; font-weight: 700; white-space: nowrap; }
td { color: var(--ink); overflow-wrap: anywhere; }
th, td { padding: 11px 14px; border-bottom: 1px solid #e8eff6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfe; }
td.number, th.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td .subtext { display: block; color: var(--quiet); margin-top: 3px; font-size: 12px; }
td button.link { text-align: left; }
.empty { padding: 21px; color: var(--quiet); margin: 0; }
.link { color: var(--blue-strong); background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 8px; background: var(--slate-bg); color: var(--slate); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.green { color: var(--green); background: var(--green-bg); }
.badge.yellow { color: var(--yellow); background: var(--yellow-bg); }
.badge.orange { color: var(--orange); background: var(--orange-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge.blue { color: var(--blue-strong); background: #e6f2ff; }

form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 15px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 5px; color: var(--ink); font-size: 13px; font-weight: 650; }
label small, .hint { color: var(--quiet); font-size: 12px; font-weight: 400; line-height: 1.5; }
input:not([type=checkbox]), select, textarea {
    width: 100%; min-width: 0; padding: 8px 11px; min-height: 40px;
    background: #fff; color: var(--ink); border: 1px solid #aabfd4; border-radius: var(--radius-control);
}
input::placeholder, textarea::placeholder { color: #647b95; }
input:disabled, select:disabled { background: #eff4f8; color: var(--quiet); }
textarea { resize: vertical; }
input[type=checkbox] { inline-size: 17px; block-size: 17px; margin: 0; accent-color: var(--blue); }
.check { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
details { border: 1px solid var(--line); border-radius: var(--radius-control); margin: 9px 0; }
details > summary { padding: 11px 13px; font-weight: 700; cursor: pointer; }
details[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 9px; }
details .details-body { padding: 4px 13px 11px; }
.section-actions { margin-top: 16px; }
form code, td code { font-size: 12px; word-break: break-word; }

.login-card { background: var(--surface); border-radius: 16px; }
.login-card h1 { font-size: clamp(29px, 4vw, 38px); letter-spacing: -.04em; margin: 0 0 16px; }
.login-card form { display: grid; gap: 15px; }
.login-card .notice { margin-bottom: 0; }

@media (max-width: 1024px) {
    .shell { grid-template-columns: 190px minmax(0, 1fr); }
    .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { padding: 13px 13px 10px; }
    .sidebar .brand { margin: 0 2px 12px; }
    .navigation { display: flex; overflow: auto; gap: 4px; padding-bottom: 4px; }
    .navigation button { width: max-content; padding: 6px 9px; min-height: 36px; }
    .navigation button[aria-current=page] { box-shadow: inset 0 -2px #68b9ff; }
    .nav-icon { display: none; }
    .topbar { height: auto; min-height: 59px; flex-wrap: wrap; padding-block: 8px; }
    .content { padding-top: 22px; }
    .stat-grid { gap: 8px; }
    .stat { padding: 12px; }
}
@media (max-width: 460px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid .stat:last-child { grid-column: 1 / -1; }
    form .form-grid { grid-template-columns: minmax(0, 1fr); }
    .topbar fieldset { gap: 5px; }
    .account-name { display: none; }
}

.portfolio-table th, .portfolio-table td { padding: 10px 8px; }
.portfolio-table th:first-child, .portfolio-table td:first-child {
    min-width: 145px; padding-left: 14px; overflow-wrap: normal;
}
.portfolio-table .subtext { white-space: nowrap; }
.portfolio-table th:nth-child(n+2):nth-child(-n+10) { text-align: right; }
.portfolio-table .number { font-size: 13px; }
.portfolio-table .zero { color: #657c93; }
@media (max-width: 700px) {
    .portfolio-table th:first-child, .portfolio-table td:first-child {
        position: sticky; z-index: 1; left: 0; background: #f5f9fd; box-shadow: 2px 0 0 var(--line);
    }
}

.brand img { display: block; width: 161px; height: 58px; object-fit: contain; object-position: left center; }
.brand small { display: block; margin: 0 11px; color: #a8c2de; font-size: 11px; font-weight: 600; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #0756a9; color: #fff; font-size: 11px; font-weight: 700; }
.nexus-heading { min-height: 98px; align-items: center; }
.assistant-card {
    position: relative; isolation: isolate; display: flex; align-items: center; min-width: 0;
    width: min(405px, 100%); min-height: 94px; padding: 14px 17px 14px 121px;
    overflow: hidden; border: 1px solid #e0edf9; border-radius: 12px; background: #eef7ff;
}
.assistant-card img { position: absolute; left: 8px; bottom: -16px; width: 110px; height: 116px; object-fit: contain; object-position: center bottom; }
.assistant-card strong { font-size: 13px; }
.assistant-card .actions { margin-top: 8px; }
.metric-icon { width: 39px; height: 39px; display: grid; flex: 0 0 39px; place-items: center; border-radius: 50%; color: var(--blue-strong); background: #e9f4ff; font-size: 20px; font-weight: 650; }
.metric-icon.positive { color: var(--green); background: var(--green-bg); }
.metric-icon.attention { color: var(--orange); background: var(--orange-bg); }
.stat { display: flex; align-items: center; gap: 12px; min-height: 96px; }
.stat > div { min-width: 0; }
.stat strong { font-size: clamp(16px, 2.25vw, 27px); letter-spacing: -.035em; }
.search-toolbar { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.search-toolbar > label { max-width: 400px; flex: 1 1 235px; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 13px 16px; color: var(--quiet); }
.mapping-scope { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.mapping-scope > label { min-width: min(100%, 230px); flex: 1 1 260px; }
.mapping-scope > div, .mapping-scope > button { align-self: center; }
.mapping-label { display: block; margin-bottom: 5px; color: var(--quiet); font-size: 13px; }
.product-code { margin-inline-start: 10px; color: var(--ink); white-space: nowrap; }
.mapping-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mapping-editor fieldset { margin: 0; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbff; }
.mapping-editor legend { padding-inline: 6px; font-weight: 700; }

.login-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: 100vh; background: #fff; }
.login-visual { min-height: 640px; isolation: isolate; position: relative; overflow: hidden; padding: 42px clamp(24px, 4vw, 67px); background: #f8fcff; }
.login-visual::before { content: ""; position: absolute; z-index: -2; inset: 40% 0 0; background: url("/images/pangea-mountains.png") center bottom / 125% auto no-repeat; opacity: .76; }
.login-visual::after { content: ""; position: absolute; z-index: -1; inset: 0 0 8% 25%; background: url("/images/pangea-login-ribbon.png") right top / contain no-repeat; opacity: .40; }
.login-logo { display: block; width: min(240px, 75%); height: 100px; object-fit: contain; object-position: left center; }
.login-visual-copy { position: relative; z-index: 1; max-width: 83%; }
.login-visual-copy h2 { margin: 25px 0 7px; font-size: clamp(30px, 4vw, 54px); line-height: 1; letter-spacing: -.045em; }
.login-visual-copy p { margin: 0; color: var(--quiet); font-size: 15px; }
.login-fox { position: absolute; z-index: 0; right: -8%; bottom: -4%; width: min(85%, 570px); height: min(79%, 660px); object-fit: contain; object-position: right bottom; }
.login-access { display: grid; place-items: center; min-width: 0; padding: 24px; }
.login-card { width: min(100%, 444px); padding: clamp(22px, 3vw, 36px); border: 1px solid #e4edf7; box-shadow: var(--shadow); }
.login-card > p { color: var(--quiet); margin: -7px 0 23px; }
.login-card .button { margin-top: 4px; width: 100%; }
@media (min-width: 701px) {
    .sidebar { position: sticky; align-self: start; top: 0; height: 100vh; overflow: auto; }
    .topbar { position: sticky; top: 0; z-index: 8; }
}
@media (max-width: 1024px) {
    .assistant-card { width: min(360px, 100%); }
    .stat { gap: 8px; }
    .metric-icon { width: 31px; height: 31px; flex-basis: 31px; font-size: 16px; }
}
@media (max-width: 700px) {
    .brand img { height: 41px; width: 125px; }
    .brand small { margin-inline-start: 7px; }
    .login-shell { grid-template-columns: minmax(0, 1fr); }
    .login-visual { min-height: 236px; padding: 14px 23px 50px; }
    .login-logo { width: min(160px, 72%); height: 63px; }
    .login-visual-copy { max-width: 70%; }
    .login-visual-copy h2 { margin-top: 8px; }
    .login-fox { width: min(52%, 255px); height: 80%; right: -9%; }
    .login-access { padding: 15px 16px 24px; }
    .mapping-editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
    .assistant-card { padding-inline-start: 92px; }
    .assistant-card img { width: 90px; left: 4px; }
    .portfolio-metrics { grid-template-columns: minmax(0, 1fr); }
    .topbar .badge { font-size: 10px; }
    .avatar { display: none; }
}

.endpoint { margin: 0 0 12px; overflow-wrap: anywhere; }
.endpoint-example { margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f3f8fd; overflow-x: auto; }
.details-body > h3 { margin: 18px 0 7px; color: var(--ink); font-size: 15px; }
.details-body > .table-wrap label { min-width: 172px; }
.details-body > .table-wrap :is(input, select) { padding-block: 6px; margin-bottom: 0; }
