/* Calendar, Connections and the meeting dialog */
.bar nav a[data-view="calendar"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Ccircle cx='8' cy='14' r='.9' fill='%23000'/%3E%3Ccircle cx='12' cy='14' r='.9' fill='%23000'/%3E%3Ccircle cx='16' cy='14' r='.9' fill='%23000'/%3E%3Ccircle cx='8' cy='17.2' r='.9' fill='%23000'/%3E%3Ccircle cx='12' cy='17.2' r='.9' fill='%23000'/%3E%3C/svg%3E"); }
.bar nav a[data-view="today"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9 17 20 6.5'/%3E%3C/svg%3E"); }
.bar nav a[data-view="connections"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M9.5 14.5 14.5 9.5'/%3E%3Cpath d='M11 6.5l1.6-1.6a4 4 0 0 1 5.7 5.7L16.7 12.2M13 17.5l-1.6 1.6a4 4 0 0 1-5.7-5.7l1.6-1.6'/%3E%3C/svg%3E"); }
@media (max-width: 720px) { .bar nav a[data-view="connections"] { display: none; } .bar nav a[data-view="results"] { display: none; } }

/* Calendar */
.cal-needs { margin: 14px 0 0; flex-wrap: wrap; }
.cal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 12px; margin: 16px 0; }
.cal-stats .stat { padding: 14px 16px; margin: 0; }
.cal-stats .big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.wkchart { display: flex; align-items: flex-end; gap: 6px; height: 96px; margin-top: 6px; }
.wkc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.wkv { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; height: 14px; }
.wkb { width: 100%; max-width: 26px; background: rgba(0,113,227,.35); border-radius: 4px 4px 0 0; }
.wkb.cur { background: var(--tint); }
.wkl { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.cal-main { padding: 14px; margin: 0; } .cal-day { margin: 0; position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow-y: auto; }
.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; } .cal-nav h2 { margin: 0 8px; font-size: 20px; min-width: 200px; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: .5px solid var(--line); border-left: .5px solid var(--line); }
.mdh { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-right: .5px solid var(--line); border-bottom: .5px solid var(--line); }
.mday { min-height: 104px; padding: 4px 4px 6px; border-right: .5px solid var(--line); border-bottom: .5px solid var(--line); cursor: pointer; overflow: hidden; }
.mday:hover { background: rgba(118,118,128,.05); } .mday.out { background: rgba(118,118,128,.04); } .mday.out .mnum { color: var(--tertiary, #aaa); }
.mday.sel { box-shadow: inset 0 0 0 2px var(--tint); }
.mnum { font-size: 12px; font-weight: 600; padding: 2px 4px; display: inline-block; min-width: 22px; text-align: center; border-radius: 11px; margin-bottom: 2px; }
.mday.today .mnum { background: #FF3B30; color: #fff; }
.ev { font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid transparent; }
.ev .evt { font-weight: 600; font-variant-numeric: tabular-nums; }
.ev.m-scheduled { background: rgba(0,113,227,.10); border-left-color: var(--tint); }
.ev.m-done { background: rgba(52,199,89,.13); border-left-color: #248A3D; }
.ev.m-canceled, .ev.m-no_show { background: rgba(118,118,128,.10); color: var(--muted); text-decoration: line-through; border-left-color: #8E8E93; }
.ev.ext { background: rgba(175,82,222,.09); border-left-color: #AF52DE; }
.ev.due { background: rgba(255,149,0,.12); border-left-color: #C93400; } .ev.due.late .evt { color: #C93400; }
.ev.touch { background: transparent; border-left-color: #8E8E93; color: var(--muted); }
.more, .tdot { font-size: 11px; color: var(--muted); padding: 2px 6px; }
.wgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wday { position: relative; background: rgba(118,118,128,.05); border-radius: 10px; padding: 8px 6px 34px; min-height: 260px; cursor: pointer; }
.wday.today .wdh b { background: #FF3B30; color: #fff; } .wday.sel { box-shadow: inset 0 0 0 2px var(--tint); }
.wdh { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.wdh b { font-size: 18px; color: var(--ink); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 15px; }
.wday .ev { white-space: normal; } .wempty { text-align: center; }
.wadd { position: absolute; left: 6px; right: 6px; bottom: 6px; border: 0; border-radius: 7px; background: transparent; color: var(--tint); font-size: 18px; line-height: 22px; cursor: pointer; opacity: 0; }
.wday:hover .wadd, .wadd:focus { opacity: 1; background: rgba(0,113,227,.08); }
.arow { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; margin: 6px 0 0; white-space: normal; font-size: 14px; border-radius: 8px; }
.arow .atime { width: 62px; flex: none; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.arow .abody { flex: 1; min-width: 0; } .arow .atag { flex: none; }
.agrp { margin-top: 12px; } .agh { font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 4px; border-bottom: .5px solid var(--line); }
.mst { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(118,118,128,.12); color: var(--muted); }
.mst.s-scheduled { background: rgba(0,113,227,.12); color: var(--tint); } .mst.s-done { background: rgba(52,199,89,.15); color: #1E7B34; }
.mst.s-ext { background: rgba(175,82,222,.12); color: #8944AB; } .mst.s-due { background: rgba(255,149,0,.15); color: #A34A00; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 2px 0; }
.lgi { display: inline-flex; align-items: center; gap: 6px; }
.lgd { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lgd.m-scheduled { background: var(--tint); } .lgd.m-done { background: #34C759; } .lgd.ext { background: #AF52DE; } .lgd.due { background: #FF9500; } .lgd.touch { background: #8E8E93; }
.cal-all { margin: 0 0 0 auto; display: flex; gap: 6px; align-items: center; font-weight: 500; } .cal-all input { width: auto; }

/* Meeting dialog */
dialog.mdlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 24px 80px rgba(0,0,0,.28), 0 0 0 .5px rgba(0,0,0,.08); color: var(--ink); }
dialog.mdlg::backdrop { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mform { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.mform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; margin: 0; }
.mform .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mform .g3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.mform textarea { resize: vertical; }
.mact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mstrow { display: flex; gap: 10px; align-items: center; }
.btn.danger { color: #D70015; }

/* Connections */
.csec { margin-top: 22px; } .csec > h2 { margin-bottom: 2px; } .csec > p { margin: 0 0 10px; max-width: 820px; }
.ccard { background: var(--surface, #fff); border-radius: 14px; padding: 16px 18px; margin-top: 10px; box-shadow: 0 0 0 .5px var(--line); }
.ccard h3 { margin: 0 0 2px; font-size: 16px; } .ccard p { margin: 0; }
.chead { display: flex; gap: 14px; align-items: flex-start; }
.clogo { width: 36px; height: 36px; flex: none; border-radius: 9px; background: rgba(118,118,128,.12) center / 22px no-repeat; }
.clogo.l-google { background-color: #fff; box-shadow: 0 0 0 .5px var(--line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22 12.2c0-.7-.1-1.4-.2-2H12v3.9h5.6a4.8 4.8 0 0 1-2.1 3.1v2.6h3.4c2-1.8 3.1-4.5 3.1-7.6z'/%3E%3Cpath fill='%2334A853' d='M12 22c2.8 0 5.2-.9 6.9-2.5l-3.4-2.6c-.9.6-2.1 1-3.5 1-2.7 0-5-1.8-5.8-4.3H2.7v2.7A10 10 0 0 0 12 22z'/%3E%3Cpath fill='%23FBBC05' d='M6.2 13.6a6 6 0 0 1 0-3.8V7.1H2.7a10 10 0 0 0 0 9.2z'/%3E%3Cpath fill='%23EA4335' d='M12 5.9c1.5 0 2.9.5 4 1.6l3-3A10 10 0 0 0 2.7 7.1l3.5 2.7C7 7.7 9.3 5.9 12 5.9z'/%3E%3C/svg%3E"); }
.clogo.l-microsoft { background-color: #fff; box-shadow: 0 0 0 .5px var(--line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23F25022' d='M2 2h9.5v9.5H2z'/%3E%3Cpath fill='%237FBA00' d='M12.5 2H22v9.5h-9.5z'/%3E%3Cpath fill='%2300A4EF' d='M2 12.5h9.5V22H2z'/%3E%3Cpath fill='%23FFB900' d='M12.5 12.5H22V22h-9.5z'/%3E%3C/svg%3E"); background-size: 18px; }
.clogo.l-hubspot { background-color: #FF7A59; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='15' cy='14' r='4'/%3E%3Cpath d='M15 10V5M5 6l7 5.5M8 20l4-3'/%3E%3C/svg%3E"); }
.clogo.l-salesforce { background-color: #00A1E0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M7 18a4 4 0 0 1-.6-8 5 5 0 0 1 9.3-1.7A4.5 4.5 0 1 1 17.5 18z'/%3E%3C/svg%3E"); }
.clogo.l-mcp { background-color: #1D1D1F; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 12l8-8M8 16l8-8M12 20l8-8'/%3E%3C/svg%3E"); }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 0; margin-top: 10px; border-top: .5px solid var(--line); }
details.setup { margin-top: 10px; } details.setup summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--tint); }
details.setup ol, details.setup ul { margin: 8px 0 0; padding-left: 20px; } details.setup li { margin: 4px 0; }
.emrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.emrgrid .ccard { margin: 0; display: flex; flex-direction: column; gap: 8px; } .emrgrid .ccard .btn { align-self: flex-start; margin-top: auto; }
.ccard.emr.over { box-shadow: 0 0 0 2px var(--tint); }
table.keys, table.crmt { width: 100%; margin-top: 12px; border-collapse: collapse; } table.keys th, table.crmt th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: .5px solid var(--line); }
table.keys td, table.crmt td { padding: 8px 4px; border-bottom: .5px solid var(--line); vertical-align: top; } table.crmt input[type=checkbox] { width: auto; }
.keybox { flex-direction: column; align-items: stretch !important; gap: 10px !important; margin: 12px 0 0; }
.keyline { display: flex; gap: 8px; align-items: center; margin-top: 4px; } .keyline code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: rgba(255,255,255,.7); padding: 6px 8px; border-radius: 6px; font-size: 12px; }

@media (max-width: 1250px) { .cal-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cal-stats .wide { grid-column: 1 / -1; } }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } .cal-day { position: static; max-height: none; } }
@media (max-width: 720px) {
  .cal-stats { grid-template-columns: 1fr 1fr; } .cal-stats .big { font-size: 24px; }
  .mday { min-height: 58px; } .mday .ev { font-size: 0; padding: 0; height: 5px; border-left-width: 0; margin-top: 2px; } .mday .ev .evt { display: none; } .mday .tdot, .mday .more { display: none; }
  .wgrid { grid-template-columns: 1fr; } .wday { min-height: 0; padding-bottom: 8px; } .wdh { flex-direction: row; gap: 8px; } .wadd { position: static; opacity: 1; margin-top: 4px; width: 100%; }
  .cal-nav h2 { min-width: 0; font-size: 17px; } .cal-all { margin-left: 0; }
  .mform .g2, .mform .g3 { grid-template-columns: 1fr; } .chead { flex-wrap: wrap; }
}
