:root {
  --bg: #0a0e1a;
  --bg2: #111728;
  --card: #1a2640;
  --card-hover: #243355;
  --text: #ecf1fa;
  --muted: #9eaac2;
  --muted-soft: #b8c4dc;
  --brand: #3b82f6;
  --brand-2: #1f6feb;
  --danger: #ef4444;
  --ok: #22c55e;
  --warn: #f59e0b;
  --border: #2a3756;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* TOPBAR */
.topbar {
  background: linear-gradient(180deg, #0a0e1a 0%, rgba(10,14,26,0.85) 100%);
  border-bottom: 1px solid var(--border);
  padding: 18px 0 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--brand);
}
.logo span { color: var(--text); font-weight: 300; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
}
.tab:hover { color: var(--text); border-color: var(--brand); }
.tab.active { background: var(--brand); color: white; border-color: var(--brand); }

.search-wrap { margin-top: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#search {
  flex: 1; min-width: 240px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  font-size: 15px;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
#search:focus { border-color: var(--brand); }
.stats { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* USER AREA NO TOPO */
.user-area { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-menu { display: flex; align-items: center; gap: 6px; }
.user-menu #user-name { color: var(--text); font-weight: 600; font-size: 13px; padding: 0 8px; }
.tab.small { padding: 5px 10px; font-size: 11px; }

/* LOGIN/ACCOUNT MODAL */
.login-card { max-width: 420px; }
.account-card { max-width: 640px; }
.login-body, .account-body { padding: 28px; }
.login-body h2, .account-body h2 { margin: 0 0 6px; font-size: 22px; }

#login-form, .account-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
#login-form label, .account-form label {
  display: flex; flex-direction: column; gap: 6px;
  color: var(--muted-soft); font-size: 13px;
}
#login-form input, .account-form input {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
}
#login-form input:focus, .account-form input:focus { border-color: var(--brand); }

.account-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.account-section:first-of-type { margin-top: 14px; padding-top: 0; border-top: none; }
.account-section h3 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.account-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--muted-soft); }
.account-row strong { color: var(--text); }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.checkbox-row { flex-direction: row !important; align-items: center; gap: 10px !important; cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.checkbox-row span { color: var(--text); font-size: 14px; }

.tg-steps {
  background: rgba(59,130,246,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}
.tg-steps p { color: var(--text); font-size: 14px; margin: 0 0 8px; }
.tg-steps p:last-of-type { margin-bottom: 0; }
.tg-bot-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #0088cc;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: background .15s, transform .15s;
}
.tg-bot-btn:hover { background: #006699; transform: translateY(-1px); }

/* Templates de resolucao */
.template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.template-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.template-chip:hover { border-color: var(--brand); }
.template-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.template-chip.none {
  background: transparent;
  border-style: dashed;
  opacity: 0.7;
}

/* Botoes de acao por usuario na linha */
.btn-chat, .btn-block {
  padding: 6px 10px !important;
  font-size: 13px !important;
  min-width: 32px;
}
.btn-block:hover { border-color: var(--danger) !important; color: var(--danger); }
.btn-chat:hover { border-color: var(--brand) !important; }

/* WELCOME */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 220px);
  padding: 40px 20px;
  color: var(--muted);
}
.welcome-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.welcome h2 {
  color: var(--text);
  font-weight: 700;
  margin: 0 0 10px;
  font-size: 26px;
}
.welcome p { margin: 0 0 28px; font-size: 15px; max-width: 480px; }
.welcome-tips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.welcome-tip {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.welcome-tip .num {
  background: var(--brand);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.welcome-arrow {
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--brand);
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  padding: 24px 0 24px;
}
.card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, background .15s;
  position: relative;
  border: 1px solid transparent;
}
.card:hover { transform: translateY(-3px); background: var(--card-hover); border-color: var(--brand); }
.card .cover {
  width: 100%; aspect-ratio: 2 / 3;
  background: #0c1424 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.card .cover.placeholder {
  background: linear-gradient(135deg, #0c1424, #16203a);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 0 8px;
}
.card .cover.placeholder span { color: var(--muted); line-height: 1.3; }
.card .info { padding: 10px 12px; }
.card .name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 34px;
}
.card .card-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.card .badge {
  background: rgba(31, 111, 235, 0.92);
  color: white;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}
