:root {
  --bg: #0b1220;
  --card: #131c2f;
  --card-2: #19253d;
  --text: #eef2ff;
  --muted: #a7b0c3;
  --accent: #4fd1c5;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(79,209,197,.14);
  --border: #27344f;
  --danger: #ef4444;
  --warning: #f59e0b;
  --ok: #10b981;
  --shadow: 0 12px 30px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #09111e 0%, #0b1220 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code { background: rgba(255,255,255,.08); padding: .15rem .35rem; border-radius: .4rem; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11,18,32,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.brand { font-weight: 800; font-size: 1.1rem; }
.nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.nav a { color: var(--muted); }
.nav a:hover, .brand:hover { color: var(--text); }
.main-content { padding: 1.5rem 0 3rem; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 1.25rem 0 2rem; }
.hero {
  background:
    radial-gradient(circle at top left, rgba(79,209,197,.17), transparent 35%),
    radial-gradient(circle at right center, rgba(45,212,191,.1), transparent 28%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.hero h1 { margin: .35rem 0 .8rem; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
.hero p { color: var(--muted); max-width: 62ch; }
.hero-actions, .actions, .toolbar { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.4rem 0 .8rem; }
.grid.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.grid.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card-body { padding: .8rem 1rem 1rem; }
.trip-card { overflow: hidden; padding: 0; }
.trip-image {
  width: 100%;
  height: 190px;
  display: block;
  object-fit: cover;
}

.trip-hero-image,
.entry-image,
.preview-image,
.gallery-image {
  width: 100%;
  display: block;
  object-fit: contain;
  background: #0d1728;
}

.trip-hero-image {
  max-height: 420px;
  height: auto;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.entry-image {
  max-height: 520px;
  height: auto;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.preview-image {
  max-width: 320px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 1rem;
}
.muted { color: var(--muted); }
.badge, .pill {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--accent-soft); color: #b9fff8;
  border: 1px solid rgba(79,209,197,.2); border-radius: 999px; padding: .35rem .65rem; font-size: .85rem;
}
.pill { color: var(--text); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.09); }
.meta-row { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: center; }
.meta-stack { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #06231f; font-weight: 700; padding: .75rem 1rem; border-radius: .9rem; border: 0; cursor: pointer;
}
.btn-secondary { background: #22314d; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: linear-gradient(180deg, #f87171, #ef4444); color: #fff; }
.btn-warning { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #271700; }
.btn-small { padding: .55rem .8rem; font-size: .92rem; }
.form-grid { display: grid; gap: 1rem; }
.form-wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-wide .full-width { grid-column: 1 / -1; }
label span { display: block; margin-bottom: .4rem; font-weight: 600; }
input, select, textarea {
  width: 100%; background: #0d1728; color: var(--text); border: 1px solid var(--border);
  border-radius: .9rem; padding: .85rem .95rem; outline: none;
}
textarea { resize: vertical; min-height: 130px; }
.flash { border-radius: .9rem; padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-success { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.25); }
.flash-error { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25); }
.auth-wrap { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: min(480px, 100%); }
.trip-header { display: grid; gap: 1rem; }
.timeline { position: relative; display: grid; gap: 1rem; }
.timeline::before {
  content: ''; position: absolute; left: 124px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, rgba(79,209,197,.55), rgba(79,209,197,0));
}
.timeline-item {
  position: relative;
  display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: start;
}
.timeline-date {
  position: sticky; top: 90px; text-align: right; font-weight: 700; color: #b9fff8;
  padding-top: .3rem;
}
.timeline-card {
  position: relative;
  overflow: hidden;
}
.timeline-card::before {
  content: ''; position: absolute; left: -8px; top: 24px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px rgba(79,209,197,.12);
}
.timeline-cover {
  width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: contain;
  background: #0d1728;
  border-radius: 1rem;
  margin-bottom: .8rem;
}
.entry-detail .lead { font-size: 1.1rem; color: #dbeafe; }
.entry-text { margin-top: 1rem; line-height: 1.7; white-space: normal; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: .8rem; margin: 1rem 0; }
.empty-state { display: grid; place-items: start; min-height: 180px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.gallery-card { overflow: hidden; padding: 0; }
.gallery-image {
  max-height: 320px;
  height: auto;
  border-radius: 0;
}
.gallery-caption { padding: .85rem 1rem 1rem; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.thumb-item { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 1rem; padding: .5rem; }
.thumb-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #0d1728;
  border-radius: .8rem;
}
.kpi { padding: 1rem; }
.kpi strong { display: block; font-size: 1.55rem; margin-top: .25rem; }
.inline-form { display: inline; }
.notice { border-left: 4px solid var(--warning); padding: .8rem 1rem; background: rgba(245,158,11,.08); border-radius: .8rem; }
@media (max-width: 760px) {
  .nav-wrap, .section-head, .meta-row { align-items: flex-start; }
  .form-wide, .timeline-item { grid-template-columns: 1fr; }
  .hero { padding: 1.2rem; }
  .container { width: min(100% - 1rem, 1120px); }
  .timeline::before { left: 12px; }
  .timeline-card::before { left: -2px; top: 20px; }
  .timeline-date { position: static; text-align: left; padding-left: 1.75rem; }
  .timeline-card { margin-left: 1.2rem; }
}
.upload-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}
.upload-status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #0d1728;
  border: 1px solid var(--border);
  margin-bottom: .6rem;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: width .2s ease;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  width: 100%;
  max-width: min(92vw, 1400px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4.5rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(19,28,47,.88);
  color: var(--text);
  box-shadow: var(--shadow);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 46px;
  height: 46px;
  font-size: 1.9rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  font-size: 2rem;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-image,
.timeline-cover,
.entry-image,
.gallery-image,
.thumb-item img,
.trip-hero-image {
  cursor: zoom-in;
}

@media (max-width: 760px) {
  .lightbox {
    padding: .5rem;
  }

  .lightbox-stage {
    padding: 4rem 2.7rem;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .lightbox-prev { left: .35rem; }
  .lightbox-next { right: .35rem; }

  .lightbox-close {
    top: .45rem;
    right: .45rem;
    width: 42px;
    height: 42px;
  }
}

