@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Nixx Essence 2.0 Brand Palette */
  --primary: #7928CA;
  --primary-hover: #661EB3;
  --primary-active: #531794;
  --primary-subtle: rgba(121, 40, 202, 0.08);
  --primary-glow: rgba(121, 40, 202, 0.25);
  
  --accent: #D946EF;
  --accent-subtle: rgba(217, 70, 239, 0.1);
  
  --sidebar-bg: #191729;
  --sidebar-surface: #221F36;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #9E9BB2;
  --sidebar-text-active: #FFFFFF;
  
  --bg-app: #F7F8FC;
  --surface: #FFFFFF;
  --surface-alt: #F9FAFD;
  
  --text-main: #202438;
  --text-muted: #74798B;
  --text-light: #9DA3B4;
  
  --border-color: #E9EAF1;
  --border-focus: #7928CA;
  
  --success: #10B981;
  --success-subtle: #ECFDF5;
  --warning: #F59E0B;
  --warning-subtle: #FFFBEB;
  --danger: #EF4444;
  --danger-subtle: #FEF2F2;
  --info: #3B82F6;
  --info-subtle: #EFF6FF;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  --shadow-popover: 0 20px 25px -5px rgba(16, 24, 40, 0.1), 0 8px 10px -6px rgba(16, 24, 40, 0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
}

