/**
 * ==========================================
 * STYLE.CS - ESTILOS DO SISTEMA CORTE LASER
 * ==========================================
 * 
 * Folha de estilos principal da aplicação
 * Design moderno com variáveis CSS para fácil customização
 * 
 * @author Desenvolvimento
 * @version 1.0.0
 */

/* ==========================================
 * ANIMAÇÕES
 * ========================================== */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ==========================================
 * VARIÁVEIS DE DESIGN SYSTEM
 * ========================================== */
:root {
  /* Cores principais */
  --bg-color: #f4f6f8;
  --panel-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #3b82f6;
  
  /* Cores de status */
  --status-pending: #f59e0b;
  --status-producing: #3b82f6;
  --status-completed: #10b981;

  /* Cores complementares */
  --danger-color: #ef4444; 
  --border-color: #e2e8f0;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Border radius */
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ==========================================
 * RESET E BASE
 * ========================================== */
.hidden { display: none !important; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Tipografia */
h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
p { color: var(--text-secondary); }

/* ==========================================
 * TELA DE LOGIN
 * ========================================== */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.login-container.hidden {
  display: none;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-header {
  margin-bottom: 30px;
}

.login-header i {
  display: block;
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.login-header p {
  font-size: 0.9rem;
}

.login-box .btn-primary {
  margin-top: 10px;
}

.login-error {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* Esconder conteúdo principal até login */
body:not(.logged-in) .top-nav,
body:not(.logged-in) .app-container {
  display: none !important;
}

body.logged-in #login-screen {
  display: none !important;
}

/* ==========================================
 * CABECALHO / NAVBAR
 * ========================================== */
.top-nav {
  background-color: var(--panel-bg);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.top-nav.logged-in {
  justify-content: flex-start;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Seletor de papel (Gerente/Operador) */
.role-selector {
  display: flex;
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.role-btn {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-btn:hover {
  background-color: rgba(0,0,0,0.05);
}

.role-btn.active {
  background-color: var(--panel-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Indicador de conexão */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--status-completed);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ==========================================
 * MENU PRINCIPAL
 * ========================================== */
.main-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 30px;
  background-color: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 4px;
}

.menu-item {
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
}

.menu-item:hover {
  background-color: var(--primary-color);
  color: white;
}

.menu-item.active {
  background-color: var(--primary-color);
  color: white;
}

.menu-item i.fa-chevron-down {
  font-size: 0.7rem;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--panel-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 100;
  padding: 8px 0;
  border: 1px solid var(--border-color);
}

.menu-item.has-submenu:hover .submenu {
  display: block;
}

.submenu div {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.submenu div:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.submenu div i {
  width: 16px;
}

.status-dot.offline { 
  background-color: var(--danger-color); 
  animation: none; 
}

.status-dot.syncing { 
  background-color: var(--status-pending); 
}

/* Botão Logout */
.btn-logout {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background-color: var(--bg-color);
  color: var(--danger-color);
}

/* ==========================================
 * RESPONSIVIDADE
 * ========================================== */
.app-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active { 
  display: block; 
}

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

.header-section { 
  margin-bottom: 24px; 
}

.list-card {
  width: 100%;
}

/* ==========================================
 * RESPONSIVIDADE
 * ========================================== */
@media (max-width: 900px) {
  .app-container { padding: 12px; }
  .manager-grid { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; align-items: stretch; gap: 16px; }
  .kanban-column { width: 100%; min-width: 100%; min-height: auto; }
}

@media (max-width: 600px) {
  .top-nav { flex-direction: column; height: auto; padding: 16px; gap: 12px; }
  .logo { font-size: 1.1rem; text-align: center; justify-content: center; }
  .role-selector { width: 100%; justify-content: center; }
  .role-btn { flex: 1; justify-content: center; font-size: 0.9rem; }
  .form-row { grid-template-columns: 1fr; }
  .app-container { padding: 8px; }
  .card { padding: 16px; }
  .form-row-grid { grid-template-columns: 1fr; }
}

/* ==========================================
 * CARDS E CAIXAS
 * ========================================== */
.card {
  background-color: var(--panel-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  border: 1px solid var(--border-color);
  min-width: 0;
  max-width: 100%;
}

.form-card h2 { 
  margin-bottom: 20px; 
  display: flex; 
  align-items: center; 
  gap: 8px;
}

.list-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 20px; 
}

/* ==========================================
 * FORMULÁRIOS
 * ========================================== */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  background-color: var(--bg-color);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  background-color: #fff;
}

/* ==========================================
 * BOTÕES
 * ========================================== */
.btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover { 
  background-color: var(--primary-hover); 
}

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: white;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { 
  background-color: var(--bg-color); 
}

/* Botão Novo Pedido */
.btn-new-order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-new-order:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Botão ícone */
.btn-icon {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.btn-icon:hover { 
  color: var(--primary-color); 
  border-color: var(--primary-color); 
}

/* ==========================================
 * SEÇÃO DE ITENS DINÂMICOS
 * ========================================== */
.items-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.items-section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.items-section-header h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin: 0;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 90px 40px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.btn-add-item {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
  width: 100%;
}

.btn-add-item:hover { 
  opacity: 0.9; 
}

.btn-remove-item {
  color: var(--danger-color);
  border: 1px solid var(--border-color);
  background: white;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-remove-item:hover {
  background: #fff1f2;
  border-color: var(--danger-color);
}

/* ==========================================
 * TABELAS
 * ========================================== */
.table-responsive { 
  overflow-x: auto; 
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

th:last-child, td:last-child {
  text-align: right;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  vertical-align: top;
}

tr:hover td { 
  background-color: rgba(0,0,0,0.01); 
}

.table-responsive td {
  vertical-align: middle;
}

.table-responsive td:last-child {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Tabela do Gerente */
#manager-table tbody tr {
  min-height: 60px;
}

#manager-table td, #manager-table th {
  vertical-align: top;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Tabelas de Gás */
#gas-requests-tbody tr td, #gas-history-tbody tr td {
  padding: 10px 12px;
  font-size: 0.85rem;
}

#gas-requests-tbody span.badge {
  font-size: 0.7rem;
  padding: 2px 8px;
}

/* ==========================================
 * BADGES DE STATUS
 * ========================================== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.pendente { 
  background-color: #fef3c7; 
  color: #b45309; 
}

.badge.producao { 
  background-color: #dbeafe; 
  color: #1d4ed8; 
}

.badge.concluido { 
  background-color: #d1fae5; 
  color: #047857; 
}

/* ==========================================
 * KANBAN (OPERADOR)
 * ========================================== */
.kanban-board {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  height: 100%;
}

.kanban-column {
  flex: 1;
  background-color: var(--panel-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  min-width: 320px;
}

.kanban-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kanban-header h3 { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  font-size: 1.1rem;
}

.kanban-header.warning { 
  border-top: 4px solid var(--status-pending); 
}

.kanban-header.info { 
  border-top: 4px solid var(--status-producing); 
}

.kanban-header.success { 
  border-top: 4px solid var(--status-completed); 
}

.kanban-header .badge { 
  background-color: var(--bg-color); 
  color: var(--text-secondary); 
  font-size: 0.85rem;
}

.kanban-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--bg-color);
}

/* Card do Operador */
.op-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
  max-width: 100%;
}

.op-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.op-card.pendente { 
  border-left-color: var(--status-pending); 
}

.op-card.producao { 
  border-left-color: var(--status-producing); 
}

.op-card.concluido { 
  border-left-color: var(--status-completed); 
  opacity: 0.7; 
}

.op-card-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 12px; 
  gap: 10px;
}

.op-card-id { 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  font-weight: 600;
  white-space: nowrap;
}

.op-card-title { 
  font-size: 1.1rem; 
  font-weight: 700; 
  color: var(--text-primary); 
  margin-bottom: 4px;
}

.op-card-tags { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  margin-bottom: 12px;
}

.op-tag {
  background: var(--bg-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.op-obs {
  background: #fefce8;
  border: 1px solid #fef08a;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #854d0e;
  margin-bottom: 12px;
}

.op-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.op-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.op-btn:hover { 
  opacity: 0.9; 
}

.op-btn-start { 
  background-color: var(--status-producing); 
  color: white; 
}

.op-btn-finish { 
  background-color: var(--status-completed); 
  color: white; 
}

/* Botão Histórico */
.btn-history {
  width: 100%;
  padding: 12px;
  background-color: #f1f5f9;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-history:hover {
  background-color: #e2e8f0;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ==========================================
 * MODAIS
 * ========================================== */
.modal-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal-overlay.hidden { 
  display: none; 
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-box.filtered::before {
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
}

.stat-box.total::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}

.stat-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-box.filtered .stat-box-icon {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-color);
}

.stat-box.total .stat-box-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-box-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-box-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-box-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-box-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-box-details {
  display: flex;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.stat-box-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-box-detail-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-box-detail-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.date-filter-inactive {
  opacity: 0.5;
  background: var(--bg-tertiary) !important;
  border-style: dashed !important;
}

.history-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  border-radius: var(--radius-lg);
}

.stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.stat-icon {
  font-size: 1.5rem;
  color: #fff;
  opacity: 0.9;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content {
  background-color: var(--panel-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header span { 
  color: var(--primary-color); 
}

.modal-body {
  padding: 24px;
}

.detail-row {
  margin-bottom: 16px;
  font-size: 0.95rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.detail-row:last-child { 
  border-bottom: none; 
  margin-bottom: 0; 
  padding-bottom: 0; 
}

.detail-row strong { 
  display: block; 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* ==========================================
 * MODAL FULLSCREEN (NOVO PEDIDO)
 * ========================================== */
.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}

.fullscreen-modal.hidden {
  display: none;
}

.fullscreen-content {
  background-color: var(--panel-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 700px;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fullscreen-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fullscreen-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.btn-close-fullscreen {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-fullscreen:hover {
  color: var(--danger-color);
  border-color: var(--danger-color);
}

/* Botão de Ajuda */
.btn-help {
  transition: all 0.2s;
}

.btn-help:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border-color: var(--primary-color) !important;
}

/* Links do menu de ajuda */
.help-sidebar a {
  transition: all 0.2s;
}

.help-sidebar a:hover {
  background: var(--card-bg);
}

.help-sidebar a.active {
  background: var(--primary-color);
  color: white;
}

.fullscreen-body {
  padding: 24px;
  overflow-y: auto;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 120px;
  gap: 16px;
  margin-bottom: 20px;
}

.fullscreen-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ==========================================
 * LOADER
 * ========================================== */
.loader-overlay {
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background-color: rgba(255,255,255,0.8);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.loader-overlay.hidden { 
  display: none; 
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================
 * TIMERS
 * ========================================== */
.live-timer {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

/* ==========================================
 * SEÇÃO DE GÁS
 * ========================================== */
.gas-section-wrapper {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.gas-section-wrapper > .card {
  flex: 1;
}

@media (max-width: 900px) {
  .gas-section-wrapper {
    flex-direction: column;
    gap: 16px;
  }
}

/* ==========================================
 * UTILITÁRIOS
 * ========================================== */
.btn-primary[style*="background-color"] {
  box-shadow: none;
}

.btn-primary[style*="background-color"]:hover {
  filter: brightness(0.9);
}

/* ==========================================
 * FILTROS
 * ========================================== */
.filter-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.filter-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.filter-section input[type="month"] {
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-primary);
}

.filter-section .btn-icon {
  width: 32px;
  height: 32px;
}

#quick-production-form .form-group {
  margin-bottom: 16px;
}

#quick-production-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

#quick-production-form input,
#quick-production-form select,
#quick-production-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s;
}

#quick-production-form input:focus,
#quick-production-form select:focus,
#quick-production-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

#quick-production-form textarea {
  resize: vertical;
  min-height: 60px;
}

.qp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  margin-left: 8px;
}