/* =========================
   Chamados Vision - Dark UI
   ========================= */

/* Paleta */
:root {
  --bg: #0e0f12;
  --card: #151821;
  --text: #e9edf5;
  --muted: #8b93a7;
  --border: #2a3142;

  --primary: #00C7FB;
  --primary-ink: #001018;
  --brand-link: #7aa2ff;

  --nav-bg: #10131b;
  --nav-hover: #00C7FB;
  --nav-text: #fff;
  --nav-muted: #ccc;

  --danger: #e74c3c;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =============================
   LAYOUT BÁSICO E CONTAINERS
   ============================= */
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}
.card {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
}
main {
  padding: 20px;
}
a {
  color: var(--brand-link);
  text-decoration: none;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.erro {
  color: #ff6b6b;
}

/* =============================
   NAVBAR SUPERIOR
   ============================= */
.navbar {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .logo {
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}
.navbar a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: 0.2s;
  background: rgba(255, 255, 255, 0.08);
}
.navbar a:hover,
.navbar a.active,
.navbar a[aria-current="page"] {
  background: var(--nav-hover);
  color: var(--nav-bg);
}
.navbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar .user {
  font-size: 14px;
  color: var(--nav-muted);
}
.btn-logout {
  background: var(--danger);
  color: #fff;
}

/* Responsividade da navbar */
@media (max-width: 720px) {
  .navbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .navbar .nav-links {
    width: 100%;
    justify-content: center;
  }
  .navbar .right {
    width: 100%;
    justify-content: flex-end;
  }
}

/* =============================
   BOTÕES E ELEMENTOS INTERATIVOS
   ============================= */
.btn {
  background: var(--primary);
  color: var(--primary-ink);
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.btn:hover {
  background: #33d1ff;
}
.btn.small {
  padding: 5px 10px;
  font-size: 13px;
}
.btn.outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* =============================
   TABELAS E LISTAS
   ============================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid #202536;
}
.inline { display: inline; }

/* =============================
   PILLS DE STATUS
   ============================= */
.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: #10131b;
  color: var(--text);
}
.pill.aberto     { border-color:#b39b27; background:#16140a; }
.pill.andamento  { border-color:#2b7fff; background:#0e1524; }
.pill.aguardando { border-color:#e39a28; background:#1a1208; }
.pill.concluido  { border-color:#2bbf6a; background:#0e1a14; }

/* =============================
   FORMULÁRIOS E CARDS CENTRAIS
   ============================= */
.form-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 140px);
  padding-top: 40px;
}
.card.form-card {
  background: var(--card);
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.card.form-card h2 {
  text-align: center;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 600;
}

/* Campos de formulários gerais */
form:not(.filtros-form) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 3px;
}
input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f121a;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
}
textarea[name="descricao"] {
  min-height: 180px;
  resize: vertical;
}

/* Responsividade dos formulários */
@media (max-width: 720px) {
  .card.form-card { padding:25px 20px; max-width:90%; }
}

/* ============================================
   FORMULÁRIOS CENTRALIZADOS (Login / Registro)
   ============================================ */
.form-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: radial-gradient(circle at 30% 20%, #10141e 0%, #0e0f12 80%);
  padding: 20px;
}

/* === form-card (Login/Register) === */
.form-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  padding: 35px 30px;
  color: var(--text);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.7);
}
.form-card h2 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.form-card form { display:flex; flex-direction:column; gap:14px; }
.form-card label { text-align:left; font-size:13px; color:var(--muted); }
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #2a3142;
  border-radius: 8px;
  background: #0f121a;
  color: #e9edf5;
  font-size: 14px;
  transition: border-color 0.25s, background 0.25s;
}
.form-card input:focus {
  border-color: var(--primary);
  background: #10141e;
  outline: none;
}
.form-card button.btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
  transition: background 0.25s ease, transform 0.15s ease;
}
.form-card button.btn:hover { background:#26d2ff; transform:scale(1.02); }
.form-card .erro {
  background: rgba(231,76,60,0.12);
  border: 1px solid #e74c3c;
  color: #ff8a80;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}
.form-card .muted {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.form-card .muted a { color:var(--primary); text-decoration:none; }
.form-card .muted a:hover { text-decoration:underline; }

/* ================================
   Filtros - Chamados (linha L→R)
   ================================ */

.filtros-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Título */
.titulo-filtros {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Linha principal do formulário */
.filtros-form {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: nowrap;
}

/* Campos individuais */
.filtros-form .campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 220px;
}

.filtros-form .campo label {
  font-size: 0.9rem;
  color: var(--muted);
}

.filtros-form .campo select,
.filtros-form .campo input[type="text"] {
  background: #0f121a;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.filtros-form .campo select:focus,
.filtros-form .campo input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 199, 251, 0.15);
}

/* Botões */
.filtros-form .botoes {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: 0;
}

.filtros-form .botoes .btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
}

/* Responsivo */
@media (max-width: 980px) {
  .filtros-form {
    flex-wrap: wrap;
  }
  .filtros-form .campo {
    flex: 1 1 260px;
    min-width: 220px;
  }
  .filtros-form .botoes {
    width: 100%;
    justify-content: flex-start;
  }
}

.previewAnexo {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  transition: 0.2s;
}
.previewAnexo:hover {
  background-color: var(--primary);
  color: var(--primary-ink);
}

/* ========== MODAL DE ANEXOS ========== */
.modalAnexos {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 25px;
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
  color: var(--primary);
}

.closeModal {
  position: absolute;
  top: 12px; right: 18px;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted);
  transition: 0.2s;
}
.closeModal:hover { color: var(--primary); }

.anexo-item {
  margin-bottom: 20px;
  text-align: center;
}
.anexo-img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.anexo-pdf {
  width: 100%;
  height: 400px;
  border: none;
  margin-bottom: 8px;
}

