/* Atlas — styles for record pages (Schools, Contacts, Tasks) + record side panel */

/* ── full-page tables ── */
.atl-tbl { display: flex; flex-direction: column; }
.atl-tbl-h { display: grid; gap: 12px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; padding: 4px 14px 10px; border-bottom: 1px solid var(--line2); }
.atl-tbl-r { display: grid; gap: 12px; align-items: center; padding: var(--rowpad) 14px; border-radius: 12px; cursor: pointer; transition: background 0.14s; }
.atl-tbl-r:hover { background: var(--card2); }
.atl.mode-dark .atl-tbl-r:hover { background: var(--raised); box-shadow: inset 3px 0 0 var(--acc2) !important; }
.atl-tbl-r + .atl-tbl-r { box-shadow: 0 -1px 0 var(--line2); }
.atl-tbl-r:hover + .atl-tbl-r, .atl-tbl-r:hover { box-shadow: none; }
.atl-tbl.schools .atl-tbl-h, .atl-tbl.schools .atl-tbl-r { grid-template-columns: 1.3fr 110px 1fr 64px 76px 86px 28px; }
.atl-tbl.contacts .atl-tbl-h, .atl-tbl.contacts .atl-tbl-r { grid-template-columns: 1.5fr 1.3fr 1.4fr 110px 86px 28px; }
.atl-addcol { width: 22px; height: 22px; border-radius: 7px; border: 1.3px dashed var(--line3); background: transparent; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; justify-self: end; transition: color 0.15s, border-color 0.15s; }
.atl-addcol:hover { color: var(--acc-ink); border-color: var(--acc2); }
.atl-cell-nm { font-size: 13px; font-weight: 600; line-height: 1.25; }
.atl-cell-sub { font-size: 11px; color: var(--faint); margin-top: 2px; }
.atl-cell { font-size: 12.5px; color: var(--muted); }
.atl-cell.num { font-family: 'Source Serif 4', serif; font-size: 14.5px; font-weight: 600; color: var(--text); text-align: right; }
.atl-cell-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.atl-stagechip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tc-ink); background: var(--tc-soft); border: 1px solid color-mix(in oklab, var(--tc) 36%, transparent); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.atl-stagechip i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }

/* ── tasks — three columns: Today / This week / Later ── */
.atl-tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.atl-task-grp { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 2px 4px 9px; display: flex; align-items: center; gap: 8px; }
.atl-task-grp b { color: var(--muted); font-weight: 600; }
.atl-task { display: flex; align-items: center; gap: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: calc(var(--rowpad) + 2px) 16px; cursor: default; transition: border-color 0.15s, opacity 0.2s; }
.atl-task + .atl-task { margin-top: 8px; }
.atl-task:hover { border-color: var(--line3); }
.atl-task-cb { width: 20px; height: 20px; border-radius: 50%; border: 1.6px solid var(--line3); flex: none; display: flex; align-items: center; justify-content: center; color: transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.atl-task-cb:hover { border-color: var(--acc2); box-shadow: 0 0 0 4px var(--acc-soft); }
.atl-task.done { opacity: 0.45; }
.atl-task.done .atl-task-cb { background: linear-gradient(120deg, var(--acc), var(--acc2)); border-color: transparent; color: #fff; }
.atl-task.done .atl-task-tx { text-decoration: line-through; }
.atl-task-tx { font-size: 13.5px; font-weight: 500; }
.atl-task > div:hover > .atl-task-tx { color: var(--acc-ink); }
.atl-task-school { font-size: 11.5px; color: var(--faint); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.atl-task-due { margin-left: auto; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; color: var(--muted); background: var(--chip); white-space: nowrap; }
.atl-task-due.due { color: var(--warn-ink); background: var(--warn-soft); }
.atl-task-due.overdue { color: var(--bad-ink); background: var(--bad-soft); }

/* ── record side panel ── */
.atl-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 90; }
.atl-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; background: var(--card); border-left: 1px solid var(--line); z-index: 95; display: flex; flex-direction: column; box-shadow: -28px 0 64px -32px rgba(0, 0, 0, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  .atl-scrim { animation: atl-fade 0.22s ease both; }
  .atl-panel { animation: atl-slide 0.32s cubic-bezier(0.25, 1, 0.35, 1) both; }
}
@keyframes atl-fade { from { opacity: 0; } }
@keyframes atl-slide { from { transform: translateX(56px); opacity: 0; } }
.atl-panel-hd { padding: 22px 24px 18px; border-bottom: 1px solid var(--line2); }
.atl-panel-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.atl-panel-x { margin-left: auto; }
.atl-panel-t { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.atl-panel-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.atl-panel-bd { flex: 1; overflow: auto; padding: 18px 24px 24px; }
.atl-panel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.atl-pstat { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 13px; }
.atl-pstat-lb { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.atl-pstat-v { font-family: 'Source Serif 4', serif; font-size: 18px; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.atl-pstat-v .gs-avatar { font-family: 'Albert Sans', sans-serif; }
.atl-psect { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 14px 0 9px; }
.atl-field { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 13px; }
.atl-field + .atl-field { border-top: 1px solid var(--line2); }
.atl-field-lb { width: 110px; flex: none; color: var(--faint); font-size: 12px; }
.atl-field-v { color: var(--text); font-weight: 500; }
.atl-field-v.link { color: var(--acc-ink); cursor: pointer; }
.atl-tl { position: relative; padding-left: 19px; }
.atl-tl::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.atl-tl-it { position: relative; padding: 7px 0; }
.atl-tl-it::before { content: ''; position: absolute; left: -19px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc2) 22%, transparent); }
.atl-tl-tx { font-size: 13px; font-weight: 500; line-height: 1.4; }
.atl-tl-when { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.atl-panel-ft { display: flex; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line2); }

/* tone: muted (paused / no-priority) */
.atl .tone-muted { --tc: var(--faint); --tc-ink: var(--muted); --tc-soft: var(--chip); }

/* ── Reports ── */
.atl-rep-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
.atl-rep-kpi { border-left: 3px solid var(--tc); }
.atl-rep-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--gap); margin-bottom: var(--gap); }
/* grouped bars: won vs created */
.atl-gbars { display: flex; align-items: flex-end; gap: 16px; height: 188px; padding: 8px 4px 0; }
.atl-gcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.atl-gpair { display: flex; align-items: flex-end; gap: 5px; width: 100%; height: 100%; justify-content: center; }
.atl-gbar { width: 40%; max-width: 26px; border-radius: 6px 6px 2px 2px; transform-origin: bottom; }
.atl-gbar.created { background: var(--chip); }
.atl-gbar.won { background: linear-gradient(180deg, var(--acc2), var(--acc)); box-shadow: 0 4px 14px -5px color-mix(in oklab, var(--acc) 55%, transparent); }
.atl-glegend { display: flex; gap: 18px; margin-top: 4px; }
.atl-gleg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.atl-gleg b { width: 11px; height: 11px; border-radius: 3px; }
.atl-rep-seg-row { display: grid; grid-template-columns: 1fr 70px 1fr 56px; gap: 12px; align-items: center; padding: var(--rowpad) 0; font-size: 12.5px; }
.atl-rep-seg-row + .atl-rep-seg-row { border-top: 1px solid var(--line2); }
.atl-rep-seg-nm { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.atl-rep-seg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); flex: none; }
.atl-lead-row { display: flex; align-items: center; gap: 13px; padding: calc(var(--rowpad) + 1px) 0; }
.atl-lead-row + .atl-lead-row { border-top: 1px solid var(--line2); }
.atl-lead-nm { font-size: 13px; font-weight: 600; }
.atl-lead-sub { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.atl-lead-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.atl-lead-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--acc), var(--acc2)); transform-origin: left; }
.atl-lead-q { font-family: 'Source Serif 4', serif; font-size: 14px; font-weight: 600; width: 42px; text-align: right; }

