/* ====================================================================
   V5.4 - BLACK & GOLD LUXURY — SAPPHIRE GLASS
   80% preto • 15% marfim • 5% dourado • vidro de safira
   ==================================================================== */
:root{--accent:#C8A165; --line:rgba(200,161,101,.18); --muted:#98938A; --text:#F5F1E8; --green:#4ADE80; --red:#F87171; --yellow:#FACC15;}

/* ---- LUZ AMBIENTE (o que o vidro refrata) ---- */
html{background:radial-gradient(700px 420px at 12% -8%, rgba(200,161,101,.10), transparent 60%), radial-gradient(900px 520px at 88% 12%, rgba(230,200,126,.06), transparent 62%), radial-gradient(760px 460px at 50% 108%, rgba(200,161,101,.07), transparent 60%), #080808 !important; background-attachment:fixed;}
body{background:transparent !important; color:#F5F1E8; font-family:'Inter',system-ui,sans-serif; font-weight:300;}
h1,h2,h3,h4{color:#F5F1E8;}
h1,.value{font-family:'Marcellus','Inter',serif;}
a{color:#E6C87E;}
.muted,.empty{color:#98938A !important;}
::selection{background:rgba(200,161,101,.35); color:#F5F1E8;}
::-webkit-scrollbar{width:10px; height:10px;}
::-webkit-scrollbar-track{background:#0A0A0B;}
::-webkit-scrollbar-thumb{background:#262019; border-radius:8px; border:2px solid #0A0A0B;}
::-webkit-scrollbar-thumb:hover{background:#C8A165;}

/* ---- CASCO ---- */
aside,.sidebar,nav,#sidebar,.menu{background:rgba(10,10,11,.92) !important; border-right:1px solid rgba(200,161,101,.18) !important; backdrop-filter:blur(16px);}
aside a,.sidebar a,nav a,#sidebar a{color:#D8D3C8 !important;}
aside a:hover,.sidebar a:hover,nav a:hover{color:#E6C87E !important;}
header,.topbar,.header{background:rgba(8,8,8,.85) !important; backdrop-filter:blur(16px); border-bottom:1px solid rgba(200,161,101,.18) !important;}

/* ---- VIDRO DE SAFIRA ---- */
.card,.dash-card{background:linear-gradient(160deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 45%, rgba(255,255,255,.035) 100%) !important; border:1px solid rgba(200,161,101,.16) !important; border-radius:18px !important; backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%); box-shadow:inset 0 1px 0 rgba(255,255,255,.09), inset 0 -1px 0 rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.55) !important; color:#F5F1E8 !important; position:relative;}
.card::after,.dash-card::after{content:''; position:absolute; top:0; left:8%; right:8%; height:1px; background:linear-gradient(90deg,transparent,rgba(230,200,126,.4),transparent); pointer-events:none;}
.card b,.dash-card b,.card h3,.dash-card h3{color:#F5F1E8;}
.card small,.dash-card small{color:#98938A;}

/* ---- BOTÕES / INPUTS / TABELAS / MODAL ---- */
.primary{background:linear-gradient(135deg,#E6C87E,#C8A165,#8a6d35) !important; color:#0A0A0B !important; border:none !important; box-shadow:0 6px 20px rgba(200,161,101,.25), inset 0 1px 0 rgba(255,255,255,.35);}
.secondary{background:rgba(255,255,255,.04) !important; color:#F5F1E8 !important; border:1px solid rgba(200,161,101,.22) !important; backdrop-filter:blur(8px);}
input,select,textarea{background:rgba(255,255,255,.04) !important; border:1px solid rgba(255,255,255,.10) !important; color:#F5F1E8 !important; backdrop-filter:blur(8px);}
input::placeholder{color:#7A756C;}
.field label{color:#98938A;}
table th{color:#98938A !important; border-bottom:1px solid rgba(200,161,101,.2) !important;}
table td{color:#F5F1E8 !important; border-bottom:1px solid rgba(255,255,255,.05) !important;}
#modal{background:rgba(0,0,0,.65) !important; backdrop-filter:blur(10px);}
#modal .card,#modal > div{background:#101012 !important; border:1px solid rgba(200,161,101,.25) !important;}

/* ---- PILLS BRANCAS → MARFIM COM TEXTO PRETO (legibilidade luxuosa) ---- */
button[style*="background: white"],button[style*="background:white"],button[style*="background: #fff"]{background:#F5F1E8 !important; color:#0A0A0B !important; border:1px solid rgba(200,161,101,.35) !important;}
button[style*="var(--accent)"]{color:#0A0A0B !important;}

/* ---- NEUTRALIZA FUNDOS CLAROS CHUMBADOS (qualquer elemento) ---- */
[style*="#f0fdf4"],[style*="#eef2ff"],[style*="#fef3c7"],[style*="#fee2e2"],[style*="#fef2f2"],[style*="#f8fafc"],[style*="#f1f5f9"],[style*="#e2e8f0"],[style*="#eff6ff"],[style*="background: white"],[style*="background:white"]{background:rgba(255,255,255,.05) !important;}

/* ---- TEXTOS ESCUROS CHUMBADOS → TONS LUXO ---- */
[style*="color:#166534"]{color:#4ADE80 !important;}
[style*="color:#30477e"]{color:#E6C87E !important;}
[style*="color:#991b1b"]{color:#F87171 !important;}
[style*="color:#92400e"]{color:#FACC15 !important;}
[style*="color:#0f172a"],[style*="color:#1e293b"],[style*="color:#334155"]{color:#F5F1E8 !important;}

/* ---- ESCOPO .v5 (dashboard / cliente 360) ---- */
.v5{--bg:transparent; --panel:#101012; --hair:rgba(200,161,101,.22); --hair2:rgba(200,161,101,.48); --copper:#C8A165; --copper2:#E6C87E; --gold:#C8A165; --gold2:#E6C87E; --white:#F5F1E8; --mut:#98938A; --green:#4ADE80; --red:#F87171; --yellow:#FACC15; --r:18px; background:transparent; color:var(--white); padding:0; border-radius:0; min-height:auto; font-family:'Inter',system-ui,sans-serif; font-weight:300;}
.v5 *{box-sizing:border-box}
.v5 h2,.v5 .vl{font-family:'Marcellus','Inter',serif;}
.v5 .lb{font-size:10px; letter-spacing:2.8px; text-transform:uppercase; color:var(--mut); font-weight:500;}
.v5 .gcard{background:linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02) 45%, rgba(255,255,255,.035)); border:1px solid var(--hair); border-radius:var(--r); padding:22px; backdrop-filter:blur(20px) saturate(160%); -webkit-backdrop-filter:blur(20px) saturate(160%); box-shadow:inset 0 1px 0 rgba(255,255,255,.09), 0 18px 48px rgba(0,0,0,.55); position:relative; transition:all .3s ease;}
.v5 .gcard:hover{border-color:var(--hair2);}
.v5 .gcard::before{content:''; position:absolute; top:0; left:10%; right:10%; height:1px; background:linear-gradient(90deg,transparent,rgba(230,200,126,.4),transparent);}
.v5 .kpi .vl{font-size:36px; font-weight:400; color:var(--white); letter-spacing:.5px; margin-top:10px; line-height:1;}
.v5 .kpi.alert .vl{color:var(--red);}
.v5 .kpi.ok .vl{color:var(--green);}
.v5 .pill{display:inline-block; padding:3px 10px; border-radius:999px; font-size:10px; font-weight:600; letter-spacing:1.4px; text-transform:uppercase;}
.v5 .pill.green{background:rgba(74,222,128,.08); color:var(--green); border:1px solid rgba(74,222,128,.28);}
.v5 .pill.copper{background:rgba(200,161,101,.10); color:var(--gold2); border:1px solid var(--hair);}
.v5 .pill.red{background:rgba(248,113,113,.08); color:var(--red); border:1px solid rgba(248,113,113,.28);}
.v5 .pill.gray{background:rgba(255,255,255,.04); color:var(--mut); border:1px solid rgba(255,255,255,.10);}
.v5 .btn{background:linear-gradient(135deg,var(--gold2),var(--gold),#8a6d35); color:#0A0A0B; border:none; padding:9px 18px; border-radius:12px; font-weight:700; font-size:12px; cursor:pointer; letter-spacing:.5px; box-shadow:0 6px 20px rgba(200,161,101,.25), inset 0 1px 0 rgba(255,255,255,.3);}
.v5 .btn.ghost{background:rgba(255,255,255,.04); color:var(--white); border:1px solid var(--hair); box-shadow:none; font-weight:400;}
.v5 .btn:hover{filter:brightness(1.08);}
.v5 table{width:100%; border-collapse:collapse;}
.v5 th{font-size:10px; letter-spacing:2.2px; text-transform:uppercase; color:var(--mut); text-align:left; padding:10px; border-bottom:1px solid rgba(200,161,101,.2);}
.v5 td{padding:12px 10px; border-bottom:1px solid rgba(255,255,255,.04); font-size:13px; color:var(--white); font-weight:300;}
.v5 .bar{background:rgba(255,255,255,.06); border-radius:8px; height:6px; overflow:hidden;}
.v5 .bar > div{height:100%; background:linear-gradient(90deg,var(--gold),var(--gold2));}
.v5 .ring{width:60px; height:60px; border-radius:50%; background:conic-gradient(var(--gold2) calc(var(--p)*1%), rgba(255,255,255,.06) 0); display:flex; align-items:center; justify-content:center; flex:none;}
.v5 .ring i{width:46px; height:46px; border-radius:50%; background:var(--panel); display:flex; align-items:center; justify-content:center; font-style:normal; font-size:12px; font-weight:600; color:var(--gold2); font-family:'Marcellus',serif;}
.v5 .orb{width:68px; height:68px; border-radius:50%; background:radial-gradient(circle at 32% 30%, #F7EFD9, var(--gold2) 40%, var(--gold) 60%, #101013 85%); box-shadow:0 0 34px rgba(200,161,101,.45); margin:0 auto 12px; animation:pulse-orb 4s ease-in-out infinite;}
@keyframes pulse-orb{0%,100%{box-shadow:0 0 34px rgba(200,161,101,.45)}50%{box-shadow:0 0 46px rgba(230,200,126,.65)}}
.v5 .tl{position:relative; margin-left:8px; padding-left:24px; border-left:1px solid rgba(200,161,101,.25);}
.v5 .tl .dot{position:absolute; left:-6px; top:4px; width:11px; height:11px; border-radius:50%; background:var(--gold2); box-shadow:0 0 10px rgba(230,200,126,.6); border:2px solid #080808;}
.v5 .cmdk{display:flex; align-items:center; gap:12px; background:rgba(255,255,255,.03); border:1px solid var(--hair); border-radius:16px; padding:14px 18px; color:var(--mut); font-size:13px; cursor:pointer; backdrop-filter:blur(20px);}
.v5 .cmdk b{color:var(--gold2); font-family:'Marcellus',serif; font-size:15px;}
.v5 small{color:var(--mut);}
.v5 a{color:var(--gold2); text-decoration:none; border-bottom:1px solid rgba(230,200,126,.3);}
.v5 .spark{filter:drop-shadow(0 0 6px rgba(230,200,126,.5));}
.v5 .hero-card{background:linear-gradient(135deg, rgba(200,161,101,.08), rgba(255,255,255,.02) 50%, rgba(200,161,101,.04)) !important; border:1px solid var(--hair2) !important;}

/* ---- Ajustes finos V5.4.1 ---- */
[style*="#fff8f0"]{background:rgba(255,255,255,.05) !important;}
button[onclick*="viewProjectProcess"]{color:#F5F1E8 !important;}

/* ---- V5.4.2 - Dropdowns e controles nativos legíveis ---- */
:root{color-scheme:dark;}
select{color-scheme:dark;}
select option{background:#101012 !important; color:#F5F1E8 !important;}
select option:hover{background:#2a2416 !important; color:#E6C87E !important;}
select option:checked{background:#2a2416 !important; color:#E6C87E !important;}
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"]{color-scheme:dark;}

/* ---- Toasts/notificações legíveis ---- */
body > div[style*="fixed"][style*="right"],
body > div[style*="position:fixed"][style*="right"],
.toast, #toast, #toastContainer, .toastify{
  background:#101012 !important;
  color:#F5F1E8 !important;
  border:1px solid rgba(200,161,101,.45) !important;
  box-shadow:0 12px 32px rgba(0,0,0,.6) !important;
  border-radius:12px !important;
}
body > div[style*="fixed"][style*="right"] *, .toast *, #toast *{ color:#F5F1E8 !important; }