:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #15233b;
  background: #edf2f7;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #edf2f7; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #102642; }
.login-card { width: min(420px, 100%); padding: 28px; border: 1px solid #d6e0ea; border-radius: 8px; background: #fff; box-shadow: 0 18px 46px rgba(4, 19, 39, .3); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: #bf8c35; color: #fff; font-size: 22px; font-weight: 800; }
.brand h1, .brand p, h2, h3, h4 { margin: 0; letter-spacing: 0; }
.brand p, .muted { color: #697588; font-size: 12px; }
.login-card h2 { margin-top: 26px; font-size: 22px; }
.login-card > p { color: #697588; font-size: 13px; }
label { display: grid; gap: 5px; color: #5d6879; font-size: 11px; font-weight: 700; }
input, select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #18253a; }
.login-form { display: grid; gap: 12px; margin-top: 18px; }
.primary { border: 1px solid #173f74; background: #173f74; color: #fff; }
.login-form button, .actions button, .filter button { min-height: 38px; padding: 8px 13px; border-radius: 4px; font-weight: 700; }
.error { margin-top: 12px; color: #ac2f2f; font-size: 12px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { padding: 18px 14px; background: #102642; color: #fff; }
.sidebar .brand { padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.18); }
.sidebar .brand p { color: #b8c7da; }
.sidebar nav { display: grid; gap: 4px; margin-top: 18px; }
.sidebar nav button { padding: 10px; border: 0; border-radius: 4px; background: transparent; color: #dce7f4; text-align: left; font-weight: 700; }
.sidebar nav button.active { background: #fff; color: #173f74; }
.sidebar footer { position: fixed; bottom: 18px; width: 198px; display: grid; gap: 8px; }
.sidebar footer button { min-height: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; background: transparent; color: #fff; }
.content { padding: 20px; overflow: auto; }
.topbar, .privacy, .panel, .detail { border: 1px solid #d8e0ea; border-radius: 6px; background: #fff; }
.topbar { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.eyebrow { margin: 0 0 3px; color: #9b6d22; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.topbar p { margin: 5px 0 0; color: #697588; font-size: 12px; }
.badge { align-self: flex-start; padding: 6px 8px; border: 1px solid #b8d7c2; border-radius: 4px; background: #f0faf3; color: #27623b; font-size: 11px; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 10px; margin-top: 12px; }
.metric { padding: 12px; border: 1px solid #d8e0ea; border-radius: 6px; background: #fff; }
.metric span, .meta span { display: block; color: #697588; font-size: 11px; }
.metric strong { display: block; margin-top: 6px; font-size: 19px; }
.privacy { display: grid; gap: 4px; margin-top: 12px; padding: 12px 14px; border-left: 4px solid #b88732; color: #674a1b; font-size: 12px; }
.panel, .detail { margin-top: 12px; padding: 14px; }
.filter { display: grid; grid-template-columns: 1fr 180px auto; align-items: end; gap: 10px; }
table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
th, td { padding: 9px; border-bottom: 1px solid #e6ebf1; text-align: left; vertical-align: top; }
th { color: #697588; background: #f7f9fc; font-size: 11px; }
td span, td strong { display: block; margin-bottom: 3px; }
.link { border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #173f74; padding: 6px 9px; font-weight: 700; }
.detail header { display: flex; justify-content: space-between; gap: 12px; }
.meta-grid, .form-grid, .log-grid { display: grid; gap: 9px; margin-top: 12px; }
.meta-grid { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.meta { padding: 10px; border: 1px solid #e1e7ee; border-radius: 4px; }
.form-grid { grid-template-columns: repeat(4,minmax(125px,1fr)); padding: 12px; border: 1px solid #e1e7ee; border-radius: 4px; }
.form-grid h4, .wide, .checks, .actions { grid-column: 1/-1; }
.checks, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 5px; }
.checks input { width: auto; min-height: auto; }
.actions button { border: 1px solid #cbd5e1; background: #fff; color: #173f74; }
.actions .primary { background: #173f74; color: #fff; }
.log-grid { grid-template-columns: repeat(auto-fit,minmax(290px,1fr)); }
.log { overflow: auto; border: 1px solid #e1e7ee; border-radius: 4px; }
.log h4 { padding: 9px; }
.status { display: inline-block !important; width: max-content; padding: 2px 5px; border-radius: 3px; background: #edf1f6; color: #475569; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status.active, .status.paid, .status.resolved { background: #e5f7e9; color: #28643a; }
.status.trial, .status.pending { background: #fff2d5; color: #855a09; }
.status.suspended, .status.failed, .status.blocked { background: #fde8e7; color: #a1312d; }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 12px; }
  .topbar, .filter, .form-grid { display: grid; grid-template-columns: 1fr; }
}

/* Fixed edge-glass control plane polish. */
html, body { height: 100%; overflow: hidden; }
body {
  background: #eef1f7 url("assets/web-auth-cardless-background.png") center center / cover no-repeat fixed;
}
.login-page {
  background: transparent;
}
.shell {
  min-height: 100vh;
  height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: rgba(238, 243, 249, .16);
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: max-content;
  max-height: calc(100vh - 32px);
  padding: 15px 13px;
  overflow: hidden;
  border: 1px solid rgba(158, 219, 194, .66);
  border-radius: 26px 10px 26px 10px;
  background:
    linear-gradient(145deg, rgba(7, 91, 69, .88), rgba(6, 55, 54, .91)),
    rgba(7, 75, 65, .86);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .44),
    inset -1px -1px 0 rgba(0, 48, 44, .42),
    0 16px 34px rgba(9, 57, 64, .2);
  backdrop-filter: blur(20px) saturate(135%);
}
.sidebar .brand { padding-bottom: 13px; }
.sidebar .brand-mark {
  background: linear-gradient(145deg, #d8ae61, #a57225);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .5);
}
.sidebar nav { gap: 3px; margin-top: 12px; }
.sidebar nav button { padding: 8px 9px; border-radius: 6px; color: #e9fff7; }
.sidebar nav button.active {
  border: 1px solid rgba(214, 255, 238, .7);
  background: rgba(232, 255, 247, .86);
  color: #075446;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .8);
}
.sidebar footer {
  position: static;
  width: auto;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.sidebar footer .muted { color: #d7f2e9; }
.content {
  height: calc(100vh - 32px);
  padding: 0 2px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  border-color: rgba(157, 211, 191, .72);
  border-radius: 22px 9px 22px 9px;
  background:
    linear-gradient(135deg, rgba(238, 255, 249, .88), rgba(214, 243, 235, .74)),
    rgba(235, 252, 247, .8);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .92),
    inset -1px -1px 0 rgba(55, 128, 112, .2),
    0 12px 24px rgba(29, 80, 84, .12);
  backdrop-filter: blur(20px) saturate(130%);
}
.topbar h2 { color: #0b554a; }
.topbar p { color: #51756e; }
.metric, .privacy, .panel, .detail, .meta, .log {
  border-color: rgba(171, 205, 199, .72);
  background: rgba(255, 255, 255, .79);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(15px) saturate(120%);
}
.badge {
  border-color: rgba(101, 174, 148, .58);
  background: rgba(231, 252, 242, .84);
  color: #216647;
}
.primary { border-color: #0e6a59; background: #0e6a59; }
.actions .primary { background: #0e6a59; }
.login-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.login-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(135deg, rgba(83, 4, 29, .87), rgba(121, 14, 43, .7) 48%, rgba(66, 4, 29, .86)),
    rgba(88, 7, 32, .72);
}
.login-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(168, 231, 198, .78);
  border-radius: 34px 12px 34px 12px;
  background:
    linear-gradient(145deg, rgba(13, 104, 78, .88), rgba(5, 60, 56, .92)),
    rgba(8, 83, 70, .9);
  color: #f5fff9;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .56),
    inset -1px -1px 0 rgba(0, 40, 36, .48),
    0 24px 55px rgba(49, 3, 22, .38);
  backdrop-filter: blur(24px) saturate(140%);
}
.login-card .brand p, .login-card > p { color: #d8f4e9; }
.login-card label { color: #e9fff7; }
.login-card input {
  border-color: rgba(175, 231, 211, .52);
  background: rgba(255, 255, 255, .92);
}
.login-card .primary {
  min-height: 42px;
  border-color: rgba(231, 255, 247, .64);
  border-radius: 7px;
  background: linear-gradient(135deg, #8d173b, #5f0928);
}
.login-card .error { color: #ffe3e2; }
.nav-caption {
  margin: 8px 8px 1px;
  color: rgba(218, 248, 238, .7);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.table-wrap { overflow-x: auto; }
.inline-form, .row-action, .split-forms, .card-grid { display: grid; gap: 9px; }
.inline-form {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(171, 205, 199, .72);
  border-radius: 5px;
  background: rgba(255, 255, 255, .67);
}
.inline-form button, .row-action button, .plan-card button, .form-grid > button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #0e6a59;
  border-radius: 4px;
  background: #0e6a59;
  color: #fff;
  font-weight: 700;
}
.split-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.compact { margin-top: 0; grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 12px; }
.plan-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(171, 205, 199, .72);
  border-radius: 6px;
  background: rgba(255, 255, 255, .8);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(15px);
}
.plan-card header { display: flex; justify-content: space-between; gap: 10px; }
.row-action { grid-template-columns: minmax(100px, 1fr) minmax(110px, 1fr) auto; }
.toast {
  position: fixed;
  z-index: 10;
  right: 20px;
  bottom: 20px;
  max-width: 340px;
  padding: 11px 14px;
  border-radius: 5px;
  background: #0b6655;
  color: #fff;
  box-shadow: 0 12px 30px rgba(7, 51, 48, .24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .2s ease;
}
.toast.success, .toast.error { opacity: 1; transform: translateY(0); }
.toast.error { background: #922d3d; }

@media (max-width: 800px) {
  html, body { overflow: auto; }
  .shell { display: block; height: auto; min-height: 100vh; padding: 10px; }
  .content { height: auto; overflow: visible; padding: 0; }
  .topbar { top: 0; }
  .split-forms, .inline-form { grid-template-columns: 1fr; }
}
