#view-dashboard { display: none; }
#view-dashboard.active { display: grid; gap: 22px; }
.home-metrics article { padding: 0; min-height: 136px; }
.home-metric { width: 100%; height: 100%; min-height: 136px; display: flex; align-items: flex-start; flex-direction: column; gap: 0; padding: 18px; background: transparent; color: var(--ink); text-align: left; border: 0; border-radius: inherit; }
.home-metric:hover { background: #ffffff40; translate: none !important; box-shadow: none !important; }
.home-metric > span { padding-right: 36px; font-size: 12px; font-weight: 500; }
.home-metric[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent) !important; }
.home-metrics .metric-overdue { background: #fcecf0; border-color: #ebcbd4; }
.home-metrics .metric-overdue::before { background: var(--red); }
.metric-overdue .metric-icon { color: var(--red); }
.home-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--brand-line); padding-bottom: 18px; }
.home-toolbar h2 { margin: 0; font-size: 15px; font-weight: 600; }
.home-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.home-quick-actions button { font-size: 12px; }
.home-quick-actions .icon-button { flex: 0 0 40px; }
.home-message { background: #e2f5eb; color: #1a6348; border-left: 3px solid #279369; padding: 11px 16px; border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.home-message.error { background: #ffedf0; color: #973446; border-color: var(--red); }
.home-default { display: grid; gap: 22px; }
.home-agenda-grid, .home-files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.home-priority { background: #fff7f5; border-color: #ecd9d3; }
.home-priority .section-icon { background: #fae6e1; color: #a34c36; }
.home-agenda { background: #faf7ff; border-color: #dfd5ee; }
.home-agenda .section-icon { background: #eee4fa; color: var(--hearing); }
.home-upcoming { background: #f4faff; }
.home-pinned { background: #f4fbf7; border-color: #d1e6d9; }
.home-recent { background: #f8fbff; }
.home-count { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 1px 6px; margin-left: 4px; font-size: 11px; border-radius: 8px; background: #fae7e1; color: #9f4d39; vertical-align: middle; }
.home-list { display: grid; min-width: 0; }
.home-group-label { font-size: 11px; font-weight: 600; color: #627b8c; margin: 15px 0 0; }
#home-priority-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
#home-priority-list .home-more { grid-column: 1 / -1; }
.home-list .empty-state { min-height: 90px; padding: 22px 2px; }
.home-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; padding: 17px 0; border-bottom: 1px solid #dce5ea; align-items: start; }
.home-item:last-of-type { border-bottom: 0; }
.home-item-symbol { display: grid; place-items: center; width: 30px; height: 32px; border-radius: 10px; color: var(--blue); background: #e2edf9; }
.home-item-symbol svg { width: 17px; height: 17px; }
.home-item.hearing .home-item-symbol { background: #ebe1f8; color: var(--hearing); }
.home-item.task .home-item-symbol { background: #ddf1e5; color: var(--green); }
.home-item.due .home-item-symbol { background: #fae2e7; color: var(--red); }
.home-item-copy { min-width: 0; overflow-wrap: anywhere; }
.home-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin-bottom: 6px; font-size: 11px; color: #547284; }
.home-item-kind { font-weight: 650; color: var(--blue); }
.hearing .home-item-kind { color: var(--hearing); }
.task .home-item-kind { color: var(--green); }
.due .home-item-kind { color: var(--red); }
.home-timing { color: #5a7180; }
.home-timing.past { color: #a7374c; font-weight: 600; }
.home-file-link { display: inline; background: transparent; color: var(--ink); padding: 0; min-height: 0; border: 0; font-size: 13px; font-weight: 650; line-height: 1.55; text-align: left; border-radius: 3px; overflow: visible; overflow-wrap: anywhere; }
.home-file-link:hover { color: var(--accent); text-decoration: underline; background: transparent; translate: none !important; box-shadow: none !important; }
.home-file-link .button-ripple { display: none; }
.home-item-copy p, .home-file-row p { margin: 4px 0 0; color: #567182; font-size: 12px; }
.home-item-title { margin-top: 5px; color: #465f70; font-size: 12px; }
.home-item-actions { display: flex; gap: 4px; align-self: center; }
.home-item-actions .icon-button { width: 32px; height: 32px; min-height: 32px; border-radius: 9px; background: #ffffffc9; border-color: #d9e4eb; }
.home-item-actions svg { width: 15px; height: 15px; }
.home-item-actions .home-complete { color: var(--green); }
.home-period { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 14px 0 3px; }
.home-period button { background: transparent; color: #567182; border-radius: 8px; min-height: 32px; font-size: 11px; padding: 6px 12px; }
.home-period button[aria-pressed="true"] { background: #dcecf6; color: var(--accent); }
.home-period > span { margin-left: auto; font-size: 11px; }
#home-kind { width: 145px; font-size: 11px; }
.home-more { font-size: 11px; min-height: 34px; margin-top: 8px; justify-self: start; }
.home-file-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 34px; gap: 11px; align-items: center; padding: 16px 0; border-bottom: 1px solid #d7e6e2; }
.home-file-row:last-child { border: 0; }
.home-file-row > svg { width: 18px; height: 18px; color: #588575; }
.home-file-row .icon-button { width: 34px; height: 34px; min-height: 34px; }
.home-history { border-top: 1px solid var(--brand-line) !important; padding-top: 15px !important; }
.home-history > summary { display: flex; align-items: center; gap: 9px; color: var(--on-brand) !important; font-size: 12px; font-weight: 500 !important; list-style: none; min-height: 32px; }
.home-history > summary::after { content: "+"; margin-left: auto; font-size: 18px; }
.home-history[open] > summary::after { content: "-"; }
.home-history > summary::-webkit-details-marker { display: none; }
.home-history summary svg { width: 17px; height: 17px; }
.home-history .activity-item { border-bottom-color: var(--brand-line); }
.home-history .activity-text { color: var(--on-brand); }
.home-history .activity-item strong, .home-history .activity-item > svg { color: #c4dce9; }
#home-case-form, #home-record-form { display: grid; gap: 16px; padding: 24px; margin: 0; }
.home-record-context { color: #486577; padding-bottom: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.home-record-context strong { color: var(--ink); font-size: 14px; }
.home-record-context p { margin: 5px 0; font-size: 12px; }
.record-target { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: #4d6b7f; font-size: 12px; overflow-wrap: anywhere; }
.form-error { margin: 0; color: #a12f44; font-size: 12px; overflow-wrap: anywhere; }
#home-focus, #home-default { scroll-margin-top: 20px; }
.record-card { scroll-margin-top: 20px; }
@media (max-width: 1250px) {
  .home-agenda-grid { grid-template-columns: 1fr; }
  #home-priority-list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  #view-dashboard.active, .home-default { gap: 18px; }
  .home-files-grid { grid-template-columns: 1fr; gap: 18px; }
  .home-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .home-quick-actions { width: 100%; gap: 6px; }
  .home-quick-actions button { flex: 1 1 90px; padding: 8px; font-size: 10px; }
  .home-quick-actions .icon-button { flex: 0 0 34px; width: 34px; }
  .home-quick-actions svg { width: 15px; height: 15px; }
  .home-metrics article, .home-metric { min-height: 132px; }
  .home-metric { padding: 14px; }
  .home-metric > span { padding-right: 28px; font-size: 11px; }
  .home-metric small { max-width: 100%; }
  .home-item { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 14px 0; }
  .home-item-symbol { width: 26px; height: 29px; }
  .home-item-actions { grid-column: 2; justify-self: end; }
  #home-kind { max-width: 48%; width: 130px; }
  #home-focus > .panel-heading { flex-wrap: wrap; gap: 10px; }
  #home-case-form, #home-record-form { padding: 20px; }
  #home-record-form menu { flex-wrap: wrap; }
  #home-record-form menu button { font-size: 12px; }
}
