/* ============================================================
   Page-specific styles
   ============================================================ */

/* ---------- Dashboard ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

.shortcut-list {
  display: grid;
  gap: 10px;
}
.shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: border-color 0.12s, transform 0.1s;
}
.shortcut:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.shortcut-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.shortcut-body { flex: 1; min-width: 0; }
.shortcut-title { font-weight: 600; color: var(--text-strong); font-size: 13px; }
.shortcut-sub { font-size: 11.5px; color: var(--text-muted); }

/* ---------- BM cards grid ---------- */
.bm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.bm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
}
.bm-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.bm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.bm-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-strong);
  margin-bottom: 2px;
}
.bm-id {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.bm-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  margin-bottom: 14px;
}
.bm-stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.bm-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2px;
}
.bm-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ---------- Campaigns table specifics ---------- */
.campaign-name {
  font-weight: 600;
  color: var(--text-strong);
}
.campaign-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.metric-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.budget-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-stepper {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--border);
}
.btn-stepper:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.budget-value {
  min-width: 70px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-strong);
}

.summary-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.summary-item .summary-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.summary-item .summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2px;
}

/* ============================================================
   Página: Criativos (3 colunas: pastas | lista | detalhe)
   ============================================================ */
.criativos-layout {
  display: grid;
  grid-template-columns: 220px 320px 1fr;
  gap: 16px;
  height: calc(100vh - 150px);
  min-height: 560px;
}
@media (max-width: 1100px) {
  .criativos-layout { grid-template-columns: 200px 1fr; height: auto; }
  .criativos-detail { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .criativos-layout { grid-template-columns: 1fr; }
}

/* coluna 1 - pastas */
.cri-folders {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cri-folders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.cri-folders-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.cri-folder-list {
  list-style: none;
  margin: 0; padding: 0;
  overflow-y: auto;
  flex: 1;
}
.cri-folder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s;
  position: relative;
}
.cri-folder:hover { background: var(--bg-card-hover); }
.cri-folder.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.cri-folder.active .cri-folder-count { background: var(--accent); color: white; }
.cri-folder-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cri-folder-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cri-folder-count {
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.cri-folder-actions {
  display: none;
  gap: 2px;
}
.cri-folder:hover .cri-folder-actions { display: flex; }
.cri-folder:hover .cri-folder-count { display: none; }
.cri-folder-act-btn {
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--text-muted);
}
.cri-folder-act-btn:hover { background: var(--border); color: var(--text); }

/* coluna 2 - lista de criativos */
.cri-list-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.cri-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.cri-list-header .search { width: 100%; }
.cri-list-header .btn { flex-shrink: 0; }
.cri-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.cri-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.1s;
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.cri-card:hover { background: var(--bg-card-hover); }
.cri-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cri-thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
  position: relative;
}
.cri-thumb.thumb-imagem { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.cri-thumb.thumb-carrossel { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cri-thumb-tipo {
  position: absolute;
  bottom: 3px; right: 3px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}
.cri-card-body { flex: 1; min-width: 0; }
.cri-card-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.cri-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* coluna 3 - detalhe */
.criativos-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.cri-detail-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cri-detail-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
}
.cri-detail-info { flex: 1; min-width: 0; }
.cri-detail-title-input {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px 4px;
  width: calc(100% + 12px);
  outline: none;
}
.cri-detail-title-input:hover, .cri-detail-title-input:focus {
  background: var(--bg-elevated);
  border-color: var(--border);
}
.cri-detail-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 6px;
}
.cri-detail-meta strong { color: var(--text); font-weight: 600; }
.cri-detail-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cri-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}
.cri-section { margin-bottom: 22px; }
.cri-section:last-child { margin-bottom: 0; }
.cri-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cri-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
}
.cri-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color 0.12s;
}
.cri-textarea:focus { border-color: var(--border-focus); }
.cri-textarea-large { min-height: 160px; }

.cri-structure {
  display: grid;
  gap: 12px;
}
.cri-structure-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.cri-structure-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 6px;
}
.cri-structure-label .cri-structure-num {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.cri-structure-block textarea {
  width: 100%;
  min-height: 50px;
  padding: 4px 0 0;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.cri-detail-empty {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}
.cri-detail-empty-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.cri-detail-empty h3 {
  color: var(--text-strong);
  margin-bottom: 6px;
}

.cri-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.cri-metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.cri-metric-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.cri-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2px;
}

/* ---------- Coming soon page ---------- */
.coming-soon {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.coming-soon-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.coming-soon h2 {
  color: var(--text-strong);
  font-size: 22px;
  margin-bottom: 8px;
}
.coming-soon p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
}
