.developer-portal {
  --green: #2459cf;
  --ink: #192941;
  --muted: #54647e;
  --line: #dfe6f0;
  --paper: #fff;
  --canvas: #f2f5fa;
  --navy: #101c32;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
}

.developer-portal .admin-layout { grid-template-columns: 222px minmax(0, 1fr); }
.developer-portal .admin-main { min-width: 0; }
.developer-portal .sidebar { padding: 25px 15px; gap: 26px; background: var(--navy); }
.developer-portal .sidebar .console-brand { display: flex; align-items: center; gap: 11px; margin: 0; padding: 0 5px; line-height: 1.3; }
.console-brand small { display: block; margin-top: 4px; color: #b8c9e3; font-size: 12px; font-weight: 500; }
.console-mark, .developer-portal .developer-login-brand span {
  display: inline-grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center;
  border-radius: 9px; background: #295bce; color: #fff; font-size: 14px; font-weight: 750;
}
.developer-portal .sidebar nav { gap: 5px; }
.developer-portal .sidebar nav button {
  min-height: 43px; padding: 8px 13px; color: #c8d5ed; border-left: 3px solid transparent; border-radius: 8px;
}
.developer-portal .sidebar nav button:hover { background: #20324d; color: #fff; }
.developer-portal .sidebar nav button[aria-current] { color: #fff; background: #243e68; border-color: transparent; border-left-color: #75a6ff; }
.developer-portal .admin-header > div { min-height: 59px; max-width: none; padding: 10px 28px; }
.developer-portal .developer-workspace-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.developer-portal .developer-login-brand { display: none; }
.developer-portal #session-user { color: #314761; font-weight: 650; overflow-wrap: anywhere; }
.developer-portal .badge { background: #edf2ff; color: #304d92; }
.developer-portal .workspace { max-width: 1520px; padding: 25px 27px 38px; }
.developer-portal .page-title { margin-bottom: 18px; }
.developer-portal .page-title h1 { color: #14243d; font-size: 29px; letter-spacing: -.025em; }
.developer-portal .page-title p { margin-top: 5px; font-size: 14px; }
.developer-portal .card { box-shadow: 0 2px 6px #18335808; }
.developer-portal :is(.columns, .operations-grid) > .card + .card { margin-top: 0; }
.developer-portal :is(#workspace, #dialog) :is(input:not([type="checkbox"]), textarea, select) { border-color: #ced9e9; }
.developer-portal :is(button, .button) { color: #243b5b; }
.developer-portal :is(button, .button):hover { border-color: #91a8d0; }
.developer-portal :is(button, .button).primary { background: #2459cf; color: #fff; border-color: #2459cf; }
.developer-portal :is(button, .button).primary:hover { background: #1d49ae; border-color: #1d49ae; }
.developer-portal button.danger { color: #9c2e43; }
.developer-portal input[type="checkbox"] { accent-color: #2459cf; }
.developer-portal :is(input, textarea, select, button, a, [tabindex="0"]):focus-visible { outline: 2px solid #3f78e2; outline-offset: 2px; }
.developer-portal #dialog { color: var(--ink); box-shadow: 0 16px 44px #111e3740; }
.developer-portal .status:not(.error) { color: #234780; border-color: #cbdcfb; background: #edf4ff; }

.developer-portal .data-card { padding: 0; }
.data-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  min-height: 59px; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--line);
}
.data-toolbar h2 { margin: 0; font-size: 16px; }
.data-toolbar .inline-filter { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.inline-filter select { min-width: 120px; width: auto; }
.console-table { width: 100%; }
.customers-table { min-width: 780px; }
.orders-table { min-width: 506px; }
.invoices-table { min-width: 604px; }
.console-table :is(th, td) { padding: 10px 14px; }
.console-table th { color: #4b5d7a; background: #f5f7fb; font-size: 13px; }
.console-table td { height: 54px; }
.console-table tr:last-child td { border-bottom: 0; }
.console-table tbody tr:hover { background: #f7faff; }
.console-table td.muted[colspan] { height: 112px; text-align: center; font-weight: 500; }
.customers-table :is(th, td):first-child { text-align: center; }
.customers-table td:nth-child(n+5):nth-child(-n+7), .console-table th.numeric,
.orders-table td:nth-child(3), .invoices-table td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.record-title { color: #1d3150; font-weight: 700; }
.record-account, .record-id { color: #506586; }
.record-account { display: inline-block; max-width: 235px; white-space: normal; overflow-wrap: anywhere; }
.record-id { font: 600 12px/1.5 Consolas, 'Courier New', monospace; letter-spacing: .025em; }
.state-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px;
  background: #edf1f7; color: #465b73; white-space: nowrap; font-size: 12px; font-weight: 700;
}
.state-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-pill.complete { color: #17634f; background: #e5f5ee; }
.state-pill.waiting { color: #845200; background: #fff2d7; }
.state-pill.ready { color: #2454af; background: #e8efff; }
.state-pill.held { color: #942d43; background: #fcebf0; }
.developer-portal .table-action { border-color: #d1dffc; color: #214caa; background: #edf3ff; }
.developer-portal .table-action:hover { background: #e2ecff; }

.operations-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 15px; }
.operations-grid > * { min-width: 0; }
.operation-detail h2 { margin-bottom: 2px; }
.operation-detail .summary { padding: 9px 12px; border-radius: 9px; background: #f4f7fc; gap: 3px; }
.operation-detail .summary > div { border-color: #e1e8f5; }
.operation-detail .summary > div:last-child { border-bottom: 0; }
.operation-detail .summary dd { font-weight: 600; }
#invoice-panel { display: grid; gap: 15px; }
#invoice-panel .card { margin-top: 0; }
#invoice-details { margin-top: 10px; }
@media (min-width: 1240px) {
  .operations-grid:has(> .operation-detail:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(345px, .58fr); }
}

.developer-portal:has(#workspace[hidden]) {
  background-color: #0b1427;
  background-image: radial-gradient(ellipse at 48% 20%, #1d3460 0%, #0c162b 58%, #0a1223 100%);
}
.developer-portal:has(#workspace[hidden]) .admin-layout { grid-template-columns: minmax(0, 1fr); }
.developer-portal:has(#workspace[hidden]) :is(.sidebar, .developer-workspace-brand, .header-user) { display: none; }
.developer-portal:has(#workspace[hidden]) .admin-header { background: #101c32; border-color: #263754; }
.developer-portal:has(#workspace[hidden]) .developer-login-brand { display: flex; color: #eef4ff; }
.developer-portal:has(#workspace[hidden]) #message { width: min(100%, 448px); margin: 10px auto 0; }
.developer-portal:has(#workspace[hidden]) #message:not([hidden]) + .developer-login { margin-top: 16px; }
.developer-login {
  width: min(100%, 448px); margin: clamp(35px, 10vh, 100px) auto 34px; padding: 33px 34px 35px;
  border: 1px solid #35496c; border-radius: 17px; background: #16233b; color: #edf4ff;
  box-shadow: 0 26px 70px #02091680;
}
.developer-login h1 { margin-bottom: 6px; font-size: 30px; letter-spacing: -.025em; }
.developer-login #login-description { margin: 0 0 24px; color: #b9c7e0; font-size: 14px; }
.developer-login .stack { gap: 14px; }
.developer-login input { min-width: 0; min-height: 46px; color: #eef4ff; background: #101b30; border-color: #435777; }
.developer-login [name="code"] { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.developer-login .account-field { gap: 9px; }
.developer-portal .developer-login #send-developer-code {
  min-width: 110px; min-height: 46px; color: #d5e5ff; background: #23395b; border-color: #476080;
}
.developer-portal .developer-login #send-developer-code:disabled { color: #b6c7e6; opacity: 1; }
.developer-portal .developer-login .primary { min-height: 46px; background: #3267db; border-color: #497aeb; }
.developer-portal .developer-login .primary:hover { background: #2756c1; }
.developer-login :is(input, button, a):focus-visible { outline-color: #8db8ff; }

@media (max-width: 760px) {
  .developer-portal .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .developer-portal .sidebar { padding: 13px 12px; gap: 12px; min-width: 0; }
  .developer-portal .sidebar nav { display: flex; overflow-x: auto; padding: 2px 0 4px; }
  .developer-portal .sidebar nav button { flex: 0 0 auto; min-height: 38px; }
  .developer-portal .workspace, .developer-portal .admin-header > div { padding-left: 13px; padding-right: 13px; }
  .developer-portal .admin-header > div { min-height: 52px; }
  .developer-portal .page-title h1 { font-size: 25px; }
  .developer-login { margin-top: 30px; padding: 25px 20px; }
}
