/*
 * Bố cục Trang chủ theo tấm mẫu đã duyệt:
 * cảnh quan giàu chi tiết là trung tâm, bảng điều hành chỉ bao quanh.
 */
:root {
  --approved-forest: #173f29;
  --approved-forest-2: #2b6544;
  --approved-gold: #c89b36;
  --approved-gold-soft: #ead083;
  --approved-paper: rgba(255, 247, 218, 0.965);
  --approved-paper-soft: rgba(255, 251, 232, 0.91);
  --approved-ink: #213b29;
  --approved-shadow: 0 14px 34px rgba(27, 46, 27, 0.27);
}

html,
body {
  background: #d7c58d;
}

.app-shell {
  min-width: 1120px;
  min-height: 100vh;
  background: #e9d9a8;
}

/* Đầu trang thấp và gọn hơn để nhường chỗ cho bản đồ. */
.top-header {
  min-height: 82px;
  grid-template-columns: minmax(470px, 1fr) auto auto;
  gap: 14px;
  padding: 8px 24px 7px;
  border-bottom: 1px solid rgba(146, 105, 28, 0.42);
  background:
    radial-gradient(circle at 84% -25%, rgba(255, 250, 218, 0.98), transparent 42%),
    linear-gradient(180deg, #fff9df, #ecdbab);
  box-shadow: 0 5px 18px rgba(70, 54, 22, 0.18);
}

.top-header::after {
  height: 3px;
  opacity: 0.75;
}

.brand-mark {
  width: 64px;
  height: 64px;
  font-size: 28px;
  border: 2px solid #ddb34a;
  box-shadow: inset 0 0 0 2px #f5dc88, 0 5px 14px rgba(34, 63, 38, 0.27);
}

.brand-copy strong {
  font-size: clamp(25px, 2.1vw, 32px);
  letter-spacing: 0;
}

.brand-copy small {
  margin-top: 2px;
  font-size: 12px;
}

.current-member-badge {
  margin-top: 4px;
  padding: 3px 9px;
  font-size: 9px;
}

.clock-block,
.weather-chip {
  min-height: 52px;
  padding: 7px 12px;
}

.clock-block strong,
.weather-chip strong {
  font-size: 17px;
}

.header-actions {
  gap: 7px;
}

.search-box {
  width: 155px;
  height: 40px;
}

.action-button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.admin-link {
  min-width: 44px;
  padding-inline: 10px;
  font-size: 0;
}

.admin-link span {
  font-size: 16px;
}

/* Thanh chức năng sát với mẫu: một dải giấy ngà duy nhất. */
.main-navigation {
  height: 50px;
  padding: 4px 4.5%;
  border-bottom: 2px solid #a77d27;
  background:
    repeating-linear-gradient(1deg, transparent 0 12px, rgba(123, 91, 26, 0.035) 13px),
    linear-gradient(180deg, #fff5cc, #dfc98d);
  box-shadow: 0 5px 15px rgba(61, 52, 27, 0.16);
}

.nav-item {
  min-width: 0;
  border-right-color: rgba(126, 93, 31, 0.24);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
}

.nav-item:hover,
.nav-item.active {
  color: #ffe696;
  background: linear-gradient(180deg, #2f6c47, #173e29);
  box-shadow: inset 0 0 0 2px #d2a943;
}

/*
 * Không dùng bản SVG phẳng. Khôi phục tài nguyên minh họa giàu chi tiết
 * đang có trong dự án, rồi đặt các lớp tương tác lên phía trên.
 */
.map-workspace {
  height: calc(100vh - 132px);
  min-height: 650px;
  background:
    linear-gradient(180deg, rgba(245, 216, 130, 0.06), rgba(26, 54, 34, 0.14)),
    url('/my-phu-summer.svg') center 48% / cover no-repeat,
    #728d58;
}

.map-workspace::before {
  background:
    linear-gradient(90deg, rgba(24, 45, 28, 0.13), transparent 18%, transparent 82%, rgba(24, 45, 28, 0.13)),
    radial-gradient(circle at 50% 46%, transparent 37%, rgba(75, 55, 18, 0.1) 100%);
}

.map-workspace::after {
  box-shadow: inset 0 0 110px rgba(37, 47, 25, 0.23);
}

.sun-glow,
.ambient-cloud,
.water-shimmer,
.boat {
  opacity: 0.16;
}

/* Hai bảng đứng mảnh hơn, không che cảnh quan. */
.side-panel {
  top: 18px;
  width: 270px;
  max-height: calc(100% - 165px);
  border: 2px solid rgba(178, 132, 39, 0.7);
  border-radius: 12px;
  background:
    repeating-linear-gradient(2deg, transparent 0 13px, rgba(127, 92, 23, 0.025) 14px),
    var(--approved-paper);
  box-shadow: var(--approved-shadow);
}

.conversation-panel {
  left: 22px;
}

.task-panel {
  right: 22px;
}

.panel-heading {
  min-height: 56px;
  padding: 8px 11px 8px 14px;
  color: #ffefb4;
  background: linear-gradient(180deg, #346f4d, #173f29);
  border-bottom: 1px solid #d7ad44;
}

.panel-heading strong {
  font-size: 17px;
  letter-spacing: 0.25px;
}

.panel-heading small {
  margin-top: 2px;
  font-size: 8px;
  color: #f2e3ad;
}

.chat-tabs,
.task-tabs {
  padding: 7px;
  background: rgba(234, 219, 168, 0.5);
}

.chat-tabs button,
.task-tabs button {
  min-height: 29px;
  font-size: 9px;
}

.chat-message {
  grid-template-columns: 36px 1fr;
  gap: 8px;
  padding: 8px 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  font-size: 9px;
}

.chat-message strong {
  font-size: 10px;
}

.chat-message p {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.4;
}

.chat-message small {
  font-size: 8px;
}

.chat-composer {
  grid-template-columns: 1fr 34px;
  padding: 7px;
}

.chat-composer input {
  height: 33px;
  font-size: 9px;
}

.task-item {
  grid-template-columns: 38px 1fr;
  gap: 7px;
  padding: 9px 10px;
}

.task-item > span:first-child {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.task-item strong {
  font-size: 9px;
}

.task-item small {
  font-size: 8px;
}

.panel-footer-button {
  min-height: 34px;
  margin: 8px;
  font-size: 9px;
}

/* Bảng tên công trình nhỏ, hòa vào cảnh hơn. */
.hotspot span {
  padding: 6px 11px 7px;
  border: 2px solid #d0a33b;
  border-radius: 4px;
  color: #ffe59a;
  font-size: 10px;
  letter-spacing: 0.15px;
  background: linear-gradient(180deg, rgba(45, 97, 61, 0.98), rgba(18, 57, 36, 0.98));
  box-shadow: 0 6px 14px rgba(16, 39, 24, 0.31), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hotspot:hover span {
  transform: translateY(-2px) scale(1.025);
}

.hotspot-headquarters { left: 50%; top: 15%; }
.hotspot-branch { left: 31%; top: 23%; }
.hotspot-leaders { left: 27.5%; top: 43%; }
.hotspot-market { left: 70%; top: 20%; }
.hotspot-weather { left: 70.5%; top: 39%; }
.hotspot-support { left: 61.5%; top: 58%; }
.hotspot-collective { left: 76%; top: 72%; }
.hotspot-data { left: 31%; top: 68%; }
.hotspot-honor { left: 51%; top: 79%; }

/* Dải dưới thấp hơn, giống bảng điều hành của mẫu. */
.bottom-dock {
  left: 22px;
  right: 22px;
  bottom: 14px;
  grid-template-columns: 1fr 345px;
  gap: 12px;
}

.news-panel,
.contact-panel {
  border: 2px solid rgba(178, 132, 39, 0.7);
  border-radius: 10px;
  background:
    repeating-linear-gradient(1deg, transparent 0 13px, rgba(124, 91, 26, 0.025) 14px),
    var(--approved-paper);
  box-shadow: var(--approved-shadow);
}

.dock-heading,
.contact-summary {
  height: 38px;
  color: #ffefb3;
  background: linear-gradient(180deg, #346f4d, #173f29);
  border-bottom: 1px solid #d5aa42;
}

.news-rotator {
  min-height: 86px;
  padding: 8px 12px;
}

.news-card {
  inset: 8px 12px;
  grid-template-columns: 50px 1fr;
  gap: 10px;
}

.news-card > span {
  width: 48px;
  height: 48px;
  font-size: 24px;
}

.news-card strong {
  font-size: 12px;
}

.news-card small {
  margin-top: 4px;
  font-size: 8px;
}

.contact-summary {
  min-height: 38px;
}

.contact-details {
  padding: 6px;
}

.contact-details button {
  min-height: 54px;
  font-size: 20px;
}

.contact-details span {
  font-size: 8px;
}

/* Cửa sổ mở từ công trình giữ chất giấy – đồng nhưng gọn hơn. */
.modal-window {
  border: 2px solid #bd9134;
  border-radius: 14px;
  background:
    repeating-linear-gradient(2deg, transparent 0 13px, rgba(120, 87, 26, 0.032) 14px),
    linear-gradient(145deg, #fff8d7, #eadbad);
  box-shadow: 0 28px 90px rgba(20, 40, 24, 0.36);
}

.modal-option {
  border-color: rgba(139, 98, 23, 0.25);
  background: rgba(255, 251, 226, 0.78);
}

@media (max-width: 1380px) {
  .top-header {
    grid-template-columns: minmax(400px, 1fr) auto;
  }

  .header-actions {
    grid-column: 1 / -1;
    margin-top: -8px;
  }

  .map-workspace {
    height: calc(100vh - 126px);
  }

  .side-panel {
    width: 252px;
  }

  .bottom-dock {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-height: 760px) {
  .top-header {
    min-height: 74px;
  }

  .main-navigation {
    height: 46px;
  }

  .map-workspace {
    height: calc(100vh - 120px);
    min-height: 590px;
  }

  .side-panel {
    top: 12px;
    max-height: calc(100% - 145px);
  }

  .bottom-dock {
    bottom: 8px;
  }
}
