:root{
  --bg:#f3f5f7;
  --surface:#ffffff;
  --surface-soft:#f8faf8;
  --text:#171717;
  --muted:#6b7280;
  --line:#e5e7eb;
  --green:#43e000;
  --green-dark:#1f7d00;
  --brand-dark:#171518;
  --shadow:0 12px 32px rgba(18,18,18,.07);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
input,select{width:100%;border:1px solid #d7dce2;border-radius:12px;padding:12px 14px;background:#fff;color:var(--text);outline:none}
input:focus,select:focus{border-color:rgba(67,224,0,.7);box-shadow:0 0 0 4px rgba(67,224,0,.1)}
button{border:0;border-radius:14px;padding:13px 18px;background:linear-gradient(180deg,#4dea11,#34c600);color:#fff;font-weight:700;cursor:pointer;box-shadow:0 10px 20px rgba(67,224,0,.16)}
button:hover{filter:brightness(.98)}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:280px;background:radial-gradient(circle at top,#1d2431 0%,#0e1218 55%,#07090c 100%);color:#fff;padding:26px 16px 18px;display:flex;flex-direction:column;gap:24px;position:fixed;inset:0 auto 0 0;z-index:20;box-shadow:inset -1px 0 0 rgba(255,255,255,.06)}
.brand-block{padding:2px 10px 8px}
.brand-logo{max-width:172px;width:100%;display:block}
.sidebar-nav{display:grid;gap:10px}
.nav-link{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:16px;color:#eef2f7;font-weight:700;transition:.2s ease;background:transparent}
.nav-link:hover{background:rgba(255,255,255,.07)}
.nav-link.is-active{background:linear-gradient(90deg,rgba(67,224,0,.48),rgba(67,224,0,.18));box-shadow:inset 0 0 0 1px rgba(67,224,0,.2)}
.nav-icon{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:8px;background:rgba(255,255,255,.07);font-size:13px}
.sidebar-footer{margin-top:auto;display:grid;gap:14px}
.workspace-card{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);border-radius:18px;padding:14px}
.workspace-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#56ed1d,#33c500);font-weight:800;font-size:22px}
.workspace-card strong,.user-pill strong{display:block}
.workspace-card span,.user-pill span{display:block;font-size:13px;color:#d8dee7}
.logout-button{width:100%;background:rgba(255,255,255,.08);box-shadow:none;border:1px solid rgba(255,255,255,.09)}
.main-shell{margin-left:280px;display:flex;flex-direction:column;min-height:100vh;flex:1}
.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:16px;justify-content:space-between;padding:18px 24px;background:rgba(255,255,255,.85);backdrop-filter:blur(16px);border-bottom:1px solid rgba(17,24,39,.06)}
.menu-toggle,.icon-button{border:1px solid var(--line);background:#fff;color:var(--text);box-shadow:none;padding:10px 12px;border-radius:12px}
.menu-toggle{display:none}
.searchbar{flex:1;max-width:720px;display:flex;align-items:center;gap:10px;padding:0 14px;background:#fff;border:1px solid var(--line);border-radius:16px;min-height:52px;box-shadow:0 4px 16px rgba(0,0,0,.03)}
.searchbar input{border:0;padding:0;box-shadow:none;background:transparent}
.searchbar kbd{margin-left:auto;padding:6px 8px;border-radius:8px;background:#f3f4f6;border:1px solid var(--line);color:var(--muted);font-size:12px}
.topbar-actions{display:flex;align-items:center;gap:12px}
.topbar-cta{display:inline-flex;align-items:center;gap:8px;padding:14px 18px;border-radius:14px;background:linear-gradient(180deg,#4dea11,#34c600);color:#fff;font-weight:800;box-shadow:0 10px 24px rgba(67,224,0,.18)}
.user-pill{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 6px;border-radius:16px;background:#fff;border:1px solid var(--line)}
.user-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#2d2a2f,#0f1116);color:#fff;font-weight:800}
.page-content{padding:22px 24px 30px}
.app-footer{display:flex;justify-content:space-between;align-items:center;padding:0 24px 24px;color:var(--muted);font-size:14px}
.app-footer strong{color:#25a100}
.footer-links{display:flex;gap:24px}
.hero-card,.panel,.page-header-card,.notice,.alert{background:var(--surface);border:1px solid rgba(17,24,39,.06);border-radius:24px;box-shadow:var(--shadow)}
.hero-card{padding:28px 28px 18px;display:grid;grid-template-columns:1.05fr .95fr;gap:26px;align-items:center}
.eyebrow{display:inline-flex;padding:7px 12px;border-radius:999px;background:rgba(67,224,0,.09);color:#248b00;font-size:13px;font-weight:700;letter-spacing:.02em;text-transform:uppercase}
.hero-copy h1,.page-header-card h1{font-size:clamp(28px,3vw,52px);line-height:1.02;margin:18px 0 12px;}
.hero-copy h1 span{color:var(--green-dark)}
.hero-copy p,.page-header-card p,.panel-heading p{color:var(--muted);line-height:1.7;max-width:64ch;margin:0}
.hero-actions{display:flex;gap:12px;align-items:center;margin-top:22px;flex-wrap:wrap}
.ghost-button,.secondary-button,.secondary-link,.soft-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;font-weight:700}
.ghost-button{padding:13px 18px;background:#fff;border:1px solid rgba(67,224,0,.35);color:#188800}
.soft-link{color:#1e1e1e;padding:10px 6px}
.secondary-button{background:#fff;color:#202020;border:1px solid var(--line);box-shadow:none}
.secondary-link{padding:10px 14px;border:1px solid var(--line);background:#fff;color:#1f2937}
.hero-visual img{width:100%;height:auto;display:block;border-radius:24px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:18px}
.stat-card{display:flex;gap:16px;align-items:center;padding:24px;background:var(--surface);border:1px solid rgba(17,24,39,.06);border-radius:22px;box-shadow:var(--shadow)}
.stat-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:rgba(67,224,0,.1);color:#1c9700;font-size:24px;font-weight:800}
.stat-card span{display:block;color:var(--muted);font-size:14px;margin-bottom:4px}
.stat-card strong{display:block;font-size:38px;line-height:1;margin-bottom:6px}
.stat-card small{color:#8a919b}
.dashboard-grid,.content-grid{display:grid;gap:18px;margin-top:18px}
.dashboard-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1.1fr) 320px;align-items:start}
.two-columns{grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr)}
.panel{padding:22px}
.panel-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}
.panel-heading h2{margin:0 0 6px;font-size:24px}
.filter-pill{display:inline-flex;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);font-weight:700;color:#4b5563}
.chart-legend{display:flex;gap:16px;flex-wrap:wrap;color:#4b5563;font-size:14px;font-weight:700;margin-bottom:12px}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}
.dot-green{background:#43E000}.dot-blue{background:#4C8DF6}.dot-purple{background:#A56CFF}.dot-red{background:#FF6775}
.chart-svg{width:100%;height:auto;border-radius:18px;background:linear-gradient(180deg,#fff,#fafafa)}
.table-wrapper{overflow:auto;border:1px solid #edf0f2;border-radius:18px}
.data-table{width:100%;border-collapse:collapse;background:#fff}
.data-table th,.data-table td{padding:14px 16px;text-align:left;border-bottom:1px solid #edf0f2;font-size:14px}
.data-table th{background:#fbfbfc;color:#6b7280;font-size:13px;text-transform:uppercase;letter-spacing:.03em}
.data-table tbody tr:hover{background:#fafcfa}
.status-badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;text-transform:capitalize}
.status-active,.status-approved,.status-completed,.status-concluída,.status-read{background:#def8d1;color:#247f00}
.status-pending,.status-pending_review,.status-agendada,.status-scheduled{background:#e6efff;color:#3468d6}
.status-rejected,.status-failed,.status-falhou{background:#fee2e2;color:#b91c1c}
.status-sending,.status-enviando,.status-sent{background:#ebf7e1;color:#368400}
.empty-state{text-align:center;color:var(--muted);padding:26px}
.status-list{display:grid;gap:14px}
.status-list article{padding:16px;border-radius:18px;background:#f8fbf7;border:1px solid #e6f0e1}
.status-list strong{display:block;margin-bottom:6px}
.status-list span{display:block;color:var(--muted);margin-bottom:8px;line-height:1.55}
.status-list em{font-style:normal;color:#198500;font-weight:800}
.page-header-card{padding:24px 26px}
.page-header-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid label{display:grid;gap:8px;color:#374151;font-size:14px;font-weight:700}
.form-grid .full-width{grid-column:1/-1}
.notice,.alert{padding:16px 20px;margin-top:18px}
.notice{background:#eefbea;border-color:#d9f5cc;color:#236d00}
.alert{background:#fff0f0;border-color:#ffd4d4;color:#a61b1b}
.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top right,#efffec 0,#f5f6f8 42%,#edf0f2 100%)}
.login-shell{width:min(1120px,92vw);display:grid;grid-template-columns:1fr 420px;gap:24px;align-items:stretch}
.login-brand-panel,.login-card{background:rgba(255,255,255,.95);border:1px solid rgba(17,24,39,.08);border-radius:28px;box-shadow:var(--shadow)}
.login-brand-panel{padding:36px;background:linear-gradient(135deg,#0e1218,#171d28 65%,#1f7d00 140%);color:#fff}
.login-brand-panel img{max-width:210px;display:block;margin-bottom:24px}
.login-brand-panel h1{margin:0 0 16px;font-size:40px;line-height:1.06}
.login-brand-panel p{margin:0 0 20px;color:#dfe7f1;line-height:1.7}
.login-brand-panel ul{margin:0;padding-left:18px;color:#eff3f9;line-height:1.8}
.login-card{padding:34px;display:grid;align-content:center;gap:18px}
.login-card-header h2{margin:10px 0 0;font-size:34px}
.login-card label{display:grid;gap:8px;font-weight:700;color:#374151}
.login-hint{margin:0;color:#6b7280;font-size:14px;line-height:1.6}
@media (max-width: 1200px){
  .dashboard-grid{grid-template-columns:1fr}
  .status-panel{order:3}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 920px){
  .sidebar{transform:translateX(-100%);transition:transform .25s ease}
  body.menu-open .sidebar{transform:translateX(0)}
  .main-shell{margin-left:0}
  .menu-toggle{display:inline-flex}
  .hero-card,.login-shell,.two-columns{grid-template-columns:1fr}
  .topbar{flex-wrap:wrap}
  .searchbar{order:3;max-width:none;width:100%}
}
@media (max-width: 680px){
  .page-content,.topbar,.app-footer{padding-left:16px;padding-right:16px}
  .stats-grid,.form-grid{grid-template-columns:1fr}
  .hero-card,.panel,.page-header-card,.login-card,.login-brand-panel{padding:20px}
  .app-footer{display:grid;gap:10px}
  .topbar-actions{width:100%;justify-content:space-between}
}

/* Correcoes de layout para hospedagem compartilhada e cache antigo */
html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
}
body {
  font-size: 16px;
  line-height: 1.45;
}
.app-shell {
  width: 100%;
  min-width: 0;
}
.sidebar {
  width: 280px !important;
  min-width: 280px !important;
  overflow: hidden !important;
}
.brand-block {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.brand-logo,
.sidebar .brand-logo,
img.brand-logo {
  display: block !important;
  width: 172px !important;
  max-width: 172px !important;
  height: auto !important;
  max-height: 54px !important;
  object-fit: contain !important;
  object-position: left center !important;
}
.main-shell {
  min-width: 0 !important;
  width: calc(100% - 280px) !important;
  max-width: calc(100vw - 280px) !important;
  overflow-x: hidden !important;
}
.page-content {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}
.hero-card {
  overflow: hidden !important;
}
.hero-visual {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  max-height: 280px !important;
  overflow: hidden !important;
  border-radius: 24px !important;
}
.hero-visual img,
.dashboard-hero .hero-visual img {
  display: block !important;
  width: 100% !important;
  max-width: 760px !important;
  height: auto !important;
  max-height: 260px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 24px !important;
}
.chart-panel,
.table-panel,
.status-panel,
.stat-card,
.panel,
.page-header-card {
  min-width: 0 !important;
}
.chart-svg,
.chart-panel svg {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 360px !important;
}
.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(280px, 320px) !important;
}
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 920px) {
  .main-shell {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .sidebar {
    width: 280px !important;
    min-width: 280px !important;
  }
}
