/* ========= Root & Theme ========= */
:root{
  --g-blue:#12314a;
  --g-green:#1c6a57;
  --g-yellow:#fbbc04;
  --g-red:#ea4335;
  --bg:#f4f7fa;
  --text:#102436;
  --muted:#607487;
  --border:#d7e0e8;
  --soft:#eef3f7;
  --soft-strong:#e5edf4;
  --radius:18px;
  --shadow-sm:0 10px 24px rgba(16,24,40,.06);
  --shadow-md:0 18px 42px rgba(16,24,40,.1);
}

/* ========= Base ========= */
html{scroll-behavior:smooth;}
body{
  font-family:'Source Sans 3',system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,'Helvetica Neue',Arial,sans-serif;
  background:var(--bg); color:var(--text);
  font-size:16px; line-height:1.55;
}
@media (max-width: 575.98px){
  body{font-size:14px;} /* menor no mobile */
  .page-shell{
    padding-top:1.4rem;
    padding-bottom:1.7rem;
  }
  .page-header{
    flex-direction:column;
    align-items:stretch;
  }
  .page-actions{
    justify-content:stretch;
  }
  .page-actions .btn{
    width:100%;
  }
  .section-card .card-body,
  .section-block{
    padding:1.15rem;
  }
  .metric-grid{
    grid-template-columns:1fr;
  }
}
@media (min-width: 576px) and (max-width: 767.98px){
  body{font-size:15px;}
}

