/* =========================================================
   PATH OF ATLAS ADMIN
========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #1a1a1a;
  color: #f2f2f2;
}

/* =========================================================
   LAYOUT
========================================================= */

.admin-shell {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 20px;
}

.admin-header h1 {
  margin: 0;
  font-size: 32px;
}

.admin-header-actions,
.location-label-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-link-btn {
  display: inline-block;
  text-decoration: none;
}

.admin-btn-danger {
  background: #b91c1c;
}

.admin-btn-danger:hover {
  background: #991b1b;
}

.admin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.admin-map-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-map-selector label {
  font-weight: 700;
}

.admin-map-selector select {
  min-width: 220px;
  padding: 9px 10px;
  color: #f2f2f2;
  background: #252525;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 15px;
}

.location-label-manager {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #252525;
  border: 1px solid #444;
  border-radius: 8px;
}

.location-label-manager h2,
.location-label-manager p {
  margin: 0;
}

.location-label-manager h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.location-label-manager p,
.location-label-status {
  color: #bdbdbd;
  font-size: 14px;
}

.location-label-actions input {
  min-width: 230px;
  padding: 10px;
  color: #f2f2f2;
  background: #181818;
  border: 1px solid #555;
  border-radius: 6px;
  font-size: 15px;
}

.location-label-status {
  grid-column: 1 / -1;
  min-height: 18px;
}

/* =========================================================
   LOGIN
========================================================= */

.login-box {
  width: 420px;
  margin: 120px auto;

  background: #252525;

  border-radius: 10px;

  padding: 30px;
}

.login-box h2 {
  margin-top: 0;
}

.login-box input {
  width: 100%;

  margin-bottom: 12px;

  padding: 10px;

  border: none;

  border-radius: 6px;

  font-size: 15px;
}

/* =========================================================
   BUTTONS
========================================================= */

.admin-btn {
  cursor: pointer;

  background: #3b82f6;

  color: white;

  border: none;

  border-radius: 6px;

  padding: 10px 16px;

  font-size: 15px;

  transition: 0.2s;
}

.admin-btn:hover {
  background: #2563eb;
}

/* =========================================================
   STATS
========================================================= */

.admin-stats {
  display: flex;

  gap: 15px;

  margin-bottom: 20px;
}

.stat-card {
  flex: 1;

  background: #252525;

  border-radius: 8px;

  padding: 20px;

  text-align: center;
}

.stat-card span {
  display: block;

  color: #bdbdbd;

  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 28px;
}

/* =========================================================
   MAIN GRID
========================================================= */

.admin-grid {
  display: grid;

  grid-template-columns: 360px 1fr;

  gap: 20px;

  height: calc(100vh - 230px);
}

/* =========================================================
   PANELS
========================================================= */

.pending-list-panel,
.pin-detail-panel {
  background: #252525;

  border-radius: 10px;

  padding: 20px;

  overflow-y: auto;
}

.pending-list-panel h2,
.pin-detail-panel h2 {
  margin-top: 0;
}

/* =========================================================
   PENDING PIN LIST
========================================================= */

.pending-pins {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

.pending-pin {
  cursor: pointer;

  background: #333;

  border-radius: 8px;

  padding: 12px;

  transition: 0.2s;
}

.pending-pin:hover {
  background: #444;
}

.pending-pin strong {
  display: block;

  margin-bottom: 6px;
}

/* =========================================================
   DETAIL PANEL
========================================================= */

#selectedPinDetails {
  line-height: 1.6;
}

#selectedPinDetails button {
  margin-right: 10px;
}

/* =========================================================
   ADMIN MAP
========================================================= */

.admin-map-panel {
  width: 100%;
  height: 45vh;
  min-height: 360px;

  background: #111;

  border-radius: 10px;

  overflow: hidden;

  margin-bottom: 20px;
}

#adminMap {
  width: 100%;
  height: 100%;
}

/* =========================================================
   DARK LEAFLET BACKGROUND
========================================================= */

#adminMap,
#adminMap .leaflet-container,
#adminMap .leaflet-pane,
#adminMap .leaflet-map-pane {
  background: #111 !important;
}

#adminMap .leaflet-control-container {
  color: #111;
}

#adminMap.is-placing-label {
  cursor: crosshair;
}

.admin-location-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px !important;
  min-height: 28px;
  padding: 5px 8px;
  color: #fff7cf;
  background: rgba(17, 17, 17, 0.82);
  border: 2px solid #d6aa45;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.admin-location-label.is-selected {
  color: #111;
  background: #f2c65d;
  border-color: #fff1bd;
}

@media (max-width: 760px) {
  .admin-header {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .location-label-manager {
    grid-template-columns: 1fr;
  }

  .location-label-status {
    grid-column: auto;
  }
}
