/* 
   API iau2 Premium Light Design System v2.0.0
   Author: © Automações Comerciais Integradas! 2026 ⚙️ 
   License: Todos os direitos reservados. contato@automacoescomerciais.com.br
*/

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

:root {
  /* Tokens de Cor - Light Theme */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --surface-alt: #f3f4f6;
  --bg-gradient: linear-gradient(180deg, #f8fafc, #ffffff);
  --border-color: #e5e7eb;
  --text-color: #111827;
  --text-secondary: #6b7280;
  --text-disabled: #9ca3af;
  --primary-color: #25d366;
  --primary-strong: #059669;
  --primary-glow: rgba(37, 211, 102, 0.15);
  --primary-contrast: #ffffff;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Status compatibility */
  --success-color: #10b981;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-text: #ef4444;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-display: "Outfit", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  
  --size-h1: 2.5rem;
  --size-body: 0.925rem;
  --size-label: 0.775rem;
  --size-code: 0.85rem;
  
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* Spacing */
  --space-unit: 8px;
  --container-margin: 24px;
  --card-padding: 24px;

  /* Components & Effects */
  --radius: 1rem;
  --radius-btn: 0.95rem;
  --radius-card: calc(var(--radius) * 1.1);
  --shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
  --shadow-card: var(--shadow);
  --blur-value: 12px;
}

/* Reset / Core Styles */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.6;
}

body[data-theme="light"] {
  background: var(--bg-color);
  color: var(--text-color);
}

/* Glassmorphism Panel Core - Adaptada para Light Theme */
.glass-panel {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--blur-value));
  -webkit-backdrop-filter: blur(var(--blur-value));
  box-shadow: var(--shadow);
  border-radius: var(--radius-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: rgba(37, 211, 102, 0.3);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

/* UI Elements */
.card, .panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--card-padding);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: rgba(37, 211, 102, 0.2);
  transform: translateY(-2px);
}

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

.card-body {
  padding-top: 1.5rem;
}

.section-title {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-btn);
  font-size: var(--size-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 1px solid transparent;
  text-decoration: none;
  user-select: none;
}

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

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 35px rgba(37, 211, 102, 0.24);
}

.btn-outline, .btn-light {
  background: transparent;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-outline:hover, .btn-light:hover {
  background: rgba(37, 211, 102, 0.08);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Variações de tamanho / largura de botão */
.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-lg {
  padding: 1.1rem 1.8rem;
  font-size: 1rem;
}

/* Form Controls */
.form-control, .form-select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-color);
  background: var(--surface-alt);
  color: var(--text-color);
  font-size: var(--size-body);
  transition: all 0.25s ease;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12) !important;
  background-color: var(--card-bg) !important;
}

.form-control::placeholder {
  color: var(--text-secondary) !important;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-color);
}

.table th,
.table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
}

.table thead {
  background: var(--surface-alt);
}

.table-hover tbody tr:hover {
  background: rgba(37, 211, 102, 0.06);
}

/* Typography & Headings */
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--size-h1);
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-color);
}

.text-muted {
  color: var(--text-secondary) !important;
}

.small {
  font-size: var(--size-label);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--size-code);
  background-color: var(--surface-alt);
  border-radius: 6px;
  color: var(--text-color);
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-error {
  background: rgba(239, 68, 68, 0.12);
  color: #9f1239;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 16px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pill.success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.status-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.status-pill.error {
  background: rgba(239, 68, 68, 0.12);
  color: #9f1239;
}

/* Modals */
.modal-content {
  background: var(--card-bg);
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 35px 60px rgba(15, 23, 42, 0.18);
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
}

/* ----------------------------------------------------
   ParallaxHero Component - Cinema-grade Implementation (Light Style)
   ---------------------------------------------------- */
.parallax-hero-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Multi-frame stage */
.parallax-hero-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.parallax-hero-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  background-size: cover;
  background-position: center;
  filter: saturate(1.02) contrast(1.05);
  transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.parallax-hero-frame.active {
  opacity: 1;
  transform: scale(1.01);
  z-index: 2;
}

.parallax-hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.3) 0%, rgba(248, 250, 252, 0.85) 100%);
  z-index: 3;
}

