/* HumeHiveMap™ – Yellow Tower Labs™ */

/* =========================================================
   DESIGN SYSTEM
   ========================================================= */

:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --surface-warm: #fffaf0;

  --text: #24211c;
  --text-muted: #6f685d;

  --primary: #d99716;
  --primary-hover: #b9790e;
  --primary-light: #fff0c7;

  --honey: #e8aa2d;
  --amber: #c77b0a;
  --charcoal: #29251f;

  --success: #3f7d58;
  --danger: #b84040;
  --warning: #c77b0a;

  --border: #e8dfcf;
  --border-strong: #d8c9ae;

  --radius: 14px;

  --shadow:
    0 1px 3px rgba(52, 42, 24, 0.06),
    0 5px 16px rgba(52, 42, 24, 0.05);

  --shadow-lg:
    0 8px 28px rgba(52, 42, 24, 0.12);

  --font: "Inter", system-ui, -apple-system, sans-serif;
}


/* =========================================================
   RESET / BASE
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top, #fffdf8 0, var(--bg) 42%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.navbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--charcoal);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--amber);
}

.brand-icon {
  font-size: 1.55rem;
}

.brand-text {
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--amber);
  text-decoration: none;
}

.nav-user {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--surface-warm);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}


/* =========================================================
   PAGE CONTAINER
   ========================================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  flex: 1;
  width: 100%;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  text-align: center;
  padding: 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer p + p {
  margin-top: 0.25rem;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 1.15rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
  text-decoration: none;
  line-height: 1.3;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #241b0d;
  box-shadow: 0 3px 10px rgba(217, 151, 22, 0.18);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface-warm);
  color: var(--charcoal);
  border-color: var(--honey);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #963434;
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-lg {
  padding: 0.78rem 1.55rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.85rem;
}


/* =========================================================
   FLASH MESSAGES
   ========================================================= */

.flash-messages {
  margin-bottom: 1.25rem;
}

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: 9px;
  margin-bottom: 0.5rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.flash-success {
  background: #e5f3e9;
  color: #315f43;
  border-color: #cce5d4;
}

.flash-danger {
  background: #fbe7e7;
  color: #8d3030;
  border-color: #f0cccc;
}

.flash-info {
  background: var(--primary-light);
  color: #75510c;
  border-color: #efd995;
}

.flash-warning {
  background: #fff0cf;
  color: #80530c;
  border-color: #efd59e;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}


/* =========================================================
   FORMS
   ========================================================= */

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.form-control::placeholder {
  color: #a59b8b;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

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


/* =========================================================
   AUTH PAGES
   ========================================================= */

.auth-wrap {
  max-width: 420px;
  margin: 2rem auto;
}

.auth-card {
  padding: 2rem;
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  color: var(--charcoal);
}

.auth-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}


/* =========================================================
   HERO / LANDING
   ========================================================= */

.hero {
  text-align: center;
  padding: 4rem 1rem 2.5rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(232, 170, 45, 0.08);
  filter: blur(2px);
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: #78500a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.8rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* =========================================================
   LANDING FEATURES
   ========================================================= */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    border-color 0.18s;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #e5c77f;
}

.feature .icon {
  font-size: 2.15rem;
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
  color: var(--charcoal);
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* =========================================================
   PAGE HEADERS
   ========================================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.7rem;
  color: var(--charcoal);
}


/* =========================================================
   CONTAINER GRID / DASHBOARD
   ========================================================= */

.container-grid,
.box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.container-card,
.box-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    box-shadow 0.2s,
    transform 0.15s,
    border-color 0.15s;
  display: flex;
  flex-direction: column;
}

.container-card:hover,
.box-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: #e3c783;
}

.container-card-photo,
.box-card-photo {
  height: 160px;
  background: #f1eadc;
  object-fit: cover;
  width: 100%;
  display: block;
}

.container-card-photo.placeholder,
.box-card-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--honey);
  background:
    linear-gradient(135deg, #fffaf0, #f6ecd5);
}

.container-card-body,
.box-card-body {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container-card-id,
.box-card-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.container-card-title,
.box-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.25rem 0 0.4rem;
  line-height: 1.3;
}

.container-card-title a,
.box-card-title a {
  color: var(--charcoal);
}

.container-card-title a:hover,
.box-card-title a:hover {
  color: var(--amber);
  text-decoration: none;
}

.container-card-meta,
.box-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.container-card-contents,
.box-card-contents {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.container-card-actions,
.box-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-state h2 {
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}


/* =========================================================
   CONTAINER DETAIL
   ========================================================= */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.detail-main {
}

.detail-side {
}

.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: #f1eadc;
  margin-bottom: 1.25rem;
}

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

.detail-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.detail-title {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.detail-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.contents-block {
  background: var(--surface-warm);
  border-radius: 9px;
  padding: 1.1rem;
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}


/* =========================================================
   QR PANEL
   ========================================================= */

.qr-panel {
  text-align: center;
  padding: 1.25rem;
}

.qr-panel img {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.35rem;
}

.qr-panel p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
  display: inline-block;
  background: var(--primary-light);
  color: #81570c;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
}


/* =========================================================
   SEARCH
   ========================================================= */

.search-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.search-bar .form-control {
  flex: 1;
}

.results-count {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}


/* =========================================================
   PRINT LABEL
   ========================================================= */

.print-label {
  text-align: center;
  padding: 1.5rem;
  max-width: 380px;
  margin: 0 auto;
  border: 2px dashed #cdbf9f;
  border-radius: 10px;
  page-break-inside: avoid;
  background: #fff;
}

.print-label .container-id,
.print-label .box-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.print-label .container-title,
.print-label .box-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.print-label img {
  width: 200px;
  height: 200px;
  margin: 0.5rem auto;
  display: block;
}

.print-label .hint {
  font-size: 0.75rem;
  color: #6e675c;
  margin-top: 0.5rem;
}


/* =========================================================
   PUBLIC QR VIEW
   ========================================================= */

.public-view {
  max-width: 560px;
  margin: 1rem auto;
}

.public-view .card-body {
  padding: 1.75rem;
}

.public-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.public-header .icon {
  font-size: 2.5rem;
}

.public-header h1 {
  font-size: 1.5rem;
  margin: 0.4rem 0;
  color: var(--charcoal);
}

.public-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
}


/* =========================================================
   FILE INPUT
   ========================================================= */

.file-input-wrap {
  border: 2px dashed var(--border-strong);
  border-radius: 9px;
  padding: 1.25rem;
  text-align: center;
  background: var(--surface-warm);
  transition:
    border-color 0.15s,
    background 0.15s;
}

.file-input-wrap:hover {
  border-color: var(--primary);
  background: #fff8e7;
}

.file-input-wrap input[type="file"] {
  max-width: 100%;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

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

  .nav-inner {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .nav-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    justify-content: center;
  }

  .nav-links {
    justify-content: center;
    gap: 0.75rem;
  }

  .container {
    padding: 1.25rem 1rem 2.5rem;
  }

  .hero {
    padding: 2.75rem 0.5rem 1.75rem;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .search-bar {
    flex-direction: column;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header .flex {
    width: 100%;
  }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print {
  .navbar,
  .footer,
  .no-print,
  .flash-messages {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .print-label {
    border-color: #999;
    box-shadow: none;
  }
}


/* =========================================================
   UTILITIES
   ========================================================= */

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}