/* Base Reset & Typography with -20% Zoom Out */
html {
  zoom: 0.80; /* Zoom out de -20% em todas as telas */
  -moz-transform: scale(0.80);
  -moz-transform-origin: top left;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global SVG & Lucide Icons Styling */
.svg-icon,
.lucide,
[data-lucide] {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  stroke-width: 1.85px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* App Shell Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ========================================================
   1. SIDEBAR (Linear / Stripe SaaS Style)
   ======================================================== */
.sidebar {
  width: 275px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-header {
  padding: 1.35rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-logo {
  height: 36px;
  max-width: 175px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.sidebar-badge {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: rgba(121, 40, 202, 0.2);
  color: #D946EF;
  border: 1px solid rgba(217, 70, 239, 0.3);
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 0.6rem;
  margin-bottom: 0.35rem;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  color: var(--sidebar-text);
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  position: relative;
}

.sidebar .nav-link:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
  color: #FFFFFF;
  background: linear-gradient(90deg, rgba(121, 40, 202, 0.9) 0%, rgba(121, 40, 202, 0.5) 100%);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(121, 40, 202, 0.3);
}

.sidebar .nav-link .nav-icon {
  font-size: 1.05rem;
  width: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s ease;
}

.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 0.9rem 1.15rem;
  border-top: 1px solid var(--sidebar-border);
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.2rem;
}

.sidebar-footer .sidebar-subtext {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ========================================================
   2. MAIN CONTENT & TOPBAR (Clean / Minimal)
   ======================================================== */
.main-content {
  margin-left: 275px;
  width: calc(100% - 275px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2.25rem 2.5rem;
  transition: margin-left 0.25s ease, width 0.25s ease;
}

.topbar {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.35rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
}

.topbar-center {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.topbar-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.75rem;
}

.topbar-search {
  position: relative;
  width: 100%;
  min-width: 380px;
  max-width: 500px;
}

.topbar-search input {
  background-color: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.52rem 2.6rem 0.52rem 2.6rem;
  font-size: 0.88rem;
  color: var(--text-main);
  width: 100%;
  transition: all 0.15s ease;
}

.topbar-search input:focus {
  background-color: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}

.topbar-search .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Spotlight Real-time Search Dropdown */
.search-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 460px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  z-index: 1050;
  overflow: hidden;
}

.search-dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.12s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.search-result-item:hover,
.search-result-item.active {
  background-color: #F8F4FF;
  color: var(--primary);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-alt);
  color: var(--primary);
  flex-shrink: 0;
}

.search-result-item:hover .search-result-icon,
.search-result-item.active .search-result-icon {
  background-color: var(--primary-subtle);
  color: var(--primary);
}

.search-result-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.search-result-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.search-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.topbar-search .search-kbd {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-tenant-selector .btn {
  background-color: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.topbar-tenant-selector .btn:hover {
  background-color: #FFFFFF;
  border-color: var(--primary);
}

/* ========================================================
   3. DASHBOARD & KPI METRICS (Clean Neutral Cards)
   ======================================================== */
.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-title-area h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
}

.dashboard-meta {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kpi-card {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #D5D7E3;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.kpi-icon-purple  { background-color: rgba(121, 40, 202, 0.08); color: var(--primary); }
.kpi-icon-blue    { background-color: var(--info-subtle); color: var(--info); }
.kpi-icon-green   { background-color: var(--success-subtle); color: var(--success); }
.kpi-icon-amber   { background-color: var(--warning-subtle); color: var(--warning); }
.kpi-icon-rose    { background-color: var(--danger-subtle); color: var(--danger); }
.kpi-icon-dark    { background-color: #F1F3F9; color: var(--text-main); }

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.kpi-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ========================================================
   4. UI COMPONENTS (Linear / Stripe Polish)
   ======================================================== */
/* Cards & Panels */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 1.35rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.card-header h2, .card-header h3, .card-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.card-body {
  padding: 1.35rem;
}

.card-footer {
  background-color: var(--surface-alt);
  border-top: 1px solid var(--border-color);
  padding: 0.85rem 1.35rem;
}

/* Tables */
.table-card {
  border-radius: var(--radius-lg);
}

.table {
  width: 100%;
  margin-bottom: 0;
  color: var(--text-main);
  vertical-align: middle;
  border-color: var(--border-color);
}

.table thead th {
  background-color: var(--surface-alt);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.table-hover tbody tr {
  transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(121, 40, 202, 0.02);
}

/* Form Controls */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.52rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-main);
  transition: all 0.15s ease;
}

/* Remove setas de aumentar/diminuir valor em inputs numéricos (Chrome, Safari, Edge, Firefox) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-subtle);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.52rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

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

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-lg {
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(121, 40, 202, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(121, 40, 202, 0.3);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-subtle);
  color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary, .btn-outline-secondary {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover, .btn-outline-secondary:hover {
  background: var(--surface-alt);
  border-color: #D5D7E3;
  color: var(--text-main);
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #FFFFFF;
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid #FECACA;
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger-subtle);
  border-color: var(--danger);
  color: var(--danger);
}

/* Badges & Dropdown Utilities */
.dropdown-toggle-no-caret::after {
  display: none !important;
}

.bg-purple-subtle {
  background-color: rgba(121, 40, 202, 0.08) !important;
}

.badge {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.badge.bg-success, .badge.text-bg-success {
  background-color: var(--success-subtle) !important;
  color: #065F46 !important;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.bg-danger, .badge.text-bg-danger {
  background-color: var(--danger-subtle) !important;
  color: #991B1B !important;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.bg-warning, .badge.text-bg-warning {
  background-color: var(--warning-subtle) !important;
  color: #92400E !important;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge.bg-info, .badge.text-bg-info {
  background-color: var(--info-subtle) !important;
  color: #1E40AF !important;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge.bg-primary, .badge.text-bg-primary {
  background-color: var(--primary-subtle) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(121, 40, 202, 0.2);
}

.badge.bg-secondary, .badge.text-bg-secondary, .badge.text-bg-light {
  background-color: #F1F3F9 !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-color);
}

/* Dropdowns */
.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popover);
  padding: 0.4rem;
  font-size: 0.86rem;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--text-main);
  font-weight: 500;
  transition: all 0.12s ease;
}

.dropdown-item:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
}

.dropdown-item.active {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Modals */
.modal-content {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-popover);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  background-color: var(--surface-alt);
}

/* Alertas */
.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-size: 0.88rem;
  border-width: 1px;
}

/* Progress bar */
.progress {
  background-color: #EAEBF2;
  border-radius: 9999px;
  overflow: hidden;
}

/* Mobile Sidebar Drawer Overlay & Backdrop */
.sidebar-overlay,
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 30, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1025;
}

.sidebar-backdrop.show,
.sidebar-overlay.show {
  display: block;
}

/* Sidebar Section Titles & Tenant Badge */
.sidebar-header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.sidebar-logo {
  height: 38px;
  max-width: 190px;
  object-fit: contain;
}

.sidebar-tenant-badge {
  margin: 0.35rem 0.85rem 0.95rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tenant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

.tenant-name {
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 600;
  max-width: 155px;
}

.tenant-tier {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(217, 70, 239, 0.18);
  color: var(--accent);
  border: 1px solid rgba(217, 70, 239, 0.35);
  flex-shrink: 0;
}

.sidebar-section-title {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem 0.35rem;
}

.sidebar-subtext {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.btn-sidebar-close,
.btn-sidebar-toggle {
  background: transparent;
  border: none;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.btn-sidebar-toggle:hover {
  background-color: var(--surface-alt);
  color: var(--text-main);
}

/* Topbar Components */
.search-kbd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: inherit;
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

.tenant-switcher-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tenant-switcher-btn:hover {
  background-color: #FFFFFF;
  border-color: var(--primary-subtle);
}

.tenant-switcher-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
}

.tenant-chevron-icon {
  width: 14px;
  height: 14px;
  color: #94A3B8;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.dropdown.show .tenant-chevron-icon {
  transform: rotate(180deg);
}

.topbar-action-btn {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-action-btn:hover {
  background-color: #FFFFFF;
  color: var(--text-main);
}

.action-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
}

.user-profile-btn {
  background: transparent;
  border: none;
  padding: 0.2rem 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.user-profile-btn::after {
  display: none !important;
}

.user-profile-btn:hover {
  background-color: var(--surface-alt);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7928CA 0%, #9333EA 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 2px 6px rgba(121, 40, 202, 0.25), 0 0 0 2px #FFFFFF;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* KPI Card Styles (Linear/Stripe Neutral Metric Cards) */
.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(121, 40, 202, 0.25);
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.kpi-icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.kpi-subtext {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* App Footer */
.app-footer {
  margin-top: auto;
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ========================================================
   6. LOGIN PAGE & SISTEMA DE ABERTURA (Splash Screen com 4 Modos)
   ======================================================== */
.system-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0d0218;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.85s;
}

.system-splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  filter: blur(22px) brightness(1.2);
  transform: scale(1.1);
  pointer-events: none;
}

.splash-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.95) contrast(1.05);
  transform: scale(1);
  animation: splashBgZoom 4s ease-out forwards;
}

@keyframes splashBgZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.splash-overlay-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(121, 40, 202, 0.15) 0%, rgba(13, 2, 24, 0.45) 55%, rgba(13, 2, 24, 0.88) 100%);
}

/* ========================================================
   OS 4 MODOS DE TRANSIÇÃO DO SISTEMA DE ABERTURA
   ======================================================== */

/* MODO 1: NEON PERIMETRAL (Apple Intelligence Perimeter Halo) */
.mode-perimeter .splash-logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 28px;
  background: conic-gradient(from 0deg, #A855F7, #EC4899, #7928CA, #38BDF8, #A855F7);
  filter: blur(8px);
  opacity: 0.7;
  z-index: -1;
  animation: spinPerimeter 2.5s linear infinite;
}

@keyframes spinPerimeter {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.mode-perimeter.splash-burst .splash-logo-ring {
  animation: perimeterBurst 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes perimeterBurst {
  0% { transform: scale(1); box-shadow: 0 0 30px #A855F7; }
  45% { transform: scale(1.2); box-shadow: 0 0 90px #EC4899, 0 0 130px #A855F7; }
  100% { transform: scale(1.05); opacity: 0; filter: blur(12px); }
}

/* MODO 2: ONDAS RADIAIS 360° (Pulso Líquido Concêntrico) */
.splash-waves-container {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.mode-waves .splash-waves-container {
  display: flex;
}

.splash-wave {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.75);
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.6);
}

.mode-waves.splash-burst .splash-wave-1 {
  animation: liquidWave 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0s forwards;
}
.mode-waves.splash-burst .splash-wave-2 {
  animation: liquidWave 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}
.mode-waves.splash-burst .splash-wave-3 {
  animation: liquidWave 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}

@keyframes liquidWave {
  0% {
    opacity: 0.95;
    transform: scale(0.6);
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    transform: scale(10);
    filter: blur(16px);
    border-width: 1px;
  }
}

/* MODO 3: PARTÍCULAS SHIMMER (Pó de Diamante / Stardust) */
.splash-particles-container {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.mode-particles .splash-particles-container {
  display: block;
}

.stardust-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 10px #F472B6, 0 0 20px #C084FC;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

.mode-particles.splash-burst .stardust-particle {
  animation: stardustBurst 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stardustBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2) rotate(var(--rot));
    filter: blur(2px);
  }
}

/* MODO 4: PROFUNDIDADE VIDRO FUMÊ (Minimalismo iOS Puro) */
.mode-glass.splash-burst .splash-content {
  animation: glassBreathe 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes glassBreathe {
  0% { transform: scale(1); filter: blur(0px); opacity: 1; }
  50% { transform: scale(1.08); filter: blur(4px); opacity: 0.9; }
  100% { transform: scale(1.15); filter: blur(24px); opacity: 0; }
}

.mode-glass.splash-hidden {
  filter: blur(35px) brightness(1.1) !important;
  opacity: 0;
}

/* DOCK FLUTUANTE DE ESCOLHA (Seletor Interativo) */
.transition-mode-dock {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  background: rgba(18, 5, 32, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(121, 40, 202, 0.3);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 95vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.transition-mode-dock::-webkit-scrollbar {
  display: none;
}

.dock-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.dock-mode-btn {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dock-mode-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.dock-mode-btn.active {
  background: linear-gradient(135deg, #7928CA 0%, #A855F7 100%);
  color: #FFFFFF;
  border-color: #A855F7;
  box-shadow: 0 2px 10px rgba(121, 40, 202, 0.4);
}

.dock-test-btn {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #10B981;
  background: #10B981;
  color: #FFFFFF;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.2rem;
}

.dock-test-btn:hover {
  background: #059669;
  transform: scale(1.04);
}

.splash-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  max-width: 380px;
  animation: splashFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.system-splash-screen.splash-burst .splash-content {
  transform: scale(1.05);
}

@keyframes splashFadeIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.splash-logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.splash-aura-glow {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, rgba(236, 72, 153, 0.3) 50%, transparent 70%);
  filter: blur(15px);
  animation: splashAuraSpin 4s linear infinite;
}

@keyframes splashAuraSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

.splash-logo-ring {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5), 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: splashRingPulse 2s ease-in-out infinite alternate;
}

@keyframes splashRingPulse {
  0% {
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.7), 0 0 20px rgba(236, 72, 153, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
  }
}

.splash-logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.splash-title {
  color: #FFFFFF;
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.3rem 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6), 0 0 30px rgba(168, 85, 247, 0.6);
}

.splash-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin: 0 0 1.75rem 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.splash-progress-track {
  width: 145px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(4px);
}

.splash-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #A855F7 0%, #EC4899 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
  animation: splashProgressFill 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashProgressFill {
  0% { width: 0%; }
  65% { width: 80%; }
  100% { width: 100%; }
}

.splash-tap-hint {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-page {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../img/login-splash.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0D0218;
  position: relative;
  perspective: 1200px;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(13, 2, 24, 0.55) 0%, rgba(9, 1, 18, 0.9) 100%);
  backdrop-filter: blur(3px);
  z-index: 1;
}

/* Card de Login com Transição 3D e Shimmer de Luz */
.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px);
  border-radius: 26px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.5), 0 0 50px rgba(121, 40, 202, 0.25) !important;
  overflow: hidden;
  opacity: 0;
  transform: perspective(1000px) rotateX(8deg) translateY(40px) scale(0.93);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card.card-revealed {
  opacity: 1;
  transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1);
}

/* Feixe de Luz diagonal suave ao aterrissar o card */
.login-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-25deg);
  pointer-events: none;
}

