/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&display=swap");

/* ─── Reset ─────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

/* ─── Design tokens ─────────────────────────────────────────────────── */
:root {
  /* Page */
  --bg: #f0eee8;
  --bg-soft: #f8f6f1;

  /* Surfaces */
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(255, 255, 255, 0.76);
  --card: #ffffff;
  --card-2: rgba(248, 246, 241, 0.98);

  /* Typography */
  --text: #0f1623;
  --text-secondary: #374151;
  --muted: #6b7280;
  --muted-light: #9ca3af;

  /* Brand */
  --primary: #2563eb;
  --primary-50: rgba(37, 99, 235, 0.05);
  --primary-100: rgba(37, 99, 235, 0.10);
  --primary-200: rgba(37, 99, 235, 0.18);
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e3a8a;

  /* Semantic */
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.10);
  --success-border: rgba(16, 185, 129, 0.20);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.10);
  --danger-border: rgba(239, 68, 68, 0.18);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.10);
  --warning-border: rgba(245, 158, 11, 0.20);
  --purple: #8b5cf6;
  --purple-light: rgba(139, 92, 246, 0.10);
  --purple-border: rgba(139, 92, 246, 0.18);
  --cyan: #06b6d4;
  --cyan-light: rgba(6, 182, 212, 0.10);

  /* Borders & elevation */
  --border: rgba(15, 22, 35, 0.08);
  --border-strong: rgba(15, 22, 35, 0.16);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(15, 22, 35, 0.08), 0 1px 4px rgba(15, 22, 35, 0.04);
  --shadow-md: 0 8px 28px rgba(15, 22, 35, 0.10), 0 2px 8px rgba(15, 22, 35, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 22, 35, 0.12), 0 4px 14px rgba(15, 22, 35, 0.06);
  --shadow-xl: 0 24px 64px rgba(15, 22, 35, 0.14), 0 6px 20px rgba(15, 22, 35, 0.08);
  --glow-blue: 0 0 32px rgba(37, 99, 235, 0.22), 0 0 8px rgba(37, 99, 235, 0.12);

  /* Radius */
  --r-2xl: 32px;
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 9px;
  --r-xs: 5px;

  /* Sidebar */
  --sb-bg: #0b1622;
  --sb-bg-2: #111d2e;
  --sb-border: rgba(255, 255, 255, 0.06);
  --sb-text: rgba(255, 255, 255, 0.78);
  --sb-muted: rgba(255, 255, 255, 0.38);
  --sb-section: rgba(255, 255, 255, 0.28);
  --sb-hover: rgba(255, 255, 255, 0.06);
  --sb-active-bg: rgba(37, 99, 235, 0.22);
  --sb-active-glow: rgba(37, 99, 235, 0.4);
  --sb-active-bar: #3b82f6;
}

/* ─── Base ────────────────────────────────────────────────────────────── */
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(245, 158, 11, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #f8f6f1 0%, #f0eee8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 {
  font-weight: 800;
  letter-spacing: -0.035em;
}

p {
  margin: 0;
  line-height: 1.65;
}

strong {
  color: var(--text);
}

/* ─── Custom scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 22, 35, 0.14);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 22, 35, 0.26);
}

/* ─── Keyframes ────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes scalePop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }

  100% {
    background-position: 600px 0;
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

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

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

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

@keyframes borderPulse {

  0%,
  100% {
    border-color: rgba(37, 99, 235, 0.18);
  }

  50% {
    border-color: rgba(37, 99, 235, 0.45);
  }
}

/* ─── Layout shell ─────────────────────────────────────────────────────── */
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

/* ─────────────────────────────────────────────────────────────── SIDEBAR */
.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  gap: 0;
}

/* Brand */
.brand {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  grid-gap: 11px;
  gap: 11px;
  padding: 11px 10px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
  transition: background 200ms;
}

.brand:hover {
  background: rgba(255, 255, 255, 0.09);
}

