/* Zanotelli - Gestão de contratos - Design System SaaS Profissional (Stripe/Linear) */

:root {
  /* Paleta – azul jurídico + neutros */
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a87;
  --color-primary-dark: #152a45;
  --color-accent: #0ea5e9;
  --color-accent-hover: #0284c7;
  --color-surface: #ffffff;
  --color-surface-elevated: #fafbfc;
  --color-surface-muted: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;

  /* Tipografia */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Espaçamento e raios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 8px 24px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08), 0 24px 64px -12px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.12);

  /* Compatibilidade com código existente */
  --accent: var(--color-accent);
  --accent-hover: var(--color-accent-hover);
  --shadow-card: var(--shadow-md);
  --shadow-card-hover: var(--shadow-lg);
  --radius-xl: var(--radius-lg);
  --radius-2xl: var(--radius-xl);
}

*
 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #e2e8f0 100%);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================
   COMPONENTES ESPECÍFICOS (não Design System)
   ============================================ */

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Sidebar colapsável: estreito por padrão, expande no hover; pin fixa expandida */
@media (min-width: 1024px) {
  #sidebar.sidebar {
    width: 72px;
  }
  #sidebar.sidebar:hover,
  #sidebar.sidebar.sidebar-pinned {
    width: 256px;
  }
  #sidebar.sidebar.sidebar-pinned .sidebar-brand-label,
  #sidebar.sidebar.sidebar-pinned .sidebar-link-label,
  #sidebar.sidebar.sidebar-pinned .sidebar-user-label {
    opacity: 1;
    width: auto;
  }
  #sidebar.sidebar.sidebar-pinned .sidebar-header .sidebar-brand-label,
  #sidebar.sidebar.sidebar-pinned .sidebar-user-label {
    display: inline;
  }
  .sidebar-main {
    margin-left: 72px;
  }
  #sidebar.sidebar.sidebar-pinned + .sidebar-main,
  #sidebar.sidebar.sidebar-pinned + [class*="sidebar-main"] {
    margin-left: 256px;
  }
  /* Expandir main quando sidebar expandida - usa sibling no flex parent */
  .sidebar-brand-label,
  .sidebar-link-label,
  .sidebar-user-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease, width 0.2s ease;
  }
  #sidebar.sidebar:hover .sidebar-brand-label,
  #sidebar.sidebar:hover .sidebar-link-label,
  #sidebar.sidebar:hover .sidebar-user-label {
    opacity: 1;
    width: auto;
  }
  #sidebar.sidebar:hover .sidebar-brand-label,
  #sidebar.sidebar:hover .sidebar-user-label {
    display: inline;
  }
  #sidebar.sidebar:not(:hover) .sidebar-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #sidebar.sidebar:not(:hover) .sidebar-header a {
    justify-content: center;
  }
  #sidebar.sidebar:not(:hover) .sidebar-header {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #sidebar.sidebar:not(:hover) .sidebar-header .sidebar-brand-label {
    display: none;
  }
  #sidebar.sidebar:not(:hover) .sidebar-user-label {
    display: none;
  }
  #sidebar.sidebar:not(:hover) .sidebar-user-box {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Mobile: manter comportamento de toggle */
aside {
  transition: transform 0.2s ease, width 0.3s ease;
}

@media (max-width: 1023px) {
  #sidebar.sidebar {
    width: 256px;
  }
  .sidebar-brand-label,
  .sidebar-link-label,
  .sidebar-user-label {
    opacity: 1;
    width: auto;
  }
  aside.sidebar-open {
    transform: translateX(0);
  }
  .sidebar-main {
    margin-left: 0;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  opacity: 0.6;
  line-height: 1;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  max-width: 280px;
  margin: 0 auto;
}

.empty-state-cta {
  margin-top: 1.5rem;
}

.badge-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
