/*
 * v6.5.3 — Premium Light UI
 * Fundo claro global + sidebar elegante + hero premium nos módulos.
 */

:root {
    --pl-bg: #f4f7fb;
    --pl-bg-2: #eef4fb;
    --pl-surface: #ffffff;
    --pl-soft: #f8fafc;
    --pl-text: #0f172a;
    --pl-text-2: #334155;
    --pl-muted: #64748b;
    --pl-border: #e5eaf2;
    --pl-primary: #2563eb;
    --pl-primary-2: #1d4ed8;
    --pl-purple: #7c3aed;
    --pl-green: #16a34a;
    --pl-orange: #f97316;
    --pl-red: #dc2626;
    --pl-sidebar: #0f172a;
    --pl-sidebar-2: #111827;
    --pl-radius: 18px;
    --pl-radius-lg: 26px;
    --pl-shadow-sm: 0 8px 24px rgba(15,23,42,.06);
    --pl-shadow: 0 14px 36px rgba(15,23,42,.08);
    --pl-shadow-lg: 0 24px 70px rgba(15,23,42,.14);
}

html, body {
    background:
        radial-gradient(circle at 8% 0%, rgba(37,99,235,.10), transparent 30%),
        radial-gradient(circle at 94% 0%, rgba(124,58,237,.08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--pl-bg) 100%) !important;
    color: var(--pl-text) !important;
}

body,
.app-shell,
.ip-app-shell,
.app-main,
.main-content,
#app-content,
.content,
.ip-content {
    background:
        radial-gradient(circle at 8% 0%, rgba(37,99,235,.08), transparent 30%),
        radial-gradient(circle at 94% 0%, rgba(124,58,237,.06), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--pl-bg) 100%) !important;
    color: var(--pl-text) !important;
}

/* Sidebar elegante */
#app-sidebar,
.app-sidebar,
.sidebar {
    background: linear-gradient(180deg, var(--pl-sidebar), var(--pl-sidebar-2)) !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    color: #e5e7eb !important;
    box-shadow: 16px 0 45px rgba(15,23,42,.12) !important;
}

#app-sidebar *,
.app-sidebar *,
.sidebar * {
    color: inherit;
}

#app-sidebar a,
.app-sidebar a,
.sidebar a,
.menu-link,
.nav-link {
    color: #cbd5e1 !important;
    border-radius: 16px !important;
    font-weight: 850 !important;
    transition: all .18s ease !important;
}

#app-sidebar a:hover,
.app-sidebar a:hover,
.sidebar a:hover,
.menu-link:hover,
.nav-link:hover {
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
    transform: translateX(3px);
}

#app-sidebar a.active,
.app-sidebar a.active,
.sidebar a.active,
.menu-link.active,
.nav-link.active {
    background: linear-gradient(135deg, var(--pl-primary), var(--pl-purple)) !important;
    color: #fff !important;
    box-shadow: 0 14px 34px rgba(37,99,235,.30) !important;
}

/* Topbar semi-glass legível */
.app-header,
.topbar,
.ip-topbar,
.header {
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226,232,240,.95) !important;
    box-shadow: 0 8px 28px rgba(15,23,42,.05) !important;
    color: var(--pl-text) !important;
}

/* Tipografia */
h1, h2, h3, h4,
.app-main h1,
.main-content h1,
.ip-content h1,
.wrap h1 {
    color: var(--pl-text) !important;
    letter-spacing: -.045em;
}

p, label, span, small, strong, div {
    color: inherit;
}

.muted,
.text-muted,
.description,
.help,
small {
    color: var(--pl-muted) !important;
}

/* Hero premium padrão */
.ip-react-hero,
.ip-page-hero,
.ip-bib-hero,
.ip-module-hero,
.page-hero,
.module-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #7c3aed 100%) !important;
    color: #fff !important;
    border-radius: 30px !important;
    padding: 30px !important;
    box-shadow: var(--pl-shadow-lg) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    overflow: hidden;
    position: relative;
    margin-bottom: 22px !important;
}

.ip-react-hero:after,
.ip-page-hero:after,
.ip-bib-hero:after,
.ip-module-hero:after,
.page-hero:after,
.module-hero:after {
    content: "";
    position: absolute;
    right: 34px;
    top: 16px;
    width: 190px;
    height: 150px;
    border-radius: 34px;
    background: rgba(255,255,255,.13);
    transform: rotate(-12deg);
    pointer-events: none;
}

