/* =========================================================
   Led's do Brasil CRM | New UI V1
   Redesign real: estrutura, leitura, espaçamento e aparência
   ========================================================= */

:root {
  --lb-bg: #f4f7f2;
  --lb-bg-soft: #edf3ec;
  --lb-panel: #ffffff;
  --lb-panel-2: #f8fbf7;
  --lb-sidebar: #07150d;
  --lb-sidebar-2: #0d2416;

  --lb-text: #102016;
  --lb-title: #07130c;
  --lb-muted: #627366;
  --lb-soft: #839188;

  --lb-green: #18b866;
  --lb-green-dark: #0d7e45;
  --lb-green-soft: #e7f8ee;

  --lb-yellow: #f0b429;
  --lb-red: #d64545;
  --lb-blue: #2772c7;

  --lb-border: #dfe8df;
  --lb-border-strong: #c8d8cb;

  --lb-radius-xl: 28px;
  --lb-radius-lg: 22px;
  --lb-radius-md: 16px;
  --lb-radius-sm: 12px;

  --lb-shadow: 0 18px 48px rgba(16, 32, 22, 0.08);
  --lb-shadow-soft: 0 10px 30px rgba(16, 32, 22, 0.06);

  --lb-sidebar-width: 286px;
  --lb-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0 !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(24, 184, 102, 0.10), transparent 360px),
    radial-gradient(circle at 100% 4%, rgba(240, 180, 41, 0.10), transparent 360px),
    linear-gradient(135deg, var(--lb-bg), var(--lb-bg-soft)) !important;
  color: var(--lb-text) !important;
  font-family: var(--lb-font) !important;
  letter-spacing: -0.015em;
}

body,
p,
span,
small,
label,
div,
li,
td,
th,
input,
select,
textarea,
button,
a {
  font-family: var(--lb-font) !important;
}

a {
  color: var(--lb-green-dark);
  text-decoration: none;
}

a:hover {
  color: var(--lb-green);
}

img,
svg {
  max-width: 100%;
}

/* App layout */
.lb-app {
  min-height: 100vh;
  display: flex;
}

.lb-sidebar,
.nx-sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  width: var(--lb-sidebar-width) !important;
  min-width: var(--lb-sidebar-width) !important;
  max-width: var(--lb-sidebar-width) !important;
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 22px 18px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(88, 255, 160, 0.14), transparent 260px),
    linear-gradient(180deg, var(--lb-sidebar), var(--lb-sidebar-2)) !important;
  color: #ecfff3 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  z-index: 1000 !important;
}

.lb-main,
.nx-page,
main.nx-page,
.nx-main,
main.nx-main,
main.main,
.main {
  margin-left: var(--lb-sidebar-width) !important;
  width: calc(100% - var(--lb-sidebar-width)) !important;
  max-width: calc(100% - var(--lb-sidebar-width)) !important;
  min-height: 100vh !important;
  padding: 30px 34px 54px !important;
  color: var(--lb-text) !important;
}

/* Sidebar */
.lb-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.lb-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d8ffe4, #5ce78f);
  color: #07150d;
  font-weight: 950;
  font-size: 20px;
  flex: 0 0 auto;
}

.lb-brand strong {
  display: block;
  color: #ffffff !important;
  font-size: 17px;
  line-height: 1.1;
}

.lb-brand span {
  display: block;
  margin-top: 4px;
  color: rgba(236, 255, 243, 0.68) !important;
  font-size: 12px;
  line-height: 1.35;
}

.lb-userbox {
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 22px;
}

.lb-userbox span {
  display: block;
  color: rgba(236, 255, 243, 0.62) !important;
  font-size: 12px;
  margin-bottom: 4px;
}

.lb-userbox strong {
  display: block;
  color: #ffffff !important;
  font-size: 14px;
  line-height: 1.3;
}

.lb-nav-section {
  margin: 22px 0;
}

.lb-nav-title {
  margin: 0 0 9px;
  padding: 0 10px;
  color: rgba(236, 255, 243, 0.52) !important;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.lb-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 15px;
  color: rgba(236, 255, 243, 0.84) !important;
  border: 1px solid transparent;
  font-weight: 780;
  font-size: 14px;
  line-height: 1.25;
}

.lb-nav a:hover,
.lb-nav a.is-active {
  background: rgba(255, 255, 255, 0.105);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.lb-nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #8effb5;
  background: rgba(142, 255, 181, 0.12);
  font-size: 12px;
  font-weight: 950;
}

.lb-nav a.is-active .lb-nav-icon {
  background: #8effb5;
  color: #07150d;
}

/* Header */
.lb-topbar,
.nx-topbar,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.74) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(200, 216, 203, 0.8) !important;
  border-radius: var(--lb-radius-xl) !important;
  padding: 16px 18px !important;
  margin-bottom: 28px !important;
  box-shadow: var(--lb-shadow-soft);
}

