
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3250;
  --accent: #4f7cff;
  --accent2: #7c3aed;
  --text: #e8eaf6;
  --text-muted: #8891b5;
  --sidebar-w: 300px;
  --header-h: 60px;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.header-inner {
  height: 100%;
  max-width: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-flag { font-size: 28px; }
.logo-text h1 { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.logo-text p { font-size: 11px; color: var(--text-muted); }

.header-center { flex: 1; max-width: 440px; }
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 36px 8px 36px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.15);
}
#searchInput::placeholder { color: var(--text-muted); }
.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.search-clear:hover { color: var(--text); }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.stat-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.menu-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}
.menu-toggle:hover { background: var(--border); color: var(--text); }

.icon-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  text-decoration: none;
}
.icon-btn:hover { background: var(--border); color: var(--text); }

/* LAYOUT */
.app-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
}
.sidebar.collapsed {
  width: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar-top { flex: 1; overflow-y: auto; padding: 16px; }
.sidebar-top::-webkit-scrollbar { width: 4px; }
.sidebar-top::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sidebar-title-row h2 { font-size: 14px; font-weight: 600; color: var(--text); }

.sidebar-all-btns { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-muted); }
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}
.link-btn:hover { opacity: 0.75; }

/* Category list */
.category-list { display: flex; flex-direction: column; gap: 6px; }

.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.cat-item:hover { border-color: var(--accent); background: rgba(79,124,255,0.06); }
.cat-item.active { border-color: currentColor; }