.ip-react-hero h1,
.ip-react-hero h2,
.ip-page-hero h1,
.ip-page-hero h2,
.ip-bib-hero h1,
.ip-bib-hero h2,
.ip-module-hero h1,
.ip-module-hero h2,
.page-hero h1,
.page-hero h2,
.module-hero h1,
.module-hero h2 {
    color: #fff !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

.ip-react-hero p,
.ip-page-hero p,
.ip-bib-hero p,
.ip-module-hero p,
.page-hero p,
.module-hero p {
    color: rgba(255,255,255,.82) !important;
    max-width: 760px;
    margin: 8px 0 0;
    position: relative;
    z-index: 1;
}

/* Cards e painéis claros */
.card,
.ip-card,
.dashboard-card,
.stat-card,
.panel,
.widget,
.box,
.msg-card,
.ip-react-card,
.ip-kpi,
.ip-bi-card,
.ip-bi-panel,
.modal-content {
    background: rgba(255,255,255,.96) !important;
    color: var(--pl-text) !important;
    border: 1px solid var(--pl-border) !important;
    border-radius: 24px !important;
    box-shadow: var(--pl-shadow) !important;
    backdrop-filter: blur(8px);
}

.card:hover,
.ip-card:hover,
.dashboard-card:hover,
.stat-card:hover,
.panel:hover,
.ip-react-card:hover {
    border-color: #d4deec !important;
    box-shadow: var(--pl-shadow-lg) !important;
}

.card h1, .card h2, .card h3,
.ip-card h1, .ip-card h2, .ip-card h3,
.panel h1, .panel h2, .panel h3,
.ip-react-card h1, .ip-react-card h2, .ip-react-card h3,
.ip-bi-card h1, .ip-bi-card h2, .ip-bi-card h3,
.ip-bi-panel h1, .ip-bi-panel h2, .ip-bi-panel h3 {
    color: var(--pl-text) !important;
}

/* KPIs */
.ip-kpi strong,
.ip-react-card strong,
.ip-bi-card strong,
.stat-card strong,
.dashboard-card strong {
    color: var(--pl-text) !important;
}

.ip-kpi small,
.ip-react-card small,
.ip-bi-card small,
.stat-card small,
.dashboard-card small {
    color: var(--pl-muted) !important;
}

/* Botões */
.btn,
.button,
button,
input[type="submit"] {
    border-radius: 15px !important;
    font-weight: 900 !important;
}

.btn-primary,
.button-primary,
button.primary,
input[type="submit"].primary,
input[type="submit"].button-primary {
    background: linear-gradient(135deg, var(--pl-primary), var(--pl-primary-2)) !important;
    border-color: var(--pl-primary) !important;
    color: #fff !important;
    box-shadow: 0 13px 28px rgba(37,99,235,.22) !important;
}

.button:not(.button-primary),
.btn:not(.btn-primary),
button:not(.primary):not(.button-primary) {
    background: #fff !important;
    border: 1px solid var(--pl-border) !important;
    color: var(--pl-text-2) !important;
}

.button:not(.button-primary):hover,
.btn:not(.btn-primary):hover,
button:not(.primary):not(.button-primary):hover {
    background: var(--pl-soft) !important;
    color: var(--pl-primary-2) !important;
}

/* Inputs */
input,
select,
textarea {
    background: #fff !important;
    color: var(--pl-text) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 15px !important;
    padding: 12px 14px !important;
    font-weight: 650;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--pl-primary) !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.13) !important;
    outline: none !important;
}

/* Tabelas claras */
table,
.data-table,
.wp-list-table {
    background: #fff !important;
    color: var(--pl-text) !important;
    border: 1px solid var(--pl-border) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    box-shadow: var(--pl-shadow) !important;
}

table th,
.data-table th,
.wp-list-table th {
    background: #f8fafc !important;
    color: #334155 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900 !important;
}

table td,
.data-table td,
.wp-list-table td {
    color: #1f2937 !important;
    border-bottom: 1px solid #edf2f7 !important;
}

table a,
.data-table a {
    color: #1d4ed8 !important;
    font-weight: 800;
}

