/* Proje Tasarım — IPVM-benzeri full layout */
.pd-app {
  --pd-sidebar: 380px;
  display: grid;
  grid-template-columns: 1fr var(--pd-sidebar);
  height: calc(100vh - 72px);
  min-height: 560px;
  margin: 0;
  border-top: 1px solid var(--border);
}

.pd-app .jumbotron,
.pd-hide-hero .vk-hero,
.pd-hide-hero .jumbotron {
  display: none !important;
}

.pd-map-wrap {
  position: relative;
  min-width: 0;
  background: #0a0f18;
}

#pd-map {
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #0a0f18;
}

.pd-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  pointer-events: none;
}

.pd-toolbar > * {
  pointer-events: auto;
}

.pd-toolbar .btn {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}

.pd-search {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.pd-sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.pd-side-head {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
}

.pd-side-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.pd-side-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pd-side-body {
  padding: 1rem 1.1rem 2rem;
  flex: 1;
}

.pd-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pd-empty i {
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.6;
  display: block;
  margin-bottom: 0.75rem;
}

.pd-field {
  margin-bottom: 0.85rem;
}

.pd-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 650;
  margin-bottom: 0.3rem;
}

.pd-field .form-control,
.pd-field .form-select {
  font-size: 0.9rem;
  padding: 0.5rem 0.7rem;
}

.pd-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.pd-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.pd-metric {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
}

.pd-metric .k {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 650;
}

.pd-metric .v {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.pd-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.pd-section-toggle {
  width: 100%;
  background: var(--bg-input);
  border: none;
  color: var(--text);
  text-align: left;
  padding: 0.7rem 0.85rem;
  font-weight: 650;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.pd-section-toggle:hover {
  background: var(--accent-soft);
}

.pd-section-body {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
}

.pd-section.collapsed .pd-section-body {
  display: none;
}

.pd-sim {
  background: #070b12;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.pd-sim-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pd-sim-meta strong {
  color: var(--accent);
  font-family: var(--mono);
}

.pd-sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pd-sim-pane {
  background: #0a1018;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.pd-sim-pane canvas {
  display: block;
  width: 100%;
  height: auto;
}

.pd-sim-pane .tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.pd-level-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.pd-level-chip {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pd-level-chip.on {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  font-weight: 650;
}

.pd-dri-cards {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.pd-dri-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: var(--bg-input);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.pd-dri-row .name {
  font-weight: 650;
}

.pd-dri-row .name.d { color: #7dd3fc; }
.pd-dri-row .name.r { color: #67e8f9; }
.pd-dri-row .name.i { color: #34d399; }

.pd-dri-row .val {
  font-family: var(--mono);
  color: var(--text);
}

.pd-cam-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.pd-cam-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  cursor: pointer;
  font-size: 0.85rem;
}

.pd-cam-item.active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.pd-cam-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pd-color-input {
  width: 42px;
  height: 36px;
  padding: 2px !important;
  cursor: pointer;
}

.leaflet-container {
  background: #0a0f18;
  font-family: var(--font);
}

.pd-camera-icon {
  background: transparent !important;
  border: none !important;
}

.pd-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.35rem;
}

.pd-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

@media (max-width: 992px) {
  .pd-app {
    grid-template-columns: 1fr;
    grid-template-rows: 55vh 1fr;
    height: auto;
  }

  .pd-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
  }
}
