:root {
  --bg: #091112;
  --surface: rgba(17, 27, 28, 0.86);
  --surface-strong: #132022;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(211, 231, 224, 0.16);
  --text: #eef8f4;
  --muted: #9eb7b0;
  --teal: #4cc5a3;
  --gold: #f4c76b;
  --amber: #d99a3f;
  --green: #71df8a;
  --red: #ff7c72;
  --ink: #071011;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 20%, rgba(244, 199, 107, 0.18), transparent 32rem),
    linear-gradient(135deg, #071011 0%, #17140f 46%, #111611 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(7, 16, 17, 0.82);
  backdrop-filter: blur(22px);
  padding: 1.2rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(244, 199, 107, 0.55);
  background: linear-gradient(145deg, rgba(244, 199, 107, 0.28), rgba(76, 197, 163, 0.12));
  border-radius: 8px;
  font-weight: 800;
  color: var(--gold);
}

.brand span,
.sidebar-card span,
.sidebar-card small,
.panel-title span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
}

.nav-list {
  display: grid;
  gap: 0.35rem;
}

.nav-item {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  text-align: left;
  padding: 0.72rem 0.82rem;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-soft);
}

.sidebar-card {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 1rem;
}

.workspace {
  padding: 1.2rem;
  min-width: 0;
}

.topbar,
.section-head,
.top-actions {
  display: flex;
  align-items: center;
}

.topbar,
.section-head {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

h2 {
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
}

h3 {
  font-size: 1rem;
}

.eyebrow {
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.top-actions {
  gap: 0.6rem;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.icon-btn,
.close-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 2.55rem;
  color: var(--text);
  background: var(--surface-soft);
}

.primary-btn {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--ink);
  font-weight: 800;
  padding: 0 1rem;
  border: 0;
}

.secondary-btn,
.close-btn {
  padding: 0 0.95rem;
}

.icon-btn {
  width: 2.55rem;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.full {
  width: 100%;
}

.section-view {
  display: none;
}

.section-view.active {
  display: block;
}

.hero-panel {
  min-height: calc(100vh - 8rem);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: 100%;
  height: calc(100vh - 8rem);
  min-height: 38rem;
  object-fit: cover;
  display: block;
  filter: sepia(0.22) saturate(1.12) hue-rotate(348deg);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(90deg, rgba(7, 16, 17, 0.9), rgba(40, 29, 13, 0.42) 72%);
}

.hero-copy {
  max-width: 44rem;
}

.hero-copy p {
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-stats,
.split-grid,
.pricing-grid,
.growth-layout,
.audit-grid,
.engine-grid,
.real-estate-tools,
.interfaces-layout,
.reports-layout,
.admin-grid {
  display: grid;
  gap: 1rem;
}

.engine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.hero-stats {
  grid-template-columns: repeat(2, minmax(8.5rem, 1fr));
  min-width: min(28rem, 100%);
}

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

.stat-card {
  padding: 1rem;
  color: var(--text);
  background: linear-gradient(145deg, rgba(13, 22, 23, 0.96), rgba(24, 23, 17, 0.94));
  border-color: rgba(244, 199, 107, 0.38);
  text-align: center;
  backdrop-filter: blur(12px);
}

.stat-card small {
  color: #d8e7e1;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.45rem;
  color: #fff7df;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.72);
}

.panel {
  padding: 1rem;
}

.split-grid,
.audit-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.8fr);
}

.pricing-grid,
.growth-layout,
.interfaces-layout,
.reports-layout,
.admin-grid {
  grid-template-columns: minmax(20rem, 0.72fr) minmax(0, 1fr);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
}

.data-list {
  display: grid;
  gap: 0.65rem;
}

.row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
}

.engine-panel[data-drill] {
  cursor: pointer;
}

.row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.row-card button {
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 0;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.metric {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 0.65rem;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.bar i {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--gold), var(--amber));
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.rate {
  min-height: 8.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 199, 107, 0.38);
  border-radius: 8px;
  background:
    conic-gradient(var(--gold) var(--angle), rgba(255, 255, 255, 0.08) 0),
    linear-gradient(145deg, rgba(244, 199, 107, 0.15), rgba(255, 255, 255, 0.04));
  color: var(--text);
  position: relative;
}

