/* basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: #f3f4f6;
  color: #111827;
  height: 100vh;
  overflow: hidden;
}

/* ---- APP LAYOUT ---- */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ---- NAVBAR ---- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.logo-icon {
  width: 22px;
  height: 22px;
  background: #16a34a;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
}

.logo-sq {
  border-radius: 1px;
  background: white;
}

.logo-sq.tr,
.logo-sq.bl {
  opacity: 0.5;
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9ca3af;
}

.breadcrumb .sep {
  color: #d1d5db;
}

.breadcrumb .current {
  color: #374151;
  font-weight: 500;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* guide chip selector */
.guide-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selector-label {
  font-size: 12px;
  color: #9ca3af;
}

.guide-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  cursor: pointer;
}

.guide-chip:hover {
  border-color: #16a34a;
  color: #16a34a;
}

.guide-chip.selected {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

/* tour button */
.tour-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1.5px solid #16a34a;
  color: #16a34a;
  background: white;
  cursor: pointer;
}

.tour-btn:hover {
  background: #f0fdf4;
}

.tour-btn.active {
  background: #16a34a;
  color: white;
}

/* avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #bbf7d0;
}

/* ---- BODY ---- */
.body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: 200px;
  background: white;
  border-right: 1px solid #e5e7eb;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  padding: 4px 10px;
  margin-bottom: 2px;
}

.sidebar-item {
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
}

.sidebar-item:hover {
  background: #f9fafb;
  color: #374151;
}

.sidebar-item.active {
  background: #f0fdf4;
  color: #16a34a;
}

/* ---- MAIN ---- */
.main {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
  background: #f3f4f6;
}

/* page heading */
.page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-top h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.page-top p {
  font-size: 13px;
  color: #6b7280;
}

.export-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  cursor: pointer;
}

.export-btn:hover {
  background: #f9fafb;
}

/* ---- STAT CARDS ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
}

.stat-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.stat-num {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 11px;
  color: #16a34a;
  font-weight: 500;
}

/* ---- TWO COL ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- CARD ---- */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #6b7280;
}

.badge.green {
  background: #f0fdf4;
  color: #16a34a;
}

/* ---- FORM ---- */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 8px 11px;
  font-size: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #111827;
  outline: none;
  font-family: inherit;
}

input:focus {
  background: white;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

input::placeholder {
  color: #d1d5db;
}

.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.hint {
  font-size: 11px;
  color: #9ca3af;
}

.submit-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border: none;
  border-radius: 6px;
  background: #16a34a;
  color: white;
  cursor: pointer;
  font-family: inherit;
}

.submit-btn:hover {
  background: #15803d;
}

/* ---- ACTIVITY ---- */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
  border-bottom: none;
}

.a-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.a-dot.green {
  background: #dcfce7;
  color: #16a34a;
}
.a-dot.blue {
  background: #eff6ff;
  color: #2563eb;
}
.a-dot.yellow {
  background: #fef9c3;
  color: #ca8a04;
}
.a-dot.gray {
  background: #f3f4f6;
  color: #6b7280;
}
.a-dot.purple {
  background: #fdf4ff;
  color: #9333ea;
}

.a-text {
  font-size: 13px;
  color: #374151;
  margin-bottom: 2px;
}

.a-time {
  font-size: 11px;
  color: #9ca3af;
}

/* ---- GUIDE OVERLAY ---- */
#guide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

#guide-overlay.active {
  display: block;
}

/* ---- TOOLTIP ---- */
#guide-tooltip {
  display: none;
  position: fixed;
  width: 290px;
  z-index: 200;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

#guide-tooltip.active {
  display: block;
}

.tooltip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#tt-step {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#tt-guide-name {
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
}

#tt-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 7px;
}

#tt-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* progress dots */
#tt-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: all 0.2s;
}

.dot.done {
  background: #16a34a;
  width: 16px;
  border-radius: 3px;
}

/* tooltip buttons */
.tooltip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tt-skip {
  font-size: 11px;
  color: #9ca3af;
  cursor: pointer;
  text-decoration: underline;
}

#tt-skip:hover {
  color: #6b7280;
}

.tooltip-btns {
  display: flex;
  gap: 6px;
}

.tooltip-btns button {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}

.tooltip-btns button:hover {
  background: #f9fafb;
}

.tooltip-btns button.btn-green {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

.tooltip-btns button.btn-green:hover {
  background: #15803d;
}

/* highlighted element gets a green glow */
.guide-highlight {
  position: relative;
  z-index: 150 !important;
  box-shadow:
    0 0 0 3px #16a34a,
    0 0 0 7px rgba(22, 163, 74, 0.15) !important;
  border-radius: 8px !important;
  background: white !important;
}

/* ---- TOAST ---- */
#toast {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 8px;
  z-index: 300;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#toast.show {
  display: block;
  animation: fadeUp 0.25s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* scrollbar styling */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}
