/* =====================================================================
   Kalsites — Painel administrativo
   Mesma linguagem visual do site, porém mais denso e funcional: aqui o
   objetivo é trabalhar rápido, não impressionar.
   ===================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/spacegrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:           #06060f;
  --bg-panel:     #0c0c1c;
  --bg-card:      #101024;
  --bg-hover:     #16162e;
  --border:       rgba(255, 255, 255, 0.09);
  --border-bright:rgba(167, 139, 250, 0.38);
  --text:         #ecebff;
  --text-muted:   #9d9cc0;
  --text-dim:     #6f6e92;
  --violet:       #8b5cf6;
  --violet-light: #a78bfa;
  --cyan:         #22d3ee;
  --pink:         #f472b6;
  --green:        #34d399;
  --amber:        #fbbf24;
  --gradient:     linear-gradient(120deg, #8b5cf6, #22d3ee);
  --radius:       14px;
  --radius-sm:    10px;
  --sidebar-w:    252px;
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a48; border-radius: 8px; border: 2px solid var(--bg); }

/* --- Tela de login e instalação ---------------------------------- */

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 500px at 20% 0%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(600px 400px at 80% 100%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 42px 38px;
  background: rgba(16, 16, 36, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.auth-head { text-align: center; margin-bottom: 30px; }
.auth-head h1 { font-size: 1.5rem; margin: 18px 0 8px; }
.auth-head p { color: var(--text-muted); font-size: 0.92rem; }

.logo-img {
  display: block;
  width: auto;
  height: 38px;
}

.logo--auth .logo-img {
  height: 48px;
  margin: 0 auto;
}

.logo--admin .logo-img {
  height: 30px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--gradient);
  display: inline-grid;
  place-items: center;
  color: #08081a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: 0 0 36px rgba(139, 92, 246, 0.45);
}

.auth-footer { margin-top: 26px; text-align: center; font-size: 0.86rem; color: var(--text-dim); }
.auth-footer a { color: var(--violet-light); }

/* --- Estrutura do painel ------------------------------------------ */

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

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  transition: transform 0.35s var(--ease);
}

.sidebar-head {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.sidebar-head small { display: block; font-size: 0.72rem; color: var(--text-dim); font-weight: 400; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }

.nav-group-label {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 12px 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav a:hover { background: var(--bg-hover); color: var(--text); }

.sidebar-nav a.is-active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.06));
  color: var(--text);
  font-weight: 500;
}

.sidebar-nav a.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient);
}

.nav-badge {
  margin-left: auto;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--pink);
  color: #2a0716;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sidebar-foot { padding: 14px 12px; border-top: 1px solid var(--border); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.user-chip:hover { background: var(--bg-hover); }

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  color: #08081a;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.user-chip .name { font-size: 0.88rem; font-weight: 500; }
.user-chip .role { font-size: 0.74rem; color: var(--text-dim); }

/* --- Conteúdo ----------------------------------------------------- */

.admin-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 6, 15, 0.9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h1 { font-size: 1.18rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  place-items: center;
}
.sidebar-toggle svg { width: 20px; height: 20px; }

.admin-content { padding: 26px; max-width: 1400px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head p { color: var(--text-muted); font-size: 0.92rem; margin-top: 6px; }

/* --- Cartões e grades --------------------------------------------- */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-head h2 { font-size: 1rem; }
.panel-body { padding: 22px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s;
}

.stat-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }

.stat-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid var(--border-bright);
  color: var(--violet-light);
  margin-bottom: 16px;
}
.stat-card .icon svg { width: 20px; height: 20px; }

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .label { font-size: 0.85rem; color: var(--text-dim); margin-top: 7px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }

/* --- Tabelas ------------------------------------------------------ */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.91rem; }

th {
  text-align: left;
  padding: 13px 18px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td { padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.18s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.022); }

.cell-main { font-weight: 500; }
.cell-sub { font-size: 0.82rem; color: var(--text-dim); margin-top: 3px; }
.cell-actions { display: flex; gap: 7px; justify-content: flex-end; }

