/* admin/admin.css - Migo Rooms Super Admin Design System (Launch Readiness Edition) */

:root {
  --admin-sidebar-width: 280px;
  --admin-topbar-height: 72px;
  --admin-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Brand Palette */
  --migo-purple-deep: #1A0D26;
  --migo-purple: #2E1A42;
  --migo-purple-light: #4A2D6B;
  --migo-coral: #FF7A4E;
  --migo-coral-hover: #F26738;
  --migo-bg-ivory: #F7F5EE;
  --migo-border-neutral: #E8E3D9;
  --migo-text-dark: #1F1F1F;
}

body.admin-body {
  font-family: var(--admin-font);
  background-color: var(--migo-bg-ivory);
  color: var(--migo-text-dark);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. SIDEBAR & NAVIGATION
   ========================================================================== */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: linear-gradient(180deg, #160B21 0%, #251437 60%, #1A0D26 100%);
  color: #FFFFFF;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.95rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem; /* 15px */
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  margin-bottom: 0.3rem;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.admin-nav-item.active {
  background: linear-gradient(90deg, #FF7A4E 0%, #F26738 100%);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 122, 78, 0.35);
}

.admin-nav-item.active svg {
  color: #FFFFFF;
}

/* ==========================================================================
   2. TOPBAR & MAIN CONTAINER
   ========================================================================== */
.admin-topbar {
  height: var(--admin-topbar-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--migo-border-neutral);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.admin-main-wrap {
  margin-left: var(--admin-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1023px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main-wrap {
    margin-left: 0;
  }
  .admin-topbar {
    padding: 0 1.25rem;
  }
}

/* ==========================================================================
   3. TYPOGRAPHY SCALE & CARDS
   ========================================================================== */
.admin-page-title {
  font-size: 1.75rem; /* 28px */
  line-height: 2.125rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.025em;
}

.admin-section-title {
  font-size: 1.3125rem; /* 21px */
  line-height: 1.75rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.015em;
}

.admin-card-title {
  font-size: 1.0625rem; /* 17px */
  line-height: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.admin-card {
  background: #FFFFFF;
  border: 1px solid var(--migo-border-neutral);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 1.625rem;
  transition: all 0.15s ease-in-out;
}

.admin-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.admin-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--migo-border-neutral);
  border-radius: 1rem;
  padding: 1.5rem 1.625rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2E1A42 0%, #FF7A4E 100%);
  opacity: 0.9;
}

.kpi-interactive {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.kpi-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.09), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
  border-color: #FF7A4E;
}

/* ==========================================================================
   4. STATUS PILLS & BADGES (Minimum 12–13px for high readability)
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem; /* 13px */
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-pill-live {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.status-pill-configured {
  background-color: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.status-pill-planned {
  background-color: #F5F3FF;
  color: #5B21B6;
  border: 1px solid #DDD6FE;
}

.status-pill-unconnected {
  background-color: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.status-pill-suspended {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ==========================================================================
   5. BUTTONS & CONTROLS (14–15px)
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  background-color: #FF7A4E;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 122, 78, 0.28);
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #F26738;
  box-shadow: 0 4px 10px rgba(255, 122, 78, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  background-color: #FFFFFF;
  color: #374151;
  border: 1px solid #D1D5DB;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #F9FAFB;
  border-color: #9CA3AF;
  color: #111827;
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  background-color: #2E1A42;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(46, 26, 66, 0.25);
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-dark:hover {
  background-color: #1A0D26;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  background-color: #DC2626;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
  transition: all 0.15s ease-in-out;
}

.btn-danger:hover {
  background-color: #B91C1C;
}

.filter-tab {
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem; /* 14px */
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid #E8E3D9;
  background-color: #FFFFFF;
  color: #4B5563;
  transition: all 0.15s ease;
  cursor: pointer;
}

.filter-tab:hover {
  border-color: #CBD5E1;
  color: #1F2937;
}

.filter-tab.active {
  background-color: #2E1A42;
  border-color: #2E1A42;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(46, 26, 66, 0.25);
}

/* ==========================================================================
   6. TABLES & DATA LISTS (Generous row heights & spacing)
   ========================================================================== */
.admin-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  font-size: 0.9375rem; /* 15px */
}

.admin-table th {
  padding: 1rem 1.25rem;
  font-size: 0.8125rem; /* 13px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  background-color: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
}

.admin-table td {
  padding: 1.125rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #F3F4F6;
  color: #374151;
}

.admin-table tr:hover td {
  background-color: #FAFAF8;
}

.attention-item {
  transition: all 0.15s ease-in-out;
  border-left-width: 4px;
}

.attention-item:hover {
  background-color: #FAFAF7;
}

/* ==========================================================================
   7. PHOTO REVIEW & MODERATION STYLING
   ========================================================================== */
.photo-review-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 0.875rem;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.photo-review-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.photo-thumb-container {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: #F3F4F6;
  overflow: hidden;
}

.photo-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-review-card:hover .photo-thumb-container img {
  transform: scale(1.03);
}

.photo-status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

.photo-hero-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
}

/* ==========================================================================
   8. TOAST & MODAL SYSTEM
   ========================================================================== */
#admin-toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.5rem;
  border-radius: 0.875rem;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.18), 0 8px 12px -6px rgba(0, 0, 0, 0.1);
  font-size: 0.9375rem;
  font-weight: 500;
  max-width: 460px;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-toast-success {
  background: #065F46;
  color: #FFFFFF;
}

.admin-toast-error {
  background: #991B1B;
  color: #FFFFFF;
}

.admin-toast-info {
  background: #1E3A8A;
  color: #FFFFFF;
}

.modal-dialog-wrap {
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.admin-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