/* Estados vazios */
.empty-state,
.ip-empty,
.no-results,
.ip-bib-empty {
    background: #fff !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 24px !important;
    color: var(--pl-muted) !important;
    padding: 38px 22px !important;
    text-align: center;
}

.empty-state strong,
.ip-empty strong,
.no-results strong,
.ip-bib-empty strong {
    color: var(--pl-text) !important;
}

/* Abas */
.tabs a,
.nav-tab,
.ip-bib-tab,
[data-tab] {
    border-radius: 15px !important;
    font-weight: 900 !important;
}

.nav-tab-active,
.tabs a.active,
.ip-bib-tab.active,
[data-tab].active {
    background: var(--pl-primary) !important;
    color: #fff !important;
    border-color: var(--pl-primary) !important;
}

/* BI claro */
.ip-bi-dashboard {
    background:
        radial-gradient(circle at 8% 0%, rgba(37,99,235,.08), transparent 31%),
        linear-gradient(180deg, #f8fbff, #eef4fb) !important;
}

.ip-bi-card,
.ip-bi-panel {
    background: #fff !important;
}

.ip-bi-funnel-row strong {
    color: var(--pl-text) !important;
}

.ip-bi-bar-bg {
    background: #e5eaf2 !important;
}

/* Modais claros */
.modal .modal-content,
.ip-edit-modal {
    background: #fff !important;
    color: var(--pl-text) !important;
}

.modal .modal-content h1,
.modal .modal-content h2,
.modal .modal-content h3,
.ip-edit-modal h1,
.ip-edit-modal h2,
.ip-edit-modal h3 {
    color: var(--pl-text) !important;
}

/* Biblioteca: mantém hero premium, mas conteúdo também claro por padrão */
.ip-bib-v544 {
    background:
        radial-gradient(circle at 8% 0%, rgba(37,99,235,.10), transparent 30%),
        linear-gradient(180deg, #f8fbff, #f4f7fb) !important;
    color: var(--pl-text) !important;
}

.ip-bib-v544 .ip-bib-hero {
    color: #fff !important;
}

.ip-bib-v544 .ip-bib-hero h1,
.ip-bib-v544 .ip-bib-hero h2,
.ip-bib-v544 .ip-bib-hero p {
    color: #fff !important;
}

.ip-bib-v544 .ip-bib-stat,
.ip-bib-v544 .ip-bib-card,
.ip-bib-v544 .ip-bib-collection {
    background: #fff !important;
    border-color: var(--pl-border) !important;
    color: var(--pl-text) !important;
}

.ip-bib-v544 .ip-bib-card h3,
.ip-bib-v544 .ip-bib-section-head h2,
.ip-bib-v544 .ip-bib-stat strong,
.ip-bib-v544 .ip-bib-collection strong {
    color: var(--pl-text) !important;
}

.ip-bib-v544 .ip-bib-card p,
.ip-bib-v544 .ip-bib-stat span,
.ip-bib-v544 .ip-bib-stat small,
.ip-bib-v544 .ip-bib-collection span {
    color: var(--pl-muted) !important;
}

/* Banner React piloto claro */
.ip-react-pilot-banner {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1e3a8a !important;
    border-radius: 18px !important;
}

.ip-react-pilot-banner a {
    color: #1d4ed8 !important;
}

/* Mobile */
@media(max-width:800px) {
    .ip-react-hero,
    .ip-page-hero,
    .ip-bib-hero,
    .ip-module-hero,
    .page-hero,
    .module-hero {
        padding: 23px !important;
        border-radius: 24px !important;
    }

    .ip-react-hero:after,
    .ip-page-hero:after,
    .ip-bib-hero:after,
    .ip-module-hero:after,
    .page-hero:after,
    .module-hero:after {
        width: 130px;
        height: 100px;
        right: -18px;
    }

    .card,
    .ip-card,
    .dashboard-card,
    .stat-card,
    .panel,
    .widget {
        border-radius: 22px !important;
    }
}


/* ==========================================================================
   v6.5.6 — FORCE REAL PREMIUM UI
   Aplicado diretamente no app.css real do PWA.
   ========================================================================== */

:root{
  --force-bg:#f4f7fb;
  --force-card:#ffffff;
  --force-text:#0f172a;
  --force-muted:#64748b;
  --force-border:#e5eaf2;
  --force-blue:#2563eb;
  --force-blue2:#1d4ed8;
  --force-purple:#7c3aed;
  --force-green:#16a34a;
  --force-red:#dc2626;
  --force-orange:#f97316;
  --force-sidebar:#07111f;
  --force-sidebar2:#0f172a;
  --force-shadow:0 14px 38px rgba(15,23,42,.075);
  --force-shadow-lg:0 24px 70px rgba(15,23,42,.14);
}

html body,
body.ip-app,
body{
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.08),transparent 30%),
    radial-gradient(circle at 94% 0%,rgba(124,58,237,.06),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb) !important;
  color:var(--force-text) !important;
}

