/*
 * A4B Relationship Hub - readable application stylesheet
 *
 * Sections:
 *  1. Tokens and global defaults
 *  2. Application shell and navigation
 *  3. Page layout, forms, tables, and cards
 *  4. Dashboard and reports
 *  5. Pipeline and detail views
 *  6. Dialogs and edit forms
 *  7. Sign-in page
 *  8. Notifications
 *  9. Responsive behavior
 * 10. v0.4 branding, user photos, and Account logos
 * 11. v0.5 full-page Account records and image discovery
 *
 * Edit the existing selectors here; no build step or CSS preprocessor is required.
 */

/* 1. Design tokens and base elements */
:root {
  --navy: #111e31;
  --navy2: #182a44;
  --blue: #478af7;
  --blue2: #236bde;
  --teal: #158c83;
  --tealbg: #e8f8f4;
  --amber: #ce8746;
  --amberbg: #fff2e5;
  --red: #d95656;
  --redbg: #fff1f0;
  --ink: #1b2a41;
  --secondary: #6e7d90;
  --faint: #a0adba;
  --line: #e7ecf2;
  --bg: #f4f7fb;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 3px 20px rgba(25,51,80,.045);
  font-family: Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-synthesis: none;
  color: var(--ink);
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

html,body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
}

button,input,select,textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--blue2);
}

:focus-visible {
  outline: 3px solid #9fc0ff;
  outline-offset: 2px;
}

svg {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none!important;
}

.muted {
  color: var(--secondary);
}

.tiny {
  font-size: 11px;
}

.small {
  font-size: 12px;
}

.medium {
  font-size: 13px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--secondary);
}

.mono {
  font-variant-numeric: tabular-nums;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtle {
  color: var(--faint);
}

/* ============================================================
   2. Application shell, navigation, and topbar
   ============================================================ */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0,1fr);
}

.sidebar {
  background: var(--navy);
  color: #abb9cc;
  padding: 26px 15px 17px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  padding: 0 12px 30px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg,#4389f5,#69b3ff);
  display: grid;
  place-items: center;
  color: white;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 8px 24px rgba(73,146,253,.18);
}

.brand-heading {
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.brand-sub {
  color: #8d9cb1;
  font-size: 10px;
  margin-top: 3px;
  letter-spacing: .08em;
}

.nav-caption {
  padding: 12px 14px 8px;
  font-size: 10px;
  letter-spacing: .15em;
  color: #687d98;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-item {
  border: 0;
  background: none;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  color: #aabbd0;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  transition: .15s;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.nav-item:hover {
  background: #1d314d;
  color: white;
}

.nav-item.active {
  background: #27496d;
  color: #fff;
  box-shadow: inset 3px 0 #65a4ff;
}

.nav-item.active svg {
  color: #79b7ff;
}

.side-bottom {
  margin-top: auto;
  padding-top: 30px;
}

.side-divider {
  border-top: 1px solid #2a3c54;
  margin: 12px 8px 18px;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
}

.avatar {
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #dfebff;
  color: #2164b8;
  font-size: 12px;
  font-weight: 800;
  flex: none;
}

.side-user .avatar {
  background: #304967;
  color: #e4edff;
}

.side-user strong {
  display: block;
  color: #f1f6ff;
  font-size: 12px;
}

.side-user span {
  display: block;
  color: #8293ae;
  font-size: 10px;
  margin-top: 3px;
}

.side-logout {
  border: 0;
  color: #809ab6;
  padding: 8px 12px;
  background: none;
  text-align: left;
  font-size: 12px;
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
}

.side-logout:hover {
  color: #fff;
}

.main {
  min-width: 0;
}

.topbar {
  height: 71px;
  background: white;
  border-bottom: 1px solid #e9eef4;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 37px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title {
  font-size: 14px;
  font-weight: 800;
  min-width: 134px;
  color: #233953;
}

.search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #8594a7;
  pointer-events: none;
}

.search-global {
  background: #f6f8fb;
  border: 1px solid #edf1f6;
  border-radius: 9px;
  width: 100%;
  padding: 10px 14px 10px 40px;
  color: var(--ink);
  font-size: 12px;
  outline: 0;
}

.search-global:focus {
  border-color: #92b8f7;
  background: white;
  box-shadow: 0 0 0 3px rgba(73,146,253,.08);
}

