/*
 * themes.css — Temas e tamanho de texto
 * Cartório Digital — PC-SP
 */

/* ===== REMOVER MARCA D'ÁGUA (brasão de fundo) ===== */
body        { background-image: none !important; background-color: var(--bg); }
.main::before { display: none !important; }

/* ===== TAMANHO DE TEXTO ===== */
html[data-fontsize="sm"] { font-size: 13px; }
html[data-fontsize="md"] { font-size: 15px; }
html[data-fontsize="lg"] { font-size: 17px; }
html[data-fontsize="xl"] { font-size: 19px; }

/* ===== TEMA ESCURO ===== */
html[data-theme="escuro"] {
  --bg:      #0f172a;
  --panel:   #1e293b;
  --text:    #e2e8f0;
  --muted:   #94a3b8;
  --line:    #334155;
  --accent:  #38bdf8;
  --accent-2:#34d399;
  --danger:  #f87171;
  --warn:    #fbbf24;
  --soft:    #1e3a4a;
}
html[data-theme="escuro"] body { background-color: #0f172a; }
html[data-theme="escuro"] .sidebar       { background: #09111e; }
html[data-theme="escuro"] nav button     { color: #b0cfe0; }
html[data-theme="escuro"] nav button.active,
html[data-theme="escuro"] nav button:hover { background: #1c3650; color: #fff; }
html[data-theme="escuro"] input,
html[data-theme="escuro"] select,
html[data-theme="escuro"] textarea       { background: #1e293b; color: var(--text); border-color: var(--line); }
html[data-theme="escuro"] .modal-box     { background: #1e293b; color: var(--text); border-color: var(--line); }
html[data-theme="escuro"] table th       { background: #1a2e42; color: var(--text); }
html[data-theme="escuro"] table tr:hover td { background: #243447; }
html[data-theme="escuro"] code           { background: #0f172a; color: #7dd3fc; }
html[data-theme="escuro"] details        { background: var(--panel); }
html[data-theme="escuro"] .sidebar-user  { border-color: rgba(255,255,255,.1); }
html[data-theme="escuro"] .brand         { border-color: rgba(255,255,255,.1); }

/* ===== TEMA AZUL INSTITUCIONAL ===== */
html[data-theme="azul"] {
  --bg:      #dce8f5;
  --panel:   #f0f6fb;
  --text:    #0b1d30;
  --muted:   #3a5a78;
  --line:    #b0ccdf;
  --accent:  #0057a8;
  --accent-2:#005f8a;
  --danger:  #b80008;
  --warn:    #a04900;
  --soft:    #cce0f5;
}
html[data-theme="azul"] body { background-color: #dce8f5; }
html[data-theme="azul"] .sidebar       { background: #06213d; }
html[data-theme="azul"] nav button     { color: #a8ccee; }
html[data-theme="azul"] nav button.active,
html[data-theme="azul"] nav button:hover { background: #0f3e6e; color: #fff; }

/* ===== TEMA ALTO CONTRASTE ===== */
html[data-theme="contraste"] {
  --bg:      #000000;
  --panel:   #111111;
  --text:    #ffffff;
  --muted:   #ffff00;
  --line:    #888888;
  --accent:  #00d4ff;
  --accent-2:#00ff88;
  --danger:  #ff5555;
  --warn:    #ffaa00;
  --soft:    #001a00;
}
html[data-theme="contraste"] body        { background: #000; }
html[data-theme="contraste"] .sidebar    { background: #000; border-right: 2px solid #fff; }
html[data-theme="contraste"] nav button  { color: #fff; }
html[data-theme="contraste"] nav button.active,
html[data-theme="contraste"] nav button:hover { background: #003066; color: #ffff00; outline: 2px solid #ffff00; }
html[data-theme="contraste"] input,
html[data-theme="contraste"] select,
html[data-theme="contraste"] textarea    { background: #000; color: #fff; border: 2px solid #fff; }
html[data-theme="contraste"] .panel,
html[data-theme="contraste"] .kpi        { border: 2px solid #555; }
html[data-theme="contraste"] .modal-box  { background: #111; border: 2px solid #fff; color: #fff; }
html[data-theme="contraste"] table th    { background: #003066; color: #fff; border: 1px solid #fff; }
html[data-theme="contraste"] a           { color: #00d4ff; text-decoration: underline; }
html[data-theme="contraste"] button.primary { background: #ffff00; color: #000; border: 2px solid #fff; }

/* ===== TEMA ROSA ===== */
html[data-theme="rosa"] {
  --bg:      #fdf2f8;
  --panel:   #fff0f7;
  --text:    #4a1035;
  --muted:   #9d5070;
  --line:    #f0b8d8;
  --accent:  #c2185b;
  --accent-2:#ad1457;
  --danger:  #b71c1c;
  --warn:    #e65100;
  --soft:    #fce4ec;
}
html[data-theme="rosa"] body { background-color: #fdf2f8; }
html[data-theme="rosa"] .sidebar       { background: #6a0f35; }
html[data-theme="rosa"] nav button     { color: #f8bbd0; }
html[data-theme="rosa"] nav button.active,
html[data-theme="rosa"] nav button:hover { background: #8e1a4a; color: #fff; }

/* ===== BOTÕES DO PAINEL DE PERSONALIZAÇÃO ===== */
.tema-btn, .fonte-btn {
  padding: .55rem .3rem;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: .82rem;
  text-align: center;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.tema-btn.active, .fonte-btn.active {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.tema-btn:hover, .fonte-btn:hover { border-color: var(--accent); }

/* Botão de personalização na sidebar */
.sidebar-personalizar {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.sidebar-personalizar button {
  width: 100%;
  background: transparent;
  border: 0;
  color: #b0ccc0;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .84rem;
}
.sidebar-personalizar button:hover { background: rgba(255,255,255,.08); color: #fff; }