.brand strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
}

.brand p {
  color: var(--sb-muted);
  font-size: 11.5px;
  margin-top: 1px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--purple) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1;
}

.sidebar-section {
  color: var(--sb-section);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0 10px;
  margin: 18px 0 5px;
}

.sidebar-section:first-child {
  margin-top: 0;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  color: var(--sb-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  letter-spacing: -0.005em;
}

.nav-link:hover {
  background: var(--sb-hover);
  color: #fff;
}

.nav-link.active {
  background: var(--sb-active-bg);
  border-color: rgba(59, 130, 246, 0.22);
  color: #fff;
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--sb-active-bar);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* Colored nav icon pill */
.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity 150ms;
  opacity: 0.65;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
  opacity: 1;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
}

/* Section-specific icon colors */
.nav-link[data-section="principal"] .nav-icon {
  background: rgba(37, 99, 235, 0.18);
  color: #60a5fa;
}

.nav-link[data-section="vendas"] .nav-icon {
  background: rgba(139, 92, 246, 0.18);
  color: #a78bfa;
}

.nav-link[data-section="operacao"] .nav-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.nav-link[data-section="config"] .nav-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.nav-link.active[data-section="principal"] .nav-icon {
  background: rgba(37, 99, 235, 0.30);
}

.nav-link.active[data-section="vendas"] .nav-icon {
  background: rgba(139, 92, 246, 0.28);
}

.nav-link.active[data-section="operacao"] .nav-icon {
  background: rgba(16, 185, 129, 0.24);
}

.nav-link.active[data-section="config"] .nav-icon {
  background: rgba(245, 158, 11, 0.24);
}

/* Active dot */
.nav-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: #60a5fa;
  animation: pulse-dot 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sb-border);
  transition: background 150ms;
  cursor: pointer;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.09);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--primary-600), var(--purple));
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.user-chip-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.user-chip-info span {
  font-size: 11px;
  color: var(--sb-muted);
}

/* ─────────────────────────────────────────────────────────────── CONTENT */
.content {
  min-height: 100vh;
  overflow: auto;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

/* ─────────────────────────────────────────────────────────────── TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: rgba(248, 246, 241, 0.92);
  border-bottom: 1px solid var(--border);
  border-radius: 0 !important;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 28px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 0 var(--border), var(--shadow-xs);
  margin: 0 -28px 28px;
  animation: none !important;
}

.topbar-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-copy h1 {
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 1px;
}

.topbar-breadcrumb span:last-child {
  color: var(--text);
  font-weight: 600;
}

.topbar-breadcrumb-sep {
  opacity: 0.35;
  font-size: 13px;
}

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

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  min-width: 220px;
  cursor: text;
  transition: border-color 150ms, box-shadow 150ms;
}

.topbar-search:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.topbar-search svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.topbar-search-grow {
  flex: 1 1;
}

kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  background: #fff;
  padding: 2px 6px;
  font-size: 10.5px;
  color: var(--muted);
  font-family: inherit;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-100);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────── EYEBROW */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────── GRID / STACK */
.grid {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
}

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

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

/* ─────────────────────────────────────────────────────────────── CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.28s ease both;
}

.card-sm {
  padding: 18px;
  border-radius: var(--r-lg);
}

/* Card variants */
.card-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-color: rgba(255, 255, 255, 0.7);
}

.card-dark {
  background: var(--sb-bg);
  border-color: var(--sb-border);
  color: #fff;
}

.card-highlight-l {
  border-left: 3px solid var(--primary-600);
  padding-left: 21px;
}

.card-highlight-success {
  border-left: 3px solid var(--success);
  padding-left: 21px;
}

.card-highlight-danger {
  border-left: 3px solid var(--danger);
  padding-left: 21px;
}

.card-highlight-warning {
  border-left: 3px solid var(--warning);
  padding-left: 21px;
}

.card-highlight-purple {
  border-left: 3px solid var(--purple);
  padding-left: 21px;
}