.login-card.card-revealed::after {
  animation: cardLightSweep 1.3s 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardLightSweep {
  0% { left: -120%; }
  100% { left: 220%; }
}

.login-logo-img {
  max-width: 210px;
  height: auto;
  object-fit: contain;
}

/* ========================================================
   5. RESPONSIVENESS & MOBILE-FIRST BREAKPOINTS
   ======================================================== */

/* Tablet & Mobile Landscape (< 992px) */
@media (max-width: 991.98px) {
  /* Restaura escala nativa para toque e visualização mobile sem distorção */
  html {
    zoom: 1 !important;
    -moz-transform: none !important;
  }

  body {
    font-size: 0.94rem;
  }

  /* Drawer Sidebar Flutuante */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 285px;
    max-width: 85vw;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay,
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 30, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.show,
  .sidebar-backdrop.show {
    display: block;
    opacity: 1;
  }

  .btn-sidebar-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* Layout Principal */
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 0.75rem 0.85rem 2rem;
  }

  /* Topbar Compacta & Sticky - Design Fluido iOS/SaaS */
  .topbar {
    position: sticky;
    top: 0.4rem;
    z-index: 1020;
    padding: 0.5rem 0.85rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .topbar-left {
    flex: 0 0 auto;
  }

  .topbar-center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .topbar-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem !important;
  }

  .btn-sidebar-toggle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #1E293B;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .btn-sidebar-toggle:active {
    transform: scale(0.93);
    background-color: #EDE9FE;
    color: var(--primary);
  }

  .btn-sidebar-toggle svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2px;
  }

  .tenant-switcher-btn {
    padding: 0.38rem 0.75rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .tenant-switcher-btn:active {
    transform: scale(0.95);
    background: #FFFFFF;
    border-color: var(--primary);
  }

  .tenant-switcher-text {
    max-width: 145px !important;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Dashboard Header */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
  }

  .dashboard-header .d-flex {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .dashboard-title-area h1 {
    font-size: 1.35rem;
  }

  /* Tabelas com Scroll Suave */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-radius: var(--radius-md);
  }

  .table th, .table td {
    padding: 0.65rem 0.75rem;
  }
}

