/* ============================================================================
   JAHATAKSAFAR — ADMIN WORKSPACE STYLES
   Minimal, focused travel curator surface.
   ============================================================================ */

.admin-body {
  background-color: var(--pigment-void);
  min-height: 100vh;
}

.admin-header {
  background: var(--pigment-pine-900);
  border-bottom: 1px solid var(--line-edge);
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
  margin-bottom: var(--s-8);
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  padding: 20px;
}

.admin-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-quiet);
  margin-bottom: 6px;
}

.admin-stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--pigment-brass-hi);
  line-height: 1;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  background: var(--bg-surface);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  padding: 14px 20px;
  margin-bottom: var(--s-6);
}

.admin-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.admin-table th {
  background: var(--pigment-pine-800);
  color: var(--ink-tertiary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-hair);
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-whisper);
  color: var(--ink-secondary);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(194, 163, 107, 0.03);
}

.table-thumb {
  width: 56px;
  height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--pigment-pine-700);
}

.badge-status-published {
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.badge-status-draft {
  background: rgba(224, 160, 60, 0.12);
  color: var(--pigment-saffron);
  border: 1px solid rgba(224, 160, 60, 0.3);
}

/* Modal Backdrop & Drawer */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 7, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-backdrop.active {
  display: flex;
}

.admin-modal-card {
  background: var(--pigment-pine-900);
  border: 1px solid var(--line-edge);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), var(--shadow-brass);
  overflow: hidden;
}

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line-hair);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface);
}

/* Form Grid */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.form-control {
  background: var(--bg-sunken);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-md);
  padding: 10px 14px;
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--dur-fast);
}

.form-control:focus {
  border-color: var(--pigment-brass);
}

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

.form-hint {
  font-size: 0.74rem;
  color: var(--ink-quiet);
}

.dynamic-row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.btn-icon-danger {
  background: rgba(168, 73, 42, 0.15);
  border: 1px solid rgba(168, 73, 42, 0.3);
  color: #ff8566;
  border-radius: var(--r-sm);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-icon-danger:hover {
  background: rgba(168, 73, 42, 0.3);
}

@media (max-width: 768px) {
  .admin-stats-row { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
}
