:root{
  --green-900:#0b3b2e;
  --green-800:#0e4a39;
  --green-700:#0f5a44;
  --accent:#00dd8b;
  --bg:#f5f7f7;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --line:#e7eceb;
  --shadow: 0 12px 30px rgba(10, 22, 18, .10);
  --radius: 18px;
  --radius-lg: 24px;
  --btn:#0f5a44;
  --btn2:#0b3b2e;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:280px;
  background: linear-gradient(180deg, var(--green-900), var(--green-800));
  color:#eafff6;
  padding:22px 18px;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px 10px 18px;
}
.brand-mark{
  width:44px;height:44px;border-radius:14px;
  background:rgba(255,255,255,.10);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
}
.brand-title{font-weight:800}
.brand-sub{font-size:12px;opacity:.85}

.nav{margin-top:10px;display:flex;flex-direction:column;gap:8px}
.nav-item{
  display:flex;
  padding:12px 14px;
  border-radius: 16px;
  color:#eafff6;
  text-decoration:none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
}
.nav-item:hover{background: rgba(255,255,255,.08)}
.nav-item.active{
  background:#eafff6;
  color: var(--green-900);
  border-color: transparent;
}

.sidebar-foot{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.10);
}
.userbox{display:flex;gap:10px;align-items:center;margin-bottom:10px}
.avatar{
  width:38px;height:38px;border-radius:14px;
  background: rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
  font-weight:800;
}
.user-name{font-weight:700}
.user-role{font-size:12px;opacity:.85}
.logout{
  display:inline-flex;
  padding:10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color:#eafff6;text-decoration:none;
  border:1px solid rgba(255,255,255,.10);
}
.logout:hover{background: rgba(255,255,255,.16)}

.main{
  flex:1;
  padding:22px 22px 36px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  padding:16px 18px;
  box-shadow: var(--shadow);
  margin-bottom:16px;
}
.h1{font-size:22px;font-weight:900;margin:0}

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.section{
  padding:18px;
  margin-top:14px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}

.kpi{
  grid-column: span 3;
  padding:16px;
}
.kpi .label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.kpi .value{font-size:24px;font-weight:900;margin-top:8px}
.kpi .sub{font-size:12px;color:var(--muted);margin-top:6px}

.btn{
  display:inline-flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius: 999px;
  background: var(--btn);
  color:#fff;
  text-decoration:none;
  border:1px solid rgba(0,0,0,.06);
  cursor:pointer;
  font-weight:700;
}
.btn:hover{background: var(--btn2)}
.btn.light{
  background: #fff;
  color: var(--green-900);
  border:1px solid var(--line);
}
.btn.light:hover{background:#f3f6f5}

.input, select{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  outline:none;
  background:#fff;
}
.row{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.field{min-width:160px}
.label{font-size:12px;color:var(--muted);margin-bottom:6px}

.cards3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
.campaign{
  overflow:hidden;
}
.campaign .media{
  width:100%;
  height:170px;
  background:#e9efee;
  position:relative;
}
.campaign .media img, .campaign .media video{
  width:100%;
  height:100%;
  object-fit:cover;
}
.badge{
  position:absolute;
  right:12px;
  bottom:12px;
  background: rgba(0,0,0,.55);
  color:#fff;
  font-size:12px;
  padding:6px 10px;
  border-radius: 999px;
}
.campaign .content{padding:14px 14px 12px}
.campaign .title{
  font-weight:900;
  margin:0 0 6px;
  display:flex;justify-content:space-between;gap:10px;
}
.small{font-size:12px;color:var(--muted)}
.pill{
  display:inline-flex;align-items:center;
  padding:6px 10px;border-radius:999px;
  font-size:12px;font-weight:800;
  border:1px solid var(--line);
}
.pill.active{background:#eafff6;color:var(--green-900);border-color:#d3efe3}
.pill.paused{background:#fff7ed;color:#9a3412;border-color:#fed7aa}
.pill.ended{background:#f1f5f9;color:#334155;border-color:#e2e8f0}

.metrics{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.metric{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px;
  background:#fff;
}
.metric b{display:block;font-size:16px}
.metric span{font-size:12px;color:var(--muted)}

.actions{
  display:flex;gap:10px;margin-top:12px;flex-wrap:wrap
}
.actions .btn{padding:10px 12px;font-size:13px}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}
.table th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  padding:0 10px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.table td{
  background:#fff;
  border:1px solid var(--line);
  padding:12px 10px;
}
.table td:first-child{border-top-left-radius:14px;border-bottom-left-radius:14px}
.table td:last-child{border-top-right-radius:14px;border-bottom-right-radius:14px}

@media (max-width:1100px){
  .cards3{grid-template-columns:1fr}
  .kpi{grid-column: span 6}
  .sidebar{display:none}
}
.brand-mark img{
  width:28px;
  height:28px;
  object-fit:contain;
}
.avatar img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}
.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
}

.nav-item i{
  width:18px;
  height:18px;
}

.slug-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(0,221,139,.14);      /* verde claro */
  border:1px solid rgba(0,221,139,.28);
  color:#026247;
  font-weight:700;
  text-decoration:none;
  line-height:1;
  transition:transform .08s ease, box-shadow .12s ease, background .12s ease;
}

.slug-chip:hover{
  background:rgba(0,221,139,.18);
  box-shadow:0 10px 26px rgba(2,98,71,.14);
  transform:translateY(-1px);
}

.slug-chip:active{
  transform:translateY(0);
  box-shadow:none;
}

.slug-chip svg{
  width:16px;
  height:16px;
}

/* MODAL CRIATIVO */
.creative-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.creative-modal.active {
  display: block;
}

.creative-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
}

.creative-box {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: 5vh auto;
  background: #000;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: zoomIn .25s ease;
}

.creative-box img,
.creative-box video {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  display: block;
}

.creative-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

@keyframes zoomIn {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