/* Smartphone Portrait & Landscape (< 768px) */
@media (max-width: 767.98px) {
  /* Reseta zoom na visualização mobile para manter proporção nativa perfeita e nítida */
  html {
    zoom: 1 !important;
    -moz-transform: none !important;
  }

  /* Previne zoom automático e incômodo no iOS Safari em campos de formulário */
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  select.form-select,
  textarea.form-control,
  .form-control {
    font-size: 16px !important;
  }

  /* Espaço inferior para a barra de navegação nativa fixa (com folga confortável) */
  .content-body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* KPIs mais compactos no mobile com visual moderno */
  .kpi-card {
    padding: 0.85rem;
    border-radius: var(--radius-lg);
  }

  .kpi-value {
    font-size: 1.25rem !important;
    font-weight: 800;
  }

  .kpi-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .kpi-subtext {
    font-size: 0.70rem;
  }

  /* Quick Action Cards */
  .quick-action-card {
    padding: 0.85rem 0.75rem;
  }

  .quick-action-title {
    font-size: 0.82rem;
  }

  .quick-action-desc {
    font-size: 0.7rem;
  }

  /* Gráficos Responsivos */
  .chart-canvas-container {
    height: 220px !important;
  }

  /* Ajustes do FullCalendar em Mobile */
  .fc-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.6rem;
  }

  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .fc-toolbar-chunk:nth-child(2) {
    order: -1; /* Título no topo */
  }

  .fc-toolbar-title {
    font-size: 1.15rem !important;
    text-align: center;
  }

  .fc-button {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
  }

  /* Ações em 3 Pontinhos Dropdown */
  .dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
  }

  /* Modais no Mobile */
  .modal-dialog {
    margin: 0.75rem;
  }

  .modal-content {
    border-radius: var(--radius-lg) !important;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer > * {
    width: 100%;
    margin: 0.25rem 0 !important;
    text-align: center;
    justify-content: center;
  }

  /* Cards de Seleção de Serviços */
  .mode-selector-container {
    flex-direction: column !important;
    gap: 0.75rem;
  }

  .mode-selector-card {
    width: 100% !important;
  }

  /* Pílulas de Duração */
  .duration-pills-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .duration-pill-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* Telas Pequenas (< 576px) */
@media (max-width: 575.98px) {
  .topbar {
    padding: 0.45rem 0.65rem;
  }

  .topbar-right {
    gap: 0.45rem !important;
  }

  .tenant-switcher-btn {
    padding: 0.35rem 0.65rem;
  }

  .tenant-switcher-text {
    max-width: 125px !important;
    font-size: 0.80rem;
  }

  .topbar-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.80rem;
  }

  /* Card de Tabela e Filtros */
  .card-header {
    padding: 0.85rem 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Botões de Ação de Formulário empilhados confortavelmente */
  .form-actions-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-actions-bar .btn {
    width: 100%;
  }

  /* Grade de Quick Actions em 2 colunas */
  .quick-actions-grid > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ========================================================
   7. GATEWAYS & APIS OFFICIAL BRAND LOGOS
   ======================================================== */
.gateway-official-logo {
  display: inline-block;
  vertical-align: middle;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.gateway-nav-list .list-group-item:hover .gateway-official-logo {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ========================================================
   8. MOBILE NATIVE APP BAR & SHORTCUTS (iOS & Android)
   ======================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1045;
  box-shadow: 0 -4px 20px rgba(16, 24, 40, 0.06);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748B;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 10px;
  transition: all 0.15s ease;
  position: relative;
  min-width: 54px;
}

.mobile-nav-item .mobile-nav-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item.active .mobile-nav-icon {
  stroke-width: 2.2px;
  transform: translateY(-1px);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0px;
  width: 16px;
  height: 3px;
  background: var(--primary);
  border-radius: 4px;
}

/* Floating Action Button (FAB) Central */
.mobile-nav-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: -22px;
  position: relative;
  transition: transform 0.15s ease;
}

.mobile-nav-fab:active {
  transform: scale(0.92);
}

.mobile-nav-fab .fab-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7928CA 0%, #9333EA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(121, 40, 202, 0.38), 0 0 0 4px #FFFFFF;
  margin-bottom: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-nav-fab .fab-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.5px;
}

/* Mobile Quick Actions Native Carousel */
.quick-actions-mobile-scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px 2px;
}