/* containers reais possíveis */
.app, .app-shell, .ip-app-shell, .main, main, .app-main, .main-content, #app-content, .content, .ip-content, .page-content, .pwa-content{
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.07),transparent 30%),
    radial-gradient(circle at 94% 0%,rgba(124,58,237,.05),transparent 28%),
    linear-gradient(180deg,#f8fbff,#f4f7fb) !important;
  color:var(--force-text) !important;
}

/* Sidebar */
#app-sidebar, .app-sidebar, aside.sidebar, .sidebar, .menu-lateral, .side-menu{
  background:linear-gradient(180deg,var(--force-sidebar),var(--force-sidebar2)) !important;
  color:#e5e7eb !important;
  border-right:1px solid rgba(255,255,255,.08) !important;
  box-shadow:16px 0 44px rgba(15,23,42,.15) !important;
}

#app-sidebar *, .app-sidebar *, aside.sidebar *, .sidebar *, .menu-lateral *, .side-menu *{
  color:inherit;
}

#app-sidebar a, .app-sidebar a, aside.sidebar a, .sidebar a, .menu-lateral a, .side-menu a, .nav-link, .menu-link{
  color:#cbd5e1 !important;
  border-radius:16px !important;
  font-weight:850 !important;
}

#app-sidebar a:hover, .app-sidebar a:hover, aside.sidebar a:hover, .sidebar a:hover, .nav-link:hover, .menu-link:hover{
  background:rgba(255,255,255,.08) !important;
  color:#fff !important;
}

#app-sidebar a.active, .app-sidebar a.active, aside.sidebar a.active, .sidebar a.active, .nav-link.active, .menu-link.active{
  background:linear-gradient(135deg,var(--force-blue),var(--force-purple)) !important;
  color:#fff !important;
  box-shadow:0 14px 34px rgba(37,99,235,.30) !important;
}

/* Topbar */
.app-header, .topbar, .ip-topbar, header, .header{
  background:rgba(255,255,255,.96) !important;
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(226,232,240,.96) !important;
  box-shadow:0 8px 28px rgba(15,23,42,.045) !important;
  color:var(--force-text) !important;
}

/* Hero criado/injetado */
.force-premium-hero,
.ip-react-hero, .ip-page-hero, .ip-bib-hero, .ip-module-hero, .page-hero, .module-hero, .pwa-hero, .dashboard-hero{
  background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 54%,#7c3aed 100%) !important;
  color:#fff !important;
  border-radius:30px !important;
  padding:30px !important;
  box-shadow:var(--force-shadow-lg) !important;
  border:1px solid rgba(255,255,255,.15) !important;
  overflow:hidden;
  position:relative;
  margin:0 0 22px !important;
}

.force-premium-hero:after,
.ip-react-hero:after, .ip-page-hero:after, .ip-bib-hero:after, .ip-module-hero:after, .page-hero:after, .module-hero:after, .pwa-hero:after, .dashboard-hero:after{
  content:"";
  position:absolute;
  right:34px;
  top:16px;
  width:190px;
  height:150px;
  border-radius:34px;
  background:rgba(255,255,255,.13);
  transform:rotate(-12deg);
  pointer-events:none;
}

.force-premium-hero h1, .force-premium-hero h2,
.ip-react-hero h1,.ip-react-hero h2,.ip-page-hero h1,.ip-page-hero h2,.ip-bib-hero h1,.ip-bib-hero h2,.ip-module-hero h1,.ip-module-hero h2,.page-hero h1,.page-hero h2,.module-hero h1,.module-hero h2{
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  margin:0 !important;
  position:relative;
  z-index:1;
}

