* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #05070b;
  color: #e5e7eb;
}

/* LOGIN */

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #111827, #020617);
}

.login-box {
  background: #020617;
  border: 1px solid #1f2937;
  padding: 2rem 2.5rem;
  width: 360px;
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
  text-align: center;
  border-radius: 6px;
}

.login-logo {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.login-box h1 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.12em;
  color: #60a5fa;
}

.login-box label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: left;
}

.login-box input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: #020617;
  border: 1px solid #374151;
  color: #e5e7eb;
  border-radius: 4px;
}

.login-box button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.6rem;
  background: #2563eb;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.login-box button:hover {
  background: #1d4ed8;
}

.login-status {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* APP LAYOUT */

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  background: #020617;
  border-bottom: 1px solid #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-logo {
  height: 40px;
  margin-right: 1rem;
  border-radius: 4px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #60a5fa;
  margin-right: 0.75rem;
}

.subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid;
}

.badge-green {
  border-color: #22c55e;
  color: #22c55e;
}

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* SIDEBAR */

.sidebar {
  width: 220px;
  background: #020617;
  border-right: 1px solid #111827;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  color: #e5e7eb;
  cursor: pointer;
  border-radius: 0.25rem;
}

.sidebar li:hover {
  background: #111827;
}

.sidebar li.active {
  background: #1f2937;
}

.sidebar-footer {
  font-size: 0.75rem;
  color: #6b7280;
}

/* MAIN */

.main {
  flex: 1;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-section {
  background: #020617;
  border: 1px solid #111827;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
}

.search-row input {
  flex: 1;
  padding: 0.5rem 0.6rem;
  background: #020617;
  border: 1px solid #374151;
  color: #e5e7eb;
  border-radius: 4px;
}

.search-row button {
  padding: 0.5rem 0.9rem;
  background: #2563eb;
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
}

.search-row button:hover {
  background: #1d4ed8;
}

.filters-row {
  margin-top: 0.5rem;
}

.filters-row select {
  padding: 0.35rem 0.5rem;
  background: #020617;
  border: 1px solid #374151;
  color: #e5e7eb;
  font-size: 0.85rem;
  border-radius: 4px;
}

/* CONTENT */

.content {
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  gap: 1rem;
  min-height: 0;
}

.results, .details {
  background: #020617;
  border: 1px solid #111827;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.results h2, .details h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.results thead {
  background: #020617;
  border-bottom: 1px solid #111827;
}

.results th, .results td {
  padding: 0.35rem 0.25rem;
  text-align: left;
}

.results tbody tr {
  cursor: pointer;
}

.results tbody tr:nth-child(even) {
  background: #020617;
}

.results tbody tr:hover {
  background: #111827;
}

.status-pill {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid;
}

.status-AKTIV {
  border-color: #60a5fa;
  color: #60a5fa;
}

.status-GESUCHT {
  border-color: #f97316;
  color: #f97316;
}

.status-ARCHIVIERT {
  border-color: #6b7280;
  color: #6b7280;
}

.details-content p {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.details-content .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* BILDER */

.details-content img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.result-photo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ADMIN PANEL */

.admin-panel {
  background: #020617;
  border: 1px solid #111827;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 0.25rem;
}

.admin-panel h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.admin-panel label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem;
  background: #020617;
  border: 1px solid #374151;
  color: #e5e7eb;
  border-radius: 4px;
}

.admin-panel textarea {
  height: 80px;
  resize: vertical;
}

.admin-panel button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.6rem;
  background: #2563eb;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}

.admin-panel button:hover {
  background: #1d4ed8;
}

/* MAP VIEW */

.map-view {
  grid-column: 1 / span 2;
  background: #020617;
  border: 1px solid #111827;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
}

.map-view h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.map-container {
  width: 100%;
  height: 350px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
}

.map-hint {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* UTILS */

.hidden {
  display: none !important;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #111827;
  }
}