.thumb-mini {
  width: 54px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
  background: #1a1a38;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.row-flex { display: flex; align-items: center; gap: 13px; }

.drag-handle {
  cursor: grab;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 5px;
  touch-action: none;
}
.drag-handle:hover { color: var(--violet-light); background: var(--bg-hover); }
.drag-handle svg { width: 16px; height: 16px; }
tr.dragging { opacity: 0.45; background: var(--bg-hover); }

/* --- Botões ------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.22s;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--gradient); color: #08081a; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--border-bright); color: var(--text); background: var(--bg-hover); }

.btn-danger { background: rgba(244, 114, 182, 0.14); border-color: rgba(244, 114, 182, 0.35); color: #fbcfe8; }
.btn-danger:hover { background: rgba(244, 114, 182, 0.25); }

.btn-sm { padding: 7px 13px; font-size: 0.83rem; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-icon svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* --- Etiquetas ---------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}

.badge-green  { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.badge-amber  { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.35); color: #fcd34d; }
.badge-violet { background: rgba(139, 92, 246, 0.14); border-color: var(--border-bright); color: var(--violet-light); }
.badge-pink   { background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.35); color: #f9a8d4; }
.badge-gray   { background: rgba(255, 255, 255, 0.05); border-color: var(--border); color: var(--text-dim); }

/* --- Formulários -------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label { display: block; font-size: 0.86rem; font-weight: 500; margin-bottom: 7px; }
.field .required { color: var(--pink); }

.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field input[type='url'],
.field input[type='tel'],
.field input[type='number'],
.field input[type='file'],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea { resize: vertical; min-height: 100px; line-height: 1.6; font-family: inherit; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.field input[type='file'] { padding: 9px 12px; font-size: 0.86rem; cursor: pointer; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--pink); }

.field-error { display: block; margin-top: 6px; font-size: 0.81rem; color: var(--pink); }
.field-hint  { display: block; margin-top: 6px; font-size: 0.81rem; color: var(--text-dim); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.check-row:hover { border-color: var(--border-bright); }
.check-row input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; margin-top: 1px; }
.check-row .text { font-size: 0.89rem; }
.check-row .text small { display: block; color: var(--text-dim); font-size: 0.8rem; margin-top: 2px; }

.form-actions {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  margin-bottom: 11px;
}

.image-preview img {
  width: 84px;
  height: 60px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
}

/* --- Alertas ------------------------------------------------------ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.9rem;
  border: 1px solid;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(52, 211, 153, 0.1);  border-color: rgba(52, 211, 153, 0.32); color: #a7f3d0; }
.alert-error   { background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.32); color: #fbcfe8; }
.alert-info    { background: rgba(139, 92, 246, 0.1);  border-color: rgba(139, 92, 246, 0.32); color: #ddd6fe; }
.alert-warning { background: rgba(251, 191, 36, 0.1);  border-color: rgba(251, 191, 36, 0.32); color: #fde68a; }
.alert code { background: rgba(0,0,0,0.3); padding: 1px 6px; border-radius: 4px; font-size: 0.86em; }

/* --- Filtros e busca ---------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box { position: relative; flex: 1; min-width: 220px; max-width: 380px; }

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}

.search-box input:focus { outline: none; border-color: var(--violet); }

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-tabs { display: flex; gap: 7px; flex-wrap: wrap; }

.filter-tabs a {
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.filter-tabs a:hover { border-color: var(--border-bright); color: var(--text); }
.filter-tabs a.is-active { background: var(--gradient); border-color: transparent; color: #08081a; font-weight: 600; }

/* --- Abas verticais (conteúdo do site) ---------------------------- */

.tabs-layout { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; }

.tabs-nav { display: grid; gap: 4px; position: sticky; top: 90px; }

.tabs-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.tabs-nav a svg { width: 17px; height: 17px; }
.tabs-nav a:hover { background: var(--bg-hover); color: var(--text); }
.tabs-nav a.is-active { background: var(--bg-card); border-color: var(--border-bright); color: var(--text); font-weight: 500; }

/* --- Paginação ---------------------------------------------------- */

.pagination { display: flex; align-items: center; gap: 7px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.pagination a, .pagination span {
  min-width: 37px;
  height: 37px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--border-bright); color: var(--text); }
.pagination .is-active { background: var(--gradient); border-color: transparent; color: #08081a; font-weight: 600; }
.pagination .disabled { opacity: 0.4; }

/* --- Estados vazios ----------------------------------------------- */

.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty svg { width: 46px; height: 46px; color: var(--text-dim); margin: 0 auto 16px; }
.empty h3 { font-size: 1.05rem; margin-bottom: 7px; color: var(--text); }
.empty p { font-size: 0.9rem; margin-bottom: 20px; }

/* --- Verificação de segurança ------------------------------------- */

.check-list { display: grid; gap: 11px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px 19px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.check-item.is-fail { border-color: rgba(244, 114, 182, 0.4); background: rgba(244, 114, 182, 0.05); }
.check-item.is-warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.05); }

.check-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.check-mark svg { width: 15px; height: 15px; }
.check-ok   { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.check-bad  { background: rgba(244, 114, 182, 0.16); color: var(--pink); }
.check-warn { background: rgba(251, 191, 36, 0.16); color: var(--amber); }

.check-item .title { font-weight: 500; font-size: 0.93rem; }
.check-item .detail { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.score-ring {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.score-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1; }

/* --- Mensagens ---------------------------------------------------- */

.message-body {
  white-space: pre-wrap;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.75;
  word-break: break-word;
}

.meta-list { display: grid; gap: 14px; }
.meta-list .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); }
.meta-list .value { font-size: 0.93rem; margin-top: 3px; word-break: break-word; }

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  flex-shrink: 0;
}

/* --- Galeria do projeto ------------------------------------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: #14142e;
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gallery-item form {
  position: absolute;
  top: 7px;
  right: 7px;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-item:hover form { opacity: 1; }

.gallery-item button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(10, 10, 20, 0.88);
  border: 1px solid rgba(244, 114, 182, 0.5);
  color: #fbcfe8;
  display: grid;
  place-items: center;
}
.gallery-item button svg { width: 15px; height: 15px; }

/* --- Responsivo --------------------------------------------------- */

@media (max-width: 1024px) {
  .tabs-layout { grid-template-columns: 1fr; }
  .tabs-nav { position: static; grid-auto-flow: column; overflow-x: auto; padding-bottom: 6px; }
  .tabs-nav a { white-space: nowrap; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, 0.7); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: grid; }
  .admin-content { padding: 18px; }
  .col-8, .col-6, .col-4, .col-3 { grid-column: span 12; }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .sidebar-backdrop.show { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
