:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --panel: #141414;
  --panel-2: #101010;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #2563eb;
  --danger: #fca5a5;
  --success: #86efac;
  --warning: #fde68a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1400px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: #0a0a0a;
  color: var(--text);
  font:
    14px/1.45 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #0f0f0f;
  border: 1px solid rgba(57, 255, 20, 0.4);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 200;
  letter-spacing: 0.3px;
}

.brand-sub {
  margin: 2px 0 0;
  color: #777;
  font-size: 11px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: block;
  object-fit: contain;
  flex: 0 0 44px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #111;
  color: #aaa;
  font-size: 12px;
}

/* === FLUORO BUTTON SYSTEM === */

:root {
  --fluoro: #39ff14;
  --fluoro-2: #2dfc0a;
  --fluoro-glow: rgba(57, 255, 20, 0.45);
}

/* Base button */
.btn,
button.btn {
  appearance: none;
  border: 1px solid rgba(57, 255, 20, 0.55);
  background: linear-gradient(180deg, var(--fluoro), var(--fluoro-2));
  color: #021302;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 200;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 6px 18px rgba(0, 0, 0, 0.35),
    0 0 12px var(--fluoro-glow);
  letter-spacing: 0.2px;
}

/* Hover = brighter glow */
.btn:hover,
button.btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(57, 255, 20, 0.65);
}

/* Active press */
.btn:active,
button.btn:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(57, 255, 20, 0.4);
}

/* Ghost button (still fluoro, just lighter) */
.btn.ghost {
  background: rgba(57, 255, 20, 0.08);
  color: var(--fluoro);
  border: 1px solid rgba(57, 255, 20, 0.35);
  box-shadow: none;
}

/* Danger button */
.btn.danger {
  background: linear-gradient(180deg, #ff4d4d, #ff1a1a);
  color: #fff;
  border: 1px solid rgba(255, 80, 80, 0.5);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.4);
}
.angra-btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
}
.angra-btn.processed {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.65);
  color: #aefcff;
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.25);
}
.angra-btn.returned {
  background: rgba(255, 0, 255, 0.12);
  border: 1px solid rgba(255, 0, 255, 0.65);
  color: #ffb3ff;
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.25);
}

/* Disabled */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.tabs {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.tabs-inner {
  max-width: none;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow: auto;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 14px 4px 12px;
  margin-right: 16px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-weight: 200;
}

.menu-link:hover {
  color: var(--text);
}

.menu-link.active {
  color: #fff;
  border-bottom-color: var(--fluoro);
  font-weight: 200;
}

.page {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

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

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 200;
}

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

.main {
  display: block;
}

.panel {
  background: linear-gradient(
    180deg,
    rgba(20, 20, 20, 0.96),
    rgba(10, 10, 10, 0.98)
  );
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 200;
}

.panel-sub {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.col-12 {
  grid-column: span 12;
}
.col-8 {
  grid-column: span 8;
}
.col-6 {
  grid-column: span 6;
}
.col-4 {
  grid-column: span 4;
}
.col-3 {
  grid-column: span 3;
}

.stat {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 200;
  line-height: 1;
  margin: 0;
}

.stat-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.96),
    rgba(15, 23, 42, 0.98)
  );
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 200;
}

.login p {
  margin: 0 0 20px;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 200;
  color: #dbeafe;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

th {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
}

td {
  color: var(--text);
}

.empty {
  padding: 20px;
  color: var(--muted);
}

.footer {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .col-8,
  .col-6,
  .col-4,
  .col-3 {
    grid-column: span 12;
  }

  .topbar-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .page-title {
    font-size: 24px;
  }
}
.layout-2col {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 18px;
}

.layout-3col {
  display: grid;
  grid-template-columns: 30% 40% 30%;
  gap: 18px;
}

@media (max-width: 980px) {
  .layout-2col,
  .layout-3col {
    grid-template-columns: 1fr;
  }
}

.angra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  text-decoration: none;
  transition: all 0.15s ease;
}

.angra-btn.processed {
  background: rgba(0, 245, 255, 0.12);
  border: 1px solid rgba(0, 245, 255, 0.65);
  color: #aefcff;
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.25);
}

.angra-btn.returned {
  background: rgba(255, 0, 255, 0.12);
  border: 1px solid rgba(255, 0, 255, 0.65);
  color: #ffb3ff;
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.25);
}
/* Compliance page typography aligned with Humans */
.compliance-page .page-title {
  font-size: 20px;
}

.compliance-page .page-sub {
  font-size: 12px;
}

.compliance-page .panel-title {
  font-size: 15px;
}

.compliance-page .panel-sub {
  font-size: 12px;
}

/* --- API Router Layout (global, reusable) --- */
.api-router {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.api-col {
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-title {
  padding: 14px 16px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 16px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* responsive */
@media (max-width: 1000px) {
  .api-router {
    grid-template-columns: 1fr;
  }
}

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

.api-provider-item {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: inherit;
  cursor: pointer;
}

.api-provider-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.api-provider-item.is-selected {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.api-provider-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.api-provider-name {
  font-weight: 800;
}

.api-provider-status {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.api-detail-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 14px;
}

/* APIs router page */
.apis-router-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr) minmax(
      280px,
      1fr
    );
  gap: 16px;
  align-items: start;
  width: 100%;
}

.apis-router-col {
  min-width: 0;
}

.apis-router-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.apis-router-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}

.apis-router-card-body {
  padding: 16px;
}

.apis-router-muted {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .apis-router-grid {
    grid-template-columns: 1fr;
  }
}

/* APIs router page */
.apis-router-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr) minmax(
      280px,
      1fr
    );
  gap: 16px;
  align-items: start;
  width: 100%;
}

.apis-router-col {
  min-width: 0;
}

.apis-router-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.apis-router-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
}

.apis-router-card-body {
  padding: 16px;
}

.apis-router-muted {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .apis-router-grid {
    grid-template-columns: 1fr;
  }
}
/* Dark scrollbars */
html,
body,
textarea,
table,
div,
section {
  scrollbar-width: thin;
  scrollbar-color: #334155 #020617;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
textarea::-webkit-scrollbar,
table::-webkit-scrollbar,
div::-webkit-scrollbar,
section::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track,
table::-webkit-scrollbar-track,
div::-webkit-scrollbar-track,
section::-webkit-scrollbar-track {
  background: #020617;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb,
table::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb,
section::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
  border: 2px solid #020617;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover,
table::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover,
section::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
/* Support chat scrollbar: blend with page */
#chatBody {
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

#chatBody::-webkit-scrollbar {
  width: 10px;
}

#chatBody::-webkit-scrollbar-track {
  background: transparent;
}

#chatBody::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

#chatBody::-webkit-scrollbar-thumb:hover {
  background: #475569;
  background-clip: content-box;
}
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 12px;
  color: #6f6a76;
  opacity: 0.9;
}

.powered-by span {
  white-space: nowrap;
}

.powered-by img {
  height: 36px;
  max-width: 180px;
  width: auto;
  display: block;
  object-fit: contain;
}
