:root{
  --app-blue:#0d6efd;
  --app-blue-dark:#084298;
  --app-bg-1:#eaf4ff;
  --app-bg-2:#cfe5ff;
  --app-text:#1f2d3d;
  --app-muted:#6c757d;
  --app-card:rgba(255,255,255,.96);
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  color:var(--app-text);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:linear-gradient(135deg,#0b5ed7 0%,#4da3ff 46%,#d9ecff 100%);
  background-attachment:fixed;
}
a{text-decoration:none}
.app-shell{min-height:100vh}
.app-navbar{background:rgba(7,49,103,.94);backdrop-filter:blur(10px);box-shadow:0 8px 30px rgba(0,0,0,.12)}
.app-brand{display:flex;align-items:center;gap:.7rem;font-weight:800;color:#fff!important;letter-spacing:.2px}
.app-logo{width:34px;height:34px;object-fit:contain;background:#fff;border-radius:9px;padding:4px}
.app-main{padding:1.25rem 0 2.25rem}
.page-card,.stat-card,.auth-card{border:0;border-radius:1.15rem;background:var(--app-card);box-shadow:0 18px 50px rgba(7,49,103,.15)}
.page-card .card-header{background:transparent;border:0;padding:1.15rem 1.25rem .35rem}
.page-card .card-body{padding:1.1rem 1.25rem 1.35rem}
.page-title{font-weight:800;color:#143a66;margin:0}.page-subtitle{color:var(--app-muted);margin:.25rem 0 0}
.btn{border-radius:.75rem;font-weight:600}.btn i{margin-right:.35rem}.btn-icon{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;padding:0}.btn-icon i{margin:0}
.form-control,.form-select{border-radius:.75rem;min-height:44px;border-color:#d7e2ee}.form-control:focus,.form-select:focus{border-color:#79b4ff;box-shadow:0 0 0 .22rem rgba(13,110,253,.12)}
.input-group-text{border-radius:.75rem 0 0 .75rem;background:#f4f8fc;border-color:#d7e2ee}
.table-modern{margin-bottom:0}.table-modern thead th{background:#f4f8fc;color:#52677c;border-bottom:0;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}.table-modern td{vertical-align:middle;border-color:#edf2f7}.table-modern tbody tr{cursor:pointer;transition:.16s}.table-modern tbody tr:hover{background:#f3f8ff}
.badge-soft-success{background:#dff7e9;color:#187845}.badge-soft-danger{background:#ffe2e6;color:#b42335}
.search-wrap{position:relative}.search-wrap i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#7b8da0;z-index:2}.search-wrap .form-control{padding-left:2.5rem}
.app-footer{color:rgba(255,255,255,.88);font-size:.86rem;padding:0 0 1rem}
.hero-card{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(238,247,255,.97));overflow:hidden}.hero-icon{width:68px;height:68px;border-radius:20px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0d6efd,#6ea8fe);color:#fff;font-size:2rem;box-shadow:0 12px 25px rgba(13,110,253,.25)}
.module-card{transition:.18s ease;border:1px solid #e5edf5;border-radius:1rem;height:100%;background:#fff}.module-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(10,74,144,.12);border-color:#b9d7ff}.module-card .module-icon{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#e8f2ff;color:#0d6efd;font-size:1.35rem}
.auth-page{min-height:100vh;display:flex;align-items:center;padding:1.5rem}.auth-wrap{width:100%;max-width:980px;margin:auto}.auth-card{overflow:hidden}.auth-side{min-height:560px;padding:3rem;background:linear-gradient(145deg,#073b7a,#0d6efd 60%,#69adff);color:#fff;display:flex;flex-direction:column;justify-content:center}.auth-side .auth-logo{width:82px;height:82px;border-radius:22px;background:#fff;padding:10px;object-fit:contain;margin-bottom:1.5rem}.auth-form{padding:2.4rem}.auth-form h1{font-weight:800;color:#143a66}.password-toggle{cursor:pointer}
.modal-content{border:0;border-radius:1rem;box-shadow:0 25px 60px rgba(0,0,0,.2)}.modal-header{border-bottom:1px solid #edf2f7}.modal-footer{border-top:1px solid #edf2f7}
.dropdown-menu{border:0;border-radius:.85rem;box-shadow:0 14px 35px rgba(0,0,0,.15)}
@media(max-width:767.98px){.app-main{padding-top:.8rem}.page-card .card-header,.page-card .card-body{padding-left:.9rem;padding-right:.9rem}.auth-side{min-height:auto;padding:2rem}.auth-form{padding:1.5rem}.table-responsive{border-radius:.75rem}.hide-mobile{display:none!important}}

.dropdown-menu{max-height:80vh;overflow:auto}
/* Caixa / Livro Caixa */
#tblCaixa td{font-size:.92rem}
#tblCaixa .badge{min-width:64px}
#resSaldoAnterior,#resEntradas,#resSaidas,#resSaldoAtual{font-variant-numeric:tabular-nums}
@media(max-width:767.98px){#tblCaixa{min-width:1150px}.pagination{flex-wrap:wrap}}

/* Plano de Contas no Movimento do Caixa */
.plano-contas-select option.conta-sintetica {
    color: #071a3d;
    font-weight: 700;
    background: #eef4ff;
}
.plano-contas-select option.conta-analitica {
    color: #111;
    font-weight: 400;
    background: #fff;
}
.legenda-sintetica { color:#071a3d; font-weight:700; }
.legenda-analitica { color:#111; }

/* Plano de contas do Caixa: fonte monoespacada para leitura hierarquica. */
.plano-contas-select {
  font-family: "Courier New", Courier, monospace !important;
  font-size: 1.08rem !important;
  font-weight: 600;
  min-height: 44px;
}
.plano-contas-select option {
  font-family: "Courier New", Courier, monospace !important;
  font-size: 1.08rem !important;
  padding: 6px 8px;
}
.plano-contas-select option.conta-sintetica {
  color: #071a3d !important;
  font-weight: 700;
}
.plano-contas-select option.conta-analitica {
  color: #111 !important;
  font-weight: 600;
}
#c_valor {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.15rem;
  font-weight: 700;
}


/* Funcionários: cores suaves por função */
tr.funcao-caixa > td,
.table tbody tr.funcao-caixa > td {
    background: rgba(13, 110, 253, .08) !important;
}
tr.funcao-outros > td,
.table tbody tr.funcao-outros > td {
    background: rgba(25, 135, 84, .07) !important;
}
tr.funcao-caixa:hover > td,
.table tbody tr.funcao-caixa:hover > td {
    background: rgba(13, 110, 253, .14) !important;
}
tr.funcao-outros:hover > td,
.table tbody tr.funcao-outros:hover > td {
    background: rgba(25, 135, 84, .12) !important;
}

/* v5.4.2 - acabamento seguro */
body{
  background:
    radial-gradient(circle at 12% 5%, rgba(255,255,255,.30), transparent 28%),
    linear-gradient(135deg,#e6eee2 0%,#c2d2bc 42%,#718a68 100%) !important;
  min-height:100vh;
}
.app-navbar{
  background:linear-gradient(90deg,#263b2a,#3e5b42) !important;
  box-shadow:0 8px 26px rgba(28,49,32,.25);
}
.dashboard-hero{
  padding:28px 32px;border-radius:24px;color:#fff;
  background:linear-gradient(135deg,#2f4b34,#58715a);
  box-shadow:0 18px 42px rgba(33,58,38,.24);
  display:flex;align-items:center;justify-content:space-between;
}
.hero-orb{
  width:76px;height:76px;border-radius:24px;
  display:flex;align-items:center;justify-content:center;
  font-size:2rem;background:rgba(255,255,255,.14);
  box-shadow:inset 0 1px rgba(255,255,255,.25),0 12px 26px rgba(0,0,0,.15);
}
.home-3d-card{
  display:flex;align-items:center;gap:18px;padding:24px;
  border-radius:22px;color:#203126;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(237,244,235,.94));
  border:1px solid rgba(255,255,255,.75);
  box-shadow:0 16px 34px rgba(34,62,39,.18), inset 0 1px rgba(255,255,255,.95);
  transition:transform .2s ease, box-shadow .2s ease;
}
.home-3d-card:hover{
  transform:translateY(-6px);
  box-shadow:0 24px 44px rgba(34,62,39,.25), inset 0 1px rgba(255,255,255,.98);
}
.home-3d-icon{
  width:58px;height:58px;border-radius:17px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:1.55rem;
  background:linear-gradient(145deg,#55765b,#2e5035);
  box-shadow:0 10px 22px rgba(46,80,53,.28);
}
.home-card-arrow{font-size:1.25rem;color:#55705b}

/* Loader global */
#globalDbLoader{
  position:fixed;inset:0;z-index:99999;display:none;
  align-items:center;justify-content:center;
  background:rgba(28,48,32,.30);backdrop-filter:blur(2px);
}
#globalDbLoader.show{display:flex}
#globalDbLoader .db-loader-card{
  min-width:230px;padding:24px;border-radius:20px;text-align:center;
  background:#fff;color:#2f4b34;
  box-shadow:0 24px 60px rgba(20,38,24,.30);
}

/* Plano de Contas */
.plano-tree{border-radius:20px;overflow:hidden;background:#fff;box-shadow:0 16px 36px rgba(31,57,35,.16)}
.plano-row{display:grid;grid-template-columns:105px 180px minmax(280px,1fr) 110px 80px 90px;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #e6ece4;font-family:"Courier New",Courier,monospace}
.plano-row.head{background:linear-gradient(90deg,#2c4832,#4c684f);color:#fff;font-family:inherit;font-weight:700}
.plano-row.sintetica{background:#edf3fb;color:#173e68;font-weight:700}
.plano-row.analitica{background:#fff;color:#121812}
.pc-real{font-family:"Courier New",Courier,monospace!important;font-size:1.08rem!important;font-weight:600}

.plano-title-wrap h2{color:#203126!important}
.plano-title-wrap .text-muted{color:#5f6f62!important}