.top-shortcut {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 10px;
  background: #e9eef5;
  color: #8c9aad;
  border-radius: 4px;
  padding: 2px 5px;
}

.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 45;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 18px 38px rgba(19,35,54,.15);
  padding: 8px;
  max-height: 340px;
  overflow: auto;
}

.search-item {
  padding: 9px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
}

.search-item:hover {
  background: #f1f6ff;
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-right .avatar {
  height: 31px;
  width: 31px;
}

.top-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

/* ============================================================
   3. Page layout, forms, tables, and reusable cards
   ============================================================ */

.page {
  max-width: 1550px;
  margin: auto;
  padding: 34px 38px 65px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 27px;
}

.page-head h1 {
  font-size: 26px;
  letter-spacing: -.05em;
  margin: 5px 0 7px;
  font-weight: 800;
  color: #1a2e49;
}

.page-head p {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.page-actions>* {
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  transition: .15s;
  min-height: 36px;
}

.btn:hover {
  background: var(--blue2);
  color: #fff;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-secondary {
  background: #fff;
  color: #33475e;
  border-color: #dfe7ef;
}

.btn-secondary:hover {
  background: #f5f8fc;
  color: #1e3b62;
  border-color: #bbd0e6;
}

.btn-quiet {
  background: transparent;
  color: #59718f;
}

.btn-quiet:hover {
  background: #e9f0f8;
  color: #203c5a;
}

.btn-sm {
  padding: 7px 11px;
  min-height: 30px;
  font-size: 11px;
}

.btn-outline-blue {
  border-color: #cfe1fe;
  background: #f5f9ff;
  color: #3476da;
}

.btn-outline-blue:hover {
  background: #e7f2ff;
  color: #1759be;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.iconbtn {
  height: 34px;
  width: 34px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #68819e;
}

.iconbtn:hover {
  background: #f4f8ff;
}

.iconbtn svg {
  height: 17px;
  width: 17px;
}

.pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  background: #edf3f9;
  border-radius: 100px;
  color: #4b617a;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.pill:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #829fb9;
}

.pill.client {
  background: #e8f9f3;
  color: #147b61;
}

.pill.client:before {
  background: #20a67a;
}

.pill.active {
  background: #e8f2ff;
  color: #2c73d8;
}

.pill.active:before {
  background: #5e9ffc;
}

.pill.target {
  background: #f0ecff;
  color: #7355b2;
}

.pill.target:before {
  background: #9b82d9;
}

.pill.archive {
  background: #fff0e3;
  color: #9c622c;
}

.pill.archive:before {
  background: #d99252;
}

.pill.done {
  background: #e3f6ec;
  color: #27825d;
}

.pill.done:before {
  background: #31a375;
}

.pill.high {
  background: #fff1ed;
  color: #bc5b41;
}

.pill.high:before {
  background: #d46a57;
}

.pill.proposal {
  background: #e7f2fe;
  color: #326caa;
}

.pill.won {
  background: #e5f6ec;
  color: #22794b;
}

.pill.lost {
  background: #fce9e9;
  color: #ac5d5d;
}

.pill.unknown {
  background: #f0f3f7;
  color: #8391a3;
}

.pill.lead {
  background: #fdf3dd;
  color: #947229;
}

/* ============================================================
   4. Dashboard, reports, and pipeline visualizations
   ============================================================ */

.kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 23px;
}

.kpi {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  padding: 20px 21px;
  box-shadow: var(--shadow);
  min-height: 135px;
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.kpi-label {
  font-size: 12px;
  color: #718197;
  font-weight: 650;
}

.kpi-icon {
  height: 36px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ecf4ff;
  color: #4787e5;
}

.kpi-icon.teal {
  background: #e7f7f4;
  color: #2b988d;
}

.kpi-icon.orange {
  background: #fff0e5;
  color: #dc9157;
}

.kpi-icon.purple {
  background: #f1ecff;
  color: #8064c1;
}

.kpi-icon svg {
  width: 18px;
  height: 18px;
}

.kpi-value {
  font-weight: 780;
  font-size: 30px;
  letter-spacing: -.055em;
  margin-top: 12px;
  color: #1c304c;
}

.kpi-foot {
  font-size: 10px;
  color: #93a0b1;
  margin-top: 7px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
}

.card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-pad {
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 22px;
  border-bottom: 1px solid #eff3f6;
  gap: 10px;
}

.card-head h2 {
  font-size: 14px;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 750;
}

.card-head small {
  color: #93a1b2;
  font-size: 11px;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 17px 0;
}

.chart-label {
  font-size: 12px;
  color: #617289;
  min-width: 86px;
}

.chart-meter {
  height: 8px;
  flex: 1;
  border-radius: 100px;
  background: #edf2f8;
  overflow: hidden;
}

.chart-meter>div {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg,#529cf6,#7cb8fa);
}

.chart-number {
  font-size: 12px;
  font-weight: 750;
  min-width: 23px;
  text-align: right;
}

.list-clean {
  padding: 0;
  margin: 0;
  list-style: none;
}

.list-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f0f3f6;
}

