/* ---------- Brand palette ---------- */
:root {
  --brand: #0f7a63;
  --brand-dark: #0b5f4d;
  --brand-light: #e6f4f0;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --bs-body-bg: #f7f8fb;
  --bs-body-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-dark);
}

body {
  background: var(--bs-body-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: none; }

/* ---------- Kicker labels (small caps eyebrow text) ---------- */
.kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .35rem;
}

/* ---------- Navbar ---------- */
.navbar {
  background: #fff !important;
  border-bottom: 1px solid var(--line);
}
.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--ink) !important;
}
.navbar-brand i { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  font-weight: 600;
  border-radius: .6rem;
}
.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}
.btn-outline-secondary {
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline-secondary:hover {
  background-color: var(--ink);
  border-color: var(--ink);
}
.btn-warning { font-weight: 700; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.project-card {
  transition: box-shadow .18s ease, transform .18s ease;
}
.project-card:hover {
  box-shadow: 0 12px 24px rgba(16,24,40,.08);
  transform: translateY(-3px);
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- Feature-card style icon squares (used for empty states etc) ---------- */
.icon-square {
  width: 46px;
  height: 46px;
  border-radius: .6rem;
  background: var(--brand-light);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

/* ---------- Items list ---------- */
.item-row {
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.item-row:hover {
  box-shadow: 0 6px 16px rgba(16,24,40,.06);
  border-color: #d3d7de;
}
.drag-handle {
  cursor: grab;
}
.item-row.dragging {
  opacity: .4;
}
.item-row[draggable="true"] {
  cursor: default;
}

/* ---------- State colors: one consistent visual language for what needs action ---------- */
.state-normal { background: #fff; border-color: var(--line); }
.state-declined { background: #fdecec; border-color: #f3b8b8; }
.state-review { background: #fff8e8; border-color: #f5d998; }
.state-approval { background: #eef1fd; border-color: #c9d3f7; }
.state-staged { background: #f5eefc; border-color: #ddc7f5; }
.state-hold { background: #f2f3f5; border-color: #dde0e5; }
.state-done { background: #eaf7ef; border-color: #b9e0c4; }

.state-pill {
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.state-pill.state-normal { background: #eef0f2; color: #475467; }
.state-pill.state-declined { background: #fbd5d5; color: #8a2c2c; }
.state-pill.state-review { background: #f9e6ae; color: #8a6512; }
.state-pill.state-approval { background: #d7deFA; color: #33409e; }
.state-pill.state-staged { background: #e6d3f7; color: #5b2c93; }
.state-pill.state-hold { background: #e2e4e8; color: #4b5563; }
.state-pill.state-done { background: #bfe6cc; color: #175c33; }

/* ---------- Clickable stat/filter cards ---------- */
/* Background and border color come from the .state-* class on each card
   (state-normal/state-approval/etc, same palette as item rows) — this rule
   deliberately does NOT set them, so those actually take effect instead of
   being silently overridden by a later, same-specificity rule. */
.stat-card {
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .85rem .5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease, filter .15s ease;
}
.stat-card:hover {
  box-shadow: 0 6px 14px rgba(16,24,40,.08);
  transform: translateY(-2px);
  color: inherit;
  filter: brightness(0.97);
}
.stat-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15,122,99,.15);
}
.stat-card .stat-card-num {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}
.stat-card .stat-card-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: .25rem;
}

/* ---------- Badges ---------- */
.badge { font-weight: 700; letter-spacing: .01em; }
.text-bg-primary { background-color: var(--brand) !important; }
.text-bg-client { background-color: #eaf0ff !important; color: #2451c2 !important; border: 1px solid #cfdcff; }
.text-primary { color: var(--brand) !important; }
.border-primary { border-color: var(--brand) !important; }

/* ---------- Nav pills (status filters) ---------- */
.nav-pills .nav-link {
  color: var(--muted);
  font-weight: 600;
  border-radius: .6rem;
}
.nav-pills .nav-link.active {
  background-color: var(--brand);
  color: #fff;
}

/* ---------- Comments / activity ---------- */
/* ---------- Activity thread ---------- */
.comment-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .85rem;
  box-shadow: 0 1px 3px rgba(16,24,40,.06);
  padding: 1rem 1.15rem;
  display: flex;
  gap: .85rem;
}
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .82rem;
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
}
.comment-avatar.state-done     { background: #bfe6cc; color: #175c33; }
.comment-avatar.state-declined { background: #fbd5d5; color: #8a2c2c; }
.comment-avatar.state-review   { background: #f9e6ae; color: #8a6512; }
.comment-avatar.state-approval { background: #d7deFA; color: #33409e; }
.comment-avatar.state-staged   { background: #e6d3f7; color: #5b2c93; }
.comment-avatar.state-hold     { background: #e2e4e8; color: #4b5563; }
.comment-body-wrap { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .3rem;
}
.comment-author { font-weight: 700; font-size: .9rem; }
.comment-event-label { font-weight: 500; color: var(--muted); }
.comment-time { font-size: .74rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.comment-text { font-size: .92rem; color: var(--ink); }

/* ---------- Attachments ---------- */
.thumb {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: .6rem;
  border: 1px solid var(--line);
  background: #fff;
}
.file-chip {
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #fff;
  padding: .4rem .7rem;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* ---------- Empty states ---------- */
.empty-state {
  border: 1.5px dashed #d3d7de;
  border-radius: 1rem;
  background: #fff;
}

/* ---------- Review banner (dashboard "waiting on your review") ---------- */
.review-banner {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fffdf5 100%);
  border-radius: 1rem;
}
.review-banner h6 {
  font-weight: 800;
}

/* ---------- New-activity badge (dashboard) + info banner (project page) ---------- */
.activity-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  z-index: 2;
  background: #e0393f;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: .25rem .6rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(224,57,63,.4);
}
.info-banner {
  border: 1px solid #c9d3f7;
  background: linear-gradient(180deg, #eef1fd 0%, #f5f7fe 100%);
  border-radius: 1rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-weight: 500; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: .55rem;
  border-color: var(--line);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(15,122,99,.15);
}

/* ---------- Modals ---------- */
.modal-content {
  border-radius: 1rem;
  border: none;
}
.modal-header, .modal-footer {
  border-color: var(--line);
}
