/* Admin Stylesheet — Slate Charcoal & Lens Blue Theme (Light / White Mode) */
:root {
  /* Paleta da Marca DRCLab (alinhada com a home) */
  --brand-dark: #192667;
  /* Azul escuro principal da marca */
  --brand-mid: #001cac;
  /* Azul médio da marca */
  --brand-light: #3a4fb0;
  /* Azul claro hover */

  --bg-dark: #f3f4f6;
  /* Light gray background */
  --bg-light: #ffffff;
  /* Pure white background for containers/cards */
  --bg-card: #ffffff;
  /* White cards */
  --bg-input: #f9fafb;
  /* Soft off-white for input fields */
  --accent-color: #192667;
  /* Azul escuro da marca */
  --accent-color-hover: #001cac;
  /* Azul médio no hover */
  --accent-gradient: linear-gradient(135deg, #192667 0%, #001cac 100%);
  --text-dark: #1f2937;
  /* Main dark text */
  --text-light: #ffffff;
  /* Light text on dark buttons */
  --text-muted: #4b5563;
  /* Muted gray text */
  --white: #ffffff;
  /* Pure white constant */
  --border-color: rgba(0, 0, 0, 0.08);
  /* Subtle dark border */
  --danger-color: #ef4444;
  /* Standard red */
  --danger-hover: #dc2626;
  /* Darker red */
  --success-color: #10b981;
  /* Standard green */
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --topbar-height: 56px;
  --environment-banner-height: 0px;
}

html.staging-environment {
  --environment-banner-height: 36px;
}

.staging-environment-banner {
  display: none;
}

html.staging-environment .staging-environment-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10000;
  height: var(--environment-banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0 1rem;
  background: repeating-linear-gradient(135deg, #f59e0b 0, #f59e0b 18px, #fbbf24 18px, #fbbf24 36px);
  color: #241500;
  border-bottom: 1px solid rgba(120, 53, 15, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

/* Dark Mode Theme & Component Overrides */
body.dark-mode {
  --bg-dark: #0f172a;
  /* Deep slate blue/gray background */
  --bg-light: #1e293b;
  /* Slate card / sidebar background */
  --bg-card: #1e293b;
  --bg-input: #334155;
  /* Lighter slate for fields */
  --accent-color: #60a5fa;
  /* Azul claro legível para dark mode */
  --accent-color-hover: #3b82f6;
  /* Azul intermediário no hover */
  --text-dark: #f8fafc;
  /* High contrast text */
  --text-muted: #94a3b8;
  /* Gray muted text */
  --border-color: rgba(255, 255, 255, 0.08);
  /* White border tint */
}

/* Theme Toggle Switch */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--accent-color);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

body.dark-mode .slider {
  background-color: #475569;
}

body.dark-mode .btn-secondary {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .sidebar-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .sidebar-tab-btn.active {
  background: rgba(58, 79, 176, 0.12);
}

body.dark-mode .album-admin-footer {
  background: rgba(255, 255, 255, 0.01);
}

body.dark-mode .btn-icon-edit {
  background: rgba(96, 165, 250, 0.08);
}

body.dark-mode .btn-gallery-star {
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
}

body.dark-mode .btn-gallery-star.active {
  background: var(--accent-color);
  color: #ffffff;
}

body.dark-mode .loading-overlay {
  background: rgba(15, 23, 42, 0.85);
}

body.dark-mode .spinner {
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--accent-color);
}

body.dark-mode .acompanhe-modal-settings-card {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode .acompanhe-modal-settings-header {
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .acompanhe-modal-settings-title,
body.dark-mode .acompanhe-modal-settings-card label {
  color: var(--text-dark) !important;
}

body.dark-mode .acompanhe-modal-settings-card input[type="file"],
body.dark-mode .acompanhe-modal-settings-card input[type="number"],
body.dark-mode #modal-bg-preview-container {
  background: var(--bg-input) !important;
  color: var(--text-dark) !important;
  border-color: var(--border-color) !important;
}

/* Reset Geral */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-dark);
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
  /* REDUZIDO: de 1rem para 0.88rem */
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* REDUZIDO: Botões um pouco menores */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.25rem;
  /* REDUZIDO: de 0.8rem 1.8rem */
  font-weight: 700;
  font-size: 0.85rem;
  /* REDUZIDO: de 0.9rem */
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(25, 38, 103, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #001cac 0%, #192667 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(25, 38, 103, 0.4);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
}

.btn-danger {
  background: var(--danger-color);
  color: var(--text-light);
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* ─── Layout Estrutural ─────────────────────────────────────────────────────── */

/* Topbar Fixa */
.admin-topbar {
  position: fixed;
  top: var(--environment-banner-height);
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 9000;
  gap: 1rem;
}


.admin-topbar::before {
  content: "";
  width: 180px;
  /* Largura aproximada para equilibrar com o bloco da direita (.topbar-actions) */
  flex-shrink: 0;
}

.admin-topbar .topbar-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-search-wrapper {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.topbar-search-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.4rem 0.85rem 0.4rem 2.2rem;
  font-size: 0.82rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
  outline: none;
}

.topbar-search-wrapper input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(25, 38, 103, 0.08);
  background: var(--bg-light);
}

.topbar-search-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.topbar-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}

.topbar-search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(25, 38, 103, 0.05);
}

.search-result-item i {
  color: var(--accent-color);
  font-size: 0.85rem;
  width: 1rem;
  text-align: center;
}

.search-result-item .result-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
}