.force-premium-hero p,
.ip-react-hero p,.ip-page-hero p,.ip-bib-hero p,.ip-module-hero p,.page-hero p,.module-hero p{
  color:rgba(255,255,255,.84) !important;
  -webkit-text-fill-color:rgba(255,255,255,.84) !important;
  position:relative;
  z-index:1;
}

/* cards */
.card, .ip-card, .dashboard-card, .stat-card, .panel, .widget, .box, .msg-card, .form-card, .content-card, .data-card, .ip-bi-card, .ip-bi-panel{
  background:#fff !important;
  color:var(--force-text) !important;
  border:1px solid var(--force-border) !important;
  border-radius:24px !important;
  box-shadow:var(--force-shadow) !important;
}

.card *, .ip-card *, .dashboard-card *, .stat-card *, .panel *, .widget *, .box *, .msg-card *, .form-card *{
  color:inherit;
}

h1,h2,h3,h4,h5,h6,
.card h1,.card h2,.card h3,.ip-card h1,.ip-card h2,.ip-card h3,.panel h1,.panel h2,.panel h3{
  color:var(--force-text) !important;
  -webkit-text-fill-color:var(--force-text) !important;
}

small,.muted,.text-muted,.description,.help{
  color:var(--force-muted) !important;
  -webkit-text-fill-color:var(--force-muted) !important;
}

/* Formulários: regra mais forte */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.regular-text,
.search-input{
  background:#fff !important;
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  border-radius:15px !important;
  padding:12px 14px !important;
  font-weight:650 !important;
  box-shadow:none !important;
}

input::placeholder, textarea::placeholder{
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}

form label, .form-label, fieldset label, .field-label{
  color:#1f2937 !important;
  -webkit-text-fill-color:#1f2937 !important;
  font-weight:800 !important;
}

/* Tabelas */
table, .data-table, .wp-list-table{
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid var(--force-border) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  box-shadow:var(--force-shadow) !important;
}

table th, .data-table th, .wp-list-table th{
  background:#f8fafc !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  font-size:12px !important;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:900 !important;
}

table td, .data-table td, .wp-list-table td{
  color:#1f2937 !important;
  -webkit-text-fill-color:#1f2937 !important;
  border-bottom:1px solid #edf2f7 !important;
}

/* Botões */
.btn, .button, button, input[type="submit"], a.button{
  border-radius:15px !important;
  font-weight:900 !important;
  text-decoration:none !important;
}

.btn-primary, .button-primary, button.primary, input[type="submit"].primary, input[type="submit"].button-primary{
  background:linear-gradient(135deg,var(--force-blue),var(--force-blue2)) !important;
  border-color:var(--force-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

/* default não invisível */
.button:not(.button-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
.btn:not(.btn-primary):not(.btn-whatsapp):not(.btn-wa-send):not(.btn-delete):not(.btn-excluir):not(.btn-edit):not(.btn-editar),
button:not(.primary):not(.button-primary):not([data-action*="delete"]):not([data-action*="excluir"]):not([data-action*="edit"]):not([data-action*="editar"]){
  background:#fff !important;
  border:1px solid var(--force-border) !important;
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
}

.btn-wa-send,.btn-whatsapp,a[href*="wa.me"],a[href*="whatsapp"]{
  background:var(--force-green) !important;
  border-color:var(--force-green) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-excluir,.btn-delete,.button-delete,.delete,button[data-action*="excluir"],button[data-action*="delete"],a[href*="excluir"],a[href*="delete"]{
  background:var(--force-red) !important;
  border-color:var(--force-red) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-editar,.btn-edit,button[data-action*="editar"],button[data-action*="edit"],.ip-editar-livro-tab,.ip-force-edit{
  background:var(--force-blue) !important;
  border-color:var(--force-blue) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.btn-warning,.warning,button[data-action*="alerta"],button[data-action*="warning"]{
  background:var(--force-orange) !important;
  border-color:var(--force-orange) !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}

.empty-state,.ip-empty,.no-results,.ip-bib-empty{
  background:#fff !important;
  border:1px dashed #cbd5e1 !important;
  border-radius:24px !important;
  color:var(--force-muted) !important;
  padding:38px 22px !important;
  text-align:center;
}

@media(max-width:800px){
  .force-premium-hero,.ip-react-hero,.ip-page-hero,.ip-bib-hero,.ip-module-hero,.page-hero,.module-hero{
    padding:23px !important;
    border-radius:24px !important;
  }
}
