:root {
  color-scheme: dark;
  --bg: #02050a;
  --panel: rgba(9, 13, 20, 0.88);
  --panel-2: rgba(19, 26, 37, 0.9);
  --text: #f0f2f5;
  --muted: #d0d6e0;
  --line: rgba(255, 255, 255, 0.14);
  --orange: #ff6b00;
  --orange-2: #ff9b25;
  --white-hot: #ffffff;
  --danger: #ff405c;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --font-ui: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-display: Impact, Haettenschweiler, "Arial Black", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 107, 0, 0.28), transparent 28rem),
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, 0.08), transparent 24rem),
    linear-gradient(145deg, #000205 0%, var(--bg) 48%, #100600 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 107, 0, 0.14) 42% 43%, transparent 43%),
    linear-gradient(115deg, transparent 0 68%, rgba(255, 255, 255, 0.08) 68% 69%, transparent 69%);
  opacity: 0.8;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 30px;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
  overflow: hidden;
}

.energy-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.energy-lines span {
  position: absolute;
  width: 32vw;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--white-hot), transparent);
  filter: drop-shadow(0 0 14px rgba(255, 107, 0, 0.8));
  animation: dash 4s linear infinite;
}

.energy-lines span:nth-child(1) {
  top: 18%;
  left: -8%;
}

.energy-lines span:nth-child(2) {
  top: 43%;
  right: -10%;
  animation-delay: 0.8s;
}

.energy-lines span:nth-child(3) {
  bottom: 23%;
  left: 6%;
  animation-delay: 1.5s;
}

.energy-lines span:nth-child(4) {
  bottom: 10%;
  right: 8%;
  animation-delay: 2.2s;
}

@keyframes dash {
  0% {
    transform: translateX(-8vw) skewX(-22deg);
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(16vw) skewX(-22deg);
    opacity: 0.35;
  }
}

.login-art,
.login-panel,
.phone-frame,
.dashboard-panel,
.wide-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(8, 12, 18, 0.9), rgba(18, 11, 5, 0.84));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 107, 0, 0.08);
  backdrop-filter: blur(18px);
}

.login-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
  padding: 28px;
  overflow: hidden;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 3px solid rgba(255, 107, 0, 0.42);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: rotateGlow 11s linear infinite;
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

.login-art img {
  position: relative;
  z-index: 1;
  width: min(92%, 720px);
  max-height: 78vh;
  object-fit: contain;
  filter: drop-shadow(0 28px 52px rgba(0, 0, 0, 0.72));
}

.live-badge {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 107, 0, 0.54);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white-hot);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.live-badge span,
.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 8px rgba(255, 107, 0, 0.15), 0 0 24px rgba(255, 107, 0, 0.9);
}

.login-panel {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: clamp(24px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-2);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 0 26px rgba(255, 107, 0, 0.34);
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.login-copy,
.sidebar-panel p,
.voice-strip p,
.finance-column p,
.client-grid p {
  color: var(--muted);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.97rem;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--white-hot);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-form input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 107, 0, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.edit-form label {
  display: grid;
  gap: 8px;
  color: var(--orange-2);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.edit-form input,
.edit-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
}

.edit-form input:focus,
.edit-form select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.login-form input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.16);
}

.password-wrap {
  display: flex;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding-right: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.password-wrap:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.16);
}

.password-wrap input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  min-height: 56px;
  padding: 0 16px;
  color: var(--text);
}

.toggle-password {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--orange);
}

.primary-button,
.ghost-button {
  min-height: 48px;
  border-radius: 10px;
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compact {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(255, 64, 92, 0.15);
}

/* RotaMap */
#rotamap.is-visible {
  display: flex !important;
  flex-direction: column;
  height: calc(100vh - 140px);
  min-height: 600px;
}

#rotamap .wide-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 32px;
  gap: 0;
  overflow: hidden;
}

#rotamap .panel-heading {
  margin-bottom: 22px;
  flex-shrink: 0;
}

/* Barra de cidade */
.rotamap-city-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 107, 0, 0.22);
  border-radius: 12px;
  background: rgba(255, 107, 0, 0.06);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.rotamap-city-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rotamap-city-label {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.rotamap-city-name {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--orange);
}

.rotamap-city-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.rotamap-city-form input {
  flex: 1;
  min-height: 52px;
  padding: 0 20px;
  border: 2px solid rgba(255, 107, 0, 0.4);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rotamap-city-form input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.16);
}

/* Busca principal */
.rotamap-search {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: stretch;
  flex-shrink: 0;
}

