* { box-sizing: border-box; }

img { max-width: 100%; }

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background-color: #f4f4f5;
  color: #1f2933;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("images/ss-qr.jpg") center center / cover no-repeat;
  opacity: 0.5;
  z-index: -1;
}

.banner-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border-bottom: none;
}

.banner-top .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #7ec8e3;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar h1 {
  font-size: 1.4rem;
  margin: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn.danger {
  background: #dc2626;
}

.btn.btn-black {
  background: black;
  padding: 0.625rem 1.25rem;
  font-size: 1.1875rem;
  border: 2px solid white;
  font-weight: bold;
}

.btn.btn-central {
  background: white;
  color: black;
  padding: 0.625rem 1.25rem;
  font-size: 1.1875rem;
  border: 2px solid black;
  font-weight: bold;
}

.btn.auth-logo-btn {
  background: transparent;
  border: none;
  padding: 0;
}

.auth-logout-icon {
  width: 26px;
  height: 26px;
  color: white;
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.layout {
  display: flex;
  align-items: flex-start;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  min-height: calc(100vh - 60px);
  background: white;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #1f2933;
  text-decoration: none;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: #f4f4f5;
}

.sidebar-link.active {
  color: #2563eb;
  border-left-color: #2563eb;
  background: #eff6ff;
}

.content {
  flex: 1;
  min-width: 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2rem 2rem 0;
}

.stat-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-count {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  color: #6b7280;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-link {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1rem;
    white-space: nowrap;
  }

  .sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: #2563eb;
  }

  .stats-row {
    padding: 1rem 1rem 0;
  }
}

@media (max-width: 600px) {
  .grid,
  .dashboard {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .banner img {
    max-width: 47%;
  }

  .banner-top {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .banner-top .page-title {
    font-size: 1.15rem;
  }

  .btn-central,
  .btn-black {
    padding: 0.5rem 0.85rem;
    font-size: 1rem;
  }

  .topbar {
    padding: 0.75rem;
  }

  .topbar h1 {
    font-size: 1.15rem;
  }

  .detail,
  .form-page {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }

  .card-photo {
    height: 130px;
  }
}

@media (max-width: 380px) {
  .banner-top .page-title {
    font-size: 1rem;
  }

  .btn-central,
  .btn-black {
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
  }
}

.card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
}

.card-photo {
  height: 160px;
  background-color: #d4d4d8;
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 1rem;
}

.card-body h2 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.price {
  font-weight: bold;
  color: #2563eb;
  margin: 0.2rem 0;
}

.location {
  color: #6b7280;
  margin: 0.2rem 0;
}

.detail, .form-page {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.detail .description {
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
}

.documents {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.documents a {
  display: inline-block;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  color: #1f2933;
}

.documents a:hover {
  border-color: #2563eb;
  color: #2563eb;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

input, textarea {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.panel {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.simple-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.simple-list li.done label {
  text-decoration: line-through;
  color: #9ca3af;
}

.simple-list .muted {
  color: #6b7280;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inline-form input {
  flex: 1;
  min-width: 100px;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.link-banner {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}
