:root{
  --app-bg: #0b1220;
  --card-bg: #0f1a2e;
  --card-border: rgba(255,255,255,0.08);
  --text: #e8eefc;
  --muted: rgba(232,238,252,0.7);
  --primary: #4f8cff;
  --dash-bg: #f3f5f9;
  --dash-surface: #ffffff;
  --dash-text: #111827;
  --dash-muted: rgba(17,24,39,0.65);
}

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.auth-page{
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 18% 12%, rgba(79,140,255,0.28), transparent 58%),
    radial-gradient(900px 560px at 82% 28%, rgba(111,66,193,0.22), transparent 60%),
    radial-gradient(900px 520px at 55% 90%, rgba(20,184,166,0.12), transparent 60%),
    linear-gradient(180deg, #060b16, var(--app-bg));
  color: var(--text);
}

.auth-page::before,
.auth-page::after{
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
}

.auth-page::before{
  background:
    radial-gradient(520px 520px at 20% 20%, rgba(79,140,255,0.32), transparent 62%),
    radial-gradient(560px 560px at 85% 25%, rgba(111,66,193,0.28), transparent 62%),
    radial-gradient(640px 640px at 55% 92%, rgba(59,130,246,0.14), transparent 62%);
  filter: blur(8px);
  opacity: 0.95;
}

.auth-page::after{
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      transparent 1px,
      transparent 8px
    );
  opacity: 0.18;
  mix-blend-mode: overlay;
}

.auth-card{
  background: rgba(15, 26, 46, 0.86);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
}

.brand-title{
  letter-spacing: 0.2px;
}

.form-control,
.form-select{
  border-radius: 12px;
}

.btn-primary{
  border-radius: 12px;
  background: linear-gradient(135deg, #4f8cff, #6f42c1);
  border: none;
}

.btn-primary:hover{
  filter: brightness(1.03);
}

.saas-shell{
  min-height: 100vh;
  background: #e9edf3;
}

.sidebar{
  background: #0f1a2e;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar .fw-bold{
  color: rgba(255,255,255,0.96);
}

.sidebar .fw-semibold{
  color: rgba(255,255,255,0.92);
}

.sidebar .small-muted{
  color: rgba(232,238,252,0.70);
}

.sidebar .nav-link{
  color: rgba(232,238,252,0.84);
  border-radius: 12px;
}

.sidebar .nav-link:hover{
  background: rgba(79,140,255,0.14);
  color: rgba(255,255,255,0.98);
}

.sidebar .nav-link.active{
  background: rgba(79,140,255,0.22);
  color: rgba(255,255,255,0.98);
}

/* Dashboard (área central em cinza claro com contraste nos cards) */
.saas-shell .content{
  background: var(--dash-bg);
  color: var(--dash-text);
  min-height: 100vh;
}

/* Cards em modo dark (usados no auth/labels) */
.card-saas{
  background: #0f1a2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

/* Cards no dashboard: branco com contraste e sombra leve */
.saas-shell .card-saas{
  background: var(--dash-surface);
  color: var(--dash-text);
  border: 1px solid rgba(17,24,39,0.10);
  box-shadow: 0 10px 26px rgba(17,24,39,0.10);
}

.small-muted{ color: var(--muted); }

.saas-shell .small-muted{ color: var(--dash-muted); }

.table{
  color: rgba(232,238,252,0.9);
}

.table thead th{
  color: rgba(232,238,252,0.75);
  border-bottom-color: rgba(255,255,255,0.10);
}

.table td{
  border-top-color: rgba(255,255,255,0.08);
}

.saas-shell .table{
  color: rgba(17,24,39,0.92);
}

.saas-shell .table thead th{
  color: rgba(17,24,39,0.70);
  border-bottom-color: rgba(17,24,39,0.12);
}

.saas-shell .table td{
  border-top-color: rgba(17,24,39,0.10);
}

.avatar-circle{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f8cff, #6f42c1);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 18px rgba(79,140,255,0.18);
}

.logo-thumb{
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,0.10);
  background: #fff;
}

.logo-placeholder{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,0.10);
}

.color-dot{
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(17,24,39,0.18);
}

.color-swatch{
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,0.10);
  box-shadow: 0 8px 16px rgba(17,24,39,0.10);
}

.color-swatch:hover{
  transform: translateY(-1px);
}

.client-card{
  border: 1px solid rgba(17,24,39,0.12);
  border-radius: 16px;
  background: var(--dash-surface);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(17,24,39,0.08);
}

.client-card-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.client-card-label{
  font-size: 12px;
  color: var(--dash-muted);
  white-space: nowrap;
}

.client-card-value{
  font-size: 14px;
  color: rgba(17,24,39,0.92);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 991.98px){
  .sidebar{
    position: sticky;
    top: 0;
    z-index: 1020;
  }

  .offcanvas.offcanvas-start{
    width: min(86vw, 320px);
  }
}