/* ========= Typography ========= */
h1,h2,h3,h4,h5,h6{
  margin:0 0 .5rem 0;
  font-weight:700;
  letter-spacing:-.03em;
  font-family:'Manrope',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
h1{font-size:clamp(1.25rem, 2.2vw, 1.75rem);}
h2{font-size:clamp(1.125rem, 1.8vw, 1.5rem);}
h3{font-size:clamp(1rem, 1.6vw, 1.25rem);}
.small{font-size:.875rem;}
.text-muted{color:var(--muted)!important;}
.text-dim{color:#475569;}

/* ========= App Pages ========= */
.page-shell{
  padding-top:2rem;
  padding-bottom:2rem;
}
.page-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:1.2rem;
}
.page-title-wrap{
  max-width:760px;
}
.page-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  color:var(--g-green);
  font-family:'Manrope',system-ui,sans-serif;
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.page-kicker::before{
  content:"";
  width:28px;
  height:1px;
  background:rgba(28,106,87,.4);
}
.page-title{
  margin:0 0 8px;
  font-size:clamp(1.7rem, 2.4vw, 2.4rem);
  line-height:1.03;
}
.page-subtitle{
  color:var(--muted);
  margin:0;
  font-size:1.05rem;
}
.page-divider{
  height:1px;
  background:linear-gradient(90deg, rgba(18,49,74,.08), rgba(18,49,74,.18), rgba(18,49,74,.08));
  margin:1.5rem 0 0;
}
.page-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}
.toolbar-card .card-body{padding:1.3rem;}
.table-card .card-body{padding:0;}
.table-card-history .table-responsive{
  display:block!important;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.table-history{
  min-width:1120px;
  table-layout:fixed;
}
.table-history thead th{
  white-space:nowrap;
  font-size:.95rem;
  padding:.95rem 1rem;
}
.table-history tbody td{
  padding:1rem;
  color:#203445;
}
.table-history .th-date,
.table-history .cell-date{
  width:160px;
  white-space:nowrap;
}
.table-history .th-type,
.table-history .cell-type{
  width:280px;
}
.table-history .th-author,
.table-history .cell-author{
  width:220px;
}
.table-history .th-month,
.table-history .cell-month{
  width:110px;
  white-space:nowrap;
}
.table-history .th-rate,
.table-history .cell-rate{
  width:130px;
}
.table-history .th-status,
.table-history .cell-status{
  width:120px;
  white-space:nowrap;
}
.table-history .th-action,
.table-history .cell-action{
  width:110px;
  white-space:nowrap;
}
.table-history .cell-type,
.table-history .cell-author{
  line-height:1.55;
  word-break:normal;
}
.table-card-history .history-cards{
  display:none!important;
}
.table-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.section-card .card-body{
  padding:1.5rem;
}
.section-block{
  background:rgba(255,255,255,.88);
  border:1px solid var(--border);
  border-radius:24px;
  padding:1.25rem;
}
.section-title{
  font-size:1.05rem;
  margin-bottom:.3rem;
}
.section-text{
  color:var(--muted);
  margin-bottom:0;
}
.eyebrow-title{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-family:'Manrope',system-ui,sans-serif;
  font-size:.92rem;
  font-weight:700;
  margin-bottom:.45rem;
}
.metric-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.metric-card{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:22px;
  padding:1.25rem;
  height:100%;
}
.metric-label{
  color:var(--muted);
  font-size:.95rem;
  margin-bottom:.35rem;
}
.metric-value{
  font-family:'Manrope',system-ui,sans-serif;
  font-size:1.15rem;
  font-weight:700;
  color:var(--text);
}
.result-shell{
  overflow:hidden;
}
.result-head{
  padding:1rem 1.25rem;
  font-family:'Manrope',system-ui,sans-serif;
  font-weight:800;
  font-size:1.05rem;
}
.result-head.success{
  background:#eaf7f1;
  color:#155b48;
}
.result-head.danger{
  background:#e33144;
  color:#fff;
}
.note-panel{
  border-radius:22px;
  border:1px solid var(--border);
  padding:1.15rem 1.25rem;
  background:#fff;
}
.highlight-panel{
  border-radius:22px;
  border:1px solid #f1c0c0;
  background:#fff3f3;
  color:#b02b2b;
  padding:1.15rem 1.25rem;
}
.peticao-alert{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:14px;
  align-items:flex-start;
}
.peticao-alert .material-symbols-outlined{
  margin-top:2px;
}
.peticao-summary-grid .metric-card:first-child{
  grid-column:span 2;
}
.peticao-summary-grid .metric-card .metric-value{
  line-height:1.25;
  word-break:break-word;
}
.peticao-stats-grid > div{
  word-break:break-word;
}
.doc-actions{
  display:grid;
  gap:12px;
}
.doc-actions .btn{
  justify-content:flex-start;
  min-height:54px;
  padding:.9rem 1.15rem;
  font-size:1rem;
  font-weight:700;
  border-radius:18px;
}
.doc-actions .btn .material-symbols-outlined{
  font-size:20px;
  line-height:1;
}
.doc-actions .btn-primary{
  box-shadow:0 10px 24px rgba(18,49,74,.14);
}
.doc-actions .btn-outline-secondary{
  border-color:#cbd5e1;
  color:#334155;
  background:#fff;
}
.doc-actions .btn-outline-secondary:hover{
  background:#f8fafc;
  color:#102436;
}
.content-grid{
  display:grid;
  gap:24px;
  grid-template-columns:minmax(0,1.7fr) minmax(280px,.9fr);
}
.plan-overview{
  display:grid;
  gap:24px;
  grid-template-columns:minmax(0,1.6fr) minmax(280px,.8fr);
}
.plan-sections{
  display:grid;
  gap:24px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.plan-title{
  font-size:clamp(1.4rem, 2vw, 1.9rem);
  margin:0;
}
.plan-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
}
.plan-cta{
  display:flex;
  align-items:flex-start;
}
.plan-metrics{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.plan-sidebar{
  display:grid;
  gap:16px;
}
.plan-steps{
  display:grid;
  gap:14px;
}
.plan-step{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:flex-start;
}
.plan-step .material-symbols-outlined{
  color:var(--g-green);
  font-size:22px;
  margin-top:2px;
}
.plan-step strong{
  display:block;
  margin-bottom:4px;
  font-family:'Manrope',system-ui,sans-serif;
}
.plan-step p{
  color:var(--muted);
}
.plan-feature-list{
  display:grid;
  gap:12px;
}
.plan-feature-item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:flex-start;
}
.plan-feature-item .material-symbols-outlined{
  color:var(--g-green);
  font-size:20px;
  margin-top:2px;
}
.plan-data-list{
  display:grid;
  gap:0;
}
.plan-data-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid rgba(215,224,232,.8);
}
.plan-data-row:last-child{
  border-bottom:0;
  padding-bottom:0;
}
.plan-data-row span{
  color:var(--muted);
}
.plan-data-row strong{
  text-align:right;
  font-family:'Manrope',system-ui,sans-serif;
}
.aside-stack{
  display:grid;
  gap:16px;
}
.video-shell{
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:var(--shadow-sm);
}
.video-shell .card-body{
  padding:1rem;
}
.info-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:12px;
}
.info-list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:#314559;
}
.info-list .material-symbols-outlined{
  font-size:20px;
  color:var(--g-green);
  margin-top:2px;
}
.form-section-divider{
  margin:1rem 0 .25rem;
  padding-top:1rem;
  border-top:1px solid rgba(215,224,232,.8);
}
.form-section-title{
  font-family:'Manrope',system-ui,sans-serif;
  font-size:1rem;
  font-weight:800;
  margin:0 0 .25rem;
}
.form-section-text{
  color:var(--muted);
  margin:0 0 1rem;
}
.pill-tabs{
  gap:10px;
}
.pill-tabs .nav-link{
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:#334155;
  font-weight:700;
  padding:.75rem 1rem;
}
.pill-tabs .nav-link.active{
  background:var(--g-blue);
  border-color:var(--g-blue);
  color:#fff;
}
.surface-warm{
  background:#fffaf0;
}
.page-actions-menu{
  display:none;
}
.page-actions-menu .btn{
  width:auto;
  min-width:52px;
  padding:.75rem .95rem;
}
.page-actions-menu .dropdown-menu{
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-sm);
  padding:.45rem;
}
.page-actions-menu .dropdown-item{
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  color:var(--text);
  padding:.75rem .85rem;
}
.page-actions-menu .dropdown-item .material-symbols-outlined{
  font-size:20px;
}

