@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

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

:root {
  --navy:        #0f1e35;
  --navy-mid:    #162844;
  --navy-light:  #1e3558;
  --navy-panel:  #243f66;
  --gold:        #c5933a;
  --gold-light:  #d9aa58;
  --gold-pale:   #efd898;
  --gold-line:   rgba(197,147,58,0.22);
  --white:       #ffffff;
  --off-white:   #f7f4ef;
  --surface:     #f2efe9;
  --text:        #1a1a1a;
  --text-mid:    #4a4a4a;
  --text-muted:  #7a7a7a;
  --green:       #2e7d52;
  --green-bg:    rgba(46,125,82,0.10);
  --amber:       #b35c00;
  --amber-bg:    rgba(179,92,0,0.10);
  --blue-tag:    #1a4a7a;
  --blue-tag-bg: rgba(26,74,122,0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', system-ui, sans-serif;
  --sidebar-w: 228px;
  --header-h:  60px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 0.88rem; color: var(--text); background: var(--surface); -webkit-font-smoothing: antialiased; display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  border-right: 1px solid var(--gold-line);
}

.sidebar-brand {
  padding: 1.4rem 1.4rem 1rem;
  border-bottom: 1px solid var(--gold-line);
}
.sidebar-brand .b-logo {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.sidebar-brand .b-sub {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
}

.sidebar-estate {
  padding: 1rem 1.4rem 0.85rem;
  border-bottom: 1px solid var(--gold-line);
}
.estate-label {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.3rem;
}
.estate-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
}
.estate-meta {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 0.75rem 1.4rem 0.35rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}
.nav-link:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--gold-light); border-left-color: var(--gold); background: rgba(197,147,58,0.07); }
.nav-link svg { opacity: 0.7; flex-shrink: 0; }
.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--gold-line);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}
.sidebar-footer strong { color: rgba(255,255,255,0.55); display: block; margin-bottom: 2px; }

/* ── MAIN SHELL ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.page-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--navy);
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.status-badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.75rem;
  border-radius: 2px;
}
.badge-active { background: var(--green-bg); color: var(--green); }
.badge-readonly { background: var(--amber-bg); color: var(--amber); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-panel);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 500; color: var(--gold-light);
  border: 1px solid var(--gold-line);
}

.content { padding: 2rem; flex: 1; }

/* ── SUMMARY STRIP ── */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}
.summary-card {
  background: var(--white);
  padding: 1.25rem 1.5rem;
}
.sum-label {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.sum-value {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--navy);
  line-height: 1;
}
.sum-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.sum-value.gold { color: var(--gold); }

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--navy);
}
.section-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-chip {
  font-size: 0.73rem;
  font-weight: 400;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--white);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
}
.filter-chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter-chip:hover:not(.active) { border-color: var(--navy); color: var(--navy); }

.filter-sep { width: 1px; height: 20px; background: rgba(0,0,0,0.12); }