/* Atmospheric / Ambient Light */
.parallax-hero-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 35% at 20% 25%, rgba(37, 211, 102, 0.12), transparent 75%),
              radial-gradient(40% 40% at 80% 30%, rgba(6, 182, 212, 0.1), transparent 75%);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 4;
}

/* Content Blocks */
.parallax-hero-content {
  position: relative;
  z-index: 5;
  width: min(840px, 92%);
  margin: 0 auto;
  padding: 3rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
  align-items: center;
}

.parallax-hero-intro {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary-strong);
}

.parallax-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.05;
  font-weight: 900;
  color: var(--text-color);
  letter-spacing: -0.03em;
  white-space: pre-line;
}

.parallax-hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 60ch;
}

.parallax-hero-logo {
  max-height: 50px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.parallax-hero-progress {
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: var(--surface-alt);
  overflow: hidden;
  margin-top: 1rem;
}

.parallax-hero-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent));
  transition: width 0.1s ease;
}

/* Responsividade do ParallaxHero */
@media (max-width: 768px) {
  .parallax-hero-content {
    padding: 2rem 1.5rem;
    border-radius: 16px;
    gap: 1rem;
  }
}

/* ====================================================
   Media Queries & Responsividade Global (Mobile-First)
   ==================================================== */

/* Mobile (320px – 767px) */
@media (max-width: 767px) {
  :root {
    --container-margin: 12px;
    --card-padding: 16px;
  }

  html, body {
    font-size: 14px;
    min-height: 100dvh;
  }

  /* Botão com área de toque mínima de 44px e sem estouro de texto.
     (largura total agora é opt-in via .btn-block, para não quebrar grupos
     de botões lado a lado.) */
  .btn {
    min-height: 44px;
    padding: 0.85rem 1.25rem;
    justify-content: center;
    font-size: 0.9rem;
    white-space: normal; /* Evita estouro de texto */
    text-align: center;
  }

  .card, .panel {
    border-radius: var(--radius);
    padding: var(--card-padding);
  }

  .manager-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    position: fixed;
    height: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-right: none;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }

  .manager-shell {
    flex-direction: column-reverse; /* Barra de navegação inferior no mobile */
    min-height: 100dvh;
  }

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

  .sidebar-menu {
    flex-direction: row !important;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 12px;
    white-space: nowrap;
  }

  .sidebar-menu .nav-item {
    padding: 8px 12px;
    font-size: 0.775rem;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }

  .sidebar-menu .nav-item i {
    font-size: 1.15rem;
  }

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

/* Tablet (768px – 1279px) */
@media (min-width: 768px) and (max-width: 1279px) {
  :root {
    --container-margin: 20px;
    --card-padding: 20px;
  }

  .manager-sidebar {
    width: 220px;
    min-width: 220px;
  }

  .sidebar-brand {
    padding: 18px;
    font-size: 1.1rem;
  }

  .sidebar-menu .nav-item {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-height: 44px;
  }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
  :root {
    --container-margin: 24px;
    --card-padding: 24px;
  }
}

/* Viewport Altura Reduzida (Notebooks / Telas Curtas de 768px a 900px) */
@media (max-height: 900px) {
  .parallax-hero-container {
    min-height: 100dvh;
  }
  
  .parallax-hero-content {
    padding: 2rem;
    gap: 0.9rem;
    max-height: 85dvh;
    overflow-y: auto;
  }

  .sidebar-brand {
    padding: 14px 20px;
  }

  .sidebar-menu {
    padding: 10px 8px;
  }

  .sidebar-menu .nav-item {
    padding: 8px 12px;
  }
}

/* ====================================================
   Utilitários responsivos & salvaguardas globais
   ==================================================== */

/* Evita que mídia/embeds estourem o container no mobile */
img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Container centralizado e responsivo */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--container-margin, 24px);
}

/* Grade fluida (colapsa para 1 coluna no mobile) */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* Ritmo vertical de seções */
.section {
  padding-block: 2rem;
}

/* Formulários: espaçamento consistente */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--size-label);
  font-weight: 600;
  color: var(--text-secondary);
}

/* Tabelas com rolagem horizontal no mobile (sem quebrar o layout) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Foco visível para navegação por teclado (acessibilidade) */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
