*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
}

.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-primary { background-color: hsl(var(--primary)); }
.text-foreground { color: hsl(var(--foreground)); }
.text-card-foreground { color: hsl(var(--card-foreground)); }
.text-on-primary { color: hsl(var(--on-primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-warning { color: hsl(var(--warning)); }
.border-border { border: 1px solid hsl(var(--border)); }
.border-input { border: 1px solid hsl(var(--input)); }

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.h-9 { height: 2.25rem; }
.p-6 { padding: 1.5rem; }
.pt-0 { padding-top: 0; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.leading-none { line-height: 1; }
.tracking-tight { letter-spacing: -0.025em; }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-xl { border-radius: 0.75rem; }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }

.ui-card {
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.ui-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.ui-card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.ui-card-content--padded {
  padding-top: 1.5rem;
}

.ui-input {
  display: flex;
  width: 100%;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.ui-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.ui-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px hsl(var(--ring));
}

.ui-input:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background-color: hsl(var(--sidebar-accent));
}

.ui-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.ui-input-icon {
  position: absolute;
  left: 0.75rem;
  z-index: 1;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

.ui-input--with-icon {
  padding-left: 2.25rem;
}

.ui-input--with-icon:focus-visible {
  background-color: hsl(var(--sidebar-accent));
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background-color: hsl(var(--primary));
  color: hsl(var(--on-primary));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.ui-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ui-button--inline {
  width: auto;
  padding: 0 1rem;
}

.ui-button-icon {
  font-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}

.ui-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.ui-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ui-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: hsl(var(--primary));
}

.ui-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid hsl(var(--primary));
  border-top-color: transparent;
  border-radius: 9999px;
  animation: ui-spin 0.8s linear infinite;
}

@keyframes ui-spin {
  to { transform: rotate(360deg); }
}

.auth-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--background));
}

.bg-sidebar { background-color: hsl(var(--sidebar-background)); }
.text-sidebar-foreground { color: hsl(var(--sidebar-foreground)); }
.border-sidebar { border-color: hsl(var(--sidebar-border)); }

.app-shell {
  display: flex;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background-color: hsl(var(--background));
}

.app-sidebar {
  width: 16rem;
  height: 100%;
  flex-shrink: 0;
  background-color: hsl(var(--sidebar-background));
  color: hsl(var(--sidebar-foreground));
  border-right: 1px solid hsl(var(--sidebar-border));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease-linear;
}

.app-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 4rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
}

.app-sidebar-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.app-sidebar-brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--sidebar-foreground));
}

.app-sidebar-nav {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.app-nav-group:not(:has(.app-nav-link)) {
  display: none;
}

.app-nav-group-label {
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--sidebar-foreground) / 0.55);
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  border-left: 2px solid transparent;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-nav-link:hover {
  background-color: hsl(var(--sidebar-accent) / 0.6);
  color: hsl(var(--sidebar-foreground));
}

.app-nav-link.active {
  background-color: hsl(var(--sidebar-accent));
  border-left-color: hsl(var(--primary));
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 500;
}

.sales-bi-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.sales-bi-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  border: 1px solid hsl(var(--border));
}

.sales-bi-nav-link:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent) / 0.5);
}

.sales-bi-nav-link.active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
  border-color: hsl(var(--border));
}

.sales-bi-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sales-bi-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: 1px solid hsl(var(--border));
  cursor: pointer;
}

.sales-bi-tab:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent) / 0.5);
}

.sales-bi-tab--active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
  border-color: hsl(var(--border));
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.app-header {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  flex-shrink: 0;
}

.app-header-start,
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header-expert-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.app-header-expert-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

.app-header-expert-select {
  max-width: 16rem;
  width: 100%;
  min-width: 8rem;
}

.app-header-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.app-header-brand {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.app-header-profile,
.app-header-logout {
  width: auto;
  gap: 0.5rem;
}

.app-header-profile-label {
  display: none;
}

.app-header-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.app-header-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  font-size: 0.65rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .app-header-profile-label {
    display: inline;
  }
}