/* ─────────────────────────────────────────────────────────────── KPI CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 20px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: fadeUp 0.3s ease both;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Decorative blob */
.kpi-card::before {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.08;
}

.kpi-card.tone-blue {
  border-top: 3px solid var(--primary-600);
}

.kpi-card.tone-green {
  border-top: 3px solid var(--success);
}

.kpi-card.tone-amber {
  border-top: 3px solid var(--warning);
}

.kpi-card.tone-slate {
  border-top: 3px solid #64748b;
}

.kpi-card.tone-purple {
  border-top: 3px solid var(--purple);
}

.kpi-card.tone-blue::before {
  background: var(--primary-600);
}

.kpi-card.tone-green::before {
  background: var(--success);
}

.kpi-card.tone-amber::before {
  background: var(--warning);
}

.kpi-card.tone-slate::before {
  background: #64748b;
}

.kpi-card.tone-purple::before {
  background: var(--purple);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  animation: countUp 0.5s ease both;
}

.kpi-card.tone-blue .kpi-value {
  color: var(--primary-700);
}

.kpi-card.tone-green .kpi-value {
  color: var(--success);
}

.kpi-card.tone-amber .kpi-value {
  color: var(--warning);
}

.kpi-card.tone-purple .kpi-value {
  color: var(--purple);
}

.kpi-helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  margin-top: auto;
  align-self: flex-start;
}

.kpi-trend.up {
  background: var(--success-light);
  color: var(--success);
}

.kpi-trend.down {
  background: var(--danger-light);
  color: var(--danger);
}

.kpi-trend.flat {
  background: rgba(107, 114, 128, 0.09);
  color: var(--muted);
}

/* Sparkline area */
.kpi-sparkline {
  margin-top: 2px;
  height: 32px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.spark-bar {
  flex: 1 1;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  background: var(--primary-200);
  transition: height 0.4s ease;
}

.kpi-card.tone-green .spark-bar {
  background: var(--success-light);
}

.kpi-card.tone-amber .spark-bar {
  background: var(--warning-light);
}

.kpi-card.tone-purple .spark-bar {
  background: var(--purple-light);
}

.spark-bar.highlight {
  background: var(--primary-600);
  opacity: 0.9;
}

.kpi-card.tone-green .spark-bar.highlight {
  background: var(--success);
}

.kpi-card.tone-amber .spark-bar.highlight {
  background: var(--warning);
}

.kpi-card.tone-purple .spark-bar.highlight {
  background: var(--purple);
}

/* ─────────────────────────────────────────────────────── HERO PANEL */
.hero-panel {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 34%),
    radial-gradient(circle at left center, rgba(245, 158, 11, 0.10), transparent 32%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(249, 245, 240, 0.98));
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.hero-panel>* {
  position: relative;
  z-index: 1;
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: 1.3fr minmax(280px, 0.9fr);
  grid-gap: 28px;
  gap: 28px;
  align-items: center;
}

.hero-panel h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.5rem);
  max-width: 15ch;
  line-height: 1.18;
}

