/* ==========================================================================
   MOBILITY — PAINEL ADMINISTRATIVO
   Identidade visual: navy, azul acinzentado, branco e bronze.
   ========================================================================== */
:root {
  --navy-950: #031326;
  --navy-900: #061c38;
  --navy: #07234a;
  --navy-700: #0b2f5e;
  --steel: #5e6b81;
  --steel-600: #566277;
  --bronze: #b07d3a;
  --bronze-dark: #7f5424;
  --bronze-3: #d8b27a;
  --ice: #f2f6fb;
  --ice-2: #e8eef7;
  --white: #ffffff;
  --ink: #0b1b31;
  --body: #4d5b70;
  --line: #dfe7f1;
  --line-strong: #c9d5e4;
  --green: #0b6b40;
  --red: #b23a3a;
  --red-soft: #fff0ef;
  --display: "Sora", "Segoe UI", sans-serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 18px 45px rgba(7, 35, 74, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ice); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(176, 125, 58, 0.24); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 0.7rem 1rem;
  border-radius: 9px; background: var(--bronze); color: var(--navy-950);
  font-weight: 800; transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.76rem; }
.admin-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--bronze-dark);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.admin-kicker::before { content: ""; width: 18px; height: 1px; background: var(--bronze); }
.dev-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 0.28rem 0.5rem; border: 1px solid rgba(176, 125, 58, 0.35); border-radius: 999px;
  color: var(--bronze-dark); background: rgba(176, 125, 58, 0.08);
  font-size: 0.52rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bronze-3); box-shadow: 0 0 0 4px rgba(216, 178, 122, 0.12); }

