/* Plus: calendar, quick add, module choices and dashboard extras. Loaded after styles.css. */

/* dashboard extras */
.plus-tiles .tile { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.plus-tiles .tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.plus-tiles .tile .foot { color: var(--muted); font-size: 12px; }
@media (min-width: 861px) {
  .grid.plus-n1 { grid-template-columns: 1fr; }
  .grid.plus-n2 { grid-template-columns: 1fr 1fr; }
  .grid.plus-n1 > *, .grid.plus-n2 > * { grid-column: auto; }
}

/* module choices in settings */
.plus-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; margin-top: 14px; }
.plus-mods label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* calendar */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 6px 8px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cal-cell { min-height: 108px; min-width: 0; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-cell.off { background: var(--surface-2); }
.cal-cell.can-add { cursor: pointer; }
.cal-cell.can-add:hover { background: var(--hover); }
.cal-num { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 4px; font-size: 12px; color: var(--text-2); }
.cal-cell.today .cal-num { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-ev { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 12px; line-height: 1.4; text-decoration: none; white-space: nowrap; overflow: hidden; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { background: var(--accent-soft); }
.cal-ev i, .cal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ev, var(--accent)); }
.cal-more { padding-left: 6px; font-size: 11px; color: var(--muted); }
.ev-tasks { --ev: var(--accent); }
.ev-invoices { --ev: var(--critical); }
.ev-interactions { --ev: var(--warning); }
.ev-projects { --ev: #7a5af5; }
.ev-deals { --ev: var(--good); }
.ev-subscriptions { --ev: var(--series-2); }
.ev-appointments { --ev: #0f9d9a; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.agenda-row { display: grid; grid-template-columns: 62px 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); color: inherit; font-size: 14px; text-decoration: none; }
.agenda-row:last-child { border-bottom: 0; }
.agenda-row .when { color: var(--text-2); font-size: 13px; }
.agenda-row .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-row .kind { color: var(--muted); font-size: 12px; }
.agenda-row:hover .txt { color: var(--accent); }
.agenda-row.late .when { color: var(--bad-text); font-weight: 600; }
@media (max-width: 640px) {
  .cal-cell { min-height: 60px; padding: 4px; }
  .cal-ev { display: inline-flex; margin: 0 3px 3px 0; padding: 0; background: none; }
  .cal-ev span, .cal-more { display: none; }
  .cal-head div { padding: 6px 2px; text-align: center; }
}

/* quick add */
.plus-fab { position: fixed; right: 20px; bottom: 20px; z-index: 35; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.plus-fab-btn { width: 54px; height: 54px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s; }
.plus-fab-btn .ic { width: 24px; height: 24px; }
.plus-fab.open .plus-fab-btn { transform: rotate(45deg); }
.plus-fab-menu { min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.plus-fab-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.plus-fab-menu button:hover { background: var(--hover); }
body.ai-open .plus-fab { display: none; }
@media print { .plus-fab { display: none; } }
@media (prefers-reduced-motion: reduce) { .plus-tiles .tile, .plus-fab-btn { transition: none; } }

/* sidebar: folding sections and pages */
.sidebar .nav-group h4 { display: flex; align-items: center; gap: 6px; border-radius: 6px; cursor: pointer; user-select: none; }
.sidebar .nav-group h4::before { content: ""; flex: none; width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; opacity: .7; transform: rotate(90deg); transition: transform .12s; }
.sidebar .nav-group.folded h4::before { transform: none; }
.sidebar .nav-group.folded .nav-link { display: none; }
.nav-add { display: grid; place-items: center; width: 20px; height: 20px; margin-left: auto; padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; }
.nav-add:hover { background: var(--hover); color: var(--text); }
.nav-add .ic { width: 14px; height: 14px; }
.nav-emoji { flex: none; width: 18px; font-size: 15px; line-height: 1; text-align: center; }
.nav-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.btn:hover { text-decoration: none; }

/* pages */
.doc { max-width: 760px; margin: 0 auto; padding: 16px 0 80px; }
.doc-icon { display: block; width: 84px; padding: 0 4px; border: 0; border-radius: 8px; background: none; font-size: 56px; line-height: 1.15; }
.doc-icon:focus { outline: none; background: var(--hover); }
.doc-title { display: block; width: 100%; margin: 8px 0 14px; padding: 0; border: 0; background: none; font-size: 38px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.doc-title:focus, .doc-body:focus { outline: none; }
.doc-body { display: block; width: 100%; min-height: 320px; padding: 0; border: 0; background: none; font-size: 16px; line-height: 1.65; resize: none; overflow: hidden; }
.doc-read { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.doc-read h2 { margin: 28px 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.doc-read h3 { margin: 22px 0 4px; font-size: 22px; font-weight: 600; color: var(--text); }
.doc-read h4 { margin: 18px 0 4px; font-size: 18px; font-weight: 600; }
.doc-read > :first-child { margin-top: 0; }
.doc-read p { margin: 0 0 8px; }
.doc-read ul, .doc-read ol { margin: 4px 0 10px; padding-left: 24px; }
.doc-read li { margin: 2px 0; }
.doc-read ul.todos { padding-left: 2px; list-style: none; }
.doc-read ul.todos li { display: flex; align-items: baseline; gap: 10px; }
.doc-read ul.todos input { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; transform: translateY(2px); cursor: pointer; }
.doc-read ul.todos li.done span { color: var(--muted); text-decoration: line-through; }
.doc-read blockquote { margin: 8px 0; padding-left: 14px; border-left: 3px solid var(--text); }
.doc-read code { padding: 2px 5px; border-radius: 4px; background: var(--surface-2); font-size: 85%; }
.doc-read hr { margin: 16px 0; border: 0; border-top: 1px solid var(--border); }
.doc-list { max-width: 760px; }
.doc-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 6px; color: var(--text); font-size: 15px; }
.doc-item:hover { background: var(--hover); text-decoration: none; }
.doc-emoji { font-size: 20px; text-align: center; }
.doc-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .doc-title { font-size: 24px; } .doc-icon { font-size: 44px; width: 68px; } }

/* bringing files in */
.plus-drop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--accent) 22%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.plus-drop > div { display: grid; justify-items: center; gap: 8px; max-width: 420px; padding: 32px 36px; border: 2px dashed var(--accent); border-radius: 16px; background: var(--surface); color: var(--text); text-align: center; box-shadow: var(--shadow); }
.plus-drop .ic { width: 34px; height: 34px; color: var(--accent); }
.plus-drop b { font-size: 18px; }
.plus-drop span { color: var(--text-2); }
.ev-quotes { --ev: #8a63d2; }

/* first choice: what kind of business */
.plus-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.plus-kinds button { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.plus-kinds button:hover { border-color: var(--accent); background: var(--accent-soft); }
.plus-kinds b { font-size: 15px; }
.plus-kinds span { color: var(--text-2); font-size: 13px; }

/* insights */
.finding { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.finding:last-child { border-bottom: 0; }
.finding:hover { text-decoration: none; }
.finding:hover .f-go { text-decoration: underline; }
.f-tag { justify-self: start; padding: 3px 8px; border-radius: 4px; background: var(--tag-info, var(--surface-2)); font-size: 12px; font-weight: 600; white-space: nowrap; }
.f-bad .f-tag { background: var(--tag-bad, var(--surface-2)); }
.f-warn .f-tag { background: var(--tag-warn, var(--surface-2)); }
.f-good .f-tag { background: var(--tag-good, var(--surface-2)); }
.f-main { display: grid; gap: 2px; min-width: 0; }
.f-main span { color: var(--text-2); font-size: 13px; }
.f-go { color: var(--accent); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg-tile { display: block; color: inherit; }
.seg-tile:hover { border-color: var(--accent); text-decoration: none; }
.ev-milestones { --ev: #2f8a58; }
.ev-posts { --ev: #d6569a; }
@media (max-width: 640px) { .finding { grid-template-columns: 1fr; gap: 6px; } }

/* strategy boards */
.board-doc { max-width: 1100px; }
.sb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sb-grid.sb-pestel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sb-cell { padding: 16px 18px; border: 1px solid var(--border); border-top: 3px solid var(--sb, var(--accent)); border-radius: 10px; background: var(--surface); }
.sb-cell h3 { color: var(--text); font-size: 16px; }
.sb-cell p { margin: 2px 0 10px; font-size: 13px; }
.sb-cell ul { margin: 0 0 8px; padding: 0; list-style: none; }
.sb-cell li { display: flex; align-items: flex-start; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.sb-cell li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sb-act { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.sb-cell li:hover .sb-act, .sb-act:focus-visible { opacity: 1; }
.sb-act:hover { background: var(--hover); color: var(--text); }
.sb-act .ic { width: 14px; height: 14px; }
.sb-add { width: 100%; border-style: dashed; background: transparent; }
.sb-strengths, .sb-opportunities { --sb: var(--good); }
.sb-weaknesses { --sb: var(--warning); }
.sb-threats { --sb: var(--critical); }
.plus-kinds a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.plus-kinds a:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.doc-emoji .ic { width: 18px; height: 18px; vertical-align: middle; }
@media (hover: none) { .sb-act { opacity: 1; } }
@media (max-width: 860px) { .sb-grid, .sb-grid.sb-pestel { grid-template-columns: 1fr; } }
@media print { .sidebar, .topbar .actions, .plus-fab, .sb-act, .sb-add, .menu-btn { display: none !important; } .shell { display: block; } }

/* notifications */
.plus-bell { position: relative; }
.bell-dot { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--critical); color: #ffffff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.bell-panel { position: absolute; top: 40px; right: 0; z-index: 60; width: min(360px, calc(100vw - 32px)); max-height: 440px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--pop, var(--surface)); box-shadow: var(--shadow); }
.bell-item { display: grid; gap: 3px; padding: 10px; border-radius: 8px; color: var(--text); }
.bell-item:hover { background: var(--hover); text-decoration: none; }
.bell-item > span:last-child { color: var(--text-2); font-size: 13px; }
.bell-foot { margin-top: 4px; padding: 10px 10px 6px; border-top: 1px solid var(--border); }

/* revenue */
.rev-line { margin: 0 0 12px; font-size: 15px; }
.rev-goal { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.rev-goal .field { max-width: 260px; }
#rvPace svg { display: block; max-width: 100%; }
.ev-bills { --ev: var(--critical); }
.ev-time_off { --ev: #b07a2a; }
.ev-payroll { --ev: #6b7fd6; }
.ev-email_campaigns { --ev: #c4609a; }

/* ideas */
.idea-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.idea { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.idea-head { display: grid; gap: 6px; }
.idea h3 { color: var(--text); font-size: 16px; }
.idea p { margin: 8px 0 0; color: var(--text-2); }
.idea ol { margin: 10px 0 0; padding-left: 20px; }
.idea li { margin: 3px 0; }
.idea .badge { justify-self: start; white-space: normal; }
.idea .idea-kpi { font-size: 13px; }
.idea-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }

/* set up and import */
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; }
.plus-kinds button.on { border-color: var(--accent); background: var(--accent-soft); }
.switch-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row > div:first-child { display: grid; flex: 1; gap: 2px; min-width: 220px; }
.switch-row > div:first-child span { color: var(--text-2); font-size: 13px; }
.switch-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* hiring */
.fit { display: inline-flex; align-items: center; gap: 8px; }
.fit .meter { width: 80px; }