.lb-search,
.nx-search {
  width: min(520px, 100%) !important;
  min-height: 48px;
  border: 1px solid var(--lb-border) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: var(--lb-text) !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  outline: none !important;
}

.lb-search::placeholder,
.nx-search::placeholder {
  color: #8a9a90 !important;
  opacity: 1;
}

.lb-user-pill,
.nx-userline,
.nx-user-pill {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--lb-muted) !important;
  white-space: nowrap;
}

.lb-avatar,
.nx-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--lb-green-soft);
  color: var(--lb-green-dark) !important;
  font-weight: 950;
}

/* Titles */
.lb-page-head,
.nx-title-row,
.nx-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 26px !important;
}

.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lb-green-dark) !important;
  background: var(--lb-green-soft);
  border: 1px solid #ccefd7;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.lb-page-head h1,
.nx-page-title h1,
.nx-title h1,
h1 {
  margin: 0 !important;
  color: var(--lb-title) !important;
  font-size: clamp(32px, 4vw, 52px) !important;
  line-height: 0.98 !important;
  font-weight: 950 !important;
  letter-spacing: -0.07em !important;
}

.lb-page-head p,
.nx-page-title p,
.nx-title p {
  margin: 12px 0 0 !important;
  max-width: 780px;
  color: var(--lb-muted) !important;
  font-size: 17px !important;
  line-height: 1.6 !important;
}

h2 {
  color: var(--lb-title) !important;
  font-size: 24px !important;
  line-height: 1.18 !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

h3 {
  color: var(--lb-title) !important;
  font-size: 18px !important;
  line-height: 1.24 !important;
  font-weight: 900 !important;
}

/* Cards */
.lb-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.lb-card,
.nx-card,
.card,
.panel,
.nx-panel {
  background: var(--lb-panel) !important;
  border: 1px solid var(--lb-border) !important;
  border-radius: var(--lb-radius-xl) !important;
  color: var(--lb-text) !important;
  box-shadow: var(--lb-shadow) !important;
}

.lb-card {
  padding: 24px;
}

.nx-card,
.card,
.panel,
.nx-panel {
  padding: 22px !important;
}

.lb-card.soft {
  background: var(--lb-panel-2) !important;
}

.lb-metric {
  position: relative;
  min-height: 162px;
  overflow: hidden;
}

.lb-metric::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(24, 184, 102, 0.10);
}

.lb-metric small {
  display: block;
  color: var(--lb-muted) !important;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 14px;
}

.lb-metric strong {
  display: block;
  color: var(--lb-title) !important;
  font-size: 42px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.lb-metric p {
  margin: 14px 0 0;
  color: var(--lb-muted) !important;
  line-height: 1.5;
  font-size: 14px;
}

/* Actions */
.lb-actions,
.nx-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lb-btn,
.nx-btn,
.btn,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 17px !important;
  border-radius: 15px !important;
  border: 1px solid transparent !important;
  background: var(--lb-green) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(24, 184, 102, 0.20);
}

.lb-btn:hover,
.nx-btn:hover,
.btn:hover,
button:hover {
  background: var(--lb-green-dark) !important;
  color: #ffffff !important;
}

.lb-btn.secondary,
.nx-btn.secondary,
.btn.secondary,
.btn-outline {
  background: #ffffff !important;
  color: var(--lb-text) !important;
  border-color: var(--lb-border-strong) !important;
  box-shadow: none;
}

.lb-btn.secondary:hover,
.nx-btn.secondary:hover,
.btn.secondary:hover,
.btn-outline:hover {
  background: var(--lb-green-soft) !important;
  color: var(--lb-green-dark) !important;
}

/* Text */
p,
small,
.nx-meta,
.nx-muted,
.text-muted,
.muted,
.subtitle {
  color: var(--lb-muted) !important;
  line-height: 1.62 !important;
}

strong,
b {
  color: var(--lb-title) !important;
}

.lb-card p + p,
.nx-card p + p,
.panel p + p {
  margin-top: 10px;
}

/* Tables */
.lb-table-wrap,
.nx-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--lb-border);
  background: #ffffff;
}

table,
.nx-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #ffffff !important;
  color: var(--lb-text) !important;
}

thead {
  background: #f0f7f1 !important;
}

th {
  color: var(--lb-green-dark) !important;
  font-size: 12px !important;
  line-height: 1.3;
  font-weight: 950 !important;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  text-align: left;
  padding: 15px 16px !important;
  border-bottom: 1px solid var(--lb-border) !important;
  white-space: nowrap;
}

td {
  color: var(--lb-text) !important;
  font-size: 14px !important;
  line-height: 1.45;
  padding: 15px 16px !important;
  border-bottom: 1px solid #edf2ed !important;
  vertical-align: top;
}

