/* Cartfy V2 shell — slim sidebar + topbar shared across all internal screens */

.app { display: grid; grid-template-columns: 76px 1fr; height: 100vh; }

/* Sidebar */
.side {
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0; gap: 6px;
}
.side .mark {
  width: 40px; height: 40px; border-radius: 11px; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; font-style: italic; letter-spacing: -.04em;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px -6px rgba(30,102,224,.55);
}
.side .mark::before { content: "C"; }
.nav-i {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--faded); cursor: pointer; position: relative;
  transition: all .12s;
}
.nav-i .ic { width: 20px; height: 20px; }
.nav-i:hover { background: var(--inset); color: var(--ink-2); }
.nav-i:hover::after, .nav-i.tip:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: #0B1530; color: #fff; font-size: 11.5px; font-weight: 500;
  padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(11,21,48,.18);
}
.nav-i.active { background: var(--royal-50); color: var(--royal); }
.nav-i.active::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 4px; background: var(--royal);
}
.nav-i .badge {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 999px; background: var(--teal);
}
.nav-i.copilot {
  background: linear-gradient(135deg, rgba(11,44,92,.04), rgba(45,212,191,.08));
}
.nav-i.copilot.active {
  background: var(--grad); color: #fff;
}
.nav-i.copilot.active::before { background: var(--teal); }
.side .sep { width: 28px; height: 1px; background: var(--line); margin: 8px 0; }
.side .bottom {
  margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.side .av-store {
  width: 36px; height: 36px; border-radius: 10px; background: var(--grad);
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* Main + topbar */
.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.topbar {
  height: 64px; padding: 0 28px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  flex: 0 0 64px;
}
.crumb-title { display: flex; flex-direction: column; line-height: 1.1; }
.crumb-title .l {
  font-size: 11.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600;
}
.crumb-title .t { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.global-search {
  margin-left: 14px;
  flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  background: var(--inset); border-radius: 11px; padding: 9px 12px;
  color: var(--faded); font-size: 13px; border: 1px solid transparent;
  cursor: pointer;
  transition: all .12s;
}
.global-search:hover { background: #F2F4FA; }
.global-search .ic { width: 16px; height: 16px; }
.global-search .k {
  margin-left: auto; font-size: 11px;
  border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px;
  background: #fff; font-family: var(--font-num);
}
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ic-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; position: relative;
}
.ic-btn:hover { background: var(--inset); color: var(--ink); }
.ic-btn .ic { width: 18px; height: 18px; }
.ic-btn .dot-on {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 999px; background: var(--teal);
  border: 2px solid #fff;
}
.ai-launcher {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px 7px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; cursor: pointer;
  background: var(--grad); color: #fff;
  border: 0;
  box-shadow: 0 4px 12px -4px rgba(30,102,224,.5);
}
.ai-launcher .ic { width: 14px; height: 14px; color: #fff; }
.ai-launcher .k {
  font-size: 10.5px; opacity: .8; border: 1px solid rgba(255,255,255,.25);
  padding: 1px 4px; border-radius: 4px; font-family: var(--font-num);
  margin-left: 4px;
}
.av-user {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--royal-100); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
}

/* Section heading helpers reused across screens */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; font-weight: 650; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { all: unset; padding: 6px 12px; border-radius: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 550; }
.seg button.on { background: var(--navy); color: #fff; }

.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
}
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.card-h .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-h .right { display: flex; align-items: center; gap: 8px; }
