/* ============================================================================
GLOBAL.CSS
Estilos Globais — Tema GOVBR Moderno
Sistema GMA — DETRAN RO
============================================================================ */

/* ============================================================================
RESET E BASE
============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "Rawline", sans-serif;
  font-size: 16px;
}

body {
  font-family: "Rawline", sans-serif;
  background: var(--cor-fundo);
  color: #333;
}

/* ============================================================================
VARIÁVEIS DE TEMA (customizáveis)
============================================================================ */
:root {
  --cor-primaria: #1351B4;
  --cor-secundaria: #0D3F86;
  --cor-destaque: #F0B400;
  --cor-fundo: #f5f5f5;
  --cor-card: #ffffff;

  --radius: 8px;
  --sombra: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ============================================================================
TITULAÇÃO
============================================================================ */
h1, h2, h3, h4 {
  font-weight: 700;
}

h1 {
  font-size: 28px;
  color: var(--cor-primaria);
}

h2 {
  font-size: 22px;
  color: var(--cor-primaria);
}

h3 {
  font-size: 18px;
  color: var(--cor-primaria);
}

p {
  line-height: 1.6;
}

/* ============================================================================
LINKS
============================================================================ */
a {
  color: var(--cor-primaria);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================================
BOTÕES
============================================================================ */
button {
  font-family: "Rawline", sans-serif;
  cursor: pointer;
}

.btn {
  padding: 10px 18px;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  transition: 0.2s;
}

.btn-primary {
  background: var(--cor-primaria);
  color: white;
}

.btn-primary:hover {
  background: var(--cor-secundaria);
}

.btn-danger {
  background: #C62828;
  color: white;
}

.btn-warning {
  background: var(--cor-destaque);
  color: #333;
}

.btn-light {
  background: #e9e9e9;
  color: #333;
}

/* ============================================================================
INPUTS & SELECTS
============================================================================ */
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1.5px solid #ccc;
  background: #FAFAFA;
  font-size: 14px;
  transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cor-primaria);
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(19, 81, 180, 0.2);
}

/* ============================================================================
CARDS
============================================================================ */
.card {
  background: var(--cor-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--sombra);
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

/* ============================================================================
TABELAS
============================================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sombra);
}

th {
  background: #EAF1FD;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cor-primaria);
  border-bottom: 1px solid #d0dcef;
  text-align: left;
}

td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

tr:hover td {
  background: #F5FAFF;
}

/* ============================================================================
GRID E LAYOUTS COMUNS
============================================================================ */
.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 780px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
TOAST GLOBAL
============================================================================ */
.gma-toast {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
LOADING GLOBAL
============================================================================ */
.gma-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ============================================================================
UTILITÁRIOS
============================================================================ */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ============================================================================
FIM DO GLOBAL.CSS
============================================================================ */