:root{
  --primary: #FF8600;
  --dark: #0E0F12;
  --card: #14161C;
  --text: #F3F4F6;
  --muted: rgba(243,244,246,.75);
  --border: rgba(255,255,255,.08);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: 'Exo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(800px 400px at 20% 0%, rgba(255,134,0,.18), transparent 60%), var(--dark);
  color: var(--text);
  min-height:100vh;
  overflow-x:hidden;
}
a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:0 auto; padding:18px}
.wrap{max-width:1100px; margin:0 auto; padding:18px}
.muted{color: var(--muted); font-size:13px}
.top{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:20px 0 10px;
}
.avatar{
  width:92px; height:92px;
  border-radius:24px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding:10px;
}
.title{
  text-align:center;
  font-size:22px;
  font-weight:800;
  letter-spacing:.5px;
}
.subtitle{color:var(--muted); text-align:center; margin-top:-6px; font-size:13px}
.cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}
@media (max-width:760px){
  .cards{grid-template-columns:1fr}
}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  transition: transform .15s ease, border-color .15s ease;
  min-width:0;
}
.card:hover{transform: translateY(-2px); border-color: rgba(255,134,0,.5)}
.card > img,
.card-cover{
  width:100%;
  aspect-ratio: 1 / 1; /* 500x500 (quadrado) */
  max-height: 500px;
  height:auto;
  object-fit:cover;
  display:block;
}
.card .body,
.card-body{padding:14px 14px 16px}
.card-title{font-weight:900; font-size:16px; letter-spacing:.6px; text-transform:uppercase}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  margin-top:10px;
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,134,0,.12);
  border:1px solid rgba(255,134,0,.28);
  color: var(--text);
  font-weight:700;
  font-size:12px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}
@media (max-width:980px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:700px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:420px){.grid{grid-template-columns:1fr}}

.thumb{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  cursor:pointer;
}
.thumb img{width:100%; height:170px; object-fit:cover; display:block}
.thumb .t{padding:10px 10px 12px; font-weight:800; font-size:12px; letter-spacing:.4px; text-transform:uppercase; color: rgba(243,244,246,.9)}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  background: rgba(255,134,0,.14);
  border:1px solid rgba(255,134,0,.35);
  color: var(--text);
  font-weight:900;
  letter-spacing:.3px;
}
.btn:hover{filter:brightness(1.1)}
.btn.secondary{background: rgba(255,255,255,.06); border:1px solid var(--border)}

.footer{
  margin-top:28px;
  padding:18px 0 24px;
  border-top:1px solid var(--border);
  color: var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.footer a{color: rgba(243,244,246,.9)}
.footer .adm a{opacity:.55}
.footer .adm a:hover{opacity:1}

/* Modal */
.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.68);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:999;
}
.modal.open{display:flex}
.modal-card{
  width:min(1000px, 100%);
  background: rgba(14,15,18,.92);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
}
.modal-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}
.modal-title{font-weight:900; letter-spacing:.4px; text-transform:uppercase; font-size:12px; color: rgba(243,244,246,.9)}
.modal-close{cursor:pointer; padding:8px 10px; border-radius:10px; background: rgba(255,255,255,.06); border:1px solid var(--border)}
.modal-close:hover{filter:brightness(1.15)}
.modal-img{width:100%; height:auto; display:block; background:#000}

/* Admin */
.admin-wrap{max-width:1200px; margin:0 auto; padding:18px}
.panel{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
}
.row{display:flex; gap:12px; flex-wrap:wrap}
.field{flex:1 1 240px; display:flex; flex-direction:column; gap:6px}
label{font-size:12px; color: var(--muted); font-weight:800; letter-spacing:.35px}
input, select, textarea{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
  font-family:inherit;
}
input:focus, select:focus, textarea:focus{border-color: rgba(255,134,0,.55)}
.uppercase{ text-transform: uppercase; }

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}
.tr{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
}
.small{font-size:12px; color: var(--muted)}
.notice{
  margin:12px 0;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,134,0,.10);
  border:1px solid rgba(255,134,0,.25);
  color: rgba(243,244,246,.95);
  font-weight:700;
  font-size:13px;
}

.img-list{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; margin-top:12px}
@media (max-width:980px){.img-list{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.img-list{grid-template-columns:1fr}}

.img-item{
  border:1px solid var(--border);
  background: rgba(255,255,255,.035);
  border-radius:16px;
  overflow:hidden;
}
.img-item .ph{height:160px; width:100%; object-fit:cover; display:block}
.img-item .pad{padding:10px}
.drag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
  border:1px dashed rgba(255,255,255,.18);
  font-size:12px;
  cursor:grab;
  user-select:none;
}
.actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.actions a, .actions button{
  cursor:pointer;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight:900;
  font-family:inherit;
}
.actions .danger{border-color: rgba(255,0,80,.35); background: rgba(255,0,80,.10)}
.actions .primary{border-color: rgba(255,134,0,.35); background: rgba(255,134,0,.12)}


.btn.primary{border-color: rgba(255,134,0,.35); background: rgba(255,134,0,.14)}

.h2{margin:0; font-size:16px; font-weight:900; letter-spacing:.4px; text-transform:uppercase}
.toast{margin:0 auto 12px auto; max-width:1200px; padding:12px 14px; border-radius:16px; border:1px solid rgba(255,134,0,.28); background: rgba(255,134,0,.10); font-weight:900; text-transform:uppercase; letter-spacing:.35px}
.notice{padding:12px 14px; border-radius:16px; border:1px solid var(--border); font-weight:900; letter-spacing:.35px; text-transform:uppercase}
.notice.ok{border-color: rgba(0,255,160,.28); background: rgba(0,255,160,.10)}
.notice.err{border-color: rgba(255,0,80,.28); background: rgba(255,0,80,.10)}

/* Mobile refinado: tudo cabendo certinho na tela */
@media (max-width: 480px){
  .wrap,
  .container,
  .admin-wrap{
    padding:12px;
    width:100%;
    max-width:100%;
  }

  .cards{gap:12px}
  .card{border-radius:14px}
  .card .body,
  .card-body{padding:12px}
  .card-title{font-size:14px}

  /* No celular, a capa continua quadrada mas nunca estoura a largura */
  .card > img,
  .card-cover{max-height: none;}
}