.rotamap-search input {
  flex: 1;
  min-height: 68px;
  padding: 0 26px;
  border: 2px solid rgba(255, 107, 0, 0.4);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rotamap-search input::placeholder {
  color: rgba(255,255,255,0.32);
  font-size: 1rem;
}

.rotamap-search input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 107, 0, 0.18);
}

.rotamap-number {
  flex: 0 0 130px !important;
  min-width: 0;
  text-align: center;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
}

.rotamap-search .primary-button {
  min-height: 68px;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0 40px;
  border-radius: 14px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.rotamap-result {
  background: rgba(255,107,0,0.08);
  border: 1px solid rgba(255,107,0,0.3);
  border-radius: 12px;
  padding: 16px 22px;
  margin-bottom: 14px;
  color: var(--white-hot);
  display: none;
  flex-shrink: 0;
}

.rotamap-result.is-visible {
  display: block;
}

.rotamap-result strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 4px;
}

.rotamap-result span {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.rotamap-map {
  width: 100%;
  flex: 1;
  min-height: 400px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255,107,0,0.22);
  background: #0d1520;
}

.rotamap-actions {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.rotamap-actions .primary-button,
.rotamap-actions .ghost-button {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 32px;
  border-radius: 12px;
}

.btn-waze {
  background: rgba(0,213,255,0.08);
  border: 1px solid rgba(0,213,255,0.35);
  color: #00d5ff;
}

.btn-waze:hover {
  background: rgba(0,213,255,0.18);
}

.rotamap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 400px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 1.1rem;
  gap: 16px;
  border-radius: 14px;
  border: 2px dashed rgba(255,107,0,0.22);
}

.rotamap-empty span {
  font-size: 4.5rem;
}

.rotamap-empty p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.btn-maps {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  border-radius: 8px;
  padding: 0 14px;
  min-height: 36px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-maps:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: #4ade80;
}

/* Modal de corrida */
.ride-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.ride-modal.is-open {
  display: flex;
}

.ride-modal-box {
  background: #0d1520;
  border: 2px solid rgba(255, 107, 0, 0.35);
  border-radius: 18px;
  padding: 32px;
  width: min(440px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,107,0,0.08);
  animation: modal-pop 0.18s ease;
}

@keyframes modal-pop {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.ride-modal-box h3 {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.ride-modal-bairro {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--orange);
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.ride-modal-box label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ride-modal-box label input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 2px solid rgba(255, 107, 0, 0.3);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ride-modal-box label input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.16);
}

.ride-modal-box label input::placeholder {
  color: rgba(255,255,255,0.32);
}

.primary-button {
  border-color: transparent;
  color: #080400;
  background: linear-gradient(135deg, var(--orange), var(--orange-2), var(--white-hot));
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(255, 107, 0, 0.32);
}

.login-button {
  min-height: 60px;
  margin-top: 4px;
  font-size: 1.1rem;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--orange-2);
  font-family: var(--font-ui);
  font-size: 0.97rem;
  font-weight: 600;
}

.login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.login-benefits span,
.tag,
.status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 0, 0.44);
  color: var(--orange-2);
  background: rgba(255, 107, 0, 0.08);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(3, 6, 11, 0.88);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  margin-bottom: 34px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--orange);
  border-radius: 12px;
  color: #080400;
  background: linear-gradient(135deg, var(--orange), var(--white-hot));
  font-size: 1.1rem;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.brand small {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
}

.nav-list {
  display: grid;
  gap: 9px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--white-hot);
  border-color: rgba(255, 107, 0, 0.38);
  background: rgba(255, 107, 0, 0.12);
}

.icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #080400;
  background: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.sidebar-panel {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.sidebar-panel strong {
  display: block;
  font-size: 1.35rem;
}

.full-button {
  width: 100%;
  margin-top: 10px;
}

.workspace {
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

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

.voice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 107, 0, 0.34);
  border-radius: 12px;
  background: rgba(255, 107, 0, 0.08);
}

.voice-strip p {
  margin: 0;
}

.voice-strip strong {
  color: var(--white-hot);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.section {
  display: none;
}

.section.is-visible {
  display: grid;
}

.phone-frame,
.dashboard-panel,
.wide-card {
  padding: 20px;
}

.phone-top,
.phone-stats,
.panel-heading,
.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phone-top {
  margin-bottom: 14px;
  color: var(--muted);
}

.phone-map {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 107, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 107, 0, 0.07) 1px, transparent 1px),
    #03070d;
  background-size: 30px 30px;
}

.phone-map img {
  position: relative;
  z-index: 2;
  width: 88%;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.72));
}

.speed-aura {
  position: absolute;
  inset: 16%;
  border: 4px solid rgba(255, 107, 0, 0.54);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: rotateGlow 8s linear infinite;
}