.quick-actions-mobile-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-app-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 0.55rem;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  min-width: 96px;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.mobile-app-shortcut:active {
  transform: scale(0.95);
  background-color: var(--surface-alt);
}

.shortcut-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.shortcut-icon-circle svg,
.shortcut-icon-circle [data-lucide] {
  width: 20px;
  height: 20px;
}

.shortcut-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.25;
  white-space: normal;
  display: block;
}

/* ==========================================================================
   MOBILE HERO BANNER & FLUID ANIMATIONS
   ========================================================================== */

@keyframes bannerGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatGlowOrb {
  0% { transform: translateY(0px) scale(1); opacity: 0.5; }
  50% { transform: translateY(-10px) scale(1.15); opacity: 0.8; }
  100% { transform: translateY(0px) scale(1); opacity: 0.5; }
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@keyframes fadeInUpSmooth {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-fade-up {
  animation: fadeInUpSmooth 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.mobile-hero-banner {
  background: #1E1035;
  border-radius: 24px;
  padding: 1.25rem 1.15rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 34px -6px rgba(121, 40, 202, 0.4), 0 6px 14px -4px rgba(121, 40, 202, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-bg-layer {
  position: absolute;
  inset: -14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease-out;
  will-change: transform, opacity;
  animation: heroKenBurns 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroKenBurns {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.08) translate(-1%, -1%); }
  100% { transform: scale(1.03) translate(1%, 0.5%); }
}

.hero-overlay-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 10, 45, 0.60) 0%, rgba(121, 40, 202, 0.38) 55%, rgba(217, 70, 239, 0.34) 100%);
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  pointer-events: none;
  z-index: 1;
}

.hero-theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  padding: 0;
}
.hero-theme-toggle-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.38);
}

