:root {
  --ink: #122022;
  --ink-soft: #2a3f41;
  --teal: #0f3d3e;
  --teal-mid: #1a5c5e;
  --accent: #e8a838;
  --accent-hover: #d4962a;
  --sand: #f3efe6;
  --sand-deep: #e7e0d2;
  --surface: rgba(255, 252, 247, 0.92);
  --line: rgba(18, 32, 34, 0.12);
  --danger: #b42318;
  --radius: 1rem;
  --shadow: 0 12px 40px rgba(18, 32, 34, 0.08);
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(232, 168, 56, 0.18), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(26, 92, 94, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f4ee 0%, #ebe6db 100%);
}

a {
  color: var(--teal-mid);
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

h1, h2, .page-title, .auth-brand h1, .navbar-brand {
  font-family: var(--display);
  letter-spacing: -0.02em;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
}

.page-sub,
.auth-sub,
.section-title {
  color: var(--ink-soft);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.app-nav {
  background: var(--teal);
  box-shadow: 0 8px 24px rgba(15, 61, 62, 0.25);
}

.app-nav .navbar-brand {
  color: #fff !important;
  font-size: 1.4rem;
}

.app-nav .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 500;
}

.app-nav .nav-link.active,
.app-nav .nav-link:hover {
  color: #fff !important;
}

.app-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.app-nav .navbar-toggler-icon {
  filter: invert(1);
}

.btn-accent {
  --bs-btn-color: #122022;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #122022;
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-color: #122022;
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  font-weight: 600;
}

.btn-ink {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--teal);
  --bs-btn-border-color: var(--teal);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--teal-mid);
  --bs-btn-hover-border-color: var(--teal-mid);
  font-weight: 600;
}

.btn-outline-ink {
  --bs-btn-color: var(--teal);
  --bs-btn-border-color: var(--teal);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--teal);
  --bs-btn-hover-border-color: var(--teal);
  font-weight: 600;
}

.stat-tile,
.pack-card,
.photo-panel,
.detail-photo,
.auth-card,
.empty-state,
.more-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-tile {
  padding: 1.25rem 1.35rem;
  min-height: 7rem;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.stat-value {
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1.1;
  margin-top: 0.35rem;
}

.stat-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.pack-card {
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(18, 32, 34, 0.12);
}

.pack-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--sand-deep);
  overflow: hidden;
}

.pack-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pack-card-placeholder,
.detail-photo-empty,
.photo-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 10rem;
  color: var(--ink-soft);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(18, 32, 34, 0.04) 8px,
      rgba(18, 32, 34, 0.04) 16px
    );
}

.pack-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.pack-card-title {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.pack-card-title a {
  color: var(--ink);
}

.pack-card-meta,
.pack-card-stats {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.pack-card-stats {
  display: flex;
  gap: 0.75rem;
  margin: 0.5rem 0 0.85rem;
}

.pack-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.auth-page main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 420px);
  padding: 2rem 1.75rem;
}

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--teal-mid);
  margin-bottom: 0.35rem;
}

.auth-brand h1 {
  font-size: 2.4rem;
  margin-bottom: 0.35rem;
}

.photo-panel {
  padding: 1.25rem;
}

.photo-preview {
  aspect-ratio: 4 / 3;
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--sand);
  border: 1px dashed rgba(18, 32, 34, 0.2);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-upload-btn {
  cursor: pointer;
}

.req {
  color: var(--danger);
}

.location-preview {
  min-height: 1.5rem;
  font-size: 0.92rem;
  color: var(--teal-mid);
}

.location-preview .chip {
  display: inline-block;
  background: rgba(15, 61, 62, 0.08);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin: 0.15rem 0.2rem 0.15rem 0;
}

.more-details {
  padding: 0.85rem 1rem;
}

.more-details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.more-details summary::-webkit-details-marker {
  display: none;
}

.more-details summary::after {
  content: "+";
  float: right;
  color: var(--teal-mid);
}

.more-details[open] summary::after {
  content: "−";
}

.more-details-body {
  padding-top: 1rem;
}

.sticky-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  position: sticky;
  bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(247, 244, 238, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.detail-photo {
  overflow: hidden;
  min-height: 280px;
}

.detail-photo img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 640px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin: 0;
}

.detail-grid .full {
  grid-column: 1 / -1;
}

.detail-grid dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}

.detail-grid dd {
  margin: 0;
  font-weight: 500;
}

.location-path {
  margin: 0;
  padding-left: 1.1rem;
}

.location-path li + li {
  margin-top: 0.15rem;
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 61, 62, 0.1);
  font-size: 0.85rem;
}

.status-active {
  background: rgba(26, 92, 94, 0.14);
}

.status-archived,
.status-sold,
.status-disposed {
  background: rgba(18, 32, 34, 0.08);
}

.notes-block {
  white-space: pre-wrap;
}

.back-link,
.link-more {
  font-weight: 600;
}

.mobile-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
}

.mobile-fab .btn {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0;
}

kbd {
  background: var(--sand-deep);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.8em;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 0.2rem rgba(26, 92, 94, 0.18);
}

@media (max-width: 575.98px) {
  .sticky-actions .btn {
    flex: 1 1 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
