/* Investor CRM: To-dos, built to James's 27 Oct "To-dos" mockup (sizes are the mockup's own at 1536 wide).
   Uses the tokens crm.css defines on .crm-app; every class starts with t- so it never collides. */

.crm-app .t-page { max-width: 860px; padding-top: 28px; }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.t-head h1 { font-family: var(--c-serif); font-size: 54px; line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; color: #102A23; }
@media (prefers-color-scheme: dark) { .t-head h1 { color: var(--c-ink); } }
.crm-app .t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border: 0; border-radius: 8px;
  background: var(--c-green); color: var(--c-on-green); font-size: 16.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.crm-app .t-btn:hover { background: var(--c-green-hover); }
.crm-app .t-btn.big { height: 47px; padding: 0 21px; font-size: 17px; margin-top: 4px; }
.crm-app .t-btn.big .c-i { width: 22px; height: 22px; }
.crm-app .t-btn.ghost { background: none; color: var(--c-ink); border: 1px solid var(--c-line); }
.crm-app .t-btn[disabled] { opacity: .5; cursor: default; }
.crm-app .t-link { background: none; border: 0; padding: 2px; color: var(--c-green); font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; }
.crm-app .t-link:hover { text-decoration: underline; }
.crm-app .t-link .c-i { width: 20px; height: 20px; }
.crm-app .t-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--c-muted); cursor: pointer; padding: 0; }
.crm-app .t-icon:hover { background: var(--c-nav-on); color: var(--c-ink); }
.crm-app .t-icon .c-i { width: 21px; height: 21px; }
.t-muted { color: var(--c-muted); }
.t-muted.small, .t-hint { font-size: 14px; color: var(--c-muted); }
.t-err { color: var(--c-red); font-size: 15px; margin: 6px 0; }
.t-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Tabs and range */
.t-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.t-tabs { display: flex; gap: 11px; }
.t-tabs button { height: 38px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--c-line); background: var(--c-card); font-size: 16px; cursor: pointer; color: var(--c-ink); }
.t-tabs button span { margin-left: 8px; color: var(--c-muted); font-size: 15px; }
.t-tabs button.on { background: #173F34; border-color: #173F34; color: #F2F6F2; }
.t-tabs button.on span { color: #BCD0C5; }
@media (prefers-color-scheme: dark) { .t-tabs button.on { background: var(--c-green); border-color: var(--c-green); color: var(--c-on-green); } .t-tabs button.on span { color: var(--c-on-green); opacity: .7; } }
.t-range { position: relative; display: inline-flex; align-items: center; }
.crm-app .t-range select { appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 6px 30px 6px 8px; min-height: 0; font-size: 16px; color: var(--c-ink); cursor: pointer; }
.t-range .c-i { position: absolute; right: 4px; width: 18px; height: 18px; pointer-events: none; color: var(--c-muted); }

/* Sections */
.t-sec { margin-bottom: 4px; }
.t-sec > h2, .t-sec summary h2 { display: flex; align-items: center; gap: 12px; font-family: var(--c-sans); font-size: 14.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c-green); padding: 10px 0 9px; border-bottom: 1px solid var(--c-hair); margin: 0; }
.t-sec.overdue > h2 { color: var(--c-red); }
.t-sec.today > h2 { color: var(--c-gold); }
.t-count { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 6px;
  background: var(--c-pill-grey); color: var(--c-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; font-family: var(--c-sans); }
.t-sec.overdue .t-count { background: var(--c-red-soft); color: var(--c-red); }
.t-sec.today .t-count, .t-pactions .t-count, .t-opps .t-count { background: var(--c-pill-amber); color: var(--c-pill-amber-ink); }
.t-sec.first summary, .t-sec.cold summary { list-style: none; cursor: pointer; }
.t-sec summary::-webkit-details-marker { display: none; }
.t-sec.first summary h2::after { content: '+'; margin-left: auto; font-size: 18px; letter-spacing: 0; color: var(--c-muted); }
.t-sec.first[open] summary h2::after { content: '\2212'; }
.t-hint { padding: 8px 0 2px; }

/* Rows */
.t-list { list-style: none; margin: 0; padding: 0; }
.t-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 36px; gap: 18px; align-items: center; padding: 10px 6px 10px 6px; border-bottom: 1px solid var(--c-hair); }
.t-row.on { background: var(--c-tint); }
.t-row.done .t-title { color: var(--c-muted); }
.t-check { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid #9EA39C; background: var(--c-card); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.t-check:hover { border-color: var(--c-green); }
.t-check.on { background: var(--c-green); border-color: var(--c-green); }
.t-check svg { width: 16px; height: 16px; fill: none; stroke: var(--c-on-green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.t-dot { width: 20px; height: 20px; border-radius: 99px; border: 1.5px dashed var(--c-gold); }
.t-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; gap: 1px; }
.t-title { font-family: var(--c-serif); font-size: 18.5px; font-weight: 500; line-height: 1.3; color: var(--c-ink); letter-spacing: -0.005em; }
.t-main:hover .t-title { text-decoration: underline; text-decoration-color: var(--c-line); text-underline-offset: 3px; }
.t-sub { font-size: 14.5px; color: var(--c-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-when { font-size: 14.5px; color: var(--c-muted); white-space: nowrap; text-align: right; min-width: 60px; }
.t-when.late { color: var(--c-red); }
.t-when.today { color: var(--c-gold); }
.t-more { position: relative; display: flex; justify-content: center; }
.t-menu { position: absolute; right: 0; top: 34px; z-index: 30; min-width: 170px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; box-shadow: 0 10px 28px var(--c-shadow); padding: 6px; }
.t-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 7px; font-size: 15px; cursor: pointer; color: var(--c-ink); }
.t-menu button:hover { background: var(--c-nav-on); }
.t-menu button.bad { color: var(--c-red); }
.t-empty { padding: 40px 0; text-align: center; color: var(--c-muted); }
.t-empty h3 { font-family: var(--c-serif); font-size: 24px; font-weight: 500; color: var(--c-ink); margin-bottom: 6px; }

/* Toast */
.t-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; display: flex; gap: 16px; align-items: center;
  background: #173F34; color: #F2F6F2; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px var(--c-shadow); font-size: 15px; max-width: min(560px, calc(100vw - 32px)); }
.crm-app .t-toast .t-link { color: #CFE3D5; }

/* Dialog */
.t-modal { position: fixed; inset: 0; z-index: 50; background: rgba(16, 26, 22, 0.32); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; overflow-y: auto; }
.t-dialog { width: min(560px, 100%); background: var(--c-panel); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: 0 20px 50px var(--c-shadow); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.t-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-dialog-head h2 { font-family: var(--c-serif); font-size: 25px; font-weight: 500; line-height: 1.2; }
.t-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.t-field { display: flex; flex-direction: column; gap: 6px; }
.t-label { font-size: 14px; color: var(--c-muted); }
.crm-app .t-field input, .crm-app .t-field select, .crm-app .t-field textarea { width: 100%; }
.t-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--c-field); font-size: 15px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-app .t-chip { height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--c-line); background: var(--c-card); font-size: 14.5px; cursor: pointer; color: var(--c-ink); }
.crm-app .t-chip.on { background: var(--c-green); border-color: var(--c-green); color: var(--c-on-green); }

/* Person panel (the mockup's right column) */
.crm-app .t-panel { padding: 54px 30px 32px 34px; gap: 0; }
.t-x { position: absolute; top: 28px; right: 26px; }
.t-x .c-i { width: 26px; height: 26px; }
.t-pname { font-family: var(--c-serif); font-size: 38px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; color: #102A23; padding-right: 40px; }
@media (prefers-color-scheme: dark) { .t-pname { color: var(--c-ink); } }
.t-psub { font-size: 18px; color: var(--c-muted); margin-top: 4px; }
.t-pills { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 16px; }
.crm-app .t-pill { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--c-pill-grey); color: var(--c-ink); font-size: 15.5px; border: 0; }
.crm-app .t-pill.first { background: var(--c-pill-green); color: var(--c-pill-green-ink); }
.crm-app .t-pill.add { width: 32px; padding: 0; justify-content: center; cursor: pointer; color: var(--c-muted); }
.crm-app .t-pill.add .c-i { width: 19px; height: 19px; }
.crm-app .t-pill-input { height: 32px; min-height: 0; width: 140px; border-radius: 99px; padding: 0 12px; font-size: 15px; }
.t-contact { display: flex; flex-direction: column; gap: 4px; margin: 28px 0 22px; padding-bottom: 26px; border-bottom: 1px solid var(--c-hair); }
.t-crow { display: grid; grid-template-columns: 26px minmax(0, 1fr) 32px; gap: 16px; align-items: center; min-height: 40px; color: var(--c-ink); }
.t-crow > .c-i { width: 24px; height: 24px; }
.crm-app .t-cval { border: 0; background: none; padding: 0; font-size: 16.5px; text-align: left; color: var(--c-ink); cursor: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-app .t-inline { grid-column: 2 / 4; border: 0; border-bottom: 1px dashed var(--c-line); border-radius: 0; background: none; min-height: 34px; padding: 4px 0; font-size: 16px; }
.t-notes h3, .t-phead h3 { font-family: var(--c-serif); font-size: 22px; font-weight: 500; display: flex; align-items: center; gap: 12px; }
.t-notes { padding-bottom: 26px; border-bottom: 1px solid var(--c-hair); }
.crm-app .t-notes textarea { width: 100%; margin-top: 12px; font-size: 16px; line-height: 1.45; padding: 16px 17px; border-radius: 10px; background: var(--c-card); min-height: 150px; }
.t-pactions { padding: 22px 0 24px; border-bottom: 1px solid var(--c-hair); }
.t-phead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.t-plist { list-style: none; margin: 0; padding: 0; }
.t-plist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 32px; gap: 16px; align-items: center; min-height: 48px; }
.t-ptitle { font-size: 15.5px; color: var(--c-ink); }
.t-opps { padding-top: 22px; }
.t-opp { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding: 16px 18px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-card); text-decoration: none; color: var(--c-ink); }
.t-opp:hover { border-color: var(--c-muted); }
.t-opp > span { display: flex; flex-direction: column; gap: 2px; }
.t-opp b { font-weight: 500; font-size: 17px; }
.t-opp span span { color: var(--c-muted); font-size: 16px; }
.crm-app .t-link.full { margin-top: 22px; font-size: 14.5px; color: var(--c-muted); }

/* Search everything */
.crm-app .t-search { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 19px; border: 0; background: none; color: var(--c-muted); font-size: 15px; cursor: pointer; border-radius: 10px; text-align: left; white-space: nowrap; }
.crm-app .t-search:hover { background: var(--c-nav-on); color: var(--c-ink); }
.t-search kbd { margin-left: auto; font-family: var(--c-sans); font-size: 13px; color: var(--c-faint); }
.t-palette { width: min(620px, 100%); background: var(--c-panel); border: 1px solid var(--c-line); border-radius: 14px; box-shadow: 0 20px 50px var(--c-shadow); overflow: hidden; }
.crm-app .t-palette input { width: 100%; border: 0; border-bottom: 1px solid var(--c-hair); border-radius: 0; font-size: 18px; padding: 16px 20px; min-height: 0; background: none; }
.t-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.t-palette li button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; padding: 9px 14px; border-radius: 8px; cursor: pointer; text-align: left; }
.t-palette li button.on, .t-palette li button:hover { background: var(--c-nav-on); }
.t-palette .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-faint); padding: 8px 14px 2px; }

@media (max-width: 760px) {
  .crm-app .t-btn.big { height: 42px; padding: 0 14px; font-size: 15.5px; }
  .crm-app .t-page { padding: 20px 16px 90px; }
  .t-head h1 { font-size: 40px; }
  .t-btn.big { height: 42px; padding: 0 14px; font-size: 15.5px; }
  .t-bar { flex-wrap: nowrap; gap: 8px; }
  .t-tabs { gap: 8px; }
  .crm-app .t-tabs button { padding: 0 11px; font-size: 14.5px; }
  .t-tabs button span { margin-left: 5px; }
  .crm-app .t-range select { padding: 6px 22px 6px 4px; font-size: 14.5px; }
  .t-range .c-i { right: 0; }
  .t-row { grid-template-columns: 22px minmax(0, 1fr) auto 28px; gap: 12px; }
  .t-title { font-size: 17px; }
  .t-two { grid-template-columns: 1fr; }
  .crm-app .t-panel { padding: 48px 18px 28px; }
  .t-pname { font-size: 32px; }
}
.c-side-rule { border: 0; border-top: 1px solid var(--c-hair); margin: 26px 12px 18px; }