.rate::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border-radius: 8px;
  background: #18150f;
  border: 1px solid rgba(244, 199, 107, 0.2);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.26);
}

.rate div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.rate span {
  color: #f7dfaa;
  font-weight: 700;
}

.rate strong {
  display: block;
  font-size: 1.85rem;
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(244, 199, 107, 0.34);
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  min-height: 2.75rem;
  padding: 0 0.75rem;
}

option {
  color: #111;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.pricing-output,
.growth-result {
  display: grid;
  gap: 0.8rem;
}

.quote-total {
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1;
  color: var(--gold);
  font-weight: 900;
}

.property-grid,
.risk-grid,
.security-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.interface-list {
  display: grid;
  gap: 0.75rem;
}

.interface-card,
.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.interface-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-interfaces {
  margin-top: 1rem;
}

.admin-controls,
.report-list,
.report-output {
  display: grid;
  gap: 0.75rem;
}

.admin-control {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  min-height: 4rem;
  padding: 0.85rem;
  text-align: left;
}

.admin-control strong,
.admin-control span {
  display: block;
}

.admin-control strong {
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.admin-control span {
  color: var(--muted);
}

.report-card p,
.report-output p {
  color: var(--muted);
}

.report-metrics {
  margin-top: 0.85rem;
}

.readiness-panel {
  margin-top: 1rem;
}

.bank-engine-panel {
  margin-top: 1rem;
}

.bank-engine-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.38fr) minmax(0, 1fr);
  gap: 1rem;
}

.bank-status {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.bank-item-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.account-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.account-strip span {
  border: 1px solid rgba(244, 199, 107, 0.22);
  border-radius: 999px;
  color: #f7dfaa;
  background: rgba(244, 199, 107, 0.08);
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  font-size: 0.78rem;
}

.readiness-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 0.32fr) repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.readiness-score,
.readiness-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem;
}

.readiness-score {
  display: grid;
  align-content: center;
  gap: 0.35rem;
}

.readiness-score strong {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.readiness-score span,
.readiness-check small {
  color: var(--muted);
}

.readiness-check {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 8rem;
  color: var(--text);
  text-align: left;
}

.readiness-check strong {
  font-size: 0.95rem;
}

.real-estate-tools {
  grid-template-columns: minmax(20rem, 0.74fr) minmax(0, 1fr);
  margin-top: 1rem;
}

.property-card,
.risk-card {
  padding: 1rem;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.pill.good {
  color: var(--green);
  border-color: rgba(113, 223, 138, 0.35);
}

.pill.warn {
  color: var(--amber);
  border-color: rgba(243, 184, 95, 0.35);
}

.pill.bad {
  color: var(--red);
  border-color: rgba(255, 124, 114, 0.35);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.suite-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.suite-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr auto;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid rgba(244, 199, 107, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  min-height: 2.55rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.suite-row span {
  color: var(--gold);
  font-weight: 800;
}

.suite-row small {
  color: var(--muted);
}

.rules {
  display: grid;
  gap: 0.75rem;
}

.rule {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
}

.security-node {
  min-height: 10rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(244, 199, 107, 0.12), rgba(76, 197, 163, 0.08));
  padding: 1rem;
}

.security-node ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(30rem, 92vw);
  height: 100vh;
  background: rgba(8, 17, 18, 0.96);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 180ms ease;
  padding: 1rem;
  z-index: 10;
  overflow: auto;
}

.drawer.open {
  transform: translateX(0);
}

.close-btn {
  margin-bottom: 1rem;
}

.drawer h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.drawer-section {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 160%);
  background: #f7fbf8;
  color: #071011;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
  z-index: 20;
  font-weight: 800;
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-overlay,
  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .split-grid,
  .pricing-grid,
  .growth-layout,
  .audit-grid,
  .engine-grid,
  .real-estate-tools,
  .interfaces-layout,
  .reports-layout,
  .admin-grid,
  .bank-engine-layout,
  .bank-item-list,
  .property-grid,
  .risk-grid,
  .security-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace,
  .sidebar {
    padding: 0.8rem;
  }

  .nav-list,
  .hero-stats,
  .metrics,
  .rate-grid,
  .input-row,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel img {
    height: 44rem;
  }
}