@media (min-width: 768px) {
  .app-header {
    padding: 0 2rem;
  }

  .app-header-mobile-brand {
    display: none;
  }
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .app-content {
    padding: 2rem;
  }
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.dashboard-filter-button {
  width: auto;
  padding: 0 1rem;
}

.ui-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.ui-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.ui-pagination-button {
  width: auto;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.ui-pagination-label {
  min-width: 7rem;
  text-align: center;
}

.ui-pagination-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ui-pagination-page-size-select {
  width: auto;
  min-width: 4.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dashboard-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.calendar-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calendar-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.calendar-summary-metric-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.calendar-summary-metric-value {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.calendar-summary-metric-value--ok {
  color: hsl(var(--primary));
}

.calendar-summary-metric-value--warn {
  color: hsl(var(--warning));
}

.dashboard-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: border-color 0.15s ease;
}

.dashboard-kpi-card:hover {
  border-color: hsl(var(--sidebar-accent));
}

.dashboard-kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dashboard-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.dashboard-kpi-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  color: hsl(var(--primary));
}

.dashboard-kpi-body {
  margin-top: 0.75rem;
}

.dashboard-kpi-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi-value--success {
  color: hsl(var(--success));
}

.dashboard-kpi-value--primary {
  color: hsl(var(--primary));
}

.dashboard-kpi-value--warning {
  color: hsl(var(--warning));
}

.dashboard-kpi-value--destructive {
  color: hsl(var(--destructive));
}

.dashboard-kpi-subtitle {
  margin: 0.375rem 0 0;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.dashboard-stat-card {
  height: 100%;
}

.dashboard-stat-label {
  margin: 0;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.dashboard-stat-value {
  margin: 0.35rem 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .dashboard-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-page {
  max-width: 90rem;
  margin: 0 auto;
  width: 100%;
}

.dashboard-page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.dashboard-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.dashboard-page-subtitle strong {
  color: hsl(var(--foreground));
  font-weight: 500;
}

.dashboard-filter-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.dashboard-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 10rem;
  max-width: 18rem;
}

.dashboard-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.dashboard-filter-label-icon {
  color: hsl(var(--muted-foreground));
}

.dashboard-filter-input {
  color-scheme: dark;
}

.dashboard-filter-button {
  width: auto;
  padding: 0 1rem;
  gap: 0.5rem;
}

.dashboard-filter-error {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: hsl(var(--destructive));
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-chart-card,
.dashboard-products-card,
.dashboard-performance-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.dashboard-chart-card-header,
.dashboard-products-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-products-header {
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.dashboard-chart-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.dashboard-chart-description {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.dashboard-chart-summary {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--primary));
  white-space: nowrap;
}

.dashboard-performance-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--sidebar-accent) / 0.35));
}

.dashboard-performance-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.dashboard-performance-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.dashboard-performance-metric-label {
  display: block;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.dashboard-performance-metric-value {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.dashboard-products-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

.dashboard-products-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dashboard-products-link {
  width: auto;
  gap: 0.5rem;
  text-decoration: none;
}

.dashboard-products-footnote {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.line-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.line-chart-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.line-chart-empty {
  margin: 0;
  min-height: 8rem;
  display: flex;
  align-items: center;
}

.line-chart-svg {
  width: 100%;
  height: 10rem;
  display: block;
}

.line-chart-grid {
  stroke: hsl(var(--border));
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.line-chart-grid--dashed {
  stroke-dasharray: 3 3;
}

.line-chart-area {
  fill: hsl(var(--primary) / 0.12);
  stroke: none;
}

.line-chart-line {
  fill: none;
  stroke: hsl(var(--primary));
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.line-chart-dot {
  fill: hsl(var(--primary));
  stroke: hsl(var(--card));
  stroke-width: 2;
}

.line-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.pie-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pie-chart-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.pie-chart-empty {
  margin: 0;
  min-height: 6rem;
  display: flex;
  align-items: center;
}

.pie-chart-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.pie-chart-svg {
  width: 11rem;
  height: 11rem;
  flex-shrink: 0;
}

.pie-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 10rem;
}

.pie-chart-legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
}

.pie-chart-legend-swatch {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  display: inline-block;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-list-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.bar-list-empty {
  margin: 0;
  min-height: 4rem;
  display: flex;
  align-items: center;
}

.bar-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.bar-list-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-list-track {
  height: 0.5rem;
  border-radius: 999px;
  background: hsl(var(--muted));
  overflow: hidden;
}

.bar-list-fill {
  height: 100%;
  border-radius: 999px;
  background: hsl(var(--primary));
}

.bar-list-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  min-width: 1.5rem;
  text-align: right;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem 1.5rem;
}

.detail-grid dt {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.detail-grid dd {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.profile-page {
  max-width: 42rem;
  width: 100%;
}

.profile-page-header {
  display: flex;
  flex-direction: column;
}

.profile-page-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: hsl(var(--primary));
}

.profile-page-eyebrow-icon {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
}

.profile-page-eyebrow-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.profile-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.profile-page-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-page--wide {
  max-width: none;
}

.profile-page-tabs {
  margin-bottom: 0.25rem;
}

.profile-sales-tab {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-sales-role-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-sales-role-title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.profile-sales-kpis {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.profile-card-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

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

.profile-card-header .profile-card-title {
  margin-bottom: 0;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .profile-avatar-section {
    flex-direction: row;
    align-items: center;
  }
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  object-fit: cover;
  background-color: hsl(var(--muted));
}

.profile-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  user-select: none;
}

.profile-avatar-badge {
  position: absolute;
  right: -0.25rem;
  bottom: -0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background-color: hsl(var(--sidebar-accent));
}

.profile-avatar-badge .material-symbols-outlined {
  font-size: 0.875rem;
  width: 0.875rem;
  height: 0.875rem;
  color: hsl(var(--primary));
}

.profile-avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.profile-file-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .profile-file-input-row {
    flex-direction: row;
    align-items: center;
  }
}

.profile-file-input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.profile-file-input-button:hover {
  background-color: hsl(var(--accent));
}

.profile-file-input-button .material-symbols-outlined {
  font-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}

.profile-file-input-hidden {
  display: none;
}

.profile-file-input-label {
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12.5rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.profile-field-helper {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

.profile-form-actions {
  padding-top: 0.5rem;
}

.profile-info-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

.profile-info-hint .material-symbols-outlined {
  font-size: 0.875rem;
  width: 0.875rem;
  height: 0.875rem;
}

.profile-feedback-success {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1rem;
  color: #16a34a;
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--sidebar-accent));
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

.profile-status-badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: hsl(var(--warning));
}

.profile-status-badge--linked .profile-status-badge-dot {
  background-color: hsl(var(--primary));
}

.profile-telegram-instructions code {
  padding: 0.125rem 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--foreground));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}

.profile-token-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: calc(var(--radius));
  background-color: hsl(var(--sidebar-accent));
}

.profile-token-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-token-box-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.profile-token-box-expiry {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: hsl(var(--primary));
}

.profile-token-box-expiry .material-symbols-outlined {
  font-size: 0.875rem;
  width: 0.875rem;
  height: 0.875rem;
}

.profile-token-box-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background));
}