/* ========= Navbar ========= */
.navbar{
  box-shadow:none;
  padding-block:0;
  background:rgba(255,255,255,.86)!important;
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(215,224,232,.9)!important;
}
.navbar .container-xxl{min-height:82px}
.navbar .navbar-brand{
  display:flex;
  align-items:center;
  gap:.5rem;
  font-weight:800;
  font-size:1.05rem;
  color:var(--g-blue)!important;
  font-family:'Manrope',system-ui,sans-serif;
}
.navbar .brand-logo{
  height:40px;
  width:auto;
  display:block;
}
.navbar .brand-icon{font-size:22px; color:var(--g-blue);}
.navbar .nav-link{
  font-family:'Manrope',system-ui,sans-serif;
  font-weight:700;
  color:#334155;
  padding:.65rem 1rem;
  border-radius:999px;
}
.navbar .nav-link:hover,
.navbar .nav-link.active{background:var(--soft); color:#111827;}
.navbar-toggler{
  padding:0;
  border:0!important;
  box-shadow:none!important;
  margin-left:auto;
  justify-self:end;
}
.mobile-nav-top{display:none}
.nav-account .btn{border-radius:999px}
@media (min-width: 992px){
  .navbar .container-xxl{
    padding-inline:2rem;
  }
  .navbar .navbar-nav{
    gap:.25rem;
    margin-left:1.15rem;
  }
  .navbar .nav-link{
    padding:.8rem 1.35rem;
  }
}
@media (max-width: 991.98px){
  .navbar .container-xxl{
    min-height:76px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    width:100%;
  }
  .navbar-collapse{
    position:fixed;
    inset:0;
    z-index:1080;
    width:100vw;
    height:100dvh;
    display:none!important;
    flex-direction:column;
    justify-content:flex-start;
    align-items:stretch;
    gap:0;
    padding:20px 18px 28px;
    background:rgba(248,250,252,.985);
    backdrop-filter:blur(16px);
    transform:translateX(100%);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:transform .32s cubic-bezier(.22,1,.36,1), opacity .2s ease, visibility .2s ease;
  }
  .navbar-collapse.show,
  .navbar-collapse.collapsing{
    display:flex!important;
  }
  .navbar-collapse.show{
    transform:translateX(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .navbar-collapse.collapsing{
    transform:translateX(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    height:100dvh!important;
  }
  .mobile-nav-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:22px;
  }
  .navbar-nav{
    width:100%;
    margin-top:auto;
    margin-bottom:auto!important;
    align-items:center;
    gap:10px;
  }
  .navbar-nav .nav-item{
    width:100%;
    display:flex;
    justify-content:center;
  }
  .navbar .nav-link{
    width:100%;
    max-width:320px;
    font-size:1.55rem;
    line-height:1.1;
    text-align:center;
  }
  .nav-account{
    width:100%;
    flex-direction:column;
    align-items:center!important;
  }
  .content-grid{
    grid-template-columns:1fr;
  }
  .metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .peticao-summary-grid .metric-card:first-child{
    grid-column:1 / -1;
  }
}
@media (max-width: 575.98px){
  .navbar .nav-link{padding:.5rem;}
  .nav-account .btn{width:auto;}
}

/* ========= Cards ========= */
.card{border-radius:var(--radius); border:1px solid var(--border); box-shadow:var(--shadow-sm); overflow:hidden;}
.card .card-header{background:#f9fafb; border-bottom:1px solid var(--border);}
.card .card-footer{background:#fff; border-top:1px solid var(--border);}
.shadow-sm{box-shadow:var(--shadow-sm)!important;}
.shadow-md{box-shadow:var(--shadow-md)!important;}

/* ========= Buttons ========= */
.btn{border-radius:999px; font-weight:700; padding:.82rem 1.2rem;}
.btn .material-symbols-outlined{font-size:1.1em; line-height:1; vertical-align:-3px;}
.btn-primary{background:var(--g-blue); border-color:var(--g-blue);}
.btn-success{background:var(--g-green); border-color:var(--g-green);}
.btn-danger{background:var(--g-red); border-color:var(--g-red);}
.btn-info{background:#0ea5e9; border-color:#0ea5e9;}
.btn-outline-secondary{border-color:#cbd5e1; color:#334155;}
.btn-outline-secondary:hover{background:#edf2f7; color:#0f172a;}
.btn-outline-primary{border-color:#93c5fd; color:#1d4ed8;}
.btn-outline-primary:hover{background:#e0f2fe; color:#1e40af;}
@media (max-width: 575.98px){
  .btn{padding:.45rem .7rem; font-weight:600;}
  .doc-actions .btn{width:100%;}
}

/* ========= Forms ========= */
.form-label{font-weight:700; color:#284055; font-family:'Manrope',system-ui,sans-serif; font-size:.94rem;}
.form-control,.form-select{
  border-radius:16px; border:1px solid #d1d5db; background:#fff; min-height:54px;
}
.form-control:focus,.form-select:focus{
  border-color:#93c5fd; box-shadow:0 0 0 .2rem rgba(26,115,232,.15);
}
.input-group-text{
  background:#f8fafc;
  border-color:#d1d5db;
  font-weight:600;
  border-radius:16px 0 0 16px;
  min-width:54px;
  justify-content:center;
}
.input-group > .form-control,
.input-group > .form-select{
  border-radius:0 16px 16px 0;
}
::placeholder{color:#9aa6b2;}
@media (max-width: 575.98px){
  .form-label{font-size:.9rem;}
  .input-group-text{min-width:48px;}
}

/* ========= Tables ========= */
.table{--bs-table-bg:#fff;}
.table thead th{background:#f0f3f9; font-weight:700; color:#111827;}
.table tbody tr:hover{background:#fafcff;}
.table td,.table th{vertical-align:middle;}
.table .badge{font-weight:600;}
/* Tabela mais compacta no mobile */
@media (max-width: 991.98px){
  .table-card .table-responsive{display:none;}
  .history-cards{display:block;}
}
@media (max-width: 575.98px){
  .table{font-size:.9rem;}
  .table .btn{padding:.35rem .55rem;}
  .table-history thead th,
  .table-history tbody td{
    padding:.85rem .8rem;
  }
  .page-actions{
    display:none;
  }
  .history-actions{
    display:none;
  }
  .page-actions-menu{
    display:flex;
    justify-content:flex-end;
    margin-top:6px;
  }
}

/* ========= Badges (soft) ========= */
.badge.bg-success{background:#e8f5e9!important; color:#188038!important;}
.badge.bg-danger{background:#fde8e8!important; color:#b91c1c!important;}
.badge.bg-primary{background:#e8f0fe!important; color:#1a73e8!important;}
.badge.bg-warning{background:#fff7e6!important; color:#9a6700!important;}
.badge.bg-secondary{background:#eef2f7!important; color:#475569!important;}
.badge-soft{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.38rem .7rem;
  font-weight:700;
  font-size:.86rem;
  border:1px solid transparent;
}
.badge-soft.success{
  background:#ebf7f1;
  color:#14624f;
  border-color:#cfe8dd;
}
.badge-soft.danger{
  background:#fff0f0;
  color:#a93232;
  border-color:#f3d0d0;
}
.badge-soft.warning{
  background:#fff6e6;
  color:#976100;
  border-color:#f7e2ae;
}
.badge-soft.neutral{
  background:#eef2f7;
  color:#53687b;
  border-color:#dde6ee;
}

/* ========= Alerts ========= */
.alert{border-radius:16px; border:1px solid var(--border); box-shadow:var(--shadow-sm); padding:1rem 1.1rem;}
.alert-success{background:#f0fdf4; color:#166534; border-color:#bbf7d0;}
.alert-danger{background:#fef2f2; color:#991b1b; border-color:#fecaca;}
.alert-warning{background:#fffbeb; color:#92400e; border-color:#fde68a;}

/* ========= Helpers ========= */
.container-xxl{max-width:1320px;}
hr{border-color:var(--border);}
.material-symbols-outlined{font-variation-settings: 'wght' 600;}

/* ========= Buttons row (rodapés) ========= */
.card-footer .btn{min-width: 44px;}
.card-footer .btn + .btn{margin-left:.25rem;}
@media (max-width: 575.98px){
  .card-footer{gap:.5rem!important;}
}

/* ========= History ========= */
.history-cards{
  display:none;
}
.history-card{
  padding:22px;
  border-bottom:1px solid var(--border);
}
.history-card:last-child{
  border-bottom:0;
}
.history-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}
.history-date{
  color:var(--muted);
  font-size:.95rem;
}
.history-title{
  font-family:'Manrope',system-ui,sans-serif;
  font-weight:700;
  font-size:1.12rem;
  line-height:1.35;
  margin-bottom:4px;
}
.history-meta{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.history-meta-item{
  display:grid;
  gap:2px;
}
.history-meta-label{
  font-family:'Manrope',system-ui,sans-serif;
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--muted);
}
.history-meta-value{
  color:var(--text);
}
.history-card-actions{
  margin-top:18px;
  display:flex;
}
.history-card-actions .btn{
  width:100%;
  justify-content:center;
}

/* ========= Auth ========= */
.auth-page{
  min-height:100vh;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(18,49,74,.08), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #f3f6f8 100%);
}
.auth-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  padding:32px 20px;
}
.auth-layout{
  width:min(1180px, 100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(320px, .95fr) minmax(0, 1fr);
  background:rgba(255,255,255,.72);
  border:1px solid rgba(215,224,232,.8);
  border-radius:32px;
  overflow:hidden;
  box-shadow:0 30px 70px rgba(16,36,54,.1);
  backdrop-filter:blur(14px);
}
.auth-aside{
  background:linear-gradient(180deg, rgba(12,31,47,.98) 0%, rgba(16,40,61,.98) 100%);
  color:#e8f0f6;
  padding:44px 40px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:28px;
}
.auth-brand{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}
.auth-logo{
  height:44px;
  width:auto;
}
.auth-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 16px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  color:#d9e7f2;
  font-family:'Manrope',system-ui,sans-serif;
  font-size:.85rem;
  font-weight:700;
  width:max-content;
}
.auth-badge::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#89d1bd;
  box-shadow:0 0 0 6px rgba(137,209,189,.12);
}
.auth-aside h1{
  font-size:clamp(2.2rem, 4vw, 3.5rem);
  line-height:.98;
  margin:0 0 18px;
  color:#fff;
}
.auth-aside p{
  color:#bfd0dd;
  font-size:1.08rem;
  margin:0;
  max-width:34ch;
}
.auth-points{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:14px;
}
.auth-points li{
  display:flex;
  gap:12px;
  align-items:flex-start;
  color:#d9e5ef;
}
.auth-points .material-symbols-outlined{
  font-size:20px;
  color:#8ad2be;
}
.auth-footnote{
  padding-top:24px;
  border-top:1px solid rgba(255,255,255,.1);
  color:#9eb4c6;
  font-size:.96rem;
}
.auth-panel{
  padding:40px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.auth-card{
  width:min(620px, 100%);
  background:#fff;
  border:1px solid rgba(215,224,232,.95);
  border-radius:28px;
  box-shadow:0 20px 52px rgba(16,36,54,.08);
}
.auth-card-body{
  padding:36px;
}
.auth-card-header{
  margin-bottom:24px;
  text-align:center;
}
.auth-card-header .material-symbols-outlined{
  display:inline-grid;
  place-items:center;
  width:62px;
  height:62px;
  margin-bottom:16px;
  border-radius:18px;
  background:#eff4f8;
  color:var(--g-blue);
  font-size:30px;
}
.auth-card-header h2{
  margin-bottom:10px;
  font-size:clamp(1.7rem, 3vw, 2.1rem);
}
.auth-card-header p{
  color:var(--muted);
  font-size:1.02rem;
  margin:0;
}
.auth-form{
  display:grid;
  gap:18px;
}
.auth-form .row{
  --bs-gutter-y:18px;
}
.auth-actions{
  display:grid;
  gap:12px;
  margin-top:10px;
}
.auth-actions .btn{
  min-height:54px;
}
.auth-secondary-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin-top:18px;
}
.auth-secondary-links a{
  color:var(--g-blue);
  text-decoration:none;
  font-weight:700;
}
.auth-secondary-links a:hover{
  color:#0d2233;
}
.auth-success{
  text-align:center;
}
.auth-success .btn{
  min-width:220px;
}

.app-footer{
  padding:20px 0 28px;
  background:transparent;
}
.app-footer-inner{
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:#708496;
  font-size:.95rem;
}

@media (max-width: 991.98px){
  .auth-shell{padding:20px 14px;}
  .auth-layout{
    grid-template-columns:1fr;
    border-radius:28px;
  }
  .auth-aside{
    padding:30px 24px;
    gap:22px;
  }
  .auth-panel{
    padding:24px 18px 28px;
  }
  .app-footer-inner{
    flex-direction:column;
    text-align:center;
    align-items:center;
  }
}

@media (max-width: 575.98px){
  .auth-shell{padding:0;}
  .auth-layout{
    border-radius:0;
    border:none;
    box-shadow:none;
    background:transparent;
  }
  .auth-aside{
    border-radius:0 0 28px 28px;
    padding:24px 18px 28px;
  }
  .auth-logo{height:40px;}
  .auth-aside h1{font-size:2rem;}
  .auth-aside p{font-size:1rem;}
  .auth-panel{
    padding:18px 14px 28px;
  }
  .auth-card{
    border-radius:24px;
  }
  .auth-card-body{
    padding:26px 20px;
  }
  .auth-card-header .material-symbols-outlined{
    width:56px;
    height:56px;
    border-radius:16px;
  }
  .page-title{
    font-size:clamp(1.48rem, 6vw, 1.82rem);
    line-height:1.1;
    letter-spacing:-.04em;
  }
  .page-subtitle{
    font-size:1rem;
  }
  .content-grid,
  .aside-stack{
    gap:18px;
  }
  .plan-overview,
  .plan-sections{
    grid-template-columns:1fr;
    gap:18px;
  }
  .plan-hero{
    flex-direction:column;
  }
  .plan-cta,
  .plan-cta .btn{
    width:100%;
  }
  .plan-metrics{
    grid-template-columns:1fr;
  }
  .plan-data-row{
    flex-direction:column;
    gap:6px;
  }
  .plan-data-row strong{
    text-align:left;
  }
  .peticao-summary-grid{
    grid-template-columns:1fr;
  }
  .peticao-summary-grid .metric-card:first-child{
    grid-column:auto;
  }
  .peticao-alert{
    grid-template-columns:1fr;
  }
  .peticao-alert .material-symbols-outlined{
    font-size:22px;
  }
  .peticao-totals-grid > [class*="col-"],
  .peticao-scenarios-grid > [class*="col-"]{
    width:100%;
  }
  .peticao-stats-grid{
    --bs-gutter-x:12px;
    --bs-gutter-y:10px;
  }
  .peticao-stats-grid > .col-6{
    width:100%;
  }
  .peticao-stats-grid > .col-6.small.text-muted.mt-2{
    margin-top:0 !important;
  }
}

/* ========= Focus visible (acessibilidade) ========= */
:focus-visible{outline:2px solid #93c5fd; outline-offset:2px;}
/* reduz animações se preferir */
@media (prefers-reduced-motion: reduce){
  *{animation:none!important; transition:none!important;}
}

/* ======= Melhorias de responsividade (append) ======= */

/* Botões 100% de largura no mobile */
@media (max-width: 575.98px){
  .btn-block-sm{ width:100% !important; display:block; }
}

/* Containers flex que viram coluna no mobile (barras de ações/rodapés) */
.stack-sm{ display:flex; gap:.5rem; }
@media (max-width: 575.98px){
  .stack-sm{ flex-direction:column; }
}

/* Tabela: scroll somente no mobile */
.table-wrap{ overflow:visible; }
@media (max-width: 575.98px){
  .table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table{ min-width: 720px; } /* evita quebrar as colunas; ajuste se precisar */
}

/* Tipografia um pouco menor no mobile */
@media (max-width: 575.98px){
  h1{ font-size:1.2rem; }
  h2{ font-size:1.05rem; }
  h3{ font-size:1rem; }
  .card .card-header, .card .card-footer{ padding:.65rem .9rem; }
}

/* Forms mais compactos no mobile */
@media (max-width: 575.98px){
  .form-control, .form-select{ padding:.45rem .6rem; }
  .input-group-text{ padding:.45rem .6rem; }
}

/* Navbar: fonte/brand um pouco menores no mobile */
@media (max-width: 575.98px){
  .navbar .navbar-brand{ font-size:1rem; }
}

/* Quebra segura de textos longos (e-mails, contratos etc.) */
.text-break, .break-any{
  word-wrap:break-word; overflow-wrap:anywhere; word-break:break-word;
}

/* Cards com respiro no mobile (quando encostam na borda) */
@media (max-width: 575.98px){
  .card{ margin-inline:.25rem; }
}

/* Rodapé de cards: espaço consistente entre botões */
.card-footer .btn{ min-height:40px; }
@media (max-width: 575.98px){
  .card-footer.stack-sm .btn{ width:100%; } /* combinado com .stack-sm */
}