.hero-panel-notes {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.hero-panel-note {
  padding: 15px 17px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.hero-panel-note strong {
  display: block;
  font-size: 1.9rem;
  margin-bottom: 3px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.hero-panel-note span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ─────────────────────────────────────────────────────── SECTION HEADING */
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.section-heading h2 {
  font-size: 1.35rem;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────── DASHBOARD GRID */
.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

/* ─────────────────────────────────────────────────────── STAT STRIP */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1px;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.stat-strip-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--card);
}

.stat-strip-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.stat-strip-item strong {
  font-size: 1.4rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* ─────────────────────────────────────────────────────── ALERT / INSIGHT */
.alert-list,
.insight-list {
  display: grid;
  grid-gap: 9px;
  gap: 9px;
}

.alert-row,
.insight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  transition: background 140ms, box-shadow 140ms;
}

.alert-row:hover,
.insight-row:hover {
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.alert-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  font-size: 17px;
  flex-shrink: 0;
}

.alert-row.tone-amber .alert-icon {
  background: var(--warning-light);
}

.alert-row.tone-rose .alert-icon {
  background: var(--danger-light);
}

.alert-row.tone-green .alert-icon {
  background: var(--success-light);
}

.alert-value {
  font-size: 1.55rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.alert-row.tone-amber .alert-value {
  color: var(--warning);
}

.alert-row.tone-rose .alert-value {
  color: var(--danger);
}

.alert-row.tone-green .alert-value {
  color: var(--success);
}

/* ─────────────────────────────────────────────────────── REPORT BAR */
.report-bar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-bar-track {
  flex: 1 1;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  min-width: 50px;
  max-width: 110px;
}

.report-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600), #60a5fa);
  border-radius: 99px;
}

/* ─────────────────────────────────────────────────────── ACTIVITY FEED */
.activity-feed {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: flex-start;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.25s ease both;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.activity-dot.blue {
  background: var(--primary-100);
}

.activity-dot.green {
  background: var(--success-light);
}

.activity-dot.amber {
  background: var(--warning-light);
}

.activity-dot.purple {
  background: var(--purple-light);
}

.activity-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.activity-text span {
  font-size: 12px;
  color: var(--muted);
}

.activity-time {
  font-size: 11px;
  color: var(--muted-light);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────── PROGRESS RING */
.progress-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-ring-label {
  font-size: 13px;
  color: var(--muted);
}

.progress-ring-label strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────────────── FORMS */
label>span:first-child {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  min-height: 42px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-light);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  background: #fff;
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

/* ─────────────────────────────────────────────────────── BUTTONS */
.button {
  border: 0;
  border-radius: var(--r-md);
  min-height: 42px;
  padding: 9px 20px;
  background: linear-gradient(160deg, var(--primary-600) 0%, var(--primary-800) 120%);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, box-shadow 200ms ease, filter 180ms ease;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.button:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.button.secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.button.secondary:hover {
  border-color: var(--border-strong);
  background: #fff;
  filter: none;
  box-shadow: var(--shadow-sm);
}

.button.ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--border-strong);
  filter: none;
  box-shadow: none;
}

.button.danger {
  background: linear-gradient(160deg, var(--danger) 0%, #b91c1c 120%);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.28);
}

.button.danger:hover {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.36);
}

.button.icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ─────────────────────────────────────────────────────── TABLE */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  background: rgba(245, 244, 240, 0.7);
}

.table th:first-child {
  border-radius: var(--r-xs) 0 0 var(--r-xs);
}

.table th:last-child {
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}

.table tbody tr {
  transition: background 120ms ease;
  cursor: pointer;
}

.table tbody tr:hover {
  background: rgba(37, 99, 235, 0.035);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.row-urgente {
  background: rgba(239, 68, 68, 0.03) !important;
}

.row-urgente td:first-child {
  border-left: 3px solid var(--danger);
}

/* ─────────────────────────────────────────────────────── BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.badge-info {
  background: var(--primary-100);
  color: var(--primary-700);
  border-color: rgba(37, 99, 235, 0.16);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning-border);
}

.badge-neutral {
  background: rgba(107, 114, 128, 0.09);
  color: #4b5563;
  border-color: rgba(107, 114, 128, 0.14);
}

.badge-purple {
  background: var(--purple-light);
  color: var(--purple);
  border-color: var(--purple-border);
}

/* Lead status */
.badge-novo {
  background: var(--primary-100);
  color: var(--primary-700);
  border-color: rgba(37, 99, 235, 0.16);
}

.badge-aprovado {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-reprovado {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-pendente {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning-border);
}

/* Task priority */
.badge-alta {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-media {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning-border);
}

.badge-baixa {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

/* Task status */
.badge-pendente-task {
  background: rgba(107, 114, 128, 0.09);
  color: #4b5563;
}

.badge-concluida {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

/* ─────────────────────────────────────────────────────── KANBAN */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(235px, 1fr));
  grid-gap: 13px;
  gap: 13px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-column {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-gap: 11px;
  gap: 11px;
  min-height: 470px;
  padding: 15px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  transition: background 160ms, border-color 160ms;
}

.kanban-column[data-column-status="ganha"] {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.22);
}

.kanban-column[data-column-status="perdida"] {
  background: rgba(239, 68, 68, 0.03);
  border-color: rgba(239, 68, 68, 0.18);
}

.kanban-column.is-saving {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.kanban-column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.kanban-column-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 3px;
  letter-spacing: -0.02em;
}

.kanban-column[data-column-status="ganha"] .kanban-column-header h3 {
  color: var(--success);
}

.kanban-column[data-column-status="perdida"] .kanban-column-header h3 {
  color: var(--danger);
}

.kanban-column-header p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.kanban-counter {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.kanban-column[data-column-status="ganha"] .kanban-counter {
  background: var(--success-light);
  color: var(--success);
}

.kanban-column[data-column-status="perdida"] .kanban-counter {
  background: var(--danger-light);
  color: var(--danger);
}

.kanban-cards {
  display: grid;
  align-content: start;
  grid-gap: 9px;
  gap: 9px;
}

.kanban-card {
  display: grid;
  grid-gap: 7px;
  gap: 7px;
  padding: 13px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  cursor: -webkit-grab;
  cursor: grab;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  animation: scalePop 0.2s ease both;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-md);
}

.kanban-card:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.42;
  transform: scale(0.97);
}

.kanban-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.kanban-card h4 {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.kanban-card-stage {
  font-size: 11px;
  color: var(--muted);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.kanban-card-notes {
  font-size: 12px;
  color: var(--muted);
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  line-height: 1.45;
}

.kanban-empty {
  min-height: 88px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--border);
  color: var(--muted-light);
  text-align: center;
  padding: 18px;
  font-size: 12.5px;
}

/* ─────────────────────────────────────────────────────── ERROR */
.error {
  color: var(--danger);
  padding: 9px 13px;
  border-radius: var(--r-sm);
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ─────────────────────────────────────────────────────── LOGIN */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-hero {
  background:
    radial-gradient(ellipse at bottom right, rgba(37, 99, 235, 0.45), transparent 55%),
    radial-gradient(ellipse at top left, rgba(139, 92, 246, 0.28), transparent 55%),
    linear-gradient(160deg, #0b1622, #172038);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.login-hero>* {
  position: relative;
  z-index: 1;
}

.login-hero-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-hero-brand strong {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.login-hero-brand p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.login-hero-content h2 {
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
  max-width: 14ch;
  margin-bottom: 16px;
}

.login-hero-content p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14.5px;
  max-width: 36ch;
  line-height: 1.7;
}

.login-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.login-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 500;
}

.login-hero-footer {
  color: rgba(255, 255, 255, 0.28);
  font-size: 11.5px;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  background: var(--bg-soft);
}

.login-form-panel .card {
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border-radius: var(--r-2xl);
  animation: scalePop 0.32s ease both;
}

/* ─────────────────────────────────────────────────────── RESPONSIVE */
@media (max-width:1200px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .sidebar-footer {
    display: none;
  }

  .kpi-grid,
  .dashboard-grid,
  .grid-2,
  .hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 240px;
    padding: 28px;
  }

  .login-form-panel {
    padding: 28px;
  }
}

@media (max-width:768px) {
  .page {
    padding: 0 16px 48px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    margin: 0 -16px 20px;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .topbar-search {
    min-width: 0;
  }

  .card {
    padding: 18px;
    border-radius: var(--r-lg);
  }

  .kanban-board {
    grid-template-columns: repeat(6, minmax(200px, 1fr));
  }
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
