/* ==========================================================================
   Megahelps CMS - Admin Dashboard Stylesheet
   ========================================================================== */

.admin-portal-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-app-window {
  background-color: var(--color-surface, #ffffff);
  width: 100%;
  max-width: 1280px;
  height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text, #1e293b);
  font-family: var(--font-body, system-ui, sans-serif);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background-color: #0f172a;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-nav-list {
  padding: 16px 12px;
  flex-grow: 1;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: #1e293b;
  color: #ffffff;
}

.admin-nav-item.active {
  background-color: #3b82f6;
  color: #ffffff;
}

.admin-sidebar-footer {
  padding: 16px;
  border-top: 1px solid #1e293b;
}

.env-badge-box {
  background-color: #1e293b;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  color: #38bdf8;
  font-weight: 600;
}

/* Main Content Area */
.admin-main-stage {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg, #f8fafc);
  overflow: hidden;
}

.admin-top-bar {
  height: 64px;
  background-color: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.admin-view-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.admin-btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.admin-btn-primary:hover {
  background-color: #1d4ed8;
}

.admin-btn-outline {
  border-color: var(--color-border, #cbd5e1);
  background: transparent;
  color: var(--color-text, #334155);
}

.admin-btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

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

.admin-content-scroll {
  padding: 28px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Stat Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background-color: var(--color-surface, #ffffff);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted, #64748b);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text, #0f172a);
}

/* Tables */
.admin-table-wrap {
  background-color: var(--color-surface, #ffffff);
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2e8f0);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.admin-table th {
  background-color: var(--color-surface-soft, #f8fafc);
  padding: 14px 18px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.admin-table td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: var(--color-surface-soft, #f8fafc);
}

/* Form Styles */
.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text, #1e293b);
}

.admin-form-input, .admin-form-textarea, .admin-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border, #cbd5e1);
  border-radius: 6px;
  background-color: var(--color-surface, #ffffff);
  color: var(--color-text, #1e293b);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.admin-form-input:focus, .admin-form-textarea:focus, .admin-form-select:focus {
  border-color: #2563eb;
}

.admin-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Media Grid */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.media-thumbnail-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border, #e2e8f0);
  position: relative;
  height: 140px;
  background-color: #000;
}

.media-thumbnail-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