.search-result-item .result-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Dark Mode Toggle */
.topbar-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition-smooth);
  position: relative;
}

.topbar-btn:hover {
  background: rgba(25, 38, 103, 0.06);
  color: var(--accent-color);
}

/* Sino de Notificações */
.topbar-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger-color);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  display: none;
}

.topbar-notif-badge.has-notif {
  display: flex;
}

.topbar-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  display: none;
  overflow: hidden;
}

.topbar-notif-dropdown.open {
  display: block;
}

.notif-header {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item i {
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.notif-item-text {
  font-size: 0.8rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.notif-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.notif-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* Avatar/User Dropdown na Topbar */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  position: relative;
}

.topbar-user:hover {
  background: rgba(25, 38, 103, 0.05);
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.topbar-username {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
  overflow: hidden;
}

.topbar-user-dropdown.open {
  display: block;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(25, 38, 103, 0.05);
}

.user-dropdown-item.danger {
  color: var(--danger-color);
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.06);
}

/* Layout Estrutural (Sidebar + Conteúdo Principal) */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  padding-top: calc(var(--topbar-height) + var(--environment-banner-height));
}

/* Menu Lateral (Sidebar) */
.admin-sidebar {
  width: 240px;
  background: var(--bg-light);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 100;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-height) + var(--environment-banner-height));
  height: calc(100vh - var(--topbar-height) - var(--environment-banner-height));
}

@media (max-width: 600px) {
  html.staging-environment {
    --environment-banner-height: 44px;
  }

  html.staging-environment .staging-environment-banner {
    font-size: 0.66rem;
    line-height: 1.2;
  }
}

/* Sidebar Dobrada (Collapsed) */
.admin-sidebar.collapsed {
  width: 65px;
  min-width: 65px;
  display: flex !important;
}

.admin-sidebar.collapsed #workspace-selector-container {
  display: none !important;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  min-height: 4rem;
  box-sizing: border-box;
}

.sidebar-header .admin-logo {
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dark);
  font-size: 1.1rem;
  white-space: nowrap;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* Quando recolhido, oculta completamente a logo e centraliza a seta no cabeçalho */
.admin-sidebar.collapsed .sidebar-header {
  justify-content: center !important;
  padding: 1rem 0.25rem !important;
  cursor: pointer;
}

.admin-sidebar.collapsed .sidebar-header .admin-logo {
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
  display: none !important;
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.btn-toggle-sidebar:hover {
  color: var(--text-dark);
  background: rgba(0, 0, 0, 0.04);
}

.admin-sidebar.collapsed .btn-toggle-sidebar i {
  transform: rotate(180deg);
}

/* Navegação Vertical na Sidebar */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  flex-grow: 1;
  overflow-x: hidden;
}