/* --------------------------------------------------------------------------
   BOTÕES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 44px; padding: 0.72rem 1.1rem; border: 1px solid transparent;
  border-radius: 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.01em;
  cursor: pointer; transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--navy); color: var(--white); box-shadow: 0 10px 24px rgba(7, 35, 74, 0.18); }
.btn--primary:hover { background: var(--navy-700); }
.btn--outline { border-color: var(--line-strong); background: var(--white); color: var(--navy); }
.btn--outline:hover { border-color: var(--bronze); color: var(--bronze-dark); }
.btn--quiet { border-color: var(--line); background: transparent; color: var(--body); }
.btn--quiet:hover { border-color: var(--line-strong); background: var(--white); color: var(--navy); }
.btn--danger { background: var(--red); color: var(--white); }
.btn--danger:hover { background: #922f2f; }
.btn--wide { width: 100%; }
.btn--small { min-height: 38px; padding: 0.55rem 0.85rem; font-size: 0.7rem; }
.icon-button {
  display: inline-grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  color: var(--navy); cursor: pointer; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.icon-button:hover { border-color: var(--bronze); background: #fffaf2; }
.text-link {
  display: inline-flex; align-items: center; gap: 0.3rem; color: var(--bronze-dark);
  font-size: 0.7rem; font-weight: 800; white-space: nowrap;
}
.text-link .icon { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.count-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.7rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  color: var(--steel); font-size: 0.65rem; font-weight: 700; white-space: nowrap;
}
.count-chip strong { color: var(--navy); font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   LOGIN
   -------------------------------------------------------------------------- */
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(430px, 0.9fr); }
.auth-visual { position: relative; min-height: 100svh; overflow: hidden; background: var(--navy-950); color: var(--white); }
.auth-visual-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.auth-visual-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 19, 38, 0.72) 0%, rgba(3, 19, 38, 0.34) 40%, rgba(3, 19, 38, 0.92) 100%),
    linear-gradient(90deg, rgba(3, 19, 38, 0.78) 0%, rgba(3, 19, 38, 0.08) 78%);
}
.auth-visual-top, .auth-visual-copy, .auth-visual-foot { position: relative; z-index: 2; }
.auth-visual-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.6rem);
}
.auth-brand-plate { display: inline-flex; padding: 0.85rem 1rem; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; background: rgba(3, 19, 38, 0.38); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.auth-brand-plate img { width: 168px; filter: drop-shadow(0 3px 12px rgba(255, 255, 255, 0.1)); }
.auth-env { color: rgba(255, 255, 255, 0.55); font-family: var(--display); font-size: 0.55rem; letter-spacing: 0.18em; }
.auth-visual-copy { padding: clamp(2rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 5rem) 2rem; max-width: 760px; }
.auth-visual-copy .admin-kicker { color: var(--bronze-3); }
.auth-visual-copy .admin-kicker::before { background: var(--bronze-3); }
.auth-visual-copy h1 {
  margin-top: 1.2rem; font-family: var(--display); font-size: clamp(2.8rem, 5.6vw, 5.4rem);
  font-weight: 600; line-height: 0.98; letter-spacing: -0.055em;
}
.auth-visual-copy p { max-width: 42ch; margin-top: 1.4rem; color: rgba(255, 255, 255, 0.7); font-size: 1rem; line-height: 1.75; }
.auth-visual-foot {
  display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 0 clamp(1.5rem, 5vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  color: rgba(255, 255, 255, 0.6); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
}
.auth-visual-foot span { display: inline-flex; align-items: center; gap: 0.55rem; }
.auth-visual-foot i { width: 5px; height: 5px; border-radius: 50%; background: var(--bronze-3); box-shadow: 0 0 9px rgba(216, 178, 122, 0.8); }

.auth-panel {
  display: flex; min-height: 100svh; flex-direction: column; justify-content: center; align-items: center;
  gap: 1rem; padding: 2rem 1.4rem; background:
    radial-gradient(60% 50% at 100% 0%, rgba(176, 125, 58, 0.07), transparent 70%), var(--ice);
}
.auth-card {
  width: 100%; max-width: 430px; padding: clamp(1.4rem, 3.2vw, 2.5rem);
  border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow);
}
.auth-logo { display: inline-flex; padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--navy-950); }
.auth-logo img { width: 142px; }
.auth-card > .admin-kicker { margin-top: 1.4rem; }
.auth-card h2 { margin-top: 0.5rem; font-family: var(--display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; }
.auth-intro { margin-top: 0.45rem; color: var(--body); font-size: 0.86rem; line-height: 1.7; }
.auth-form { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.4rem; }
.field > span, .field-label { color: var(--steel); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.field input, .search-field input, .select-field select {
  width: 100%; min-height: 46px; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong); border-radius: 9px; background: #fbfdff;
  color: var(--ink); font-size: 0.85rem; outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field input:focus, .search-field:focus-within, .select-field:focus-within { border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(176, 125, 58, 0.12); }
.form-message { color: var(--steel); font-size: 0.72rem; line-height: 1.6; }
.form-message.is-strong { color: var(--bronze-dark); font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0; color: var(--steel-600); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-footnote { margin-top: 0.9rem; color: var(--steel-600); font-size: 0.66rem; line-height: 1.6; text-align: center; }
.auth-legal { color: var(--steel-600); font-size: 0.62rem; letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   APLICAÇÃO
   -------------------------------------------------------------------------- */
.admin-app { min-height: 100svh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.admin-sidebar {
  position: sticky; top: 0; z-index: 40; display: flex; height: 100svh; flex-direction: column;
  padding: 1.2rem 1rem; background:
    radial-gradient(70% 50% at 10% 0%, rgba(11, 47, 94, 0.9), transparent 70%), var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
}
.sidebar-brand { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.55rem 0.6rem 1.3rem; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.sidebar-brand img { width: 166px; }
.sidebar-brand span { color: rgba(255, 255, 255, 0.45); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 0.3rem; margin-top: 1.2rem; }
.nav-label { padding: 0 0.7rem 0.45rem; color: rgba(255, 255, 255, 0.35); font-size: 0.53rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 0.65rem; min-height: 44px; padding: 0.55rem 0.7rem;
  border: 1px solid transparent; border-radius: 9px; color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem; font-weight: 700; transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-item .icon { width: 17px; height: 17px; opacity: 0.72; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }
.nav-item.is-active { border-color: rgba(216, 178, 122, 0.24); background: rgba(216, 178, 122, 0.1); color: var(--white); }
.nav-item.is-active .icon { color: var(--bronze-3); opacity: 1; }
.nav-count { margin-left: auto; min-width: 21px; padding: 0.12rem 0.34rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.72); font-size: 0.58rem; text-align: center; }
.nav-item.is-active .nav-count { background: var(--bronze); color: var(--navy-950); }
.sidebar-note { display: flex; gap: 0.65rem; margin-top: auto; padding: 0.9rem; border: 1px solid rgba(216, 178, 122, 0.18); border-radius: 12px; background: rgba(216, 178, 122, 0.05); }
.sidebar-note .status-dot { margin-top: 0.28rem; flex: 0 0 auto; }
.sidebar-note p { color: rgba(255, 255, 255, 0.48); font-size: 0.61rem; line-height: 1.55; }
.sidebar-note strong { display: block; margin-bottom: 0.2rem; color: rgba(255, 255, 255, 0.82); font-size: 0.64rem; }
.sidebar-foot { display: grid; gap: 0.2rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.09); }
.sidebar-link {
  display: flex; align-items: center; gap: 0.65rem; min-height: 40px; padding: 0.45rem 0.7rem;
  border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, 0.55);
  font-size: 0.71rem; font-weight: 700; text-align: left; cursor: pointer;
}
.sidebar-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }
.sidebar-link .icon { width: 15px; height: 15px; }

.admin-shell { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
  min-height: 74px; padding: 0.8rem clamp(1rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.mobile-menu-button { display: none; }
.admin-crumb { display: grid; gap: 0.05rem; }
.admin-crumb span { color: var(--steel-600); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.admin-crumb strong { color: var(--navy); font-family: var(--display); font-size: 0.92rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 0.8rem; margin-left: auto; }
.admin-user { display: inline-flex; align-items: center; gap: 0.5rem; }
.admin-user > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 0.62rem; font-weight: 800; }
.admin-user em { max-width: 180px; overflow: hidden; color: var(--steel); font-size: 0.62rem; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dev-banner {
  display: flex; align-items: center; gap: 0.65rem; margin: 0 clamp(1rem, 3vw, 2.4rem);
  padding: 0.7rem 0.9rem; border: 1px solid rgba(176, 125, 58, 0.24); border-radius: 10px;
  background: rgba(176, 125, 58, 0.07); color: var(--bronze-dark);
}
.dev-banner { margin-top: 1rem; }
.dev-banner .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.dev-banner p { flex: 1; font-size: 0.66rem; line-height: 1.5; }
.dev-banner strong { font-weight: 800; }
.admin-main { width: 100%; max-width: 1480px; margin: 0 auto; padding: clamp(1.2rem, 3vw, 2.4rem); }
.admin-view { animation: adminFade 0.35s var(--ease); }
@keyframes adminFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.4rem; }
.page-head h1 { margin-top: 0.35rem; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.1; color: var(--navy); }
.page-head p { margin-top: 0.4rem; color: var(--body); font-size: 0.86rem; }
.admin-footer {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: auto;
  padding: 1rem clamp(1rem, 3vw, 2.4rem); border-top: 1px solid var(--line);
  color: var(--steel-600); font-size: 0.58rem; font-weight: 600;
}

/* --------------------------------------------------------------------------
   DASHBOARD
   -------------------------------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.stat-card { display: flex; min-height: 138px; flex-direction: column; justify-content: space-between; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(7, 35, 74, 0.04); }
.stat-card--accent { border-color: rgba(176, 125, 58, 0.3); background: linear-gradient(150deg, #fffdf8, #fff8ef); }
.stat-label { color: var(--steel); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-card strong { margin-top: 0.5rem; color: var(--navy); font-family: var(--display); font-size: clamp(2.2rem, 3.6vw, 3.1rem); font-weight: 600; line-height: 1; letter-spacing: -0.06em; }
.stat-card--accent strong { color: var(--bronze-dark); }
.stat-hint { color: var(--steel-600); font-size: 0.62rem; line-height: 1.4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 0.85rem; margin-top: 0.85rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(7, 35, 74, 0.04); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin-top: 0.3rem; color: var(--navy); font-family: var(--display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.025em; }
.section-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; padding: 1rem; }
.section-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; }
.section-row.is-empty { border-style: dashed; background: #f7f9fc; }
.section-row > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: var(--ice); color: var(--navy); font-family: var(--display); font-size: 0.62rem; font-weight: 600; }
.section-row strong { display: block; color: var(--navy); font-size: 0.7rem; line-height: 1.3; }
.section-row small { display: block; color: var(--steel-600); font-size: 0.58rem; }
.section-row em { margin-left: auto; color: var(--bronze-dark); font-size: 0.72rem; font-style: normal; font-weight: 800; }
.quick-links { display: grid; gap: 0.55rem; padding: 1rem; }
.quick-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease); }
.quick-link:hover { border-color: var(--bronze); background: #fffaf3; }
.quick-icon { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border-radius: 8px; background: var(--navy); color: var(--bronze-3); }
.quick-icon .icon { width: 16px; height: 16px; }
.quick-link strong { display: block; color: var(--navy); font-size: 0.72rem; }
.quick-link small { display: block; color: var(--steel-600); font-size: 0.6rem; line-height: 1.4; }
.quick-arrow { width: 13px; height: 13px; margin-left: auto; color: var(--steel-600); }
.info-card { margin: 0 1rem 1rem; padding: 0.9rem; border: 1px solid rgba(176, 125, 58, 0.22); border-radius: 10px; background: #fffaf3; }
.info-card p { margin-top: 0.35rem; color: var(--bronze-dark); font-size: 0.64rem; line-height: 1.6; }
.panel--gallery { margin-top: 0.85rem; }
.gallery-mini { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; padding: 1rem; }
.gallery-mini img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--ice); }
.gallery-mini figure { position: relative; overflow: hidden; border-radius: 8px; }
.gallery-mini figcaption { position: absolute; right: 0.35rem; bottom: 0.35rem; padding: 0.12rem 0.3rem; border-radius: 4px; background: rgba(3, 19, 38, 0.65); color: var(--white); font-size: 0.48rem; font-weight: 700; }

/* --------------------------------------------------------------------------
   IMAGENS
   -------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.1rem; }
.search-field { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; padding: 0 0.8rem; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--white); }
.search-field .icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--steel-600); }
.search-field input { min-height: 44px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.search-field input:focus { box-shadow: none; }
.select-field { display: flex; align-items: center; gap: 0.5rem; }
.select-field span { color: var(--steel); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.select-field select { min-height: 44px; min-width: 170px; padding: 0 0.8rem; border-radius: 9px; background: var(--white); cursor: pointer; }
.image-groups { display: grid; gap: 1rem; }
.image-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(7, 35, 74, 0.04); }
.image-group-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); }
.image-group-head h2 { color: var(--navy); font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.image-group-head p { margin-top: 0.15rem; color: var(--steel-600); font-size: 0.65rem; }
.group-count { display: inline-grid; min-width: 28px; height: 28px; place-items: center; border-radius: 999px; background: var(--ice); color: var(--navy); font-size: 0.65rem; font-weight: 800; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 0.75rem; padding: 1rem; }
.image-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--white); overflow: hidden; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.image-card:hover { border-color: var(--line-strong); box-shadow: 0 12px 26px rgba(7, 35, 74, 0.07); }
.image-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ice); }
.image-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.image-card-media--logo { background: linear-gradient(45deg, #f7f9fc 25%, #eef3f9 25%, #eef3f9 50%, #f7f9fc 50%, #f7f9fc 75%, #eef3f9 75%); background-size: 18px 18px; }
.image-card-media--logo img { object-fit: contain; padding: 1.1rem; }
.image-card:hover .image-card-media img { transform: scale(1.025); }
.image-card-media .image-tag { position: absolute; top: 0.5rem; left: 0.5rem; padding: 0.2rem 0.45rem; border-radius: 5px; background: rgba(3, 19, 38, 0.7); color: var(--white); font-size: 0.48rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.image-tag--staged { background: rgba(176, 125, 58, 0.9); color: var(--navy-950); }
.image-card-body { display: flex; flex: 1; flex-direction: column; gap: 0.4rem; padding: 0.8rem; }
.image-card-title { color: var(--navy); font-family: var(--display); font-size: 0.84rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.image-card-desc { color: var(--steel); font-size: 0.64rem; line-height: 1.5; }
.image-card-usage { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.usage-chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.18rem 0.4rem; border-radius: 4px; background: var(--ice); color: var(--steel); font-size: 0.53rem; font-weight: 700; }
.usage-chip--shared { background: #fff6e8; color: var(--bronze-dark); }
.image-card-actions { display: flex; gap: 0.4rem; margin-top: auto; padding-top: 0.55rem; }
.image-card-actions .btn { flex: 1; min-height: 36px; padding: 0.45rem 0.55rem; font-size: 0.61rem; }
.image-card-actions .btn .icon { width: 13px; height: 13px; }
.image-card-meta { color: var(--steel-600); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.53rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { padding: 2.2rem 1rem; color: var(--steel); font-size: 0.76rem; text-align: center; }
.empty-state strong { display: block; margin-bottom: 0.3rem; color: var(--navy); font-family: var(--display); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   GALERIA
   -------------------------------------------------------------------------- */
.inline-note { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; padding: 0.7rem 0.9rem; border: 1px solid rgba(176, 125, 58, 0.24); border-radius: 9px; background: #fffaf3; color: var(--bronze-dark); }
.inline-note .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.inline-note p { flex: 1; font-size: 0.65rem; line-height: 1.5; }
.inline-note strong { font-weight: 800; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.toolbar-hint { color: var(--steel-600); font-size: 0.63rem; }
.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.7rem; }
.gallery-admin-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 8px 24px rgba(7, 35, 74, 0.04); }
.gallery-admin-card .gallery-thumb-wrap { position: relative; aspect-ratio: 4 / 3; background: var(--ice); }
.gallery-admin-card .gallery-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-admin-card .gallery-thumb-index { position: absolute; left: 0.5rem; top: 0.5rem; padding: 0.2rem 0.42rem; border-radius: 4px; background: rgba(3, 19, 38, 0.72); color: var(--white); font-size: 0.48rem; font-weight: 700; letter-spacing: 0.06em; }
.gallery-admin-card .gallery-thumb-actions { position: absolute; right: 0.4rem; bottom: 0.4rem; display: flex; gap: 0.3rem; opacity: 0; transition: opacity 0.25s var(--ease); }
.gallery-admin-card:hover .gallery-thumb-actions, .gallery-admin-card:focus-within .gallery-thumb-actions { opacity: 1; }
.gallery-thumb-actions .icon-button { width: 32px; height: 32px; border-color: rgba(255, 255, 255, 0.28); background: rgba(3, 19, 38, 0.66); color: var(--white); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gallery-thumb-actions .icon-button:hover { border-color: var(--bronze-3); background: var(--bronze); color: var(--navy-950); }
.gallery-admin-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.7rem; }
.gallery-admin-body strong { color: var(--navy); font-family: var(--display); font-size: 0.72rem; font-weight: 600; }
.gallery-admin-body small { color: var(--steel-600); font-size: 0.57rem; line-height: 1.4; }
.gallery-admin-body .usage-chip { align-self: flex-start; }
.add-gallery-card {
  display: grid; min-height: 208px; place-items: center; padding: 1rem; border: 1px dashed var(--line-strong);
  border-radius: 12px; background: rgba(255, 255, 255, 0.5); color: var(--steel); cursor: pointer;
  text-align: center; transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.add-gallery-card:hover { border-color: var(--bronze); background: #fffaf3; color: var(--bronze-dark); }
.add-gallery-card span { display: grid; gap: 0.4rem; place-items: center; }
.add-gallery-card .icon { width: 26px; height: 26px; }
.add-gallery-card strong { color: var(--navy); font-family: var(--display); font-size: 0.8rem; font-weight: 600; }
.add-gallery-card small { color: var(--steel-600); font-size: 0.6rem; }
.gallery-related { color: var(--bronze-dark); font-size: 0.55rem; font-weight: 700; }
.gallery-order { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.15rem; }
.gallery-order > span { margin-right: auto; color: var(--steel-600); font-size: 0.53rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.order-button {
  display: inline-grid; width: 26px; height: 26px; place-items: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--white);
  color: var(--navy); font-size: 0.78rem; line-height: 1; cursor: pointer;
}
.order-button:hover { border-color: var(--bronze); color: var(--bronze-dark); }
.order-button:disabled, .icon-button:disabled { opacity: 0.35; cursor: not-allowed; }
.add-gallery-card:disabled { opacity: 0.5; cursor: not-allowed; }


/* --------------------------------------------------------------------------
   DIÁLOGOS
   -------------------------------------------------------------------------- */
.admin-dialog {
  width: min(960px, 94vw); max-height: 92vh; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px; background: var(--white);
  color: var(--ink); box-shadow: 0 30px 80px rgba(3, 19, 38, 0.32);
}
.admin-dialog[open] { display: flex; flex-direction: column; }
.admin-dialog--small { width: min(560px, 94vw); }
.admin-dialog::backdrop { background: rgba(3, 19, 38, 0.58); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex: 0 0 auto; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-top: 0.3rem; color: var(--navy); font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.03em; }
.dialog-close { width: 36px; height: 36px; border-color: transparent; background: var(--ice); }
.dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.15rem 1.25rem; }
.dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: 0 0 auto; padding: 0.85rem 1.25rem; border-top: 1px solid var(--line); background: #fbfdff; }
.dev-inline { color: var(--steel-600); font-size: 0.58rem; font-weight: 600; }
.dialog-actions { display: flex; gap: 0.5rem; }
.preview-dialog-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr); gap: 1.2rem; }
.preview-stage { display: grid; min-height: 300px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--navy-950); overflow: hidden; }
.preview-stage img { display: block; width: 100%; max-height: 58vh; object-fit: contain; }
.preview-side { display: flex; flex-direction: column; gap: 0.7rem; }
.preview-description { color: var(--body); font-size: 0.76rem; line-height: 1.7; }
.meta-list { display: grid; gap: 0.55rem; }
.meta-list > div { display: grid; gap: 0.12rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.meta-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list dt { color: var(--steel-600); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.meta-list dd { color: var(--navy); font-size: 0.68rem; word-break: break-word; }
.note-box { padding: 0.7rem 0.8rem; border: 1px solid rgba(176, 125, 58, 0.22); border-radius: 8px; background: #fffaf3; color: var(--bronze-dark); font-size: 0.64rem; line-height: 1.55; }
.note-box--danger { border-color: rgba(178, 58, 58, 0.25); background: var(--red-soft); color: var(--red); }
.dialog-context { margin-bottom: 0.9rem; color: var(--body); font-size: 0.74rem; }
.replace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.replace-column { display: flex; min-width: 0; flex-direction: column; gap: 0.45rem; }
.current-image-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--navy-950); aspect-ratio: 16 / 11; }
.current-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.image-caption { color: var(--steel-600); font-size: 0.58rem; line-height: 1.4; word-break: break-word; }
.upload-zone {
  position: relative; display: grid; min-height: 230px; place-items: center; overflow: hidden;
  border: 1px dashed var(--line-strong); border-radius: 10px; background: #fbfdff; cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.upload-zone:hover { border-color: var(--bronze); background: #fffaf3; }
.upload-zone--large { min-height: 290px; }
.upload-empty { display: grid; gap: 0.35rem; place-items: center; padding: 1rem; color: var(--steel); text-align: center; }
.upload-icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 0.2rem; border-radius: 50%; background: var(--ice); color: var(--navy); }
.upload-empty strong { color: var(--navy); font-size: 0.74rem; }
.upload-empty small { font-size: 0.58rem; }
.upload-preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.upload-filename { min-height: 1em; color: var(--steel-600); font-size: 0.58rem; word-break: break-all; }
.form-error { margin-top: 0.7rem; padding: 0.55rem 0.7rem; border: 1px solid rgba(178, 58, 58, 0.25); border-radius: 7px; background: var(--red-soft); color: var(--red); font-size: 0.65rem; font-weight: 700; }
.replace-warning { display: flex; align-items: flex-start; gap: 0.45rem; margin-top: 0.7rem; color: var(--bronze-dark); font-size: 0.63rem; line-height: 1.5; }
.replace-warning .icon { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 0.15rem; }

/* --------------------------------------------------------------------------
   TOAST
   -------------------------------------------------------------------------- */
.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; display: grid; gap: 0.4rem; width: min(340px, calc(100vw - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.75rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 9px; background: var(--navy); color: var(--white); box-shadow: 0 16px 34px rgba(3, 19, 38, 0.28); font-size: 0.68rem; line-height: 1.45; animation: toastIn 0.3s var(--ease); }
.toast .icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 0.1rem; color: var(--bronze-3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   RESPONSIVO
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr); }
  .auth-visual-copy h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
  .admin-app { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar-brand img { width: 150px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .gallery-mini { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 320px; }
  .auth-visual-copy { padding-top: 2.2rem; }
  .auth-visual-foot { padding-bottom: 1.4rem; }
  .auth-panel { min-height: auto; padding: 1.6rem 1rem 2.4rem; }
  .auth-card { margin-top: -3rem; position: relative; z-index: 3; }
  .admin-app { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%);
    transition: transform 0.35s var(--ease); box-shadow: 20px 0 60px rgba(3, 19, 38, 0.25);
  }
  .admin-sidebar.is-open { transform: none; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(3, 19, 38, 0.5); }
  .mobile-menu-button { display: inline-grid; }
  .admin-topbar { min-height: 66px; }
  .admin-main { padding: 1.1rem; }
  .dev-banner { margin-inline: 1.1rem; }
  .admin-footer { padding-inline: 1.1rem; }
}

@media (max-width: 700px) {
  .page-head { align-items: flex-start; flex-direction: column; gap: 0.8rem; }
  .page-head .btn { width: 100%; }
  .stats-grid { gap: 0.55rem; }
  .stat-card { min-height: 120px; padding: 0.85rem; }
  .stat-card strong { font-size: 2.2rem; }
  .section-summary { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .select-field { justify-content: space-between; }
  .select-field select { flex: 1; min-width: 0; }
  .image-grid { grid-template-columns: 1fr; padding: 0.75rem; }
  .gallery-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .gallery-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-admin-card .gallery-thumb-actions { opacity: 1; }
  .dialog-foot { align-items: flex-start; flex-direction: column; }
  .dialog-actions { width: 100%; }
  .dialog-actions .btn { flex: 1; }
  .preview-dialog-body, .replace-grid { grid-template-columns: 1fr; }
  .preview-stage { min-height: 220px; }
  .replace-grid .current-image-frame { aspect-ratio: 16 / 9; }
  .admin-footer { flex-direction: column; gap: 0.35rem; }
  .topbar-actions .btn { display: none; }
  .admin-user em { display: none; }
}

@media (max-width: 480px) {
  .auth-brand-plate img { width: 142px; }
  .auth-visual { min-height: 280px; }
  .auth-visual-copy h1 { font-size: 2.6rem; }
  .auth-visual-copy p { font-size: 0.86rem; }
  .auth-visual-foot { gap: 0.7rem; font-size: 0.55rem; }
  .auth-panel { padding-inline: 0.7rem; }
  .auth-card { padding: 1.2rem; border-radius: 18px; }
  .admin-crumb strong { font-size: 0.82rem; }
  .admin-topbar { padding-inline: 0.75rem; }
  .dev-banner { align-items: flex-start; margin-inline: 0.75rem; }
  .dev-banner .dev-badge { display: none; }
  .admin-main { padding: 0.8rem; }
  .admin-footer { padding-inline: 0.8rem; }
  .gallery-admin-grid { grid-template-columns: 1fr 1fr; }
  .gallery-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card strong { font-size: 1.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
