/* ==========================================================================
   FRIENDS STICKERS & SIGNS - ADMIN PANEL STYLESHEET
   Dark Glassmorphic UI with vibrant neon accents & micro-interactions
   ========================================================================== */

:root {
  --admin-bg: #07090e;
  --admin-card-bg: rgba(18, 24, 38, 0.75);
  --admin-card-hover: rgba(26, 35, 55, 0.9);
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-bright: rgba(0, 242, 254, 0.3);
  
  --admin-primary: #00f2fe;
  --admin-primary-glow: rgba(0, 242, 254, 0.25);
  --admin-secondary: #4facfe;
  --admin-accent: #ff0844;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  
  --admin-text-main: #f3f4f6;
  --admin-text-muted: #9ca3af;
  --admin-text-dim: #6b7280;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body.admin-body {
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(255, 8, 68, 0.04) 0%, transparent 40%);
}

/* ==========================================================================
   1. AUTHENTICATION LOCK SCREEN
   ========================================================================== */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border-bright);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.15);
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-brand-logo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px var(--admin-primary-glow));
  margin-bottom: 1rem;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--admin-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--admin-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.pin-input-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.pin-input {
  width: 100%;
  background: rgba(10, 15, 26, 0.8);
  border: 2px solid var(--admin-border);
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.25rem;
  text-align: center;
  letter-spacing: 8px;
  color: #fff;
  outline: none;
  transition: all 0.25s ease;
}

.pin-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 15px var(--admin-primary-glow);
}

.btn-admin-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--admin-secondary) 0%, var(--admin-primary) 100%);
  color: #050811;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px var(--admin-primary-glow);
}

.btn-admin-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.4);
}

.login-hint {
  font-size: 0.8rem;
  color: var(--admin-text-dim);
  margin-top: 1.25rem;
}

/* ==========================================================================
   2. MAIN ADMIN LAYOUT & NAVBAR
   ========================================================================== */
.admin-app {
  max-width: 1350px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-brand img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--admin-primary-glow));
}

.admin-brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.admin-brand-text span {
  font-size: 0.8rem;
  color: var(--admin-primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-nav-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-main);
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--admin-border-bright);
  color: #fff;
}

.btn-nav-action.logout-btn:hover {
  background: rgba(255, 8, 68, 0.15);
  border-color: rgba(255, 8, 68, 0.4);
  color: #ff4d6d;
}

/* ==========================================================================
   3. STATS CARDS DASHBOARD
   ========================================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--admin-border-bright);
}

.stat-info h3 {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 242, 254, 0.1);
  color: var(--admin-primary);
}

.stat-icon-wrapper.purple {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}
.stat-icon-wrapper.pink {
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
}
.stat-icon-wrapper.orange {
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
}

/* ==========================================================================
   4. MULTI-IMAGE UPLOADER HUB
   ========================================================================== */
.admin-section {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  border-radius: 10px;
}

.upload-tab-btn {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-tab-btn.active {
  background: var(--admin-primary);
  color: #050811;
}

/* Dropzone */
.dropzone-container {
  border: 2px dashed rgba(0, 242, 254, 0.3);
  background: rgba(0, 242, 254, 0.02);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dropzone-container.drag-over,
.dropzone-container:hover {
  border-color: var(--admin-primary);
  background: rgba(0, 242, 254, 0.06);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.dropzone-text p {
  color: var(--admin-text-muted);
  font-size: 0.85rem;
}

.file-hidden-input {
  display: none;
}

/* URL Upload Tab */
.url-upload-wrap {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.url-input {
  flex: 1;
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
}

.url-input:focus {
  border-color: var(--admin-primary);
}

/* Upload Preview Items List */
.upload-previews-container {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.preview-card {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  padding: 0.85rem;
  display: flex;
  gap: 0.85rem;
  position: relative;
}

.preview-thumb {
  width: 75px;
  height: 75px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--admin-border);
}

.preview-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preview-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  color: #fff;
  width: 100%;
}

.preview-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  color: #fff;
  width: 100%;
}

.btn-remove-preview {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 8, 68, 0.2);
  border: none;
  color: #ff4d6d;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-preview:hover {
  background: #ff0844;
  color: #fff;
}

.global-upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border);
}

/* ==========================================================================
   5. MEDIA MANAGER GRID & FILTERS
   ========================================================================== */
.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-text-muted);
}

.category-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cat-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill-btn:hover {
  border-color: var(--admin-border-bright);
  color: #fff;
}

.cat-pill-btn.active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #050811;
}

.bulk-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.media-item-card {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.media-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--admin-border-bright);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.media-card-img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: #000;
  overflow: hidden;
}

.media-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-item-card:hover img {
  transform: scale(1.05);
}

.badge-featured {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 242, 254, 0.9);
  color: #050811;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.select-checkbox-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.select-checkbox-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-primary);
  cursor: pointer;
}

.media-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.media-card-cat {
  color: var(--admin-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.media-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-card-desc {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-border);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-card-action:hover {
  color: #fff;
  border-color: var(--admin-border-bright);
}

.btn-card-action.delete:hover {
  background: rgba(255, 8, 68, 0.2);
  color: #ff4d6d;
  border-color: rgba(255, 8, 68, 0.4);
}

/* ==========================================================================
   6. EDIT MODAL
   ========================================================================== */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.admin-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border-bright);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--admin-primary);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.checkbox-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.88rem;
}

.checkbox-control input {
  accent-color: var(--admin-primary);
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   7. TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-toast {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--admin-primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: toastIn 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive & Mobile Perfection */
@media (max-width: 768px) {
  .admin-app {
    padding: 1rem 0.85rem 3rem 0.85rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.85rem;
  }

  .admin-brand {
    justify-content: flex-start;
  }

  .admin-brand-text h1 {
    font-size: 1.15rem;
  }

  .admin-nav-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
  }

  .btn-nav-action {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .admin-section {
    padding: 1.15rem 0.85rem;
    border-radius: 16px;
  }

  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title-wrap h2 {
    font-size: 1.1rem;
  }

  .upload-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .upload-tab-btn {
    flex: 1;
    text-align: center;
  }

  .dropzone-container {
    padding: 1.75rem 0.85rem;
  }

  .dropzone-icon {
    width: 48px;
    height: 48px;
  }

  .dropzone-text h3 {
    font-size: 1rem;
  }

  /* Horizontal swipeable category pills on mobile */
  .category-filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .cat-pill-btn {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }

  .search-box {
    width: 100%;
    min-width: 100%;
  }

  .media-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-actions-bar {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .bulk-actions-bar .btn-nav-action {
    flex: 1;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .media-card-img-wrap {
    height: 200px;
  }

  .media-card-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-card-action {
    flex: 1;
    justify-content: center;
    padding: 0.5rem !important;
  }

  .global-upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-modal-card {
    padding: 1.25rem 1rem;
    margin: 0.5rem;
  }

  .admin-toast-container {
    left: 15px;
    right: 15px;
    bottom: 15px;
  }

  .admin-toast {
    font-size: 0.82rem;
    padding: 0.75rem 1rem;
  }
}

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

  .btn-nav-action {
    flex: 1 1 100%;
  }
}