.sidebar-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-tab-btn i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-tab-btn span {
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.admin-sidebar.collapsed .sidebar-tab-btn span {
  opacity: 0;
  visibility: hidden;
  width: 0;
  pointer-events: none;
}

.sidebar-tab-btn:hover {
  color: var(--text-dark);
  background: rgba(0, 0, 0, 0.03);
}

.sidebar-tab-btn.active {
  color: var(--brand-dark);
  background: rgba(25, 38, 103, 0.07);
}

/* Rodapé da Sidebar */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
}

.sidebar-footer .admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-sidebar.collapsed .sidebar-footer .admin-user-info {
  justify-content: center;
}

.admin-sidebar.collapsed .sidebar-footer .admin-user-info span {
  display: none;
}

.btn-logout-sidebar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.admin-sidebar.collapsed .btn-logout-sidebar span {
  display: none;
}

.sidebar-brand {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
}

..admin-sidebar.collapsed {
  width: 65px !important;
  min-width: 65px !important;
  max-width: 65px !important;
  flex: 0 0 65px !important;
  display: flex !important;
  position: sticky !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100 !important;
  overflow: visible !important;
}

.admin-sidebar.collapsed .sidebar-brand {
  display: none !important;
}

/* Área de Conteúdo do Admin */
.admin-main-content {
  flex-grow: 1;
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Layout das Telas (Views) */
.admin-view {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  /* REDUZIDO: de 2rem 1.5rem */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.admin-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Login View (Centralizada - Fora do layout de sidebar) */
#login-view {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#login-view.active {
  display: flex;
}

.login-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  /* REDUZIDO: de 3rem 2.5rem */
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  /* REDUZIDO: de 480px */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.login-logo {
  font-size: 1.4rem;
  /* REDUZIDO: de 1.6rem */
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-transform: lowercase;
}

.login-subtitle {
  font-size: 0.85rem;
  /* REDUZIDO: de 0.9rem */
  color: var(--text-muted);
  margin-bottom: 2rem;
  /* REDUZIDO: de 2.5rem */
}

/* Formulários */
.form-group {
  margin-bottom: 1.1rem;
  /* REDUZIDO: de 1.5rem */
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  /* REDUZIDO: de 0.8rem */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  /* REDUZIDO: de 0.5rem */
  font-weight: 600;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
  /* REDUZIDO: de 0.75rem 1rem */
  color: var(--text-dark);
  font-size: 0.88rem;
  /* REDUZIDO: de 0.95rem */
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
  /* REDUZIDO: de 100px */
}

/* Ajuda sobre Tokens */
.token-help {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  /* REDUZIDO: de 0.78rem */
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

.token-help a {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Dashboard View */
.dashboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  /* REDUZIDO: de 2rem */
}

.dashboard-actions h2 {
  font-size: 1.35rem;
  /* REDUZIDO: de 1.5rem */
  color: var(--text-dark);
  font-weight: 600;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  /* REDUZIDO: de 320px */
  gap: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

.album-admin-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.album-admin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.album-admin-cover {
  height: 140px;
  /* REDUZIDO: de 160px */
  background-size: cover;
  background-position: center;
  position: relative;
}

.album-admin-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(13, 14, 17, 0.8) 0%, rgba(13, 14, 17, 0.1) 100%);
}

.album-admin-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: var(--accent-color);
  color: var(--text-light);
  font-size: 0.6rem;
  /* REDUZIDO: de 0.65rem */
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
}

.album-admin-info {
  padding: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

.album-admin-title {
  font-size: 1.1rem;
  /* REDUZIDO: de 1.25rem */
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.album-admin-desc {
  font-size: 0.82rem;
  /* REDUZIDO: de 0.88rem */
  color: var(--text-muted);
  line-height: 1.5;
  height: 3.7rem;
  /* REDUZIDO: de 4.5rem */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 1.25rem;
}

.album-admin-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  /* REDUZIDO: de 1rem 1.5rem */
  background: rgba(0, 0, 0, 0.01);
}

.album-photo-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.album-card-btns {
  display: flex;
  gap: 0.4rem;
}

/* REDUZIDO: Botões de ícone menores */
.btn-icon-edit {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-color);
  width: 1.85rem;
  /* REDUZIDO: de 2.2rem */
  height: 1.85rem;
  /* REDUZIDO: de 2.2rem */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-icon-edit:hover {
  background: var(--accent-color);
  color: var(--text-light);
}

.btn-icon-delete {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger-color);
  width: 1.85rem;
  /* REDUZIDO: de 2.2rem */
  height: 1.85rem;
  /* REDUZIDO: de 2.2rem */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-icon-delete:hover {
  background: var(--danger-color);
  color: var(--text-light);
}

/* Edit View Layout */
.edit-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  /* REDUZIDO: de 320px */
  gap: 1.5rem;
  /* REDUZIDO: de 2rem */
}