.list-row:last-child {
  border: 0;
}

.mini-icon {
  height: 33px;
  width: 33px;
  display: grid;
  place-items: center;
  background: #f1f6fc;
  border-radius: 9px;
  color: #4479bd;
  flex: none;
}

.mini-icon svg {
  width: 15px;
  height: 15px;
}

.list-row-main {
  flex: 1;
  min-width: 0;
}

.list-row-main strong {
  display: block;
  font-weight: 720;
  font-size: 12px;
}

.list-row-main span {
  display: block;
  margin-top: 5px;
  color: var(--secondary);
  font-size: 11px;
}

.list-row-tail {
  font-size: 10px;
  color: #9aa9b7;
  white-space: nowrap;
}

.insight-strip {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #dce9fe;
  background: #eef5ff;
  padding: 15px 18px;
  border-radius: 11px;
  margin-bottom: 22px;
}

.insight-strip svg {
  width: 22px;
  height: 22px;
  color: #427cce;
  flex: none;
}

.insight-strip strong {
  font-size: 12px;
}

.insight-strip p {
  font-size: 11px;
  color: #6483a9;
  margin: 4px 0 0;
  line-height: 1.6;
}

.link {
  font-size: 11px;
  color: var(--blue2);
  font-weight: 700;
  border: 0;
  background: transparent;
  padding: 3px;
}

.link:hover {
  text-decoration: underline;
}

.toolbar {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.input {
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: #253951;
  font-size: 12px;
  min-height: 37px;
  outline: 0;
  max-width: 100%;
}

.input:focus {
  border-color: #8bb4ee;
  box-shadow: 0 0 0 3px rgba(73,146,253,.09);
}

.input-search {
  width: 290px;
  max-width: 100%;
}

.select {
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  padding: 9px 30px 9px 10px;
  background: #fff;
  color: #465a75;
  min-height: 37px;
  font-size: 12px;
  outline: 0;
}

.select:focus {
  border-color: #8bb4ee;
}

.toolbar .spacer {
  flex: 1;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #e6edf3;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  background: none;
  color: #8997a9;
  font-size: 12px;
  padding: 13px 16px;
  font-weight: 650;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: #2b5080;
}

.tab.active {
  color: #2e72cf;
  border-bottom-color: #4992fd;
}

.table-wrap {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  overflow: auto;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}

th {
  background: #f9fbfd;
  color: #8997a8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .095em;
  font-weight: 800;
  white-space: nowrap;
  padding: 15px 18px;
  border-bottom: 1px solid #e8edf4;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f3f7;
  vertical-align: middle;
  font-size: 12px;
  color: #53647a;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f9fbfe;
}

.table-name {
  font-weight: 750;
  color: #283c57;
}

.table-name.clickable {
  cursor: pointer;
}

.table-name.clickable:hover {
  color: #2f7dda;
}

.company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-icon {
  height: 33px;
  width: 33px;
  border-radius: 9px;
  background: #eaf1fa;
  display: grid;
  place-items: center;
  color: #587ca5;
  flex: none;
}

.company-icon svg {
  width: 17px;
  height: 17px;
}

.table-secondary {
  color: #97a5b4;
  font-size: 10px;
  margin-top: 4px;
}

.pagination {
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #8996a6;
  background: #fff;
  border-top: 1px solid #edf2f7;
}

.pagination-actions {
  display: flex;
  gap: 7px;
}

.empty {
  text-align: center;
  padding: 60px 24px!important;
}

.empty-icon {
  height: 56px;
  width: 56px;
  background: #edf3f9;
  color: #9aafc7;
  display: grid;
  place-items: center;
  border-radius: 18px;
  margin: 0 auto 12px;
}

.empty-icon svg {
  width: 25px;
  height: 25px;
}

.empty h3 {
  font-size: 14px;
  color: #45566a;
  margin: 8px 0;
}

.empty p {
  font-size: 12px;
  color: #8b9bad;
  margin: 4px auto 15px;
  max-width: 380px;
  line-height: 1.7;
}

/* ============================================================
   5. Opportunity board and detailed data views
   ============================================================ */

.board {
  display: grid;
  grid-template-columns: repeat(4,minmax(240px,1fr));
  gap: 13px;
  overflow: auto;
  padding-bottom: 15px;
  align-items: start;
}

.board-col {
  background: #eff3f8;
  border: 1px solid #e6edf5;
  padding: 13px;
  border-radius: 12px;
  min-height: 240px;
}

.board-col.dragover {
  outline: 2px dashed #5299f7;
  outline-offset: -5px;
}

.board-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.board-col-name {
  font-size: 12px;
  font-weight: 760;
}

.board-counter {
  background: #dfe8f3;
  border-radius: 8px;
  padding: 3px 7px;
  color: #6f839e;
  font-size: 10px;
  font-weight: 750;
}

.deal-card {
  background: #fff;
  border: 1px solid #e1e8f0;
  border-radius: 9px;
  padding: 15px;
  box-shadow: 0 3px 8px rgba(22,43,73,.025);
  margin-bottom: 9px;
  cursor: pointer;
}

.deal-card:hover {
  border-color: #8db9fc;
  box-shadow: 0 6px 16px rgba(41,97,153,.09);
}

.deal-card h3 {
  font-size: 12px;
  margin: 0 0 7px;
  line-height: 1.4;
  color: #263a55;
}

.deal-account {
  font-size: 11px;
  color: #879bb0;
}

.deal-value {
  font-size: 16px;
  font-weight: 800;
  margin: 18px 0 12px;
  letter-spacing: -.03em;
}

.deal-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #97a4b4;
  font-size: 10px;
  border-top: 1px solid #eff2f6;
  padding-top: 10px;
}