.profile-token-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-token-copy {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.75rem;
  color: hsl(var(--primary));
  cursor: pointer;
}

.profile-token-copy:hover {
  text-decoration: underline;
}

.profile-telegram-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.profile-link-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.profile-link-ghost:hover {
  background-color: hsl(var(--accent) / 0.4);
}

.profile-link-ghost .material-symbols-outlined {
  font-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}

.short-links-page-header {
  display: flex;
  flex-direction: column;
}

.short-links-page-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
  color: hsl(var(--primary));
}

.short-links-page-eyebrow-icon {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
}

.short-links-page-eyebrow-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.short-links-page-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
}

.short-links-page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.short-links-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .short-links-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.short-links-empty {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.short-links-empty-icon {
  font-size: 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  color: hsl(var(--muted-foreground));
}

.short-links-empty-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.short-links-table-card {
  padding: 1.5rem;
}

.short-links-table th:last-child,
.short-links-table td.short-links-table-actions {
  text-align: right;
  white-space: nowrap;
}

.short-links-url {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.short-links-url:hover {
  text-decoration: underline;
}

.short-links-muted {
  color: hsl(var(--muted-foreground));
}

.short-links-destination {
  max-width: 16rem;
}

.short-links-destination-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.short-links-copy-button {
  gap: 0.5rem;
}

.short-links-copy-icon {
  color: hsl(var(--muted-foreground));
}

.short-links-copy-icon--copied {
  color: hsl(var(--primary));
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 40;
}

.sidebar-overlay.open {
  display: block;
}

.ui-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.ui-button-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ui-table-wrap {
  overflow-x: auto;
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ui-table th,
.ui-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
}

.ui-table th {
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.ui-table tbody tr:hover {
  background-color: hsl(var(--muted) / 0.3);
}

@media (max-width: 767px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: 18rem;
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-trigger {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .sidebar-trigger {
    display: none;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

.weekly-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.weekly-view-tab {
  padding: 0.375rem 0.875rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.weekly-view-tab--active {
  background: hsl(var(--primary));
  color: hsl(var(--on-primary));
  border-color: hsl(var(--primary));
}

.weekly-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .weekly-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .weekly-board {
    grid-template-columns: 1fr;
  }
}

.weekly-board-day {
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--card));
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.weekly-board-day-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.weekly-board-day-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.weekly-entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background));
  color: hsl(var(--card-foreground));
}

.weekly-entry-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.weekly-entry-card-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: hsl(var(--foreground));
}

.weekly-entry-card-expert {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

.weekly-entry-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.weekly-entry-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1rem;
  white-space: nowrap;
}

.weekly-entry-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

.weekly-entry-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.weekly-entry-status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1rem;
  white-space: nowrap;
}