.card .badge.serie { background: rgba(229, 9, 20, 0.95); }

.badge-4k {
  background: #ffd60a;
  color: #1a1a1a;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
  border-radius: 4px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.loader, .empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px 0 50px;
  flex-wrap: wrap;
}
.pagination button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-width: 38px;
  transition: all .15s;
}
.pagination button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pagination button.active { background: var(--brand); color: white; border-color: var(--brand); }
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination .ellipsis { color: var(--muted); padding: 0 4px; }
.pagination .page-info {
  color: var(--muted);
  font-size: 12px;
  margin-left: 10px;
  width: 100%;
  text-align: center;
}

/* MODAL */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 760px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.modal-body { display: flex; gap: 24px; padding: 28px; flex-wrap: wrap; }
.modal-cover {
  width: 200px;
  aspect-ratio: 2 / 3;
  background: #0c1424 center/cover no-repeat;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.modal-cover.placeholder {
  background: linear-gradient(135deg, #0c1424, #16203a);
}
.modal-cover.placeholder::after {
  content: "Conteúdo sem capa";
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 0 12px;
}
.modal-info { flex: 1; min-width: 240px; }
.modal-info h2 { margin: 4px 0 14px; font-size: 22px; }
.modal-badges { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.modal-type {
  display: inline-block;
  background: var(--brand);
  color: white;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}
.modal-type.serie { background: var(--danger); }
.hint { color: var(--muted); margin: 0 0 10px; font-size: 13px; }
.reasons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.reason-item {
  background: var(--card);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.reason-item:hover { border-color: var(--brand); transform: translateX(2px); }
.reason-item input { position: absolute; opacity: 0; pointer-events: none; }
.reason-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  transition: all .15s;
}
.reason-icon svg { width: 22px; height: 22px; }
.reason-text { flex: 1; min-width: 0; }
.reason-text strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.reason-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.4;
}

.reason-item[data-color="orange"] .reason-icon { color: #ff9f43; background: rgba(255, 159, 67, 0.12); }
.reason-item[data-color="red"]    .reason-icon { color: #e50914; background: rgba(229, 9, 20, 0.12); }
.reason-item[data-color="purple"] .reason-icon { color: #a55eea; background: rgba(165, 94, 234, 0.12); }
.reason-item[data-color="yellow"] .reason-icon { color: #feca57; background: rgba(254, 202, 87, 0.12); }
.reason-item[data-color="blue"]   .reason-icon { color: #1f6feb; background: rgba(31, 111, 235, 0.15); }

.reason-item:has(input:checked) {
  background: var(--card-hover);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.18);
}
.reason-item:has(input:checked) .reason-icon { transform: scale(1.06); }
#notes {
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 8px;
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}
.btn-primary {
  background: var(--brand);
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--brand-2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.submit-msg { margin-top: 10px; font-size: 13px; }
.submit-msg.ok { color: var(--ok); }
.submit-msg.err { color: var(--danger); }

/* DASHBOARD */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 16px;
}
.metric-card.highlight {
  background: linear-gradient(135deg, rgba(31,111,235,0.10), rgba(31,111,235,0.02));
  border-color: var(--brand);
}
.metric-card.skeleton { min-height: 92px; opacity: 0.4; }
.metric-label { color: var(--muted-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.metric-value { font-size: 32px; font-weight: 800; line-height: 1.1; margin: 6px 0 4px; color: var(--text); }
.metric-card.highlight .metric-value { color: #6fa3ff; }
.metric-sub { color: var(--muted-soft); font-size: 12px; }

.chart-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 8px;
  margin-bottom: 24px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.chart-header h3 { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.chart-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-legend .dot.brand { background: var(--brand); }
.chart-legend .dot.ok    { background: var(--ok); }

.chart {
  display: flex;
  align-items: flex-end;
  height: 180px;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding: 0 4px 8px;
  position: relative;
}
.bar-col {
  flex: 1;
  min-width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  cursor: help;
  position: relative;
}
.bar-col > .bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  margin-top: auto;
  transition: opacity .15s, transform .15s;
}
.bar-col:hover .bar-stack { opacity: 0.85; transform: scaleY(1.03); transform-origin: bottom; }
.bar-piece.bar-report  { background: var(--brand); }
.bar-piece.bar-request { background: var(--ok); }
.bar-value {
  position: absolute;
  top: -18px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-soft);
  opacity: 0;
  transition: opacity .15s;
}
.bar-col:hover .bar-value { opacity: 1; }
.bar-label {
  font-size: 10px;
  color: var(--muted-soft);
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 600;
}
.bar-label.faded { opacity: 0.35; }

.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.top-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.top-block h3 { margin: 0 0 14px; font-size: 14px; color: var(--text); }
.top-list { list-style: none; padding: 0; margin: 0; counter-reset: rank; display: flex; flex-direction: column; gap: 8px; }
.top-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  position: relative;
  counter-increment: rank;
}
.top-list li::before {
  content: counter(rank);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(31,111,235,0.12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.top-list li:nth-child(1)::before { background: rgba(255,215,0,0.20); color: #ffd60a; }
.top-list li:nth-child(2)::before { background: rgba(192,192,192,0.20); color: #d0d0d0; }
.top-list li:nth-child(3)::before { background: rgba(205,127,50,0.20); color: #cd7f32; }
.top-thumb {
  width: 36px; height: 54px;
  border-radius: 4px;
  background: #0c1424 center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.top-thumb.placeholder { background: linear-gradient(135deg, #0c1424, #16203a); }
.reporter-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #6fa3ff);
  color: white;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.top-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.top-info .type-badge { width: fit-content; padding: 2px 7px; font-size: 9px; }
.top-info strong {
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.top-count {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand);
  text-align: center;
  line-height: 1;
  flex-shrink: 0;
}
.top-count small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 768px) {
  .metric-value { font-size: 24px; }
  .chart { height: 150px; gap: 10px; }
  .bar-label { font-size: 11px; margin-top: 8px; }
}

/* ADMIN */
.admin-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin: 20px 0;
}
.admin-section h2 { margin: 0 0 16px; font-size: 18px; }
.admin-grid { display: grid; gap: 12px; }
.admin-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.admin-grid input {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
}
.admin-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.btn-secondary:hover { border-color: var(--brand); }

/* BULK selection */
.bulk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 10px;
  padding: 0 4px;
}
.bulk-selectall {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.bulk-selectall input { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.bulk-count {
  background: rgba(31,111,235,0.18);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.row-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
.row-check { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

.bulk-toolbar {
  position: sticky;
  bottom: 0;
  background: var(--bg2);
  border: 1px solid var(--brand);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 20;
}
.bulk-toolbar #bulk-toolbar-count {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}
.bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-actions button { padding: 9px 16px; font-size: 13px; }
.bulk-actions .btn-primary { background: var(--ok); }
.bulk-actions .btn-primary:hover { background: #25a85a; }

/* Notas multiplas (auto-merge) */
.report-notes .notes-label {
  display: block;
  color: var(--muted-soft);
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.report-notes .note-item {
  color: var(--text);
  padding: 6px 0 6px 12px;
  border-left: 2px solid rgba(59,130,246,0.4);
  margin: 4px 0 4px 4px;
  font-size: 13px;
  line-height: 1.5;
}
.report-notes .note-item:last-child { margin-bottom: 0; }

.items-filterbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.items-filterbar #items-search {
  flex: 1;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
}
.items-filterbar #items-search:focus { border-color: var(--brand); }
.items-filterbar #items-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.items-filterbar #items-reason {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 220px;
  outline: none;
}
.items-filterbar #items-reason:focus { border-color: var(--brand); }

@media (max-width: 480px) {
  .items-filterbar #items-search,
  .items-filterbar #items-reason { width: 100%; min-width: 0; }
}

.report-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
}
.report-row .meta { flex: 1; min-width: 200px; }
.report-row .meta strong { display: block; font-size: 15px; margin-top: 6px; }
.report-row .meta small { color: var(--muted-soft); display: block; margin-top: 4px; font-size: 12px; }
.report-row .report-notes {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(59,130,246,0.07);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.report-row .actions { display: flex; gap: 6px; align-self: center; }
.report-row .actions button { padding: 6px 12px; font-size: 12px; }
.report-row .actions .btn-resolve { background: var(--ok); color: white; border-color: var(--ok); }
.report-row .actions .btn-resolve:hover { opacity: 0.9; }

.report-thumb {
  width: 56px;
  height: 84px;
  border-radius: 6px;
  background: #0c1424 center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.report-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c1424, #16203a);
  padding: 4px;
  text-align: center;
}
.report-thumb.placeholder span { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.2; }

.badges-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.type-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.type-badge.movie  { background: var(--brand);  color: white; }
.type-badge.series { background: var(--danger); color: white; }

.reason-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.reason-badge[data-color="orange"] { background: rgba(255,159,67,0.18);  color: #ff9f43; }
.reason-badge[data-color="red"]    { background: rgba(229,9,20,0.18);    color: #ff5460; }
.reason-badge[data-color="purple"] { background: rgba(165,94,234,0.18);  color: #a55eea; }
.reason-badge[data-color="yellow"] { background: rgba(254,202,87,0.18);  color: #feca57; }
.reason-badge[data-color="blue"]   { background: rgba(31,111,235,0.22);  color: #6fa3ff; }
.reason-badge[data-color="green"]  { background: rgba(46,204,113,0.18);  color: var(--ok); }

/* CTA Solicitar adicao (na home) */
.request-cta {
  margin: 30px auto 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(31,111,235,0.10), rgba(31,111,235,0.04));
  border: 1px dashed var(--brand);
  border-radius: 12px;
  padding: 26px 20px;
  max-width: 540px;
}
.request-cta p { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.request-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  padding: 12px 24px;
}

/* Modal de Solicitacao */
.request-card { max-width: 820px; }
.request-body { padding: 28px; }
.request-header h2 { margin: 0 0 6px; font-size: 22px; }
.request-header .hint { margin-bottom: 14px; }
#request-search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  outline: none;
  margin-bottom: 14px;
}
#request-search:focus { border-color: var(--brand); }

.request-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px;
}
.tmdb-item {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s;
  position: relative;
  border: 1px solid transparent;
}
.tmdb-item:hover { background: var(--card-hover); border-color: var(--brand); transform: translateY(-3px); }
.tmdb-cover {
  width: 100%; aspect-ratio: 2 / 3;
  background: #0c1424 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.tmdb-cover.placeholder {
  background: linear-gradient(135deg, #0c1424, #16203a);
  text-align: center;
  padding: 0 8px;
}
.tmdb-cover.placeholder span { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.3; }
.tmdb-item .card-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; gap: 4px; z-index: 2;
}
.tmdb-item .type-badge { padding: 3px 8px; font-size: 10px; }
.tmdb-info { padding: 10px 12px; }
.tmdb-info strong {
  font-size: 13px; font-weight: 600; line-height: 1.3; display: block;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 34px;
}
.tmdb-info small { color: var(--muted); font-size: 12px; margin-top: 4px; display: block; }

/* Confirmacao */
.request-confirm { display: flex; flex-direction: column; gap: 16px; }
.confirm-pick {
  display: flex;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--brand);
  border-radius: 12px;
  padding: 16px;
  flex-wrap: wrap;
}
.confirm-cover {
  width: 130px; aspect-ratio: 2/3;
  background: #0c1424 center/cover no-repeat;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.confirm-cover.placeholder { background: linear-gradient(135deg, #0c1424, #16203a); }
.confirm-cover.placeholder::after {
  content: "Conteúdo sem capa";
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 0 8px;
}
.confirm-info { flex: 1; min-width: 200px; }
.confirm-info h3 { margin: 8px 0 4px; font-size: 19px; }
.muted-text { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.confirm-overview {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 0;
}

.similar-block {
  background: rgba(255,177,66,0.08);
  border: 1px solid rgba(255,177,66,0.4);
  border-radius: 10px;
  padding: 14px;
}
.warn-text { margin: 0 0 10px; font-size: 13px; color: #ffb142; }
.similar-list { display: flex; gap: 10px; flex-wrap: wrap; }
.similar-item {
  width: 80px;
  text-align: center;
}
.similar-cover {
  width: 80px; height: 120px;
  background: #0c1424 center/cover no-repeat;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 4px;
}
.similar-cover.placeholder {
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #0c1424, #16203a);
  padding: 4px;
}
.similar-cover.placeholder::after {
  content: "Sem capa";
  font-size: 10px; color: var(--muted); font-weight: 600;
}
.similar-item small { color: var(--muted); font-size: 11px; line-height: 1.2; display: block; }

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 768px) {
  .request-results { grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 460px; }
  .request-body { padding: 18px; }
  .confirm-cover { width: 100px; margin: 0 auto; }
  .confirm-info { text-align: center; min-width: 100%; }
  .confirm-actions { justify-content: stretch; flex-direction: column-reverse; }
  .confirm-actions button { width: 100%; }
}

.status-pill {
  display: inline-block;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-pill.open { background: rgba(255,177,66,0.18); color: #ffb142; }
.status-pill.resolved { background: rgba(46,204,113,0.18); color: var(--ok); }
.status-pill.archived { background: rgba(136,149,171,0.18); color: var(--muted); }

/* RESPONSIVO - mobile */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .topbar { padding: 12px 0 10px; }
  .row { gap: 10px; }
  .logo { font-size: 18px; }
  .tab { padding: 6px 12px; font-size: 12px; }
  .search-wrap { margin-top: 10px; flex-direction: column; align-items: stretch; gap: 6px; }
  #search { padding: 10px 14px; font-size: 14px; }
  .stats { text-align: center; }

  .welcome { min-height: calc(100vh - 200px); padding: 30px 16px; }
  .welcome-icon { font-size: 60px; }
  .welcome h2 { font-size: 20px; }
  .welcome p { font-size: 13px; }
  .welcome-tip { font-size: 12px; padding: 8px 14px; }
  .welcome-arrow { top: 110px; font-size: 26px; }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 0;
  }
  .card .info { padding: 8px 10px; }
  .card .name { font-size: 12px; min-height: 30px; }
  .card .badge { font-size: 9px; padding: 2px 6px; top: 6px; left: 6px; }

  .modal { padding: 10px; align-items: flex-start; padding-top: 30px; }
  .modal-card { max-height: 95vh; }
  .modal-body { padding: 20px; gap: 16px; justify-content: center; }
  .modal-cover {
    width: 140px;
    margin: 0 auto;
  }
  .modal-info { min-width: 100%; text-align: left; }
  .modal-info h2 { font-size: 18px; text-align: center; }
  .modal-type { display: block; width: fit-content; margin: 0 auto 8px; }

  .pagination { padding: 16px 0 30px; gap: 4px; }
  .pagination button { padding: 6px 10px; font-size: 12px; min-width: 34px; }

  .admin-section { padding: 16px; }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .request-results { grid-template-columns: repeat(2, 1fr); }
}