.board .tag {
  font-size: 10px;
  color: #6c84a5;
  background: #eff5fa;
  padding: 4px 7px;
  border-radius: 6px;
}

.task-entry {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border: 1px solid #e7edf4;
  border-radius: 10px;
  padding: 16px;
  margin: 10px 0;
}

.task-check {
  appearance: none;
  height: 19px;
  width: 19px;
  border-radius: 6px;
  border: 1px solid #bdcde0;
  background: white;
  flex: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.task-check:checked {
  background: #358ddb;
  border-color: #358ddb;
}

.task-check:checked:after {
  content: '✓';
  color: white;
  font-weight: 800;
}

.task-details {
  flex: 1;
  min-width: 0;
}

.task-details strong {
  font-size: 12px;
  font-weight: 750;
}

.task-details .small {
  display: block;
  margin-top: 5px;
}

.task-entry.is-done strong {
  text-decoration: line-through;
  color: #99a5b6;
}

.due-late {
  color: #cf5353;
  font-size: 11px;
  font-weight: 760;
}

.due-soon {
  color: #a57a3b;
  font-size: 11px;
  font-weight: 700;
}

.due-normal {
  color: #93a3b4;
  font-size: 11px;
}

.timeline {
  position: relative;
  padding-left: 8px;
}

.timeline-item {
  display: flex;
  gap: 13px;
  padding: 12px 0 15px;
}

.timeline-icon {
  background: #e9f3fc;
  color: #5185ba;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  flex: none;
}

.timeline-icon svg {
  width: 16px;
  height: 16px;
}

.timeline-item:not(:last-child) .timeline-icon:after {
  content: "";
  position: absolute;
  top: 34px;
  left: 15px;
  height: calc(100% + 8px);
  width: 1px;
  background: #e6edf4;
  z-index: -1;
}

.timeline-content {
  flex: 1;
  border-bottom: 1px solid #edf2f6;
  padding-bottom: 14px;
  min-width: 0;
}

.timeline-content strong {
  font-size: 12px;
}

.timeline-content p {
  font-size: 12px;
  line-height: 1.6;
  color: #66798f;
  margin: 8px 0;
}

.timeline-meta {
  font-size: 10px;
  color: #9aa6b6;
  margin-top: 5px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.bar-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.bar-line .name {
  width: 145px;
  flex: none;
  color: #738197;
  font-size: 11px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.bar-line .bar {
  height: 10px;
  border-radius: 20px;
  background: #eaf0f7;
  flex: 1;
  overflow: hidden;
}

.bar-line .bar>span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,#3b8af5,#87b9ff);
  border-radius: 20px;
}

.bar-line .number {
  width: 30px;
  font-weight: 800;
  color: #445870;
  font-size: 11px;
  text-align: right;
}

.reports-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.summary-metric strong {
  display: block;
  font-size: 24px;
  letter-spacing: -.035em;
}

.summary-metric span {
  font-size: 11px;
  color: #899aaa;
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 17px;
}

.campaign-card {
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.campaign-card:hover {
  border-color: #adcaee;
}

.campaign-card strong {
  display: block;
  font-size: 14px;
  margin: 12px 0 7px;
}

.campaign-card p {
  font-size: 12px;
  color: #8292a6;
  line-height: 1.55;
  height: 55px;
  overflow: hidden;
}

.campaign-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #90a0b3;
  font-size: 11px;
}

.upload-zone {
  border: 2px dashed #d6e3f2;
  border-radius: 13px;
  padding: 33px;
  text-align: center;
  background: #fafcff;
}

.upload-zone svg {
  margin: 0 auto 12px;
  color: #7dacf1;
  width: 30px;
  height: 30px;
}

.upload-zone strong {
  display: block;
  font-size: 14px;
}

.upload-zone p {
  font-size: 12px;
  color: #899bb1;
  line-height: 1.7;
}

.upload-zone input {
  max-width: 100%;
  font-size: 12px;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.preview-metrics>div {
  background: #f4f8fe;
  padding: 14px;
  border-radius: 8px;
}

.preview-metrics strong {
  display: block;
  font-size: 23px;
}

.preview-metrics span {
  font-size: 10px;
  color: #839ab2;
}

.caution {
  padding: 13px 15px;
  background: #fff7ec;
  border: 1px solid #f4dfc7;
  border-radius: 10px;
  font-size: 12px;
  color: #976e3c;
  line-height: 1.6;
}

.success-note {
  padding: 13px 15px;
  background: #eafaef;
  border: 1px solid #caebd9;
  border-radius: 10px;
  font-size: 12px;
  color: #42765b;
  line-height: 1.6;
}

/* ============================================================
   6. Dialogs, edit forms, and record details
   ============================================================ */

.modal-shade {
  position: fixed;
  inset: 0;
  background: rgba(13,24,39,.54);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal {
  background: white;
  border-radius: 16px;
  max-height: 91vh;
  overflow: auto;
  box-shadow: 0 22px 80px rgba(13,33,58,.24);
  width: min(650px,100%);
}

.modal.wide {
  width: min(850px,100%);
}

.modal-head {
  padding: 23px 26px 17px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #edf0f4;
}

.modal-head h2 {
  font-size: 18px;
  letter-spacing: -.03em;
  margin: 0;
}

.modal-head p {
  font-size: 11px;
  color: #8395ab;
  margin: 6px 0 0;
}

.modal-body {
  padding: 23px 26px;
}

.modal-actions {
  padding: 16px 26px;
  border-top: 1px solid #edf0f4;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1/-1;
}

.field label {
  font-size: 11px;
  font-weight: 750;
  color: #526780;
}

.field .input,.field .select {
  width: 100%;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field .help {
  font-size: 10px;
  color: #97a6b6;
}

.panel-sub {
  font-size: 10px;
  font-weight: 800;
  color: #7489a2;
  text-transform: uppercase;
  letter-spacing: .11em;
  margin: 19px 0 8px;
}

.detail-heading {
  font-size: 17px;
  margin: 0 0 5px;
}

.detail-kv {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.detail-kv>div {
  border: 1px solid #ebf0f6;
  border-radius: 9px;
  padding: 11px 14px;
}

.detail-kv label {
  font-size: 10px;
  color: #94a4b5;
  display: block;
  margin-bottom: 5px;
}

.detail-kv strong {
  font-size: 12px;
  color: #39516b;
  font-weight: 670;
}

.detail-list {
  border: 1px solid #edf1f5;
  border-radius: 10px;
  overflow: hidden;
}

.detail-list>div {
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f5;
  font-size: 12px;
}

.detail-list>div:last-child {
  border-bottom: 0;
}

.detail-list strong {
  display: block;
  margin-bottom: 5px;
}

.detail-list span {
  color: #92a4b5;
  font-size: 11px;
}

.detail-empty {
  font-size: 12px;
  color: #93a4b5;
  padding: 17px;
}

.detail-txt {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.75;
  color: #697d92;
}

/* ============================================================
   7. Sign-in page
   ============================================================ */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(290px,1fr) minmax(300px,1fr);
  background: #fff;
}

.login-art {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg,#0b1c34,#162f51 70%,#1b426b);
  color: #fff;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-art:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%,rgba(73,146,253,.29),transparent 32%),radial-gradient(circle at 10% 92%,rgba(69,196,189,.14),transparent 25%);
  pointer-events: none;
}

.login-art:after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(117,172,250,.11);
  border-radius: 50%;
  top: 20%;
  left: 20%;
  box-shadow: 0 0 0 65px rgba(85,154,235,.025),0 0 0 130px rgba(85,154,235,.022);
}

.login-art>* {
  position: relative;
  z-index: 1;
}

.login-art .brand {
  padding: 0;
}

.login-text {
  max-width: 480px;
}

.login-text h1 {
  font-size: 44px;
  line-height: 1.13;
  letter-spacing: -.06em;
  max-width: 420px;
  margin: 0 0 22px;
}

.login-text p {
  font-size: 15px;
  line-height: 1.8;
  color: #a8bdd8;
  max-width: 440px;
}

.login-foot {
  font-size: 11px;
  color: #7b98b9;
}

.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-form {
  width: min(392px,100%);
}

.login-form h2 {
  font-size: 28px;
  letter-spacing: -.045em;
  margin: 0 0 8px;
}

.login-form p {
  font-size: 13px;
  color: #8091a5;
  margin: 0 0 32px;
  line-height: 1.6;
}

.login-form .field {
  margin: 0 0 18px;
}

.login-form .input {
  font-size: 13px;
  padding: 13px 14px;
}

.login-form .btn {
  padding: 14px;
  font-size: 13px;
  margin-top: 8px;
}

.login-error {
  margin-bottom: 15px;
  padding: 10px 12px;
  background: #fff0f0;
  color: #af4e4e;
  border-radius: 9px;
  font-size: 12px;
}

.login-note {
  margin-top: 26px;
  font-size: 11px;
  color: #97a4b3;
  line-height: 1.7;
}

/* ============================================================
   8. Notifications and toasts
   ============================================================ */

.toast {
  position: fixed;
  right: 24px;
  bottom: 22px;
  background: #152e4b;
  color: #f1f6ff;
  font-weight: 600;
  border-radius: 10px;
  padding: 13px 17px;
  box-shadow: 0 13px 33px rgba(22,44,78,.22);
  z-index: 120;
  max-width: 360px;
  font-size: 12px;
  line-height: 1.5;
}

.toast.error {
  background: #b34444;
}

.toast.success {
  background: #1b746a;
}

/* ============================================================
   9. Responsive behavior
   ============================================================ */

@media(max-width:1180px) {
  .shell {
    grid-template-columns: 205px minmax(0,1fr);
  }
  .page {
    padding: 25px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  .kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .campaign-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .board {
    grid-template-columns: repeat(4,minmax(210px,1fr));
  }
}

@media(max-width:780px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 12px;
    overflow: visible;
  }
  .brand {
    padding: 2px 8px 12px;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
  }
  .nav-caption,.side-bottom {
    display: none;
  }
  .nav-item {
    width: auto;
    flex: none;
    font-size: 11px;
    padding: 8px;
  }
  .nav-item svg {
    width: 15px;
    height: 15px;
  }
  .main {
    width: 100%;
  }
  .topbar {
    height: 60px;
    padding: 0 17px;
    gap: 8px;
  }
  .topbar-title {
    display: none;
  }
  .top-right {
    display: none;
  }
  .page {
    padding: 20px 15px 40px;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 15px;
    min-height: 115px;
  }
  .kpi-value {
    font-size: 26px;
  }
  .two-col,.report-grid,.campaign-grid {
    grid-template-columns: 1fr;
  }
  .board {
    grid-template-columns: repeat(4,minmax(200px,1fr));
  }
  .table-wrap {
    overflow: auto;
  }
  .input-search {
    width: 180px;
    flex: 1;
  }
  .toolbar {
    gap: 7px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .modal-shade {
    padding: 9px;
  }
  .modal-head,.modal-body,.modal-actions {
    padding-left: 17px;
    padding-right: 17px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-form-wrap {
    min-height: 100vh;
  }
  .detail-kv {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   10. v0.4 branding and image upload controls
   ============================================================ */

/* v0.4 - Brand logos on sign-in and navigation */
.brand-mark-image {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  flex: none;
  width: 42px;
  height: 42px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.login-art .brand-logo {
  width: 56px;
  height: 56px;
}

.login-art .brand-mark-image {
  width: 56px;
  height: 56px;
}

.login-form .brand-logo {
  width: 48px;
  height: 48px;
}

.login-form .brand-mark-image {
  width: 48px;
  height: 48px;
}

/* v0.4 - User profile photo in Settings and navigation */
.avatar-photo {
  object-fit: cover;
  display: block;
  background: #d9e9fa;
  border: 1px solid #d8e4f3;
}

.avatar-settings {
  width: 96px;
  height: 96px;
  flex: none;
  border: 3px solid #e7f1fc;
  box-shadow: 0 5px 18px rgba(25,51,80,.12);
}

.profile-photo-editor {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.photo-editor-controls {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 9px;
}

.photo-editor-controls>strong,.account-logo-controls>strong {
  color: #213856;
  font-size: 13px;
}

.photo-editor-controls p,.account-logo-controls p {
  margin: 0;
}

.visually-hidden {
  position: absolute!important;
  overflow: hidden!important;
  clip: rect(0 0 0 0)!important;
  white-space: nowrap!important;
  clip-path: inset(50%)!important;
  width: 1px!important;
  height: 1px!important;
  padding: 0!important;
  border: 0!important;
}

.settings-heading {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}

.settings-security {
  margin-top: 18px;
}

.settings-notice {
  margin-top: 18px;
}

/* v0.4 - Account logos in the directory and Account details */
.company-icon {
  overflow: hidden;
  flex: none;
}

.company-icon .account-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain; 
}

.account-logo-img {
  display: block;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.account-logo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #5798ed;
}

.account-logo-editor {
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 15px;
  margin: 0 0 18px;
  border: 1px solid #e3eaf3;
  border-radius: 11px;
  background: #f8fbff;
}

.account-logo-tile {
  flex: none;
  width: 90px;
  height: 90px;
  border: 1px solid #dde7f2;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.account-logo-tile .account-logo-img {
  width: 100%;
  height: 100%;
  padding: 8px;
}

.account-logo-large {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.account-logo-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

@media(max-width:480px) {
  .profile-photo-editor,.account-logo-editor {
    align-items: flex-start;
    gap: 12px;
  }
  .avatar-settings {
    width: 72px;
    height: 72px;
  }
  .account-logo-tile {
    width: 70px;
    height: 70px;
  }
}

/* ==========================================================
 * 11. v0.5 - Full-page Account records and image discovery
 * ========================================================== */

.account-record-page {
  max-width: 1520px;
}

.account-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--secondary);
  font-size: 12px;
}

.account-breadcrumb .link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  font-weight: 700;
  color: var(--blue2);
}

.account-breadcrumb .link svg {
  transform: rotate(180deg);
}

.account-record-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 25px 28px;
  margin-bottom: 20px;
}

.account-record-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border: 1px solid #e3ebf4;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}

.account-record-logo .account-logo-img {
  width: 100%;
  height: 100%;
  padding: 12px;
}

.account-record-heading {
  flex: 1;
  min-width: 0;
}

.account-record-heading h1 {
  margin: 6px 0 4px;
  font-size: clamp(23px, 2.3vw, 32px);
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.account-record-heading p {
  margin: 0;
  color: var(--secondary);
  font-size: 13px;
}

.account-record-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.account-record-actions {
  align-self: start;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.account-record-layout {
  display: grid;
  grid-template-columns: minmax(275px, 310px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.account-record-side {
  min-width: 0;
}

.account-record-side h2 {
  font-size: 15px;
  font-weight: 750;
  margin: 0 0 15px;
}

.page-logo-editor {
  padding: 0;
  margin: 0 0 13px;
  border: 0;
  background: transparent;
  align-items: flex-start;
  flex-wrap: wrap;
}

.page-logo-editor .account-logo-tile {
  width: 92px;
  height: 92px;
}

.page-logo-editor .account-logo-controls {
  flex: 1;
}

.account-image-hint {
  margin: 9px 0 19px;
  line-height: 1.5;
}

.account-record-side .btn-block {
  justify-content: center;
  width: 100%;
}

.account-side-facts {
  display: grid;
  gap: 15px;
}

.account-side-facts > div {
  display: grid;
  gap: 5px;
}

.account-side-facts span {
  color: var(--secondary);
  font-size: 11px;
}

.account-side-facts strong,
.account-side-facts a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.account-side-facts a {
  color: var(--blue2);
}

.account-record-main {
  min-width: 0;
  overflow: hidden;
}

.account-record-tabs {
  margin: 0;
  padding: 12px 18px 0;
  overflow-x: auto;
  white-space: nowrap;
}

.account-record-section {
  padding: 24px;
  min-height: 420px;
}

.account-record-section .detail-kv {
  margin-top: 0;
}

.account-website {
  margin-top: 16px;
  font-size: 12px;
}

.account-website a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-tab-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.account-tab-heading h3 {
  font-size: 16px;
  margin: 0;
  color: var(--ink);
}

.account-contact-entry {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-contact-entry .avatar {
  flex: none;
}

.account-contact-entry > div:last-child {
  min-width: 0;
}

.account-deal-entry .pill {
  display: inline-flex;
}

.contact-photo-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px;
  background: #f8fbff;
  border: 1px solid #e3eaf3;
  border-radius: 11px;
  margin-bottom: 14px;
}

.contact-photo-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 90px !important;
  height: 90px !important;
  overflow: hidden;
  border-radius: 14px;
  background: #eaf1fb;
}

.contact-avatar-large {
  display: grid;
  place-items: center;
  width: 90px !important;
  height: 90px !important;
  border-radius: 14px;
  font-size: 24px;
}

.contact-photo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}

.contact-photo-controls {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.contact-photo-controls p {
  margin: 0;
}

.linkedin-photo-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 0 16px;
}

.linkedin-photo-tools .link {
  font-size: 12px;
}

.linkedin-photo-tools .btn {
  display: inline-flex;
  gap: 8px;
}

@media (max-width: 1190px) {
  .account-record-layout {
    grid-template-columns: minmax(235px, 265px) minmax(0, 1fr);
  }

  .account-record-hero {
    flex-wrap: wrap;
  }

  .account-record-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .account-record-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-record-hero {
    padding: 20px;
    gap: 15px;
  }

  .account-record-logo {
    width: 74px;
    height: 74px;
  }

  .account-record-section {
    padding: 18px;
  }

  .account-record-tabs {
    padding: 10px 12px 0;
  }
}

/* ==========================================================
   v0.6  Consultant directory and clipboard photo editing
   ========================================================== */
.photo-paste-zone {
  min-height: 170px;
  padding: 32px 18px;
  border: 2px dashed #83a9d8;
  border-radius: 14px;
  color: #42668d;
  background: #f3f8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: text;
}
.photo-paste-zone:focus {
  outline: 3px solid #b9d4ff;
  border-color: #3083e5;
}

/* v0.7 shared person pages and attachments */
.person-record-avatar .contact-avatar-large,.person-record-avatar .contact-photo{width:100%!important;height:100%!important;object-fit:cover;border-radius:12px}
.attachment-list{margin-top:20px}.attachment-row{display:flex;align-items:center;gap:13px;padding:14px 3px;border-bottom:1px solid var(--line)}
.attachment-row .attachment-name{flex:1;min-width:0;overflow-wrap:anywhere}.attachment-row strong{display:block;font-size:12px;color:var(--ink)}.attachment-row span{display:block;color:var(--secondary);font-size:11px;margin-top:4px}.attachment-actions{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap}.attachment-drop{margin-top:10px}@media(max-width:720px){.attachment-row{flex-wrap:wrap}.attachment-row .attachment-name{flex-basis:calc(100% - 40px)}}

/* v0.8 - Full-page Opportunities. Reuses the existing Account record components. */
.opportunity-record-mark{background:#edf4ff;color:#2868b7;}
.opportunity-record-mark svg{width:40px;height:40px;}
