:root {
      --accent: #004b87;
      --accent-contrast: #ffffff;
      --color-success: #15803d;
      --color-success-bg: #ecfdf5;
      --color-danger: #b91c1c;
      --color-danger-bg: #fef2f2;
      --color-warning: #b45309;
      --color-warning-bg: #fffbeb;
    }

    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: inherit;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Top navigation tabs */
    .nav-tabs-wrapper {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .nav-tabs {
      display: flex;
      gap: 0.5rem;
      overflow-x: auto;
      padding: 0.5rem 0 0 0;
      white-space: nowrap;
    }

    .tab-btn {
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      padding: 0.75rem 1.1rem;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.15s ease;
    }

    .tab-btn:hover {
      color: var(--text);
      background-color: rgba(0, 0, 0, 0.03);
    }

    .tab-btn.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .tab-content {
      display: none;
      animation: fadeIn 0.2s ease-in-out;
    }

    .tab-content.active {
      display: block;
    }

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

    /* Badges & Status */
    .status-eco {
      color: var(--color-success);
      background: var(--color-success-bg);
      font-weight: 600;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.85rem;
    }

    .status-estouro {
      color: var(--color-danger);
      background: var(--color-danger-bg);
      font-weight: 600;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.85rem;
    }

    .status-neutro {
      color: var(--text-muted);
      background: rgba(0, 0, 0, 0.05);
      font-weight: 500;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.85rem;
    }

    /* Progress bar for Efficiency Goal */
    .progress-track {
      background: #e2e8f0;
      border-radius: 999px;
      height: 12px;
      overflow: hidden;
      position: relative;
      margin-top: 0.5rem;
    }

    .progress-fill {
      background: linear-gradient(90deg, #0284c7, #16a34a);
      height: 100%;
      border-radius: 999px;
      transition: width 0.4s ease;
    }

    /* Modal styles */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(2px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
      padding: 1rem;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .modal-overlay.open {
      opacity: 1;
      pointer-events: auto;
    }

    .modal-box {
      background: var(--surface);
      border-radius: var(--radius);
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
      max-width: 550px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      border: 1px solid var(--border);
    }

    /* Custom inline bar chart styling */
    .monthly-chart-grid {
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      gap: 0.5rem;
      align-items: end;
      height: 220px;
      padding: 1rem 0.5rem 0.25rem 0.5rem;
      border-bottom: 1px solid var(--border);
    }

    .bar-group {
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100%;
      justify-content: flex-end;
      position: relative;
    }

    .bar-pair {
      display: flex;
      gap: 3px;
      align-items: flex-end;
      width: 100%;
      max-width: 42px;
      height: 100%;
    }

    .bar-sub {
      flex: 1;
      border-radius: 3px 3px 0 0;
      position: relative;
      transition: height 0.3s ease;
      min-height: 4px;
    }

    .bar-orc {
      background-color: #9AA7B4;
    }

    .bar-rea {
      background-color: #3B82C4;
    }

    .bar-label {
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-top: 0.5rem;
      text-align: center;
      font-weight: 500;
    }

    .tooltip-bar {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: #1e293b;
      color: #fff;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 0.7rem;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.15s ease;
      z-index: 20;
    }

    .bar-group:hover .tooltip-bar {
      opacity: 1;
    }

    /* Horizontal Bar Chart for Visão por Área */
    .hbar-item {
      padding: 0.85rem 1rem;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      background: var(--surface);
      transition: all 0.2s ease;
    }

    .hbar-item.estouro-highlight {
      border-color: #fca5a5;
      background: #fef2f2;
    }

    .hbar-track {
      background: #e2e8f0;
      border-radius: 4px;
      height: 12px;
      overflow: hidden;
      position: relative;
      margin-top: 4px;
    }

    .hbar-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.35s ease;
    }

    .hbar-fill-orc {
      background-color: #9AA7B4;
    }

    .hbar-fill-rea {
      background-color: #3B82C4;
    }

    .hbar-fill-danger {
      background-color: #C0392B;
    }

    /* Quick Action Badge */
    .card-meta {
      border-left: 4px solid var(--accent);
    }

    /* Logo Grupo Equatorial no cabeçalho */
    .header-logo-equatorial {
      height: 54px;
      width: auto;
      max-width: 100%;
      border-radius: 8px;
      display: block;
      object-fit: contain;
    }

    @media (max-width: 640px) {
      .header-logo-equatorial {
        height: 38px;
      }
    }

    /* Print styles */
    @media print {
      .nav-tabs-wrapper,
      .shell-toolbar,
      .no-print,
      button,
      .btn {
        display: none !important;
      }

      .tab-content {
        display: block !important;
        page-break-after: always;
      }

      body {
        background: #fff;
        color: #000;
      }

      .panel {
        box-shadow: none;
        border: 1px solid #ccc;
      }
    }