.hero-theme-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(15, 10, 30, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-top: 10px;
  z-index: 3;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-thumb {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}
.theme-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.theme-thumb:active {
  transform: scale(0.95);
}
.theme-thumb.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: scale(1.06);
}

.hero-glow-orb-1 {
  position: absolute;
  top: -35px;
  right: -25px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.5) 0%, rgba(244, 114, 182, 0) 70%);
  border-radius: 50%;
  filter: blur(25px);
  animation: floatGlowOrb 6s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-glow-orb-2 {
  position: absolute;
  bottom: -45px;
  left: -25px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(56, 189, 248, 0) 70%);
  border-radius: 50%;
  filter: blur(25px);
  animation: floatGlowOrb 7s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0.5rem;
}

.hero-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: pulseLiveDot 2s infinite;
}

.hero-user-greeting {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.2;
}

.hero-meta-text {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  line-height: 1.3;
}

.hero-bio-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.hero-bio-link-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}

.hero-bio-link-btn .hero-bio-icon {
  width: 14px;
  height: 14px;
  color: #FDE047;
}

.hero-glass-pill {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF !important;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-glass-pill:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.28);
}

.hero-glass-pill .pill-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
}

/* Touch feedback and spring dynamics on mobile KPI cards */
@media (max-width: 767.98px) {
  .kpi-card {
    padding: 0.85rem 0.85rem;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
  }
  .kpi-card:active {
    transform: scale(0.96);
  }
  .kpi-card .kpi-label {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748B;
  }
  .kpi-card .kpi-value {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 2px;
  }
  .kpi-card .kpi-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .kpi-card .kpi-icon-wrapper svg {
    width: 16px;
    height: 16px;
  }
}