@media (max-width: 980px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }
}

.edit-main {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.75rem;
  /* REDUZIDO: de 2.5rem */
}

.edit-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-box {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

.sidebar-box h3 {
  font-size: 0.82rem;
  /* REDUZIDO: de 0.9rem */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.85rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

/* Capa Preview */
.cover-preview-container {
  width: 100%;
  height: 140px;
  /* REDUZIDO: de 160px */
  border-radius: 4px;
  background-color: var(--bg-input);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
}

/* Drag and Drop Zone */
.upload-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 6px;
  padding: 2rem;
  /* REDUZIDO: de 2.5rem */
  text-align: center;
  background: var(--bg-input);
  transition: var(--transition-smooth);
  cursor: pointer;
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
  border-color: var(--accent-color);
  background: rgba(37, 99, 235, 0.02);
}

.upload-icon {
  font-size: 1.85rem;
  /* REDUZIDO: de 2.2rem */
  color: var(--accent-color);
}

.upload-text {
  font-size: 0.85rem;
  color: var(--text-dark);
}

.upload-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Gallery Admin Grid */
.admin-gallery-title {
  font-size: 1rem;
  /* REDUZIDO: de 1.1rem */
  color: var(--text-dark);
  margin-top: 1.75rem;
  /* REDUZIDO: de 2.5rem */
  margin-bottom: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  /* REDUZIDO: de 130px */
  gap: 0.85rem;
  /* REDUZIDO: de 1rem */
  margin-top: 0.85rem;
}

.admin-gallery-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  transition: var(--transition-smooth);
}

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

.gallery-item-actions {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
}

.admin-gallery-item:hover .gallery-item-actions {
  opacity: 1;
}

.btn-gallery-action {
  width: 1.5rem;
  /* REDUZIDO: de 1.6rem */
  height: 1.5rem;
  /* REDUZIDO: de 1.6rem */
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
}

.btn-gallery-delete {
  background: var(--danger-color);
  color: var(--text-light);
}

.btn-gallery-delete:hover {
  background: var(--danger-hover);
}

.btn-gallery-star {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
}

.btn-gallery-star.active {
  background: var(--accent-color);
  color: var(--text-light);
}

/* Loading Overlay & Spinners */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--text-dark);
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 3rem;
  /* REDUZIDO: de 3.5rem */
  height: 3rem;
  border: 4px solid rgba(0, 0, 0, 0.05);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loading-text {
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.95rem;
  /* REDUZIDO: de 1rem */
}

.loading-progress {
  font-size: 0.8rem;
  /* REDUZIDO: de 0.85rem */
  color: var(--text-muted);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Alertas & Toasts */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  /* REDUZIDO: de 2rem */
  right: 1.5rem;
  /* REDUZIDO: de 2rem */
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  /* REDUZIDO: de 1rem 1.5rem */
  color: var(--text-dark);
  font-size: 0.85rem;
  /* REDUZIDO: de 0.9rem */
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(0);
}

.toast.toast-success {
  border-left-color: var(--success-color);
}

.toast.toast-danger {
  border-left-color: var(--danger-color);
}

