/* Painel Administrativo SaaS Premium - UPET Petshop */

/* ==========================================
   1. TELA DE LOGIN DO ADMIN
   ========================================== */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(14, 23, 46, 0.98) 0%, rgba(7, 11, 25, 1) 100%);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-login-card {
  max-width: 450px;
  width: 100%;
  padding: 3rem;
  text-align: center;
}

.admin-login-logo {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.admin-login-logo i {
  color: var(--accent-green);
  margin-right: 8px;
  filter: drop-shadow(0 0 8px var(--accent-green-glow));
}

.admin-login-card h3 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.admin-login-helper {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--glass-border);
  padding: 8px;
  border-radius: var(--border-radius-sm);
  margin-top: 1.5rem;
}

/* ==========================================
   2. ESTRUTURA PRINCIPAL DO ADMIN (LAYOUT)
   ========================================== */
.admin-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #040713;
}

@media (max-width: 992px) {
  .admin-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Sidebar do Admin */
.admin-sidebar {
  background: #090e1f;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  height: 100vh;
  position: sticky;
  top: 0;
}

@media (max-width: 992px) {
  .admin-sidebar {
    height: auto;
    position: relative;
    padding: 1rem;
  }
}

.admin-sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.admin-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand-logo {
  font-size: 1.4rem;
  font-weight: 800;
}

.admin-brand-logo i {
  color: var(--accent-green);
  margin-right: 6px;
}

.admin-brand-badge {
  background: rgba(9, 216, 149, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  text-transform: uppercase;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.2rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-menu-item:hover, .admin-menu-item.active {
  background: rgba(9, 216, 149, 0.08);
  color: var(--accent-green);
}

.admin-menu-item i {
  font-size: 1.1rem;
  width: 20px;
}

.admin-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green) 0%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 700;
}

.admin-user-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-user-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Área de Conteúdo do Admin */
.admin-content {
  padding: 3rem;
  height: 100vh;
  overflow-y: auto;
}

@media (max-width: 992px) {
  .admin-content {
    padding: 1.5rem;
    height: auto;
  }
}

.admin-header-title {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header-title h2 {
  font-size: 2rem;
  font-weight: 800;
}

.admin-header-title p {
  color: var(--text-muted);
}

/* ==========================================
   3. DASHBOARD PANELS & CARDS (DADOS)
   ========================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.stat-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon-green {
  background: rgba(9, 216, 149, 0.1);
  color: var(--accent-green);
}

.stat-icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-icon-yellow {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.stat-icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

/* Vistas de Tabelas do Admin */
.admin-table-card {
  padding: 2rem;
  margin-bottom: 3rem;
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
}

.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.01);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-action-green:hover {
  background: rgba(9, 216, 149, 0.15);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.btn-action-red:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
}

.btn-action-blue:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: #3b82f6;
}

/* ==========================================
   4. DETALHE DOS FORMS DO ADMIN
   ========================================== */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 992px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-sub-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.admin-sub-view.active {
  display: block;
}

/* Lista Lateral de Edição */
.admin-items-list-card {
  padding: 1.5rem;
  height: 60vh;
  overflow-y: auto;
}

.admin-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.admin-item-row:hover, .admin-item-row.active {
  background: rgba(255,255,255,0.03);
  border-color: var(--accent-green);
}

.admin-item-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-item-row-thumb {
  width: 45px;
  height: 45px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  border: 1px solid var(--glass-border);
}

.admin-item-row-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-row-info span {
  font-size: 0.8rem;
  color: var(--accent-green);
  font-weight: 600;
}