/* ==========================================================================
   PERFORMANCE CHART CONTROLS & SWITCHER
   ========================================================================== */

.chart-view-switcher {
  background: #F1F5F9;
  padding: 3px;
  border-radius: 10px;
  display: inline-flex;
}

.chart-view-switcher .btn {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 8px !important;
  border: none;
  color: #64748B;
  background: transparent;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: none;
}

.chart-view-switcher .btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
}

.chart-view-switcher .btn.active {
  background: #FFFFFF !important;
  color: var(--primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.chart-view-switcher .btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   MOBILE BOOKINGS & TRANSACTION FEED CARDS (Clean UX Pattern)
   ========================================================================== */

.appointment-ux-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background-color 0.15s ease;
}

.appointment-ux-card:active {
  transform: scale(0.985);
  background-color: #FAF5FF !important;
}

.appointment-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(121, 40, 202, 0.08);
  border: 1px solid rgba(121, 40, 202, 0.2);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.appointment-date-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.btn-icon-whatsapp {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #15803D !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-icon-whatsapp:hover,
.btn-icon-whatsapp:active {
  background: #25D366;
  color: #FFFFFF !important;
  border-color: #25D366;
  transform: scale(1.08);
}

.btn-icon-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-icon-more:hover,
.btn-icon-more:active {
  background: #7928CA;
  color: #FFFFFF !important;
  border-color: #7928CA;
  transform: scale(1.08);
}

.mobile-booking-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background-color 0.15s ease;
}

.mobile-booking-card:active {
  transform: scale(0.99);
  background-color: #FAFAFA !important;
}

.booking-cust-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F3E8FF 0%, #EDE9FE 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid rgba(121, 40, 202, 0.2);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.live-dot-green {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  margin-right: 3px;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.booking-date-badge {
  background: linear-gradient(135deg, rgba(121, 40, 202, 0.08) 0%, rgba(147, 51, 234, 0.14) 100%);
  border: 1px solid rgba(121, 40, 202, 0.2);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  flex-shrink: 0;
}

.booking-date-badge .date-day {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.booking-date-badge .date-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748B;
  font-family: var(--font-mono);
}

.mobile-tx-card {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease;
}

.mobile-tx-card:active {
  transform: scale(0.97);
  background-color: var(--surface-alt) !important;
}

.tx-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.tx-icon-circle svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2px;
}

.bg-teal-subtle {
  background-color: rgba(20, 184, 166, 0.12) !important;
}

.text-teal {
  color: #0d9488 !important;
}

/* ==========================================================================
   ENHANCED CARD ACTION BUTTONS & PILLS
   ========================================================================== */

.btn-card-action {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1.2;
}

.btn-card-action:hover {
  background: #FFFFFF;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(121, 40, 202, 0.15);
}

.btn-card-action:active {
  transform: scale(0.95);
}

.btn-card-action-success {
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.09) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
}

.btn-card-action-success:hover {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3) !important;
}

.btn-card-action-primary {
  color: var(--primary) !important;
  background: rgba(121, 40, 202, 0.09) !important;
  border-color: rgba(121, 40, 202, 0.28) !important;
}

.btn-card-action-primary:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(121, 40, 202, 0.3) !important;
}

.btn-card-action-primary-solid {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #7928CA 0%, #9333EA 100%) !important;
  border: 1px solid rgba(121, 40, 202, 0.45) !important;
  box-shadow: 0 2px 8px rgba(121, 40, 202, 0.28) !important;
}

.btn-card-action-primary-solid:hover {
  background: linear-gradient(135deg, #6B21A8 0%, #7E22CE 100%) !important;
  border-color: #6B21A8 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(121, 40, 202, 0.4) !important;
  transform: translateY(-1px);
}

.btn-card-action-primary-solid:active {
  transform: scale(0.95);
}

.btn-whatsapp-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #15803D !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap !important;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 2px rgba(37, 211, 102, 0.08);
}

.btn-whatsapp-pill:hover {
  background: #25D366;
  border-color: #25D366;
  color: #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
  transform: translateY(-1px);
}

.btn-whatsapp-pill:active {
  transform: scale(0.95);
}

