:root {
  color-scheme: light;
  /* Palette matches the public landing page (landing/index.html) so the
     panel and login screen read as the same product, not a bolted-on
     admin tool. */
  --bg: #f7faf7;
  --panel: #ffffff;
  --panel-2: #f7faf7;
  --soft: #eef5f0;
  --line: #dce8e1;
  --text: #101816;
  --muted: #66746e;
  --muted-2: #8b968f;
  --accent: #b8ef5d;
  --accent-2: #effbdc;
  --accent-dark: #4f7f1d;
  --accent-ink: #223a0a;
  --navy: #07111c;
  --warning: #f1d36d;
  --danger: #c0392b;
  --shadow: 0 18px 42px rgba(11, 31, 24, 0.08);
  --shadow-soft: 0 10px 26px rgba(11, 31, 24, 0.06);
  --radius: 22px;
  --font-display: "Plus Jakarta Sans", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", "Plus Jakarta Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 260px),
    radial-gradient(circle at top left, rgba(57, 169, 0, 0.1), transparent 30%),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 800;
}

button:hover {
  background: #2b302c;
}

button.secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}

button.secondary:hover {
  background: var(--soft);
}

button.danger-button,
.danger-button {
  min-height: 36px;
  border: 1px solid #f2c0ba;
  background: #fff1ef;
  color: var(--danger);
  border-radius: 16px;
  padding: 0 12px;
}

button.danger-button:hover,
.danger-button:hover {
  background: #ffe4e0;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 168, 0, 0.12);
}

label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.shell {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 8%, rgba(184, 239, 93, 0.16), transparent 42%),
    radial-gradient(circle at 92% 92%, rgba(184, 239, 93, 0.12), transparent 40%),
    var(--bg);
}

.login-card {
  width: min(920px, 100%);
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-visual {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 48px 40px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 14%, rgba(184, 239, 93, 0.5), transparent 32%),
    radial-gradient(circle at 88% 84%, rgba(184, 239, 93, 0.3), transparent 34%),
    linear-gradient(160deg, #0c2136 0%, #07111c 100%);
}

.login-visual .eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dff8ea;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.login-visual h1 {
  margin: 0;
  max-width: 320px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}

.login-visual p {
  max-width: 300px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 48px 44px;
}

.login-panel .brand-logo {
  width: 118px;
  height: auto;
  display: block;
}

.login-copy {
  display: grid;
  gap: 5px;
}

.login-copy strong {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.01em;
}

.login-copy span {
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 14px;
}

@media (max-width: 760px) {
  .login-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-visual {
    padding: 34px 30px;
  }

  .login-visual h1 {
    max-width: none;
    font-size: 26px;
  }

  .login-panel {
    padding: 34px 30px;
  }
}

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 20px 16px;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 20% 0%, rgba(184, 239, 93, 0.22), transparent 38%),
    radial-gradient(circle at 90% 92%, rgba(184, 239, 93, 0.12), transparent 36%),
    linear-gradient(180deg, #0c2136 0%, #07111c 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
}

.brand.compact {
  justify-content: flex-start;
  padding: 4px 6px 14px;
}

.brand.compact .brand-logo {
  width: 96px;
}

.brand.compact div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand.compact small {
  max-width: 120px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.5);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.nav button strong {
  font-size: 14px;
}

.condo-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f9fcf4);
  box-shadow: 0 12px 28px rgba(18, 22, 19, 0.04);
}

.condo-card + .condo-card {
  margin-top: 12px;
}

.condo-card-head,
.condo-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.condo-card-head h3 {
  font-size: 20px;
}

.condo-card-head p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.condo-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.condo-meta span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.condo-meta strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.condo-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.condo-kpis > span {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 900;
}

.condo-kpis small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

button.small-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 16px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav button.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.nav button:hover .nav-icon {
  background: rgba(255, 255, 255, 0.14);
}

.nav button.active .nav-icon {
  background: rgba(16, 24, 16, 0.14);
  color: var(--accent-ink);
}

