/* Additions: top bar + notification bell, inbox, settings lists, CSV import, project sheet, print. */
.work { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px 32px; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-title { font: 600 .95rem var(--f-display); color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.me-chip { font-size: .85rem; font-weight: 600; padding: 5px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.bell-wrap { position: relative; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.bell:hover { border-color: var(--accent); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: var(--surface); font-size: .7rem; display: grid; place-items: center; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(10, 16, 20, .18); z-index: 20; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.bell-foot { padding: 10px 14px; border-top: 1px solid var(--line); text-align: center; }
.note-item { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 11px 14px; cursor: pointer; color: inherit; font: inherit; }
.note-item:hover { background: var(--sunk); }
.note-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.note-item.unread .dot { background: var(--accent); }
.note-item.unread .t { font-weight: 700; }
.note-item .t { font-weight: 500; overflow-wrap: anywhere; }
.note-item .s { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
@media (max-width: 880px) { .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); top: 0; } .nav { position: static; } }

.nav-last { margin-top: 10px; border-top: 1px solid var(--line) !important; border-radius: 0 0 6px 6px !important; padding-top: 12px !important; }
@media (max-width: 880px) { .nav-last { margin-top: 0; border-top: 0 !important; padding-top: 9px !important; } }

.pill.Running { background: var(--accent-soft); color: var(--accent); }
.pill.Upcoming { background: var(--info-soft); color: var(--info); }
.pill.On-hold { background: var(--warn-soft); color: var(--warn); }
.pill.Forwarded { background: var(--info-soft); color: var(--info); }

/* Settings lists */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 16px; background: var(--sunk); font-size: .84rem; }
.tag button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 4px; }
.tag button:hover { color: var(--bad); }
.addrow { display: flex; gap: 8px; }
.addrow input { flex: 1; }

/* CSV import */
.drop { border: 1.5px dashed var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.preview { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.preview table { font-size: .8rem; }
.preview td, .preview th { padding: 6px 9px; }
.preview tr.bad td { background: var(--bad-soft); }
.okmark { color: var(--ok); font-weight: 600; }
.badmark { color: var(--bad); font-weight: 600; }

/* Inbox */
.inbox-item.unread { box-shadow: inset 3px 0 0 var(--accent); }

/* Project sheet */
.psheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 26px; }
.psheet-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.psheet-head h2 { font-size: 1.5rem; }
.psheet section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.psheet h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.psheet .dl { grid-template-columns: max-content 1fr max-content 1fr; }
@media (max-width: 640px) { .psheet { padding: 18px; } .psheet .dl { grid-template-columns: max-content 1fr; } }
.sheet-figs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sheet-figs > div { padding: 10px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sheet-figs > div:last-child { border-right: 0; }
.sheet-figs small { color: var(--muted); font-size: .74rem; }
.sheet-figs b { font: 600 1.05rem var(--f-display); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .sheet-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sheet-figs > div { border-bottom: 1px solid var(--line); } }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

@media print {
  .nav, .topbar, .tabs, .pagehead .actions, .no-print, .toast, .modal { display: none !important; }
  .app { display: block; }
  .main { padding: 0 !important; }
  body { background: #fff; color: #000; }
  .psheet { border: 0; padding: 0; }
  .tablewrap { overflow: visible; }
}
/* Timesheet rows + profile */
.tsline { display: grid; grid-template-columns: minmax(0, 2.2fr) 90px minmax(0, 3fr) 32px; gap: 6px; align-items: center; }
@media (max-width: 700px) { .tsline { grid-template-columns: 1fr 90px; } .tsline > [name=t_task] { grid-column: 1 / -1; } }
.pill.Submitted, .pill.Complete { background: var(--ok-soft); color: var(--ok); }
.pill.Missing { background: var(--bad-soft); color: var(--bad); }
.pill.Partial { background: var(--warn-soft); color: var(--warn); }
details summary { cursor: pointer; }
/* Searchable dropdowns (js/ssel.js) */
select.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.field, .tsline { position: relative; }
.ss-btn { width: 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; cursor: pointer; color: var(--ink); line-height: 1.5; }
.ss-btn:hover { border-color: var(--muted); }
.ss-btn:focus-visible, .ss-btn[aria-expanded="true"] { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.ss-btn:disabled { cursor: not-allowed; opacity: .65; }
.ss-btn.ss-placeholder .ss-text { color: var(--muted); }
.ss-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-caret { width: 12px; height: 12px; flex: none; color: var(--muted); }
.ss-panel { position: fixed; z-index: 1000; display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 36px rgba(10, 16, 20, .22); overflow: hidden; font-size: .92rem; }
.ss-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex: none; }
.ss-search[hidden] { display: none; }
.ss-search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.ss-search input { border: 0; padding: 4px 0; background: transparent; box-shadow: none !important; }
.ss-list { overflow-y: auto; padding: 4px; outline: none; overscroll-behavior: contain; }
.ss-opt { padding: 7px 10px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.ss-opt[hidden] { display: none; }
.ss-opt.ss-blank { color: var(--muted); }
.ss-opt.is-active { background: var(--sunk); }
.ss-opt[aria-selected="true"] { font-weight: 600; color: var(--accent); }
.ss-opt[aria-disabled="true"] { opacity: .5; cursor: default; }
.ss-empty { padding: 10px 14px; color: var(--muted); margin: 0; }
@media print { .ss-panel { display: none !important; } }