.cat-check {
  width: 18px; height: 18px;
  border: 2px solid;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.cat-item.active .cat-check {
  background: currentColor;
}
.cat-check svg { display: none; }
.cat-item.active .cat-check svg { display: block; }

.cat-icon { font-size: 18px; flex-shrink: 0; }
.cat-info { flex: 1; min-width: 0; }
.cat-name { font-size: 13px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 11px; color: var(--text-muted); }

/* Search results */
.search-results-panel {
  flex-shrink: 0;
  max-height: 50%;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.srp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.srp-list {
  overflow-y: auto;
  flex: 1;
}
.srp-list::-webkit-scrollbar { width: 4px; }
.srp-list::-webkit-scrollbar-thumb { background: var(--border); }

.srp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.srp-item:hover { background: var(--surface2); }
.srp-item-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.srp-item-name { font-size: 13px; font-weight: 500; }
.srp-item-cat { font-size: 11px; color: var(--text-muted); }

.sidebar-footer {
  padding: 10px 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
  flex-shrink: 0;
}

/* MAP */
.map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#map { width: 100%; height: 100%; }

.count-badge {
  position: absolute;
  bottom: 28px;
  left: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  z-index: 500;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.count-badge strong { color: var(--accent); }

.reset-btn {
  position: absolute;
  bottom: 28px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  z-index: 500;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.reset-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Leaflet override */
.leaflet-container { background: #111420 !important; }
.leaflet-popup-content-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-close-button { color: var(--text-muted) !important; }
.leaflet-popup-content { margin: 12px 16px !important; }

/* Custom marker */
.custom-marker {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid rgba(255,255,255,0.3);
  font-size: 13px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.15s;
}
.custom-marker:hover { transform: scale(1.2); }

.cluster-marker {
  background: rgba(79, 124, 255, 0.82);
  border: 2px solid rgba(79, 124, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: transparent !important;
}

/* INFO PANEL */
.info-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: min(360px, 92vw);
  height: calc(100vh - var(--header-h));
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}
.info-panel.open { transform: translateX(0); }
.info-panel-inner {
  padding: 20px;
  overflow-y: auto;
  height: 100%;
}
.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.info-header h2 { font-size: 18px; font-weight: 700; }
.info-lead {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.info-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.info-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.info-stat strong {
  display: block;
  font-size: 1.2rem;
  color: var(--accent);
}
.info-stat span {
  font-size: 11px;
  color: var(--text-muted);
}
.info-panel h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.info-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.source-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.source-list li a {
  color: var(--accent, #60a5fa);
  text-decoration: none;
  font-weight: 600;
}
.source-list li a:hover { text-decoration: underline; }
.source-list li span {
  font-size: 11px;
  color: var(--text-muted);
}

/* PLACE PANEL */
.place-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  backdrop-filter: blur(3px);
}
.place-panel-overlay.open { display: block; }

.place-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: min(480px, 96vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 2001;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.place-panel.open { transform: translateX(-50%) translateY(0); }

.place-panel-inner { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.place-panel-inner::-webkit-scrollbar { width: 4px; }
.place-panel-inner::-webkit-scrollbar-thumb { background: var(--border); }

.pp-close {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.pp-img-wrap {
  position: relative;
  flex-shrink: 0;
  background: var(--surface2);
  height: 220px;
  overflow: hidden;
}
.pp-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pp-img-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
  pointer-events: none;
}

.pp-gallery {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #111827;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}
.pp-gallery::-webkit-scrollbar {
  height: 5px;
}
.pp-gallery::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.pp-gallery-item {
  width: 68px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #000;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.pp-gallery-item:hover {
  transform: scale(1.05);
  border-color: #60a5fa;
}
.pp-gallery-item.active {
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
}
.pp-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp-body {
  padding: 16px 20px 24px;
  flex: 1;
}
.pp-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  opacity: 0.75;
}
.pp-body h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.pp-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}
.pp-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.pp-img-wrap {
  position: relative;
}
.pp-trust-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 2;
}
.pp-trust-badge span {
  background: rgba(0,0,0,0.72);
  border: 2px solid;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.pp-trust-badge small {
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.pp-img-credit {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  z-index: 2;
}
.pp-img-credit:hover { text-decoration: underline; }
.pp-gallery {
  display: flex;
  gap: 6px;
  padding: 8px 16px 0;
  overflow-x: auto;
}
.pp-gallery-item {
  flex: 0 0 64px;
  height: 48px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--surface2);
}
.pp-gallery-item.active { border-color: var(--accent, #60a5fa); }
.pp-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  align-items: center;
}
.pp-sources-label {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.source-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.source-link {
  text-decoration: none;
  color: var(--accent, #60a5fa);
  transition: background 0.15s;
}
.source-link:hover {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
}
.pp-body p#ppDesc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pp-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(79,124,255,0.3);
}
.pp-maps-btn:hover { background: #3d6de8; transform: translateY(-1px); }
.pp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.pp-search-btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.pp-search-btn:hover {
  background: var(--border);
  border-color: rgba(96, 165, 250, 0.35);
  color: var(--text);
}

/* Responsive */
@media (max-width: 640px) {
  .header-center { display: none; }
  .sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 900; box-shadow: var(--shadow); }
  .sidebar.collapsed { transform: translateX(-100%); width: var(--sidebar-w); opacity: 1; }
  .sidebar { transform: translateX(0); transition: transform 0.3s ease; }
  .info-panel { width: 100%; }
}

/* ==========================================================================
   ADMIN VALDYMAS & REDAGAVIMAS
   ========================================================================== */

/* Header Admin mygtukai */
.admin-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 124, 255, 0.12);
  border: 1px solid rgba(79, 124, 255, 0.35);
  color: #93c5fd;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-pill-btn:hover {
  background: rgba(79, 124, 255, 0.22);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}
.admin-logged-in {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseAnim 1.8s infinite;
}
@keyframes pulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.admin-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.admin-act-btn.add-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
}
.admin-act-btn.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.45);
}
.admin-act-btn.logout-btn {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text-muted);
}
.admin-act-btn.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Vietos kortelės admin veiksmai */
.admin-place-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.pp-admin-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.pp-admin-btn.edit-btn {
  background: #f59e0b;
  color: #000;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}
.pp-admin-btn.edit-btn:hover {
  background: #d97706;
  transform: translateY(-1px);
}
.pp-admin-btn.delete-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.pp-admin-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
}

/* Modalai (Popups) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.login-modal {
  max-width: 420px;
}
.edit-modal {
  max-width: 640px;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-icon-badge {
  font-size: 24px;
}
.modal-title-wrap h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.modal-title-wrap p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.2);
}
.form-group select {
  cursor: pointer;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row.coords-row {
  align-items: flex-end;
}
.form-row .form-group {
  flex: 1;
}
.form-row .flex-2 { flex: 2; }
.form-row .flex-1 { flex: 1; }

.coords-btn-group {
  flex: 0 0 auto !important;
}
.pick-on-map-btn {
  white-space: nowrap;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrap input {
  width: 100%;
  padding-right: 40px;
}
.btn-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
}
.btn-toggle-pwd:hover { opacity: 1; }

.form-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 4px;
}

.image-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.image-preview {
  width: 100%;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
}
.modal-footer-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(79, 124, 255, 0.35);
}
.btn-primary:hover {
  background: #3d6de8;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-cancel {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-cancel:hover {
  color: var(--text);
  background: var(--surface2);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

/* Plaukiojantis žymėjimo skydelis */
.pin-drop-banner {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 17, 23, 0.95);
  border: 2px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: 30px;
  z-index: 2500;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.pin-drop-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.btn-banner-done {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-banner-done:hover {
  background: #3d6de8;
}
.btn-banner-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
}
.btn-banner-cancel:hover {
  color: var(--text);
}

/* Draggable Leaflet Marker custom style */
.drag-edit-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f59e0b;
  border: 3px solid #fff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: move;
  animation: pinBounce 1s infinite alternate;
}
@keyframes pinBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

/* Toast pranešimai */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s;
}
@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.toast-success {
  border-left: 4px solid #22c55e;
}
.toast.toast-error {
  border-left: 4px solid #ef4444;
}
.toast.toast-info {
  border-left: 4px solid var(--accent);
}

/* DI aprašymo mygtukas ir statusas */
.desc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-ai-describe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(79, 124, 255, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}
.btn-ai-describe:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(79, 124, 255, 0.45));
  border-color: #c084fc;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.btn-ai-describe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