.nav-icon,
.stat-icon,
.alert-icon {
  position: relative;
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 999px;
  background: var(--soft);
  color: currentColor;
  flex: 0 0 auto;
}

.nav .nav-icon {
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon::before,
.nav-icon::after,
.stat-icon::before,
.stat-icon::after,
.alert-icon::before,
.alert-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-dashboard::before {
  width: 5px;
  height: 5px;
  left: 8px;
  top: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 9px 0 0 currentColor, 0 9px 0 currentColor, 9px 9px 0 currentColor;
}

.nav-condominiums::before {
  width: 15px;
  height: 18px;
  left: 8px;
  top: 6px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-condominiums::after {
  width: 2px;
  height: 2px;
  left: 13px;
  top: 11px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor;
}

.nav-units::before {
  width: 16px;
  height: 14px;
  left: 7px;
  top: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-units::after {
  width: 10px;
  height: 10px;
  left: 10px;
  top: 5px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-residents::before {
  width: 8px;
  height: 8px;
  left: 11px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.nav-residents::after {
  width: 16px;
  height: 8px;
  left: 7px;
  top: 18px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 5px 5px;
}

.nav-devices::before {
  width: 16px;
  height: 20px;
  left: 7px;
  top: 5px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.nav-devices::after {
  width: 4px;
  height: 4px;
  left: 13px;
  bottom: 7px;
  border-radius: 999px;
  background: currentColor;
}

.nav-logs::before {
  width: 16px;
  height: 2px;
  left: 7px;
  top: 9px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.nav-settings::before {
  width: 16px;
  height: 16px;
  left: 7px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.nav-settings::after {
  width: 6px;
  height: 6px;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: currentColor;
}

.sidebar-status {
  margin-top: auto;
  min-height: 52px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.sidebar-status div {
  display: grid;
  gap: 2px;
}

.sidebar-status strong {
  font-size: 13px;
  color: #fff;
}

.sidebar-status small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(23, 167, 101, 0.14);
}

.pulse.offline {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.14);
}

.sidebar #logoutButton {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar #logoutButton:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar #logoutButton::after {
  content: "";
}

.content {
  padding: 18px 22px 28px;
  min-width: 0;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.05;
}

.topbar p {
  margin-top: 5px;
}

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


.message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #b7ddce;
  background: #e8f7ef;
  color: #13553b;
}

.error {
  min-height: 18px;
  color: var(--danger);
}

.grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.62fr);
  align-items: start;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat,
.panel,
.hero-panel,
.alert-panel {
  background: var(--panel);
  border: 1px solid rgba(223, 229, 220, 0.9);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.stat::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 104px;
  height: 104px;
  border-radius: 999px;
  background: rgba(57, 169, 0, 0.08);
  z-index: -1;
}

.stat.featured,
.alert-panel {
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(145deg, var(--accent), #2d8f00);
  color: #fff;
  border-color: transparent;
}

.stat-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.stat.featured .stat-label,
.alert-panel p,
.alert-panel small {
  color: rgba(255, 255, 255, 0.78);
}

.stat-icon {
  background: var(--accent-2);
  color: var(--accent-dark);
}

.stat.featured .stat-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.stat-condominiums::before,
.stat-units::before {
  width: 15px;
  height: 16px;
  left: 8px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.stat-condominiums::after {
  width: 2px;
  height: 2px;
  left: 13px;
  top: 12px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor;
}

.stat-units::after {
  width: 10px;
  height: 10px;
  left: 10px;
  top: 5px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.stat-residents::before {
  width: 8px;
  height: 8px;
  left: 11px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.stat-residents::after {
  width: 16px;
  height: 8px;
  left: 7px;
  top: 18px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 5px 5px;
}

.stat-devices::before {
  width: 16px;
  height: 20px;
  left: 7px;
  top: 5px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.stat-devices::after {
  width: 4px;
  height: 4px;
  left: 13px;
  bottom: 7px;
  border-radius: 999px;
  background: currentColor;
}

.stat strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.stat em {
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.stat.featured em {
  color: rgba(255, 255, 255, 0.72);
}

.hero-panel {
  min-height: 430px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--panel);
}

.hero-art {
  min-height: 210px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 55% 35%, rgba(57, 169, 0, 0.92), transparent 8%),
    radial-gradient(circle at 50% 55%, #c9e7bd 0 18%, transparent 19%),
    radial-gradient(circle at 42% 60%, #8ccf78 0 10%, transparent 11%),
    radial-gradient(circle at 62% 64%, #6fb654 0 12%, transparent 13%),
    linear-gradient(145deg, #f8faf7, #edf4ea);
  position: relative;
}

.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(17, 21, 18, 0.18);
  transform: rotate(30deg) skew(-18deg);
}

.hero-art::before {
  width: 190px;
  height: 118px;
  left: calc(50% - 95px);
  top: 72px;
}

.hero-art::after {
  width: 130px;
  height: 78px;
  left: calc(50% - 65px);
  top: 92px;
}

.hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-panel {
  display: grid;
  gap: 18px;
}

.bar-chart {
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 20px 12px 8px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(184, 239, 93, 0.1), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(180deg, transparent 0 48px, rgba(20, 45, 35, 0.06) 49px 50px);
}

.bar-item {
  min-width: 0;
  height: 210px;
  display: grid;
  grid-template-rows: 24px 1fr 22px;
  align-items: end;
  justify-items: center;
  gap: 6px;
}

.bar-item i {
  width: min(38px, 80%);
  min-height: 8px;
  display: block;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--accent), #58a716);
  box-shadow: 0 12px 20px rgba(72, 138, 16, 0.18);
}

.bar-value {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.bar-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: capitalize;
}

.health-panel {
  display: grid;
  gap: 16px;
}

.donut-wrap {
  display: grid;
  place-items: center;
}

.donut {
  --percent: 0;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--panel) 0 58%, transparent 59%),
    conic-gradient(var(--accent) calc(var(--percent) * 1%), rgba(20, 45, 35, 0.1) 0);
}

.donut strong {
  font-size: 34px;
  line-height: 1;
}

.donut span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-list .settings-row {
  padding: 12px;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.event-row > span:not(.badge) {
  grid-row: span 2;
  width: 70px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(184, 239, 93, 0.32);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 900;
}

.event-row small {
  color: var(--muted);
  font-size: 12px;
}

.mini-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.mini-card strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}

.mini-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mobile-panel {
  display: grid;
  gap: 18px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.readiness-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.readiness-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.readiness-card strong {
  font-size: 13px;
}

.readiness-card span {
  color: var(--accent-dark);
  font-weight: 900;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.progress span {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.alert-panel {
  display: grid;
  gap: 14px;
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.status-card.online {
  border-color: rgba(56, 168, 0, 0.28);
}

.status-card.offline {
  border-color: rgba(192, 57, 43, 0.34);
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--danger);
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(56, 168, 0, 0.12);
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.alert-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.alert-icon {
  width: 38px;
  height: 38px;
  background: #fff;
  color: var(--accent-dark);
}

.alert-database::before {
  width: 18px;
  height: 8px;
  left: 10px;
  top: 9px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.alert-database::after {
  width: 18px;
  height: 12px;
  left: 10px;
  top: 13px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 999px 999px;
}

.alert-devices::before {
  width: 18px;
  height: 22px;
  left: 10px;
  top: 8px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.alert-devices::after {
  width: 4px;
  height: 4px;
  left: 17px;
  bottom: 10px;
  border-radius: 999px;
  background: currentColor;
}

.alert-gate::before {
  width: 18px;
  height: 16px;
  left: 10px;
  top: 13px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
}

.alert-gate::after {
  width: 12px;
  height: 10px;
  left: 13px;
  top: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.alert-state {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.compact-panel {
  padding-bottom: 10px;
}

.compact-table table {
  min-width: 420px;
}

.compact-table th,
.compact-table td {
  padding: 10px 6px;
}

.two-column {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.badge.active,
.badge.success,
.badge.answered,
.badge.online {
  background: #dff5d8;
  color: var(--accent-dark);
}

.badge.ringing {
  background: #fff5c2;
  color: #7a5d00;
}

.badge.inactive,
.badge.failed,
.badge.denied,
.badge.rejected,
.badge.missed,
.badge.offline {
  background: #ffe7e4;
  color: var(--danger);
}

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

@media (max-width: 1120px) {
  .dashboard-grid,
  .stats,
  .two-column,
  .status-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    min-height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav {
    display: flex;
  }

  .sidebar-status {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .form-row,
  .hero-metrics,
  .readiness-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

.brand.compact .brand-logo {
  max-width: 86px;
}

button {
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}


.stat,
.panel,
.hero-panel,
.alert-panel,
.status-card,
.mini-card,
.readiness-card,
.sidebar-status,
.message {
  border-radius: var(--radius);
}

.stat.featured,
.alert-panel {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(145deg, #b8ef5d, #5d901b);
  color: #132006;
}

.stat.featured .stat-label,
.stat.featured em,
.alert-panel p,
.alert-panel small {
  color: rgba(19, 32, 6, 0.72);
}

.stat.featured .stat-icon {
  background: rgba(16, 22, 16, 0.1);
  color: #101610;
}

.progress span {
  background: linear-gradient(90deg, var(--accent), #76a928);
}

.pulse,
.status-dot.online {
  background: var(--accent);
}

.nav-billing::before {
  width: 16px;
  height: 12px;
  left: 7px;
  top: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-billing::after {
  width: 10px;
  height: 2px;
  left: 10px;
  top: 15px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.stat-plans::before,
.stat-subscriptions::before,
.stat-payments::before,
.stat-pending::before {
  width: 16px;
  height: 16px;
  left: 7px;
  top: 7px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.stat-plans::after,
.stat-subscriptions::after,
.stat-payments::after,
.stat-pending::after {
  width: 8px;
  height: 2px;
  left: 11px;
  top: 13px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.billing-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.billing-overview {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: stretch;
}

.billing-hero {
  min-height: 220px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-end;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(184, 239, 93, 0.22);
  background:
    radial-gradient(circle at 8% 10%, rgba(184, 239, 93, 0.5), transparent 26%),
    radial-gradient(circle at 86% 84%, rgba(184, 239, 93, 0.38), transparent 28%),
    linear-gradient(135deg, #101610, #1d2b14 58%, #344b18);
  color: #fff;
  box-shadow: var(--shadow);
}

.billing-hero h3 {
  max-width: 640px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
}

.billing-hero p {
  max-width: 660px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.checkout-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #172507;
  font-weight: 900;
  text-decoration: none;
}

.billing-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.compact-select {
  width: min(240px, 100%);
  min-height: 38px;
  border-radius: 999px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 18, 13, 0.38);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(620px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 90px rgba(21, 30, 24, 0.24);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-actions {
  justify-content: flex-end;
  padding-top: 8px;
}

.integration-card {
  min-height: 220px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 22px;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.integration-card span {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.integration-card.ready {
  background: linear-gradient(145deg, #b8ef5d, #ecffd0);
  color: #182607;
}

.integration-card.waiting {
  background: linear-gradient(145deg, #101610, #30441c);
  color: #fff;
}

.integration-card.waiting span {
  background: rgba(184, 239, 93, 0.16);
  color: var(--accent);
}

.integration-card.ready span {
  background: rgba(16, 22, 16, 0.1);
  color: #172507;
}

.coupon-card {
  min-height: 180px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(184, 239, 93, 0.34);
  background:
    radial-gradient(circle at 92% 0%, rgba(184, 239, 93, 0.52), transparent 42%),
    linear-gradient(145deg, #f8fbf3, #ffffff);
  box-shadow: var(--shadow);
}

.coupon-card span {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(184, 239, 93, 0.22);
  color: #4f7f1d;
  font-size: 12px;
  font-weight: 900;
}

.coupon-card h3 {
  font-size: 32px;
  line-height: 1;
}

.coupon-card p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .billing-grid,
  .billing-stats,
  .billing-overview {
    grid-template-columns: 1fr;
  }

  .billing-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

.onboarding-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: start;
  gap: 22px;
}

.onboarding-grid.onboarding-single {
  grid-template-columns: minmax(0, 1fr);
}

.onboarding-form {
  gap: 20px;
}

.onboarding-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(184, 239, 93, 0.38), rgba(184, 239, 93, 0.08)),
    #edf4e5;
  border: 1px solid rgba(20, 45, 35, 0.07);
  overflow: hidden;
}

.onboarding-steps::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 31px;
  height: 3px;
  border-radius: 999px;
  background: rgba(20, 45, 35, 0.08);
}

.onboarding-step-tab {
  position: relative;
  z-index: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  white-space: nowrap;
}

.onboarding-step-tab:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
}

.onboarding-step-tab span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(20, 45, 35, 0.08);
  color: currentColor;
  font-size: 12px;
  font-weight: 900;
}

.onboarding-step-tab.active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 12px 24px rgba(25, 32, 28, 0.12);
}

.onboarding-step-tab.done {
  background: rgba(184, 239, 93, 0.82);
  color: var(--accent-ink);
}

.onboarding-step-tab.done span {
  background: rgba(16, 22, 16, 0.12);
  color: var(--accent-ink);
}

.loading-field {
  background:
    linear-gradient(90deg, #fff 0%, #f3ffe4 50%, #fff 100%);
  background-size: 220% 100%;
  animation: fieldLoading 0.9s linear infinite;
}

@keyframes fieldLoading {
  to {
    background-position: -220% 0;
  }
}

.onboarding-step {
  display: none;
}

.form-section.onboarding-step {
  display: none;
}

.onboarding-step.active,
.form-section.onboarding-step.active {
  display: grid;
  animation: setupStepIn 0.22s ease both;
}

@keyframes setupStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(20, 45, 35, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 253, 245, 0.86)),
    var(--panel);
  box-shadow: 0 10px 28px rgba(25, 32, 28, 0.04);
}

.form-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  letter-spacing: 0;
}

.form-section > p {
  max-width: 720px;
}

.setup-note {
  padding: 14px 16px;
  border: 1px solid rgba(95, 155, 24, 0.18);
  border-radius: 18px;
  background: rgba(184, 239, 93, 0.16);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.setup-units {
  display: grid;
  gap: 12px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 239, 93, 0.85) rgba(20, 45, 35, 0.08);
}

.setup-units::-webkit-scrollbar {
  width: 8px;
}

.setup-units::-webkit-scrollbar-track {
  background: rgba(20, 45, 35, 0.08);
  border-radius: 999px;
}

.setup-units::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}

.setup-unit-row {
  display: grid;
  grid-template-columns: 88px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border-radius: 18px;
  background: #f9fcf4;
  border: 1px solid rgba(20, 45, 35, 0.07);
}

.setup-unit-row strong {
  min-height: 98px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: span 2;
  border-radius: 14px;
  background: rgba(184, 239, 93, 0.35);
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.setup-unit-row input {
  min-width: 0;
  background: #fff;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(20, 45, 35, 0.07);
}

.review-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.review-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.onboarding-grid aside.panel {
  position: sticky;
  top: 22px;
}

.onboarding-grid aside.panel h3 {
  margin-bottom: 14px;
}

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

  .onboarding-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-grid aside.panel {
    position: static;
  }

  .setup-unit-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-unit-row strong {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 14px;
  }
}

@media (max-width: 680px) {
  .onboarding-steps,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-step-tab {
    justify-content: flex-start;
  }

  .setup-units {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .setup-unit-row {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 14px;
  }
}
