/**
 * styles.css — OfficeLaw Frontend
 * Versão: V0.148
 * Atualizado em: 17/05/2026
 *
 * ADIÇÕES V0.148: Estilos para a seção de deploy (Atualizações do Sistema)
 * Todos os estilos anteriores da V0.147 foram preservados.
 */

/* =========================================================================
   Reset e base
   ========================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #1a1a2e;
  --color-primary-hover: #16213e;
  --color-accent: #e94560;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* =========================================================================
   V0.148: Seção de Deploy / Atualizações do Sistema
   ========================================================================= */

.section-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 6px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Grade de cards de status */
.deploy-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.status-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.status-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

/* Barra de progresso */
.progress-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.progress-track {
  height: 6px;
  background: var(--color-border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-info), var(--color-accent));
  border-radius: 99px;
  transition: width 0.4s ease;
  animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Blocos de ação */
.deploy-action-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.action-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 6px;
}

.action-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

/* Área de upload */
.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area.dragover {
  border-color: var(--color-info);
  background: #eff6ff;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text-muted);
}

.upload-label:hover {
  color: var(--color-info);
}

.file-info {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
  padding: 8px 12px;
  background: #f0fdf4;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
}

/* Botões */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-warning {
  background: var(--color-warning);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-warning:hover { background: #d97706; }
.btn-warning:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-danger:hover { background: #dc2626; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover { background: #f1f5f9; border-color: #94a3b8; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lista de backups */
.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: background 0.1s;
}

.backup-item:hover { background: var(--color-bg); }

.backup-item--latest {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.backup-name {
  font-size: 13px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  color: var(--color-text);
}

.backup-meta {
  font-size: 11px;
  color: var(--color-text-muted);
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.badge--green {
  background: #dcfce7;
  color: #166534;
}

/* Estado vazio */
.empty-state {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 16px;
  margin: 0;
}

/* Animação slide-in para toasts */
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
