.card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.table-wrap{ width:100%; overflow:auto; }

.table{
  width:100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.table tbody td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: middle;
  font-size: 14px;
}

.table tbody tr:hover td{
  background: rgba(255,255,255,.03);
}

.col-small{ width: 90px; }
.col-date{ width: 140px; }

.muted{ color: rgba(255,255,255,.65); }

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
  "Liberation Mono", "Courier New", monospace;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.15);
}

.pill.on{
  background: rgba(46, 204, 113, .15);
  border-color: rgba(46, 204, 113, .35);
}

.pill.off{
  background: rgba(231, 76, 60, .14);
  border-color: rgba(231, 76, 60, .35);
}

.btn{
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  text-decoration:none;
  user-select:none;
}

.btn:hover{ background: rgba(255,255,255,.10); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btn.primary{
  background: rgba(202,166,75,0.18);
  border-color: rgba(202,166,75,0.45);
}
.btn.primary:hover{
  background: rgba(202,166,75,0.24);
  border-color: rgba(202,166,75,0.70);
}

.form{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.field label{
  font-size: 12px;
  color: rgba(255,255,255,.75);
  font-weight: 700;
}

.field input,
.field textarea,
.field select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: #fff;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color: rgba(202,166,75,0.70);
  box-shadow: 0 0 0 3px rgba(202,166,75,0.15);
}

.field textarea{
  resize: vertical;
  min-height: 54px;
}

.msg{
  margin-top: 12px;
  min-height: 18px;
  font-size: 13px;
  white-space: pre-line;
}

.msg.ok{ color: rgba(46, 204, 113, .95); }
.msg.err{ color: rgba(231, 76, 60, .95); }

.hint{
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.campanhas-grid{
  display:grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

@media (max-width: 980px){
  .campanhas-grid{ grid-template-columns: 1fr; }
}

.small{ font-size: 12px; }

/* Tabs */
.tabs{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin: 6px 0 14px;
}

.tab{
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(243,245,255,0.86);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
}

.tab:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}

.tab.active{
  color: #fff;
  background: rgba(202,166,75,0.16);
  border-color: rgba(202,166,75,0.55);
}

/* Filtros */
.filters{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  margin-bottom: 14px;
}

.filters-actions{
  display:flex;
  gap: 10px;
  align-items:flex-end;
  justify-content:flex-end;
  padding-bottom: 2px;
}

@media (max-width: 980px){
  .filters{ grid-template-columns: 1fr 1fr; }
  .filters-actions{
    grid-column: 1 / -1;
    justify-content:flex-start;
  }
}

/* Tabela */
.campanhas-table{ min-width: 880px; }
.col-slug{ width: 180px; }
.col-actions{ width: 180px; }

.row-actions{
  display:flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

.row-actions .btn{
  white-space: nowrap;
}

@media (max-width: 520px){
  .row-actions{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .row-actions .btn{
    width: 100%;
  }
}

/* Paginação */
.pager{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.pager-actions{
  display:flex;
  gap: 10px;
}

/* MODAL */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}

.modal-overlay.open{ display:flex; }

.modal{
  width: min(860px, 96vw);
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10, 12, 16, .92);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  overflow:hidden;
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.modal-header h2{
  margin: 0;
  font-size: 22px;
}

.icon-btn{
  cursor:pointer;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.icon-btn:hover{ background: rgba(255,255,255,.10); }

.modal-body{
  padding: 18px;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  padding-top: 8px;
}

.modal-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 860px){
  .modal-grid{ grid-template-columns: 1fr; }
}

.check-row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: 4px;
}

.check-row input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: rgba(202,166,75,0.95);
}

.check-row label{
  font-size: 13px;
  color: rgba(255,255,255,.85);
  font-weight: 700;
}

/* Storage badge (limite de espaço) */
.storage-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.92);
}

.storage-pill .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(46, 204, 113, .95);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, .18);
}

.header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-actions .storage-pill{
  margin-right: auto;
}

@media (max-width: 560px){
  .panel-header{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-actions{
    width: 100%;
    justify-content: flex-end;
  }

  .header-actions .storage-pill{
    flex: 1 1 100%;
    margin-right: 0;
  }
}

.storage-pill.warn .dot{
  background: rgba(231, 76, 60, .95);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .18);
}

.img-preview-wrap{
  margin-top: 10px;
  display:none;
}

.img-preview-wrap.on{ display:block; }

.img-preview{
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}

/* ------------ Upload bonito ------------ */
.file-input{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.file-row{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}

.file-btn{
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.file-btn:hover{
  background: rgba(255,255,255,.12);
}

.file-btn .icon{
  font-size: 14px;
  opacity: .9;
}

.file-name{
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------ Color picker ------------ */
.color-row{
  display:flex;
  align-items:center;
  gap: 10px;
}

.color-picker{
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  cursor: pointer;
}

.color-picker::-webkit-color-swatch-wrapper{ padding: 8px; }
.color-picker::-webkit-color-swatch{
  border: none;
  border-radius: 10px;
}