.phone-stats {
  margin: 14px 0;
}

.phone-stats > div,
.mini-list article,
.metric-card,
.finance-column,
.maintenance-grid div,
.client-grid article,
.admin-kpis div {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.phone-stats span,
.mini-list span,
.metric-card span,
.finance-column span,
.maintenance-grid span,
.admin-kpis span {
  display: block;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
}

.phone-stats strong,
.metric-card strong,
.finance-column strong,
.maintenance-grid strong,
.admin-kpis strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.35rem, 2.6vw, 2.3rem);
}

.mini-list {
  display: grid;
  gap: 8px;
}

.mini-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.metric-card {
  min-height: 150px;
  background: linear-gradient(180deg, rgba(255, 107, 0, 0.14), rgba(255, 255, 255, 0.04));
}

.metric-card small {
  color: var(--orange-2);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 800;
}

.progress-block {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
}

.progress-copy span {
  color: var(--muted);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  width: 69%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--white-hot));
  box-shadow: 0 0 22px rgba(255, 107, 0, 0.72);
}

.chart-card {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
}

.bar {
  flex: 1;
  min-width: 20px;
  border-radius: 10px 10px 2px 2px;
  background: rgba(255, 255, 255, 0.2);
}

.bar.active {
  background: linear-gradient(180deg, var(--orange), var(--white-hot));
}

.module-grid {
  grid-template-columns: 1fr;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.97rem;
}

th,
td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  line-height: 1.4;
}

.neighborhood-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.neighborhood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  background: rgba(255, 107, 0, 0.08);
  border: 2px solid rgba(255, 107, 0, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

.neighborhood-btn:hover {
  background: rgba(255, 107, 0, 0.2);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.neighborhood-btn:active {
  transform: scale(0.96);
}

.neighborhood-btn.nbh-loading {
  opacity: 0.5;
  pointer-events: none;
}

.nbh-name {
  font-size: 1rem;
  font-weight: 900;
  color: var(--white-hot);
  text-transform: uppercase;
  text-align: center;
}

.nbh-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--orange);
}

.empty-cell,
.empty-card {
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 800;
}

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

.row-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 107, 0, 0.34);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 107, 0, 0.12);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.15s;
}

.row-actions button:hover {
  background: rgba(255, 107, 0, 0.22);
}

.maintenance-grid p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
}

th {
  color: var(--orange-2);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status.done {
  color: #080400;
  background: var(--orange);
}

.status.live {
  color: #080400;
  background: var(--white-hot);
}

.status.wait {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
}

.finance-layout,
.maintenance-grid,
.client-grid,
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.positive strong,
.neutral strong {
  color: var(--orange-2);
}

.negative strong {
  color: var(--danger);
}

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

.score {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 12px;
  color: #080400;
  background: var(--orange);
  font-size: 1.3rem;
  font-weight: 900;
}

.score.alert {
  color: #fff;
  background: var(--danger);
}

.score.mid {
  background: var(--white-hot);
}

body.light {
  color-scheme: light;
  --bg: #fff7ef;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-2: rgba(255, 242, 230, 0.95);
  --text: #0b0d0e;
  --muted: #4c5764;
  --line: rgba(10, 10, 10, 0.14);
  background: #fff7ef;
}

body.light .sidebar {
  background: rgba(255, 255, 255, 0.92);
}

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  padding: 14px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #080400;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 32px rgba(255, 107, 0, 0.4);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  flex-shrink: 0;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.filter-btn {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 107, 0, 0.1);
}

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

  .login-art {
    min-height: 460px;
  }

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

  .sidebar-panel {
    position: static;
    margin-top: 18px;
  }

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

  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .login-screen,
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .login-art {
    min-height: 330px;
  }

  .login-art img {
    width: 100%;
  }

  .topbar,
  .panel-heading,
  .phone-stats {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .nav-list,
  .metric-grid,
  .edit-form,
  .finance-layout,
  .maintenance-grid,
  .client-grid,
  .admin-kpis {
    grid-template-columns: 1fr;
  }

  .phone-map {
    min-height: 230px;
  }
}

/* ─── Subscription badge & modal ─────────────────────────────────────────── */

.sub-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
  text-align: center;
}

.sub-trial {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.sub-active {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.sub-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.sub-modal-box {
  text-align: center;
  max-width: 360px;
  padding: 48px 40px;
}

.sub-modal-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.sub-modal-box h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.sub-modal-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.sub-modal-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-bottom: 12px;
  padding: 13px;
}

.sub-modal-logout {
  width: 100%;
  font-size: 13px;
}
