/* ============================================================
   astoria.css — Base compartilhada entre todos os módulos
   Importar em: portal, chamados, instalacoes, painel
   ============================================================ */

/* ── FONTES ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════════
   TEMA ESCURO (padrão)
══════════════════════════════════════════════════════════ */
:root {
  /* Fundos */
  --bg:           #0d1117;
  --surface:      #161b27;
  --surface2:     #1e2535;
  --border:       #2a3248;

  /* Texto */
  --text:         #edf0f7;
  --text-soft:    #c4cade;
  --text-muted:   #6b7899;

  /* Acentos */
  --accent-green:  #22c55e;
  --accent-blue:   #60a5fa;
  --accent-yellow: #facc15;
  --accent-red:    #f87171;
  --accent-purple: #c084fc;
  --accent-orange: #f97316;
  --accent-teal:   #2dd4bf;
  --accent-indigo: #818cf8;
  --accent-pink:   #f472b6;

  /* Interação */
  --card-hover:    #1e2535;
  --input-bg:      #0d1117;
  --focus-ring:    rgba(96, 165, 250, 0.35);

  /* Tipografia */
  --font:  'DM Sans', 'Segoe UI', sans-serif;
  --mono:  'DM Mono', 'Courier New', monospace;
}



/* ══════════════════════════════════════════════════════════
   TEMA CLARO
   Aplicado via: [data-tema="claro"]  OU  body.light
══════════════════════════════════════════════════════════ */
[data-tema="claro"],
body.light {
  --bg:           #f0f4f9;
  --surface:      #ffffff;
  --surface2:     #f4f6fb;
  --border:       #d1d9e8;

  --text:         #0f172a;
  --text-soft:    #334155;
  --text-muted:   #64748b;

  --accent-green:  #16a34a;
  --accent-blue:   #2563eb;
  --accent-yellow: #ca8a04;
  --accent-red:    #dc2626;
  --accent-purple: #9333ea;
  --accent-teal:   #0d9488;
  --accent-indigo: #4f46e5;
  --accent-pink:   #db2777;

  --card-hover:    #edf2fb;
  --input-bg:      #f8fafc;
  --focus-ring:    rgba(37, 99, 235, 0.25);
}

/* ══════════════════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}



body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}

/* ══════════════════════════════════════════════════════════
   BOTÃO ALTERNAR TEMA
   Classe: .btn-tema
   Usado em: portal, chamados, instalacoes, painel
══════════════════════════════════════════════════════════ */
.btn-tema {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}

.btn-tema:hover {
  border-color: var(--text-soft);
  color: var(--text);
  background: var(--card-hover);
}

/* ══════════════════════════════════════════════════════════
   SCROLLBAR GLOBAL
══════════════════════════════════════════════════════════ */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover{ background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════
   TOAST COMPARTILHADO
══════════════════════════════════════════════════════════ */
#toastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast-msg {
  padding: .75rem 1.25rem;
  border-radius: 9px;
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  animation: toastIn .25s ease;
  max-width: 340px;
}

.toast-msg.success { background: var(--accent-green); }
.toast-msg.error   { background: var(--accent-red); }
.toast-msg.info    { background: var(--accent-blue); }

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

/* ══════════════════════════════════════════════════════════
   LOADING OVERLAY
══════════════════════════════════════════════════════════ */
#loadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 8000;
  align-items: center;
  justify-content: center;
}

#loadingOverlay.show { display: flex; }

/* ══════════════════════════════════════════════════════════
   INPUTS & SELECTS COMPARTILHADOS
══════════════════════════════════════════════════════════ */
input, select, textarea {
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}