/* ── B2B Partners ── */
.atl-prt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-content: start; }
.atl-prt-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--cardpad); cursor: pointer; position: relative; overflow: hidden; transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s; }
.atl-prt-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc); opacity: 0.85; }
.atl-prt-card:hover { border-color: color-mix(in oklab, var(--acc2) 40%, transparent); box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.5); transform: translateY(-2px); }
.atl-prt-top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 13px; }
.atl-prt-logo { width: 42px; height: 42px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 17px; background: var(--tc-soft); color: var(--tc-ink); border: 1px solid color-mix(in oklab, var(--tc) 32%, transparent); }
.atl-prt-nm { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.atl-prt-meta { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.atl-prt-tier { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tc-ink); background: var(--tc-soft); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.atl-prt-note { font-size: 12px; color: var(--muted); line-height: 1.45; min-height: 34px; }
.atl-prt-stats { display: flex; gap: 18px; margin: 13px 0; padding: 12px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.atl-prt-stat-v { font-family: 'Source Serif 4', serif; font-size: 18px; font-weight: 600; }
.atl-prt-stat-l { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-top: 1px; }
.atl-prt-ft { display: flex; align-items: center; gap: 9px; }
.atl-statuschip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--tc-ink); background: var(--tc-soft); border: 1px solid color-mix(in oklab, var(--tc) 30%, transparent); border-radius: 999px; padding: 3px 10px; }
.atl-statuschip i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }

/* ── Support Queue ── */
.atl-tbl.support .atl-tbl-h, .atl-tbl.support .atl-tbl-r { grid-template-columns: 78px 1.7fr 1fr 96px 110px 96px 30px; }
.atl-pri { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.atl-pri i { width: 8px; height: 8px; border-radius: 2.5px; flex: none; }
.atl-pri.bad { color: var(--bad-ink); } .atl-pri.bad i { background: var(--bad); }
.atl-pri.warn { color: var(--warn-ink); } .atl-pri.warn i { background: var(--warn); }
.atl-pri.info { color: var(--info-ink); } .atl-pri.info i { background: var(--info); }
.atl-pri.muted { color: var(--faint); } .atl-pri.muted i { background: var(--faint); }
.atl-tk-id { font-family: 'Source Serif 4', serif; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.atl-tk-stat { font-size: 11.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.atl-tk-stat i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.atl-tk-stat.open i { background: var(--info); } .atl-tk-stat.open { color: var(--info-ink); }
.atl-tk-stat.prog i { background: var(--warn); } .atl-tk-stat.prog { color: var(--warn-ink); }
.atl-tk-stat.res i { background: var(--ok); } .atl-tk-stat.res { color: var(--ok-ink); }
.atl-tk-sla { font-size: 11.5px; color: var(--muted); }
.atl-tk-sla.bad { color: var(--bad-ink); font-weight: 600; }
.atl-catchip { font-size: 11px; color: var(--muted); background: var(--chip); border-radius: 7px; padding: 3px 8px; }