/* Edit Sections in Site Config */
.config-section {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  /* REDUZIDO: de 2rem */
  margin-bottom: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

.config-section h3 {
  font-size: 0.92rem;
  /* REDUZIDO: de 1rem */
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* CSS Grid layout for Services Configuration */
.config-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  /* REDUZIDO: de 280px */
  gap: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

.service-config-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem;
  /* REDUZIDO: de 1.5rem */
}

/* Gerenciador de Grupos/Categorias */
.category-manager-container {
  margin-top: 1rem;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.category-chip .btn-remove-cat {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.category-chip .btn-remove-cat:hover {
  color: var(--danger-color);
}

.category-add-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.category-add-form input {
  flex-grow: 1;
}

/* Ocultar barra superior horizontal que não é mais usada */
.admin-tabs,
.admin-header {
  display: none !important;
}

/* Delivery Admin Styles */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.delivery-badge-active {
  background: #10b981;
  color: #0d0e11;
  border: 1px solid #10b981;
}

.delivery-badge-expired {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #ef4444;
}

.delivery-badge-lock {
  background: #f59e0b;
  color: #0d0e11;
  border: 1px solid #f59e0b;
}

.delivery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.delivery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.delivery-card-cover {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #1f2937;
  position: relative;
}

.delivery-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.delivery-card-body {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.delivery-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.delivery-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.delivery-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Reordenação por Drag & Drop e Setas Manuais */
.admin-gallery-item {
  cursor: grab;
}

.admin-gallery-item:active {
  cursor: grabbing;
}

.admin-gallery-item.dragging {
  opacity: 0.45;
  transform: scale(0.95);
  border: 2px dashed var(--accent-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Rodapé com setas para ordenamento manual no hover */
.gallery-item-move-actions {
  position: absolute;
  bottom: 0.3rem;
  left: 0.3rem;
  right: 0.3rem;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
}

.admin-gallery-item:hover .gallery-item-move-actions {
  opacity: 1;
}

.btn-gallery-move {
  background: rgba(20, 20, 20, 0.85);
  color: var(--text-light) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-gallery-move:hover {
  background: var(--accent-color) !important;
  color: #0d0e11 !important;
  border-color: var(--accent-color);
}

/* Face Recognition Selection Button Style */
.btn-gallery-face {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
}

.btn-gallery-face.active {
  background: #10b981 !important;
  color: var(--text-light) !important;
  border-color: #10b981 !important;
}

body.dark-mode .btn-gallery-face {
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
}

body.dark-mode .btn-gallery-face.active {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* Painel Administrativo: Responsividade Mobile */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .admin-sidebar.collapsed {
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    flex-shrink: 0 !important;
  }

  .sidebar-header {
    height: auto !important;
    padding: 0.75rem 1rem !important;
  }

  .btn-toggle-sidebar {
    display: none !important;
  }

  .sidebar-nav {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 0.5rem !important;
    gap: 0.25rem !important;
  }

  .sidebar-tab-btn {
    width: auto !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    gap: 0.4rem !important;
  }

  .sidebar-tab-btn i {
    font-size: 0.95rem !important;
    width: auto !important;
  }

  .sidebar-footer {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    border-top: 1px solid var(--border-color) !important;
  }

  .btn-logout-sidebar {
    width: auto !important;
    padding: 0.4rem 0.75rem !important;
  }

  .sidebar-brand {
    margin-top: 0 !important;
  }

  .dashboard-actions {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .dashboard-actions .btn {
    width: 100% !important;
  }

  .metrics-grid {
    grid-template-columns: 1fr !important;
  }

  /* Justificar botões no mobile */
  .admin-main-content .btn,
  .modal-card .btn,
  .password-card .btn,
  .edit-layout .btn,
  .edit-main .btn,
  .sidebar-box .btn,
  .delivery-card-actions .btn,
  .delivery-card-actions a.btn {
    width: 100% !important;
    display: inline-flex !important;
    justify-content: center !important;
    margin: 0 !important;
  }

  /* Alinha os contêineres de ações em coluna no mobile */
  .delivery-card-actions,
  .modal-footer,
  .edit-main form div[style*="display: flex"][style*="justify-content: flex-end"],
  .edit-main form div[style*="display: flex"][style*="justify-content: space-between"],
  .edit-main div[style*="display: flex"][style*="justify-content: flex-end"],
  .modal-card div[style*="display: flex"][style*="justify-content: flex-end"],
  .user-modal-card div[style*="display: flex"][style*="justify-content: flex-end"] {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: stretch !important;
  }
}

/* Card de Vitrine de Módulos & Estatísticas */
.module-showcase-card {
  transition: var(--transition-smooth);
}

.module-showcase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.metric-card {
  transition: var(--transition-smooth);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .home-details-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Abas Internas do Painel Mestre */
.master-internal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.master-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.master-tab-btn:hover {
  background: var(--bg-input);
  color: var(--text-dark);
}

.master-tab-btn.active {
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

/* Esconder seções não ativas por padrão */
.master-internal-section {
  display: none;
}

.master-internal-section.active {
  display: block;
}

/* ─── QR Code Section (Acompanhe Cliques) ─────────────────────────────────── */
.qr-config-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .qr-config-wrapper {
    grid-template-columns: 1fr;
  }
}

.qr-preview-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.qr-preview-box canvas,
.qr-preview-box img {
  border-radius: 8px;
  border: 4px solid var(--bg-light);
  box-shadow: 0 4px 16px rgba(25, 38, 103, 0.15);
}

.qr-link-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: var(--accent-color);
  word-break: break-all;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-print-qr {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-print-qr:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ─── Domínios ───────────────────────────────────────────────────────────────── */
.domain-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.domain-status-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.domain-status-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.domain-status-crit {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.domain-status-none {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

/* ─── Módulos — Paleta da Marca ─────────────────────────────────────────────── */
.module-card-brand-1 {
  background: linear-gradient(135deg, rgba(25, 38, 103, 0.08) 0%, rgba(0, 28, 172, 0.04) 100%);
  border-color: rgba(25, 38, 103, 0.15) !important;
}

.module-card-brand-1 .module-icon {
  color: #192667;
  background: rgba(25, 38, 103, 0.1);
}

.module-card-brand-2 {
  background: linear-gradient(135deg, rgba(0, 28, 172, 0.08) 0%, rgba(58, 79, 176, 0.04) 100%);
  border-color: rgba(0, 28, 172, 0.15) !important;
}

.module-card-brand-2 .module-icon {
  color: #001cac;
  background: rgba(0, 28, 172, 0.1);
}

.module-card-brand-3 {
  background: linear-gradient(135deg, rgba(58, 79, 176, 0.08) 0%, rgba(25, 38, 103, 0.04) 100%);
  border-color: rgba(58, 79, 176, 0.15) !important;
}

.module-card-brand-3 .module-icon {
  color: #3a4fb0;
  background: rgba(58, 79, 176, 0.1);
}

.module-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ─── Modal Esqueci Senha ─────────────────────────────────────────────────────── */
.forgot-pass-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  display: none;
}

.forgot-pass-modal-overlay.open {
  display: flex;
}

.forgot-pass-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ─── Dark Mode Overrides para Topbar ─────────────────────────────────────── */
body.dark-mode .admin-topbar {
  background: var(--bg-light);
  border-bottom-color: var(--border-color);
}

body.dark-mode .topbar-search-wrapper input {
  background: var(--bg-input);
  color: var(--text-dark);
  border-color: var(--border-color);
}

body.dark-mode .topbar-user {
  border-color: var(--border-color);
}

body.dark-mode .topbar-notif-dropdown,
body.dark-mode .topbar-user-dropdown,
body.dark-mode .topbar-search-results {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .master-tab-btn.active {
  background: var(--accent-color);
}

/* ─── Delivery Page Customization ───────────────────────────────────────────── */
.delivery-page-preview {
  background: #0d0e11;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
}

.delivery-page-preview .preview-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.delivery-page-preview .preview-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.preview-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  transition: transform 0.2s ease;
}

.preview-social-btn:hover {
  transform: scale(1.1);
}

.preview-social-btn.instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.preview-social-btn.whatsapp {
  background: #25d366;
}

/* ─── Responsive Topbar ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar-search-wrapper {
    display: none;
  }

  .topbar-username {
    display: none;
  }
}

/* Correo de Fontes Azuis no Tema Escuro (Branco) */
body.dark-mode .sidebar-tab-btn.active,
body.dark-mode .sidebar-tab-btn.active i,
body.dark-mode .login-logo,
body.dark-mode .token-help a,
body.dark-mode .search-result-item i,
body.dark-mode .delivery-drop-zone label,
body.dark-mode .delivery-card-title,
body.dark-mode .stat-card-value {
  color: #ffffff !important;
}
/* Superadmin operations dashboard */
.ops-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1.25rem}.ops-heading h2{font-size:1.65rem;font-weight:550;letter-spacing:-.03em;margin:.2rem 0}.ops-heading p{color:var(--text-muted);margin:0}.ops-eyebrow{font-size:.7rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-color)}.ops-status-line{display:flex;align-items:center;gap:.55rem;padding:.75rem 0;border-bottom:1px solid var(--border-color);font-size:.8rem;color:var(--text-muted)}.ops-status-line strong{color:var(--text-dark)}.ops-status-line>span:last-child{margin-left:auto}.ops-dot{width:8px;height:8px;border-radius:50%;background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.12)}.ops-status-line.error .ops-dot{background:#ef4444}.ops-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--border-color);border:1px solid var(--border-color);border-radius:12px;overflow:hidden;margin:1.25rem 0}.ops-metric{background:var(--bg-card);padding:1.2rem}.ops-metric span,.ops-metric small{display:block;color:var(--text-muted);font-size:.72rem}.ops-metric strong{display:block;color:var(--text-dark);font-size:1.55rem;margin:.45rem 0}.ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ops-panel{background:var(--bg-card);border:1px solid var(--border-color);border-radius:12px;padding:1.25rem}.ops-panel-title,.ops-panel-title>div{display:flex;align-items:center;justify-content:space-between;gap:.65rem}.ops-panel-title h3{margin:0;font-size:.95rem}.ops-service-icon{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--bg-input);color:var(--text-dark)}.ops-service-icon.cloudflare{color:#f38020}.ops-service-icon.github{color:var(--text-dark)}.ops-badge{display:inline-flex;padding:.2rem .45rem;border-radius:999px;background:var(--bg-input);color:var(--text-muted);font-size:.62rem;font-weight:800}.ops-badge.ok{background:rgba(16,185,129,.12);color:#10b981}.ops-badge.warn{background:rgba(245,158,11,.12);color:#f59e0b}.ops-service-list{margin-top:1rem}.ops-service-list>div{display:flex;justify-content:space-between;gap:1rem;padding:.65rem 0;border-bottom:1px solid var(--border-color);font-size:.76rem}.ops-service-list span{color:var(--text-muted)}.ops-service-list strong{text-align:right;color:var(--text-dark);max-width:60%;overflow:hidden;text-overflow:ellipsis}.ops-note{margin-top:1rem;padding:.75rem;border-radius:8px;background:var(--bg-input);color:var(--text-muted);font-size:.72rem;line-height:1.5}.ops-repos{margin-top:1rem}.ops-repo{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--border-color);text-decoration:none}.ops-repo strong,.ops-repo span{display:block;color:var(--text-dark);font-size:.78rem}.ops-repo span{color:var(--text-muted);font-size:.68rem;margin-top:.2rem}.ops-repo-meta{text-align:right}.ops-repo-meta small{display:block;color:var(--text-muted);font-size:.64rem;margin-top:.3rem}.ops-capabilities{margin-top:1rem}.ops-capabilities p{color:var(--text-muted);font-size:.78rem;line-height:1.6;margin:1rem 0 0}.operations-table{width:100%;border-collapse:collapse;font-size:.76rem}.operations-table th,.operations-table td{text-align:left;padding:.8rem .6rem;border-bottom:1px solid var(--border-color);vertical-align:top}.operations-table th{color:var(--text-muted);font-size:.66rem;text-transform:uppercase;letter-spacing:.05em}.operations-table td small{display:block;color:var(--text-muted);margin-top:.2rem}.operations-table code{white-space:normal;color:var(--text-muted);font-size:.66rem}.ops-action{font-weight:700;color:var(--accent-color)}.ops-empty{text-align:center;color:var(--text-muted);padding:1.5rem!important}@media(max-width:900px){.ops-metrics{grid-template-columns:1fr 1fr}.ops-grid{grid-template-columns:1fr}}@media(max-width:560px){.ops-metrics{grid-template-columns:1fr}.ops-heading{align-items:flex-start;flex-direction:column}}