.btn-action-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.btn-action-circle:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-subtle);
  color: var(--primary);
  transform: scale(1.06);
}

.btn-action-circle:active {
  transform: scale(0.93);
}


/* ==========================================================================
   KPI MOBILE FLUID SLIDES (MODERN SWIPE CAROUSEL)
   ========================================================================== */
.kpi-mobile-slider-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.kpi-mobile-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 6px 1rem 12px 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  scrollbar-width: none;
}

.kpi-mobile-slider::-webkit-scrollbar {
  display: none;
}

.kpi-slide-card {
  flex: 0 0 78%;
  max-width: 310px;
  scroll-snap-align: start;
  border-radius: 20px;
  padding: 1.2rem 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  background: #FFFFFF;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  animation: kpiSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kpi-slide-card:active {
  transform: scale(0.97);
}

@keyframes kpiSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.kpi-slide-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-slide-card:nth-child(2) { animation-delay: 0.12s; }
.kpi-slide-card:nth-child(3) { animation-delay: 0.19s; }
.kpi-slide-card:nth-child(4) { animation-delay: 0.26s; }

/* Themed Variant 1: Faturamento (Alto Contraste Esmeralda) */
.kpi-slide-revenue, .kpi-card-revenue {
  background: #FFFFFF;
  border: 1.5px solid #A7F3D0 !important;
  border-left: 5px solid #059669 !important;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.08);
}
.kpi-slide-revenue .kpi-label, .kpi-card-revenue .kpi-label {
  color: #065F46 !important;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.kpi-slide-revenue .kpi-icon-badge, .kpi-card-revenue .kpi-icon-badge {
  background: #059669 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.kpi-slide-revenue .kpi-slide-chip {
  background: #ECFDF5;
  color: #065F46;
  border: 1.5px solid #A7F3D0;
  font-weight: 700;
}

/* Themed Variant 2: Hoje (Alto Contraste Roxo Real) */
.kpi-slide-today, .kpi-card-today {
  background: #FFFFFF;
  border: 1.5px solid #DDD6FE !important;
  border-left: 5px solid #7C3AED !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}
.kpi-slide-today .kpi-label, .kpi-card-today .kpi-label {
  color: #5B21B6 !important;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.kpi-slide-today .kpi-icon-badge, .kpi-card-today .kpi-icon-badge {
  background: #7C3AED !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.kpi-slide-today .kpi-slide-chip {
  background: #F5F3FF;
  color: #5B21B6;
  border: 1.5px solid #DDD6FE;
  font-weight: 700;
}

/* Themed Variant 3: Concluídos (Alto Contraste Azul Oceano) */
.kpi-slide-completed, .kpi-card-completed {
  background: #FFFFFF;
  border: 1.5px solid #BAE6FD !important;
  border-left: 5px solid #0284C7 !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}
.kpi-slide-completed .kpi-label, .kpi-card-completed .kpi-label {
  color: #075985 !important;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.kpi-slide-completed .kpi-icon-badge, .kpi-card-completed .kpi-icon-badge {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}
.kpi-slide-completed .kpi-slide-chip {
  background: #F0F9FF;
  color: #075985;
  border: 1.5px solid #BAE6FD;
  font-weight: 700;
}

/* Themed Variant 4: Clientes (Alto Contraste Pink/Rosa Vibrante) */
.kpi-slide-customers, .kpi-card-customers {
  background: #FFFFFF;
  border: 1.5px solid #FBCFE8 !important;
  border-left: 5px solid #DB2777 !important;
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.08);
}
.kpi-slide-customers .kpi-label, .kpi-card-customers .kpi-label {
  color: #9D174D !important;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.kpi-slide-customers .kpi-icon-badge, .kpi-card-customers .kpi-icon-badge {
  background: #DB2777 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.35);
}
.kpi-slide-customers .kpi-slide-chip {
  background: #FDF2F8;
  color: #9D174D;
  border: 1.5px solid #FBCFE8;
  font-weight: 700;
}

.kpi-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kpi-icon-badge svg {
  width: 18px;
  height: 18px;
}

.kpi-slide-value {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0.5rem 0;
  line-height: 1.15;
}

.kpi-slide-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  width: fit-content;
}

.kpi-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.kpi-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.kpi-dot.active {
  width: 22px;
  border-radius: 9999px;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(121, 40, 202, 0.35);
}