.ai-sparkle {
  display: inline-block;
  font-size: 12px;
  animation: sparkleTwinkle 2s infinite ease-in-out;
}
@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.25) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 4px #c084fc); }
}

.ai-status {
  margin-top: 4px;
  font-size: 11px;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 6px;
  animation: fadeIn 0.2s ease-out;
}

/* Header Nustatymų mygtukas */
.admin-act-btn.settings-btn {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}
.admin-act-btn.settings-btn:hover {
  background: rgba(168, 85, 247, 0.35);
  border-color: #c084fc;
  color: #fff;
  transform: translateY(-1px);
}

/* Greitas nustatymų mygtukas redagavimo lange */
.desc-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-quick-settings {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-quick-settings:hover {
  background: var(--border);
  color: var(--text);
  transform: rotate(45deg);
}

/* Nustatymų modalas */
.settings-modal {
  max-width: 740px;
}
.settings-body {
  gap: 16px;
  padding: 22px;
}
.settings-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}
.settings-sec-title h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}
.sec-icon {
  font-size: 16px;
}

/* Toggles Grid */
.toggles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .toggles-grid { grid-template-columns: 1fr; }
}

.toggle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  background: var(--surface2);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.toggle-item:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(255, 255, 255, 0.03);
}
.toggle-item input[type="checkbox"] {
  display: none;
}
.toggle-track {
  width: 34px;
  height: 18px;
  background: #333a52;
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.25s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
}
.toggle-item input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-item input:checked + .toggle-track::after {
  transform: translateX(16px);
}
.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-label strong {
  font-size: 12px;
  color: var(--text);
}
.toggle-label small {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Range slider */
.range-slider {
  cursor: pointer;
  accent-color: var(--accent);
  width: 100%;
  height: 6px;
  margin-top: 8px;
}
.badge-pill {
  display: inline-block;
  background: rgba(79, 124, 255, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(79, 124, 255, 0.4);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
}
.hint-text {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Backup action */
.backup-action-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 4px;
}
.backup-action-wrap strong {
  font-size: 12px;
  color: var(--text);
}
.backup-action-wrap p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Nuotraukų paieškos mygtukas */
.btn-image-search {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-image-search:hover {
  background: rgba(59, 130, 246, 0.35);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}
.btn-image-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Nuotraukų pasirinkimo skydelis */
.image-picker-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  animation: fadeIn 0.25s ease-out;
}
.image-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.picker-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.google-img-link {
  font-size: 11px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.google-img-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.image-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding: 2px;
}
.image-option-card {
  position: relative;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #000;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.image-option-card:hover {
  transform: scale(1.04);
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.image-option-card.selected {
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}
.image-option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-option-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-option-card .img-source-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  font-size: 9px;
  color: #ddd;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lauko pasiūlymų juosta (DI smart suggestions) */
.field-suggestion-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 6px;
  animation: fadeIn 0.2s ease-out;
}
.field-suggestion-box .suggestion-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.field-suggestion-box .suggestion-text {
  font-size: 11px;
  color: #fde68a;
  flex: 1;
}
.field-suggestion-box .suggestion-text strong {
  color: #fff;
}
.btn-apply-suggestion {
  background: #f59e0b;
  color: #000;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-apply-suggestion:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

/* Redagavimo galerijos juosta */
.edit-gallery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  min-height: 20px;
}
.edit-gallery-strip:empty {
  display: none;
}
.edit-gallery-item {
  position: relative;
  width: 78px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: #000;
}
.edit-gallery-item.primary {
  border-color: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}
.edit-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-gallery-item .btn-remove-img {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edit-gallery-item .primary-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: #3b82f6;
  color: #fff;
  font-size: 8px;
  font-weight: bold;
  padding: 1px 3px;
  border-radius: 3px;
}

.btn-add-img {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-add-img:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
}

/* Kompaktiškos, paspaudžiamos šaltinių nuorodos */
.sources-chips-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sources-chips-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sources-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #93c5fd;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s ease;
}
.source-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
}
.text-inline-link {
  color: #60a5fa;
  text-decoration: underline;
  word-break: break-all;
}
.text-inline-link:hover {
  color: #93c5fd;
}





