/* App shell layout (WI000252): top bar + (org rail | sidebar | main). */

.shell { display: flex; flex-direction: column; height: 100%; }
.shell__body { display: flex; flex: 1; min-height: 0; }
.shell__main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.shell__loading { padding: 30px; color: var(--text-faint); }

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; gap: 12px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; }
.topbar__search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.14); border-radius: var(--radius-md); padding: 6px 10px; }
.topbar__search input { flex: 1; background: transparent; border: none; color: var(--on-brand); outline: none; font: inherit; }
.topbar__search input::placeholder { color: rgba(225,245,238,0.7); }
.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar__icon { background: none; border: none; color: var(--on-brand); font-size: 18px; display: flex; padding: 4px; }
.topbar__demo { font-size: 12px; background: rgba(255,255,255,0.16); padding: 3px 9px; border-radius: 999px; }
.topbar .menu__trigger { background: transparent; border: none; color: var(--on-brand); padding: 4px; font-size: 18px; }
.topbar .menu__trigger:hover { background: rgba(255,255,255,0.14); }

/* ---- Org rail ---- */
.orgrail { width: 54px; background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; }
.orgrail__tile, .orgrail__add, .orgrail__icon { width: 34px; height: 34px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; border: none; font-weight: 500; font-size: 13px; }
.orgrail__tile { background: rgba(255,255,255,0.12); color: var(--on-brand); }
.orgrail__tile.is-active { background: var(--on-brand); color: #04342c; }
.orgrail__add { background: transparent; border: 1px dashed rgba(255,255,255,0.35); color: #9fe1cb; font-size: 16px; }
.orgrail__icon { background: transparent; color: #9fe1cb; font-size: 18px; }
.orgrail__spacer { flex: 1; }

/* ---- Sidebar ---- */
.sidebar { width: 230px; background: var(--bg-elevated); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar__switcher { border-bottom: 1px solid var(--border); }
.sidebar__switcher .menu, .sidebar__switcher .menu__trigger { width: 100%; }
.sidebar__switcher .menu__trigger { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 9px 12px; background: transparent; border: none; border-radius: 0; text-align: left; }
.sidebar__switcher .menu__trigger:hover { background: var(--surface-2); }
.sidebar__org { grid-column: 1; font-size: 11px; color: var(--text-faint); }
.sidebar__proj { grid-column: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.sidebar__switcher .menu__trigger > .ti { grid-column: 2; grid-row: 1 / span 2; color: var(--text-muted); }
.sidebar__switcher .menu__list { min-width: 200px; }

.sidebar__scroll { flex: 1; overflow: auto; padding: 6px 6px 12px; }
.sidebar__section-head { font-size: 11px; color: var(--text-faint); padding: 10px 8px 4px; display: flex; align-items: center; gap: 4px; }
.sidebar__section-head--toggle { background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.sidebar__row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 6px; padding: 6px 12px; background: none; border: none; border-radius: var(--radius-md); color: var(--text-muted); text-align: left; }
.sidebar__row:hover { background: var(--surface-2); }
.sidebar__row.is-active { background: var(--brand); color: var(--on-brand); }
.sidebar__row-label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__count { font-size: 12px; color: var(--text-faint); }
.sidebar__row.is-active .sidebar__count { color: var(--on-brand); }
.sidebar__row--add { color: var(--accent); }
.sidebar__status { padding: 8px 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); }
.conn { display: flex; align-items: center; gap: 6px; }
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.conn--connected .dot { background: var(--success); }
.conn--demo .dot { background: #ef9f27; }

/* ---- Task list (minimal; formalized in WI000253) ---- */
.tl { display: flex; flex-direction: column; height: 100%; }
.tl__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.tl__view { font-weight: 500; }
.tl__tools { display: flex; gap: 4px; }
.tl__tool { background: none; border: none; color: var(--text-muted); width: 30px; height: 28px; border-radius: var(--radius-sm); font-size: 16px; }
.tl__tool:hover { background: var(--surface-2); color: var(--text); }
.tl__scroll { flex: 1; overflow: auto; }
.tl__group-head { display: flex; align-items: center; gap: 7px; padding: 12px 16px 6px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.tl__group-head--pinned { color: var(--accent); }
.tl__group-count { color: var(--text-faint); font-weight: 400; }
.tl__row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-top: 1px solid var(--border); padding: 9px 16px; color: var(--text); }
.tl__row:hover { background: var(--surface-2); }
.tl__prio { width: 16px; display: flex; }
.tl__key { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); white-space: nowrap; }
.tl__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl__meta { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 12px; }
.tl__chip { display: inline-flex; align-items: center; gap: 5px; }
.tl__comments { display: inline-flex; align-items: center; gap: 3px; }
.tl__empty { padding: 30px 16px; color: var(--text-faint); }

/* Toolbar: search + sort/group/board/new */
.tl__toolbar { display: flex; align-items: center; gap: 6px; }
.tl__searchbox { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 8px; }
.tl__searchbox input { background: none; border: none; outline: none; color: var(--text); font: inherit; width: 120px; }
.tl__tool.is-active { background: var(--surface-2); color: var(--text); }
.tl__tool--primary { color: var(--accent); }
.tl__toolbar .menu__trigger { background: none; border: none; padding: 0; }

/* Board (Kanban) */
.tl__board { flex: 1; overflow: auto; display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.tl__col { flex: 0 0 260px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: 100%; }
.tl__col-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 12px; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.tl__col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.tl__card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; color: var(--text); }
.tl__card:hover { border-color: var(--border-strong); }
.tl__card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tl__card-title { font-size: 13px; line-height: 1.35; margin-bottom: 8px; }
.tl__card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-faint); font-size: 12px; }

/* Create-task modal form */
.createform { display: flex; flex-direction: column; gap: 14px; }
.createform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.createform .menu, .createform .menu__trigger { width: 100%; }
.createform .menu__trigger { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 8px 10px; }

/* Notifications dropdown */
.notif { position: relative; display: inline-flex; }
.notif__badge { position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.notif__panel { position: absolute; top: calc(100% + 6px); right: 0; width: 340px; max-height: 440px; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: 0 12px 36px rgba(0,0,0,0.25); z-index: 60; }
.notif__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 500; }
.notif__markall { background: none; border: none; color: var(--accent); font-size: 12px; }
.notif__row { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 10px 12px; color: var(--text); }
.notif__row:hover { background: var(--surface-2); }
.notif__row.is-unread { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.notif__icon { color: var(--text-muted); margin-top: 2px; }
.notif__body { flex: 1; min-width: 0; }
.notif__line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.notif__time { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.notif__summary { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.notif__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.notif__empty { padding: 24px; text-align: center; color: var(--text-faint); }

/* Dashboard */
.dash { padding: 18px 20px 40px; overflow: auto; }
.dash__head { font-size: 16px; font-weight: 500; margin-bottom: 14px; }
.dash__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
.dash-card__title { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.dash-card__big { font-size: 30px; font-weight: 500; margin: 4px 0 12px; }
.dash-chart { display: flex; align-items: flex-end; gap: 10px; height: 110px; }
.dash-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; justify-content: flex-end; }
.dash-chart__bar { width: 70%; background: var(--brand); border-radius: 4px 4px 0 0; }
.dash-chart__lbl { font-size: 11px; color: var(--text-faint); }
.dash-standup { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.dash-bucket__head { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.dash-bucket__row { display: flex; gap: 8px; padding: 5px 0; color: var(--text); }
.dash-bucket__row:hover { text-decoration: none; color: var(--accent); }
