/* ==========================================================================
   J.C. GOEROE - BEHEERPANEEL (CMS) STYLESHEET
   ========================================================================== */

.admin-body {
  background-color: #0b0e14;
  color: #e2e8f0;
  min-height: 100vh;
}

/* Auth / Login Overlay */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 30%, rgba(255, 159, 28, 0.1) 0%, #080b10 70%);
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.auth-logo {
  width: 130px;
  height: auto;
  margin: 0 auto 1.5rem;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}



.auth-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.2rem;
}

.auth-hint strong {
  color: var(--accent-amber);
}

/* Admin Dashboard Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 270px;
  background: #0d121c;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.8rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-logo {
  height: 40px;
  width: auto;
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item-btn.active {
  background: rgba(255, 159, 28, 0.12);
  color: var(--accent-amber);
  border-left: 3px solid var(--accent-amber);
}

.nav-item-btn svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Admin Main Content */
.admin-main {
  flex-grow: 1;
  padding: 2.5rem 3rem;
  overflow-y: auto;
  max-width: 1300px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

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

/* Stats Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(255, 159, 28, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-amber);
  font-size: 1.3rem;
}

.stat-info-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-info-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Content Box / Panel */
.panel-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

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

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

/* Tables */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #cbd5e1;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-published {
  background: rgba(46, 196, 182, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(46, 196, 182, 0.3);
}

.badge-draft {
  background: rgba(255, 159, 28, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 159, 28, 0.3);
}

/* Action Buttons */
.action-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-icon.danger:hover {
  background: rgba(231, 29, 54, 0.2);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Form Styles for Editor */
.editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.image-preset-select {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.preset-thumb-btn {
  width: 60px;
  height: 45px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: all var(--transition-fast);
  padding: 0;
  background: none;
}

.preset-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-thumb-btn.selected, .preset-thumb-btn:hover {
  opacity: 1;
  border-color: var(--accent-amber);
}

.preview-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

/* Tabs */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Modal & User Management */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.role-badge.role-admin {
  background: rgba(255, 159, 28, 0.15);
  border: 1px solid rgba(255, 159, 28, 0.3);
  color: var(--accent-amber);
}

.role-badge.role-editor {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.user-self-tag {
  font-size: 0.72rem;
  color: var(--accent-amber);
  background: rgba(255, 159, 28, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
}

.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-glow);
  text-align: left;
}

.admin-modal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Gallery Picker Modal in Editor */
.gallery-picker-modal-content {
  max-width: 900px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.picker-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.8rem;
  overflow-y: auto;
  max-height: 55vh;
  padding: 0.5rem 0.2rem;
}

.picker-thumb-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #000;
  transition: all var(--transition-fast);
}

.picker-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picker-thumb-card:hover {
  border-color: var(--accent-amber);
  transform: scale(1.04);
  box-shadow: 0 4px 15px rgba(255, 159, 28, 0.35);
}

.picker-thumb-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.75);
  color: var(--accent-amber);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 700;
}

/* Admin Gallery Tab Grid */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.admin-gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.admin-gallery-card:hover {
  border-color: var(--accent-amber);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.admin-gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
  position: relative;
}

.admin-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-gallery-body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 992px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .admin-main { padding: 1.5rem; }
  .editor-grid { grid-template-columns: 1fr; }
}