/* ── INVENTORY GRID ── */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.item-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s;
}
.item-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.item-photo {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.item-photo-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-photo svg { opacity: 0.25; }

/* Photo color fills per category */
.photo-furniture { background: #e8e0d4; }
.photo-art       { background: #dde4ed; }
.photo-jewelry   { background: #ede8dd; }
.photo-silver    { background: #e4e6ea; }
.photo-china     { background: #edeae6; }
.photo-rug       { background: #e6e0d6; }
.photo-firearm   { background: #dde4db; }
.photo-watch     { background: #e4e8ec; }
.photo-crystal   { background: #e8ecf0; }
.photo-clock     { background: #ece8e2; }
.photo-coin      { background: #ece4d4; }
.photo-document  { background: #ebebeb; }

.item-tag-row {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem 0;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}
.tag-julie { background: #f0e8f5; color: #7b2d9b; }
.tag-don   { background: #e8f0f5; color: #1a5c8a; }
.tag-andy  { background: #e8f5ee; color: #1a7a40; }
.tag-room  { background: #f5f1e8; color: #7a5c1a; }

.item-body { padding: 0.75rem 0.85rem 1rem; flex: 1; display: flex; flex-direction: column; }
.item-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 0.2rem;
  line-height: 1.25;
}
.item-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  flex: 1;
}
.item-valuation {
  border-top: 1px solid rgba(0,0,0,0.07);
  padding-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.val-block {}
.val-label { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.val-range { font-size: 0.82rem; font-weight: 500; color: var(--navy); }
.val-insurable { font-size: 0.82rem; font-weight: 500; color: var(--green); }

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.015);
}
.item-id { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--text-muted); font-family: monospace; }
.item-action {
  font-size: 0.68rem;
  color: var(--navy);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.item-action:hover { color: var(--gold); }

/* ── ROOM OVERVIEW ── */
.room-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.room-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 1.25rem;
}
.room-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 0.15rem;
}
.room-count { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 0.85rem; }
.room-bar-wrap { background: rgba(0,0,0,0.06); height: 4px; border-radius: 2px; margin-bottom: 0.65rem; }
.room-bar { height: 4px; border-radius: 2px; background: var(--gold); }
.room-total { font-size: 0.8rem; font-weight: 500; color: var(--navy); }
.room-total span { color: var(--text-muted); font-weight: 300; font-size: 0.72rem; }

/* ── CPA PANEL ── */
.cpa-banner {
  background: var(--amber-bg);
  border: 1px solid rgba(179,92,0,0.25);
  border-left: 3px solid var(--amber);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.8rem;
  color: var(--amber);
}
.cpa-banner svg { flex-shrink: 0; }
.cpa-banner strong { font-weight: 500; }

.cpa-table-wrap {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.cpa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.cpa-table thead th {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gold-line);
}
.cpa-table tbody tr { border-bottom: 1px solid rgba(0,0,0,0.06); }
.cpa-table tbody tr:last-child { border-bottom: none; }
.cpa-table tbody tr:hover { background: rgba(0,0,0,0.015); }
.cpa-table td { padding: 0.75rem 1rem; vertical-align: middle; color: var(--text); }
.cpa-table td.mono { font-family: monospace; font-size: 0.75rem; color: var(--text-muted); }
.cpa-table td.val { font-weight: 500; color: var(--navy); }
.cpa-table td.val-ins { font-weight: 500; color: var(--green); }
.cpa-table tfoot td {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-top: 2px solid rgba(0,0,0,0.1);
  font-weight: 500;
  color: var(--navy);
}
.cpa-table tfoot td.val { font-size: 1rem; color: var(--navy); }
.cpa-table tfoot td.val-ins { font-size: 1rem; color: var(--green); }

.category-pill {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  background: rgba(0,0,0,0.06);
  color: var(--text-mid);
  display: inline-block;
}

/* ── NOTES / COMMENTS ── */
.comment-list { display: flex; flex-direction: column; gap: 0.85rem; }
.comment {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.07);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 600; color: var(--white);
}
.av-julie { background: #7b2d9b; }
.av-don   { background: #1a5c8a; }
.av-andy  { background: #1a7a40; }
.av-cpa   { background: var(--navy); }
.comment-body {}
.comment-meta { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.comment-meta strong { color: var(--text-mid); font-weight: 500; }
.comment-text { font-size: 0.8rem; color: var(--text); line-height: 1.55; }

/* ── TWO COL ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.panel {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 1.25rem;
}
.panel-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.78rem;
}
.timeline-item:last-child { border-bottom: none; }
.tl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0; margin-top: 5px;
}
.tl-dot.green { background: var(--green); }
.tl-dot.blue  { background: var(--blue-tag); }
.tl-text { color: var(--text-mid); line-height: 1.5; }
.tl-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 1px; }

/* ── FAMILY TAGS PANEL ── */
.family-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.family-member:last-child { border-bottom: none; }
.fm-info { display: flex; align-items: center; gap: 0.6rem; }
.fm-name { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.fm-role { font-size: 0.68rem; color: var(--text-muted); }
.fm-stat { font-size: 0.75rem; font-weight: 500; color: var(--navy); text-align: right; }
.fm-stat span { display: block; font-size: 0.65rem; font-weight: 300; color: var(--text-muted); }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: 0.73rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--navy); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: rgba(0,0,0,0.3); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-strip  { grid-template-columns: repeat(2, 1fr); }
  .room-grid      { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .inventory-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
}
