/* Crow Mockup 1 — Modern SaaS Dashboard */
:root {
  --crow-ink: #0a0a0a;
  --crow-ink-2: #1a1a1a;
  --crow-mute: #6b7280;
  --crow-mute-2: #9ca3af;
  --crow-line: #e5e7eb;
  --crow-line-2: #f1f3f5;
  --crow-bg: #fafafa;
  --crow-card: #ffffff;
  --crow-blue: #95dfe3;
  --crow-blue-deep: #1e8a8f;
  --crow-blue-soft: #e8fafb;
}
* { box-sizing: border-box; }
html, body { background: var(--crow-bg); color: var(--crow-ink); font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
.font-display { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.02em; }

/* Layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } .sidebar { display:none; } }

.sidebar {
  background: #fff; border-right: 1px solid var(--crow-line); padding: 22px 16px;
  position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto;
}
.sidebar__brand { display:flex; align-items:center; gap:10px; padding: 4px 10px 18px; }
.sidebar__brand img { height: 34px; }
.sidebar__group { margin-top: 18px; }
.sidebar__group h6 { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--crow-mute); margin: 0 12px 6px; font-weight:600; }
.nav__item {
  display:flex; align-items:center; gap:10px; padding: 9px 12px; border-radius: 10px;
  color: #374151; font-size: 14px; font-weight: 500; transition: all .15s ease;
  border: 1px solid transparent;
}
.nav__item:hover { background: var(--crow-line-2); color: #111; }
.nav__item.is-active { background: var(--crow-ink); color: #fff; }
.nav__item.is-active .nav__icon { color: var(--crow-blue); }
.nav__icon { width: 18px; height: 18px; opacity: .85; flex-shrink:0; }

/* Main */
.main { min-width: 0; }
.topbar {
  display:flex; align-items:center; justify-content:space-between; padding: 18px 28px;
  border-bottom: 1px solid var(--crow-line); background: #fff;
}
.topbar h1 { margin:0; font-size: 22px; font-weight: 700; letter-spacing:-.02em; }
.topbar__crumb { font-size:12px; color: var(--crow-mute); margin-bottom: 4px; text-transform: uppercase; letter-spacing:.1em; }
.topbar__actions { display:flex; align-items:center; gap: 10px; }
.search { display:flex; align-items:center; background:#f3f4f6; border-radius:10px; padding:8px 12px; gap:8px; min-width: 240px; }
.search input { background:none; border:none; outline:none; font-size:13px; width:100%; color:#111; }
.icon-btn { width:38px; height:38px; border-radius:10px; border:1px solid var(--crow-line); background:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; position:relative; }
.icon-btn .badge { position:absolute; top:-3px; right:-3px; background:#ef4444; color:#fff; font-size:10px; padding: 1px 5px; border-radius:999px; line-height:1.4; }
.avatar { width:36px; height:36px; border-radius:50%; background: linear-gradient(135deg, #95dfe3, #1e8a8f); color:#0a0a0a; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; }

.content { padding: 28px; }

/* Cards */
.card { background:#fff; border:1px solid var(--crow-line); border-radius: 16px; }
.card__head { padding: 18px 20px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--crow-line-2); }
.card__head h3 { margin:0; font-size:14px; font-weight:600; letter-spacing:-.01em; }
.card__head small { color: var(--crow-mute); font-size:12px; }
.card__body { padding: 18px 20px; }

/* Stat */
.stat { background:#fff; border:1px solid var(--crow-line); border-radius:16px; padding: 18px 20px; }
.stat__label { font-size:12px; color:var(--crow-mute); text-transform: uppercase; letter-spacing:.08em; font-weight:500; }
.stat__val { font-size: 28px; font-weight:700; letter-spacing:-.02em; margin-top:4px; }
.stat__delta { display:inline-flex; align-items:center; gap:4px; font-size:12px; padding: 2px 8px; border-radius: 999px; margin-top:6px; }
.stat__delta.up { background: #ecfdf5; color:#047857; }
.stat__delta.dn { background: #fef2f2; color:#b91c1c; }
.stat__delta.flat { background: #f3f4f6; color: #6b7280; }

/* Pills */
.pill { display:inline-flex; align-items:center; gap:6px; padding: 3px 9px; border-radius:999px; font-size:11px; font-weight:600; letter-spacing:.02em; }
.pill--blue { background: var(--crow-blue-soft); color: var(--crow-blue-deep); }
.pill--ink { background: var(--crow-ink); color: var(--crow-blue); }
.pill--green { background: #ecfdf5; color:#047857; }
.pill--amber { background: #fffbeb; color:#b45309; }
.pill--red   { background: #fef2f2; color:#b91c1c; }
.pill--gray  { background: #f3f4f6; color:#374151; }

/* Buttons */
.btn { display:inline-flex; align-items:center; gap:8px; padding: 10px 16px; border-radius:10px; font-size:13px; font-weight:600; border:1px solid transparent; cursor:pointer; transition: all .15s; }
.btn--primary { background: var(--crow-ink); color:#fff; }
.btn--primary:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--crow-ink); border-color: var(--crow-line); }
.btn--ghost:hover { background: var(--crow-line-2); }
.btn--accent { background: var(--crow-blue); color: var(--crow-ink); }

/* Table */
.table { width:100%; border-collapse: separate; border-spacing:0; font-size:13px; }
.table th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--crow-mute); padding: 10px 16px; background:#fafafa; border-bottom:1px solid var(--crow-line); font-weight:600; }
.table td { padding: 14px 16px; border-bottom:1px solid var(--crow-line-2); vertical-align: middle; }
.table tr:hover td { background: #fafafa; }
.table .num { font-variant-numeric: tabular-nums; font-weight:600; }

/* Misc */
.divider { height:1px; background: var(--crow-line); margin: 14px 0; }
.dot { width:8px; height:8px; border-radius:50%; }
.dot.blue { background: var(--crow-blue); }
.dot.green { background:#10b981; }
.dot.amber { background:#f59e0b; }
.dot.red { background:#ef4444; }
.dot.gray { background:#9ca3af; }
.kbd { font-family: ui-monospace, SFMono-Regular, monospace; font-size:11px; padding: 2px 6px; background:#f3f4f6; border:1px solid var(--crow-line); border-radius:6px; color:#6b7280; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content:''; position:absolute; left:7px; top:6px; bottom:6px; width:2px; background: var(--crow-line); }
.timeline__item { position: relative; padding-bottom: 16px; }
.timeline__item::before { content:''; position:absolute; left:-22px; top:6px; width:12px; height:12px; border-radius:50%; background:#fff; border:2px solid var(--crow-blue); }

.progress { background:#f3f4f6; border-radius:999px; height:6px; overflow:hidden; }
.progress > span { display:block; height:100%; background: linear-gradient(90deg, var(--crow-blue), var(--crow-blue-deep)); border-radius:999px; }

/* ===== Detail-view styles ===== */

/* Breadcrumb (sits inside .topbar in detail pages) */
.bcrumb { display:flex; align-items:center; gap:8px; font-size:12px; color: var(--crow-mute); flex-wrap:wrap; }
.bcrumb a { color: var(--crow-mute); }
.bcrumb a:hover { color: var(--crow-ink); text-decoration: underline; }
.bcrumb .sep { color: var(--crow-mute-2); }
.bcrumb .here { color: var(--crow-ink); font-weight:500; }

/* Detail hero (full-bleed top of detail page) */
.detail-hero {
  background: #fff; border:1px solid var(--crow-line); border-radius:16px;
  padding: 26px 28px; margin-bottom: 16px;
  display:grid; grid-template-columns: 1fr auto; gap: 20px; align-items:flex-start;
}
.detail-hero__title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 8px; }
.detail-hero__sub { color: var(--crow-mute); font-size:14px; }
.detail-hero__pills { display:flex; gap:6px; flex-wrap:wrap; margin-top: 10px; }
.detail-hero__actions { display:flex; gap:8px; flex-wrap:wrap; }
.detail-hero__avatar {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--crow-ink), #2a2a2a);
  color: var(--crow-blue);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 22px; letter-spacing: -.02em; flex-shrink: 0;
}
.detail-hero__left { display:flex; gap:18px; align-items:flex-start; }
@media (max-width: 720px) {
  .detail-hero { grid-template-columns: 1fr; padding: 20px; }
  .detail-hero__title { font-size: 22px; }
}

/* Tabs */
.tabs {
  display:flex; gap:4px; border-bottom: 1px solid var(--crow-line);
  margin-bottom: 18px; overflow-x: auto;
}
.tabs a {
  padding: 10px 16px; font-size:13px; color: var(--crow-mute); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--crow-ink); }
.tabs a.is-active { color: var(--crow-ink); border-bottom-color: var(--crow-ink); font-weight: 600; }
.tabs__count { font-size: 11px; padding: 1px 7px; background: var(--crow-line-2); color: var(--crow-mute); border-radius: 999px; margin-left: 6px; font-weight: 600; }

/* Detail grid (main + side rail) */
.detail-grid { display:grid; grid-template-columns: 1fr 320px; gap:16px; align-items:flex-start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid__main { display:flex; flex-direction:column; gap:16px; min-width:0; }
.detail-grid__rail { display:flex; flex-direction:column; gap:16px; }

/* Key/value meta rows */
.meta { display:grid; grid-template-columns: 140px 1fr; gap: 4px 16px; font-size:13px; }
.meta dt { color: var(--crow-mute); padding: 8px 0; border-bottom: 1px solid var(--crow-line-2); }
.meta dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--crow-line-2); color: var(--crow-ink); font-weight: 500; }
.meta dt:last-of-type, .meta dd:last-of-type { border-bottom: none; }

/* Stat tiles inline (smaller than .stat) */
.tile { background: var(--crow-line-3, #f1f3f5); border-radius: 10px; padding: 12px 14px; }
.tile__label { font-size: 10px; color: var(--crow-mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tile__val { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }

/* Run-of-show / linear timeline */
.ros { display:flex; flex-direction:column; }
.ros__item {
  display:grid; grid-template-columns: 86px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--crow-line-2);
}
.ros__item:last-child { border-bottom: none; }
.ros__time { font-variant-numeric: tabular-nums; font-weight: 700; font-size:14px; color: var(--crow-ink); padding-top: 1px; }
.ros__time small { display:block; font-size:11px; color: var(--crow-mute); font-weight:500; text-transform:uppercase; letter-spacing:.06em; margin-top: 2px; }
.ros__what { font-weight: 600; font-size: 14px; }
.ros__notes { color: var(--crow-mute); font-size: 12px; margin-top: 2px; }

/* Activity feed (compact) */
.feed { display:flex; flex-direction:column; }
.feed__item { display:grid; grid-template-columns: 18px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--crow-line-2); align-items:flex-start; }
.feed__item:last-child { border-bottom: none; }
.feed__dot { width:8px; height:8px; border-radius:50%; margin-top:6px; }
.feed__when { font-size: 11px; color: var(--crow-mute); white-space: nowrap; }
.feed__what { font-size: 13px; color: var(--crow-ink); }
.feed__sub { font-size: 12px; color: var(--crow-mute); margin-top: 2px; }

/* Files list */
.files { display:flex; flex-direction:column; }
.files__item {
  display:grid; grid-template-columns: 32px 1fr auto auto; gap:12px; align-items:center;
  padding: 10px 0; border-bottom: 1px solid var(--crow-line-2);
}
.files__item:last-child { border-bottom: none; }
.files__icon { width: 32px; height: 36px; border: 1px solid var(--crow-line); border-radius: 4px; display:flex; align-items:center; justify-content:center; font-size:9px; font-weight: 700; color: var(--crow-mute); background: var(--crow-line-3, #f1f3f5); }
.files__name { font-size: 13px; font-weight: 500; }
.files__size { font-size: 11px; color: var(--crow-mute); }
.files__act { font-size: 12px; color: var(--crow-blue-deep); font-weight: 600; }

/* Generic 50/50 split inside cards */
.split-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .split-2 { grid-template-columns: 1fr; } }

/* Photo placeholder (gradient blocks for thumbnails) */
.thumb { aspect-ratio: 4/3; border-radius: 10px; display:flex; align-items:flex-end; padding: 10px; font-size: 11px; font-weight: 600; }

/* Mobile menu trigger */
.mobile-menu { display:none; }
@media (max-width: 900px) {
  .mobile-menu { display:flex; align-items:center; gap:10px; padding: 10px 16px; background:#fff; border-bottom:1px solid var(--crow-line); position:sticky; top:52px; z-index: 50; }
  .mobile-menu img { height: 26px; }
  .topbar { padding: 14px 16px; }
  .content { padding: 16px; }
  .search { display:none; }
  .topbar h1 { font-size: 18px; }
}