.weekly-entry-status--pendente {
  background-color: hsl(var(--warning) / 0.16);
  color: hsl(var(--warning));
}

.weekly-entry-status--planejado {
  background-color: hsl(var(--secondary) / 0.16);
  color: hsl(var(--secondary));
}

.weekly-entry-status--andamento {
  background-color: hsl(var(--primary) / 0.18);
  color: hsl(81 66% 35%);
}

.dark .weekly-entry-status--andamento {
  color: hsl(var(--primary));
}

.weekly-entry-status--concluido {
  background-color: rgb(22 163 74 / 0.16);
  color: #16a34a;
}

.weekly-entry-status--cancelado {
  background-color: hsl(var(--destructive) / 0.16);
  color: hsl(var(--destructive));
}

.weekly-entry-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  padding-top: 0.25rem;
  border-top: 1px solid hsl(var(--border) / 0.7);
}

.weekly-entry-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.75rem;
  padding: 0 0.5rem;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.weekly-entry-action:hover {
  background-color: hsl(var(--muted));
}

.weekly-entry-action--primary {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(81 66% 35%);
}

.dark .weekly-entry-action--primary {
  color: hsl(var(--primary));
}

.weekly-entry-action--danger {
  border-color: hsl(var(--destructive) / 0.35);
  color: hsl(var(--destructive));
}

.weekly-add-btn {
  border: 1px dashed hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  padding: 0.375rem;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}

.weekly-add-btn:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary));
  background-color: hsl(var(--muted) / 0.4);
}

.weekly-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.weekly-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.weekly-timeline-time {
  min-width: 3.5rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  padding-top: 0.5rem;
}

.ui-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background: rgb(0 0 0 / 0.5);
}

.ui-modal {
  width: 100%;
  max-width: 36rem;
  max-height: min(90vh, calc(100vh - 2rem));
  overflow-y: auto;
}

.ui-modal-card {
  margin: 0;
}

.ui-modal-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0;
}

.ui-modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.ui-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
}

.ui-modal-close:hover:not(:disabled) {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.ui-modal-close:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ui-modal-content {
  padding-top: 1rem;
}

@media (max-width: 640px) {
  .ui-modal-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .ui-modal {
    max-width: none;
    max-height: 92vh;
  }
}

.weekly-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.weekly-form-full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .weekly-form-grid {
    grid-template-columns: 1fr;
  }
}

.leaders-ritmo-bar {
  width: 100%;
}

.leaders-ritmo-track {
  position: relative;
  height: 0.75rem;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  overflow: hidden;
}

.leaders-ritmo-fill {
  height: 100%;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  transition: width 0.3s ease;
}

.leaders-ritmo-marker {
  position: absolute;
  top: -0.125rem;
  bottom: -0.125rem;
  width: 2px;
  margin-left: -1px;
  background-color: hsl(var(--foreground));
  opacity: 0.55;
  pointer-events: none;
}
