/* ==========================================================================
   TLX Soluções em Tecnologia • Design System Completo
   Suporte Unificado para Portal (index.html) e Login (login.html)
   ========================================================================== */

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

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand TLX Soluções */
  --tlx-orange: #D3661C;
  --tlx-orange-hover: #BF5714;
  --tlx-orange-light: #FFEDD5;
  --tlx-green: #0A6638;
  --tlx-green-hover: #074E2A;
  --tlx-green-emerald: #059669;
  --tlx-blue: #1A71B7;
  --tlx-dark: #0A0E17;
  --tlx-navy: #0F172A;

  /* Institutional Government Palette (login.html) */
  --gov-primary: #0A5C36;
  --gov-primary-hover: #084C2C;
  --gov-primary-active: #063C22;
  --gov-accent: #D97706;
  --gov-emerald: #059669;

  /* Light Theme Variables */
  --bg-page: #F1F5F9;
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F1F5F9;
  --bg-card: #FFFFFF;
  --border-card: #E2E8F0;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;
  --text-main: #0F172A;
  --text-title: #0F172A;
  --text-body: #334155;
  --text-muted: #475569;
  --text-subtle: #94A3B8;
  --input-bg: #F8FAFC;
  --input-border: #CBD5E1;
  --input-focus: #0A5C36;
  --header-bg: rgba(255, 255, 255, 0.85);
}

.dark {
  /* Dark Theme Variables */
  --bg-page: #0B0F17;
  --bg-body: #070B12;
  --bg-surface: #0E1422;
  --bg-surface-subtle: #131B2E;
  --bg-card: #111827;
  --border-card: #1F293D;
  --border-subtle: #1F293D;
  --border-strong: #2E3E5B;
  --text-main: #F8FAFC;
  --text-title: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --input-bg: #0E1422;
  --input-border: #243048;
  --input-focus: #10B981;
  --header-bg: rgba(7, 11, 18, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Utility */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   LOGIN.HTML ESPECÍFICOS: Canvas, Grid, Card & Inputs
   ========================================================================== */

.bg-canvas {
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(10, 92, 54, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(217, 119, 6, 0.05) 0%, transparent 50%);
}

.dark .bg-canvas {
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.09) 0%, transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(217, 119, 6, 0.06) 0%, transparent 50%);
}

.micro-grid {
  background-size: 24px 24px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

.dark .micro-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: 
    0 1px 2px 0 rgba(0, 0, 0, 0.05),
    0 12px 28px -4px rgba(15, 23, 42, 0.08),
    0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

.dark .auth-card {
  box-shadow: 
    0 1px 2px 0 rgba(0, 0, 0, 0.3),
    0 16px 36px -4px rgba(0, 0, 0, 0.5),
    0 6px 16px -2px rgba(0, 0, 0, 0.3);
}

.auth-input {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-title);
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input:hover {
  border-color: #94A3B8;
}

.dark .auth-input:hover {
  border-color: #3B4B69;
}

.auth-input:focus {
  outline: none;
  background-color: var(--bg-card);
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.14);
}

.dark .auth-input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.btn-gov-primary {
  background: linear-gradient(180deg, #0D6938 0%, #09502B 100%);
  border: 1px solid #073D21;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-weight: 600;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gov-primary:hover {
  background: linear-gradient(180deg, #0F7840 0%, #0A5A30 100%);
  box-shadow: 
    0 3px 8px -1px rgba(10, 92, 54, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-gov-primary:active {
  background: linear-gradient(180deg, #074323 0%, #05331B 100%);
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}

.dark .btn-gov-primary {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  border: 1px solid #065F46;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark .btn-gov-primary:hover {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  box-shadow: 
    0 4px 12px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hosted-badge {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.dark .hosted-badge {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(31, 41, 61, 0.8);
}

.hosted-badge:hover {
  border-color: rgba(211, 102, 28, 0.4);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px -2px rgba(211, 102, 28, 0.12);
  transform: translateY(-1px);
}

.dark .hosted-badge:hover {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(211, 102, 28, 0.5);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   INDEX.HTML ESPECÍFICOS: Portal, Header, Grid & Acordeão
   ========================================================================== */

.bg-canvas-lighting {
  position: relative;
}

.bg-canvas-lighting::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 700px;
  background: radial-gradient(circle at 50% 10%, rgba(211, 102, 28, 0.09) 0%, rgba(10, 102, 56, 0.06) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.dark .bg-canvas-lighting::before {
  background: radial-gradient(circle at 50% 10%, rgba(211, 102, 28, 0.16) 0%, rgba(10, 102, 56, 0.12) 40%, transparent 70%);
}

.pattern-grid {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

.dark .pattern-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.header-glass {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}

.card-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 10px 24px -4px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .card-surface {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 12px 28px -4px rgba(0, 0, 0, 0.4);
}

.card-surface:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 16px 32px -4px rgba(15, 23, 42, 0.08);
}

.dark .card-surface:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 20px 40px -4px rgba(0, 0, 0, 0.6);
}

.btn-tlx-primary {
  background: linear-gradient(180deg, #D3661C 0%, #B85210 100%);
  border: 1px solid #9C4108;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-weight: 600;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-tlx-primary:hover {
  background: linear-gradient(180deg, #E06F23 0%, #C45B15 100%);
  box-shadow: 0 4px 14px -1px rgba(211, 102, 28, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-tlx-primary:active {
  background: linear-gradient(180deg, #A4480A 0%, #8A3B05 100%);
  transform: translateY(1px);
}

.btn-tlx-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-tlx-secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: var(--tlx-orange);
  color: var(--tlx-orange);
  transform: translateY(-1px);
}

@keyframes telemetry-pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse-dot {
  animation: telemetry-pulse 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.accordion-item.active .accordion-content {
  max-height: 400px;
  opacity: 1;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   UTILITÁRIOS GERAIS
   ========================================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tlx-orange);
  outline-offset: 2px;
}