td p,
td span,
td small {
  color: var(--lb-muted) !important;
}

td strong,
td .nx-title {
  color: var(--lb-title) !important;
}

tr:hover td {
  background: #fbfdfb !important;
}

/* Forms */
label {
  display: block;
  color: var(--lb-title) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  margin-bottom: 8px !important;
}

input,
select,
textarea,
.input,
.form-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--lb-border-strong) !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  color: var(--lb-text) !important;
  padding: 12px 14px !important;
  outline: none !important;
  font-size: 15px !important;
}

textarea {
  min-height: 118px;
}

input::placeholder,
textarea::placeholder {
  color: #93a198 !important;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lb-green) !important;
  box-shadow: 0 0 0 4px rgba(24, 184, 102, 0.11) !important;
}

option {
  background: #ffffff !important;
  color: var(--lb-text) !important;
}

/* Badges */
.lb-badge,
.nx-badge,
.badge,
.status,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--lb-green-soft) !important;
  color: var(--lb-green-dark) !important;
  border: 1px solid #ccefd7 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.lb-badge.warn,
.nx-badge.warn,
.badge.warn {
  background: #fff7df !important;
  color: #856100 !important;
  border-color: #f8dea1 !important;
}

.lb-badge.danger,
.nx-badge.danger,
.badge.danger {
  background: #fff0f2 !important;
  color: #a92d3d !important;
  border-color: #ffcbd3 !important;
}

/* Alerts */
.alert,
.notice,
.message,
.error,
.success,
.warning {
  border-radius: 18px !important;
  padding: 15px 16px !important;
  color: var(--lb-text) !important;
  border: 1px solid var(--lb-border) !important;
  background: #ffffff !important;
}

/* Corrige bagunça visual herdada */
[style*="color:#fff"],
[style*="color: #fff"],
[style*="color:white"],
[style*="color: white"] {
  color: inherit !important;
}

[style*="background:#031"],
[style*="background: #031"],
[style*="background:#061"],
[style*="background: #061"],
[style*="linear-gradient"] {
  color: inherit;
}

.bg-white,
.bg-light,
.white,
.light {
  background: #ffffff !important;
  color: var(--lb-text) !important;
}

/* Login */
.lb-login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
  padding: 54px 7vw;
}

.lb-login-hero {
  max-width: 780px;
}

.lb-login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.lb-login-mark {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f2517, #18b866);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 950;
}

.lb-login-brand {
  color: var(--lb-title);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.lb-login-hero h1 {
  color: var(--lb-title) !important;
  font-size: clamp(42px, 5vw, 74px) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.085em !important;
  margin: 0 0 24px !important;
}

.lb-login-hero p {
  color: var(--lb-muted) !important;
  font-size: 19px;
  line-height: 1.68;
  max-width: 660px;
}

.lb-login-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.lb-login-pills span {
  background: #ffffff;
  color: var(--lb-green-dark) !important;
  border: 1px solid var(--lb-border);
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 900;
  box-shadow: var(--lb-shadow-soft);
}

.lb-login-card {
  background: #ffffff;
  border: 1px solid var(--lb-border);
  border-radius: 34px;
  padding: 36px;
  box-shadow: var(--lb-shadow);
}

.lb-login-card h2 {
  margin: 0 0 8px !important;
}

.lb-login-card p {
  margin: 0 0 18px;
}

.lb-login-info {
  background: var(--lb-green-soft);
  color: var(--lb-green-dark) !important;
  border: 1px solid #ccefd7;
  padding: 14px;
  border-radius: 18px;
  font-weight: 850;
  line-height: 1.45;
}

.lb-login-error {
  background: #fff0f2;
  color: #a92d3d !important;
  border: 1px solid #ffcbd3;
  padding: 14px;
  border-radius: 18px;
  font-weight: 850;
  line-height: 1.45;
  margin-bottom: 14px;
}

/* Responsive */
@media (max-width: 1080px) {
  :root {
    --lb-sidebar-width: 0px;
  }

  .lb-sidebar,
  .nx-sidebar {
    position: relative !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  }

  .lb-main,
  .nx-page,
  main.nx-page,
  .nx-main,
  main.nx-main,
  main.main,
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px !important;
  }

  .lb-app {
    display: block;
  }

  .lb-grid.cols-4,
  .lb-grid.cols-3,
  .lb-grid.cols-2,
  .nx-cards,
  .nx-grid {
    grid-template-columns: 1fr !important;
  }

  .lb-page-head,
  .nx-title-row,
  .nx-page-title,
  .lb-topbar,
  .nx-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .lb-login-page {
    grid-template-columns: 1fr;
    padding: 34px 22px;
  }
}
