/* Dashboard admin dan galeri publik. Tema terang, sewarna dengan viewer. */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: #d8dfe9;
  --ink: #1a2432;
  --muted: #5d6b7f;
  --accent: #0d9488;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* Beberapa elemen di bawah diberi display eksplisit (grid/flex) yang akan
   mengalahkan `display: none` bawaan browser untuk atribut [hidden]. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

.muted {
  color: var(--muted);
}

.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.boot {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

/* ------------------------------------------------------------------- header */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #eef2f7);
}

.bar__brand {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.bar h1 {
  font-size: 19px;
}

.bar__actions,
.bar__admin {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar__who {
  font-size: 13px;
  color: var(--muted);
}

/* -------------------------------------------------------------------- tata letak */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 24px;
}

.panel,
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-bottom: 14px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.count {
  color: var(--muted);
  font-weight: 400;
}

.card--login {
  max-width: 380px;
  margin: 8vh auto;
}

.card--login h2 {
  margin-bottom: 6px;
  font-size: 17px;
}

/* --------------------------------------------------------------------- form */

.form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form--row {
  grid-template-columns: 2fr 3fr auto;
  align-items: end;
  margin-top: 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type='text'],
input[type='password'],
input:not([type]) {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

input:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ------------------------------------------------------------------ tombol */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: #9fb0c6;
  background: #eaf0f7;
}

.btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.btn--primary:hover {
  background: #0f766e;
}

.btn--small {
  padding: 6px 10px;
  font-size: 13px;
}

.btn--danger {
  color: var(--danger);
}

.btn--danger:hover {
  border-color: var(--danger);
  background: #fdeaea;
}

.btn--file {
  color: var(--ink);
}

.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ------------------------------------------------------------- kartu gedung */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.tour__cover {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  background: #e9eef5;
}

.tour__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour__nocover {
  font-size: 12px;
  color: var(--muted);
}

.tour__body {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.tour__body h3 {
  font-size: 15px;
}

.tour__meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.tour__note {
  margin: 0;
  font-size: 13px;
}

.tour__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ------------------------------------------------------------------ progres */

.tour__progress {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.pbar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.pbar__fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.tour__status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.tour__progress .btn {
  justify-self: start;
}

/* ------------------------------------------------------------ galeri publik */

.lead {
  margin: 0;
  font-size: 15px;
}

/* Seluruh kartu jadi satu sasaran klik; lebih mudah dijangkau di layar sentuh
   daripada tautan kecil di dalamnya. */
.tour--link {
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.tour--link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tour__hit {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tour__hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tour--link h2 {
  font-size: 15px;
}

.tour--link .tour__cover {
  background: #e9eef5;
}

@media (prefers-reduced-motion: reduce) {
  .tour--link {
    transition: none;
  }

  .tour--link:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .form--row {
    grid-template-columns: 1fr;
  }
}
