/* Área do fotógrafo — pensada desktop-first: o fotógrafo usa computador.
   Login/cadastro continuam centrados e estreitos (tela de entrada, sem contexto ainda).
   Depois do login, o app vira um shell com navegação lateral fixa e conteúdo largo. */

.admin-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-auth-wrap .screen { max-width: 420px; padding: 0; }

.admin-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.admin-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid #1e2d40;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid #1e2d40;
  text-decoration: none;
  color: inherit;
}
.admin-sidebar .sidebar-brand img { height: 30px; }
.admin-sidebar .sidebar-brand span { font-weight: 700; font-size: 15px; color: var(--text); }

.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; margin-top: 16px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover { background: var(--bg-card-2); color: var(--text); }
.admin-nav-item.active { background: var(--accent-gradient); color: #fff; }
.admin-nav-item .icon { flex-shrink: 0; }

.admin-nav-footer { border-top: 1px solid #1e2d40; padding-top: 12px; margin-top: 12px; }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 36px 48px;
  max-width: 1320px;
  display: flex;
  flex-direction: column;
}

.admin-main > .app-footer { margin-top: auto; padding-top: 40px; text-align: left; }

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.admin-page-header h1 { font-size: 26px; margin: 0 0 6px; }
.admin-page-header .subtitle { margin: 0; max-width: 560px; }
.admin-page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-page-header .btn,
.admin-page-header .actions .btn { width: auto; min-width: 0; margin-bottom: 0; padding: 12px 20px; }

/* Grid de álbuns */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.album-card {
  background: var(--bg-card);
  border: 1px solid #1e2d40;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.album-cover {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover .icon { color: var(--text-dim); opacity: 0.5; }
.album-cover-upload-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.album-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.album-body .album-name { font-size: 18px; font-weight: 600; }
.album-body .album-meta { font-size: 13px; color: var(--text-dim); }
.album-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: auto; }
.album-actions .icon-btn:first-child { grid-column: 1 / -1; }
.album-actions .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 10px;
  background: var(--bg-card-2);
  border: 1px solid #232328;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 0;
  min-height: 44px;
}
.album-actions .icon-btn:hover { color: var(--text); border-color: var(--brand-color); }
.album-actions .icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.create-album-card {
  border: 1.5px dashed #2a3a50;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 16px;
  color: var(--text-dim);
  cursor: pointer;
  background: transparent;
  min-height: 220px;
}
.create-album-card:hover { border-color: var(--brand-color); color: var(--brand-color); }

/* Perfil */
.profile-card {
  background: var(--bg-card);
  border: 1px solid #1e2d40;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-photo-row { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.profile-photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #1e2d40;
}
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-preview .icon { color: var(--text-dim); }
.profile-member-since { font-size: 13px; color: var(--text-dim); }

/* Dashboard */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (min-width: 700px) {
  .dashboard-cards { grid-template-columns: repeat(3, 1fr); }
}
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid #1e2d40;
  border-radius: var(--radius);
  padding: 20px;
}
.dashboard-card .label { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.dashboard-card .value { font-size: 28px; font-weight: 700; }
.dashboard-top-photo {
  background: var(--bg-card);
  border: 1px solid #1e2d40;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 420px;
}
.dashboard-top-photo img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; }

/* Progresso de upload de fotos */
.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-card-2);
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.2s ease;
}
.upload-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #1e2d40;
  border-radius: var(--radius);
  margin: 12px 0 20px;
}
.upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid #1e2d40;
}
.upload-row:last-child { border-bottom: none; }
.upload-row span:first-child {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.status-pending, .status-ok, .status-err {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 500;
}
.status-pending { color: var(--text-dim); }
.status-ok { color: #2ecc71; }
.status-err { color: var(--danger); }

/* Mobile fallback — colapsa a sidebar pra topbar quando a tela ficar estreita.
   Os itens quebram em duas linhas (flex-wrap) em vez de exigir deslizar a tela
   pro lado pra ver os botões que não cabem numa linha só. */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
  }
  .admin-sidebar .sidebar-brand { display: none; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; margin-top: 0; flex: 1; gap: 8px; }
  .admin-nav-item { white-space: nowrap; }
  .admin-nav-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }
  .admin-main { padding: 24px 20px; max-width: 100%; }
}

/* Toast de confirmação (ex: "Álbum apagado com sucesso") */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid #1e2d40;
  border-radius: 12px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 3000;
}
.admin-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-toast-success { border-color: #2ecc71; color: #2ecc71; }
.admin-toast-error { border-color: var(--danger); color: var(--danger); }

/* Álbum bloqueado */
.album-card--blocked {
  position: relative;
}
.album-card--blocked .album-cover img,
.album-card--blocked .album-cover svg {
  opacity: 0.25;
  filter: grayscale(1);
}
.album-blocked-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px; /* altura da .album-cover */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.album-blocked-icon { color: var(--text); opacity: 0.7; }
.album-blocked-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.6;
}
.album-card--blocked .album-name { opacity: 0.45; }
.album-card--blocked .album-meta { opacity: 0.35; }
.album-actions .icon-btn.warning:hover { color: #f59e0b; border-color: #f59e0b; }
.album-actions .icon-btn.success:hover { color: #2ecc71; border-color: #2ecc71; }
