/* Claim diary and adjuster log (/claim-diary/). Prefix dy-. Builds on aad.css tool cards, tags and tables. */
.dy input[type=datetime-local] { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--tint-2); border-radius: 12px; background: #fff; color: var(--text); font: inherit; }
.dy input[type=datetime-local]:focus { outline: none; border-color: var(--dusk-soft); box-shadow: 0 0 0 3px rgba(92,124,142,.2); }
.dy input[type=datetime-local]:focus-visible { outline: 3px solid var(--gold-strong); outline-offset: 2px; }

/* Tabs: two by two on phones, one row from 640 px. */
.dy-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 6px; background: #fff; border: 1px solid var(--hairline); border-radius: 20px; box-shadow: var(--lift); }
@media (min-width: 640px) { .dy-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dy-tabs [role=tab] { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 14px; background: none; color: var(--dusk); font-weight: 650; font-size: .97rem; cursor: pointer; transition: background .16s, color .16s; }
.dy-tabs [role=tab]:hover { background: var(--tint); }
.dy-tabs [role=tab][aria-selected=true] { background: var(--dusk); color: #fff; }
.dy-tabs .icon { width: 19px; height: 19px; }
.dy-count { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--gold-tint); color: var(--gold-ink); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dy-count:empty { display: none; }
[aria-selected=true] .dy-count { background: var(--gold-strong); color: #2B1B02; }
.dy-wide { display: none; }
@media (min-width: 900px) { .dy-wide { display: inline; } }

/* Forms. Big tap targets for quick entries on a phone. */
.dy fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.dy legend { padding: 0; margin-bottom: 6px; font-weight: 620; color: var(--text); font-size: .97rem; }
.dy-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dy-chips-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dy-chip { position: relative; display: block; }
.dy-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.dy-chip span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--tint-2); border-radius: 12px; background: #fff; color: var(--dusk); font-weight: 600; font-size: .94rem; text-align: center; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.dy-chip input:checked + span { background: var(--dusk); border-color: var(--dusk); color: #fff; }
.dy-chip input:focus-visible + span { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.dy-chip:hover span { border-color: var(--dusk-soft); }
.dy-other { padding: 12px 14px 0; margin: -6px 0 16px; border-radius: 14px; background: var(--sand); }
.dy .tool-option { margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.dy .tool-option[open] { padding-bottom: 12px; }
.dy-cancel { width: 100%; margin-top: 10px; min-height: 44px; }
.dy-endnote { margin: -8px 0 14px; }
.dy-prev { padding: 12px 14px; border-radius: 12px; background: var(--gold-tint); color: var(--text); min-height: 44px; }
.dy-check { align-items: center; min-height: 44px; margin: 0; }

/* Filters above the log. */
.dy-filters { margin: 0 0 6px; padding: 14px 14px 4px; border-radius: 16px; background: var(--sand); }
.dy-filters .field { margin-bottom: 10px; }
.dy-filter-row { display: grid; gap: 4px 14px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 520px) { .dy-filter-row { grid-template-columns: minmax(0, 1fr) auto; } .dy-check { margin-bottom: 12px; } }
.dy-filters [data-shown] { margin: 0 0 10px; }

/* Entries, contacts and requests as small cards in a list. */
.dy-list { list-style: none; padding: 0; margin: 0; }
.dy-item { position: relative; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dy-item .dy-acts .x { position: absolute; top: 6px; right: -8px; }
.dy-item-h { padding-right: 40px; }
@media (max-width: 519px) { .dy-item-h time { flex-basis: 100%; margin-left: 0; } .dy-acts { margin-left: 0; } }
.dy-item:last-child { border-bottom: 0; }
.dy-item p { margin: 6px 0 0; font-size: .96rem; overflow-wrap: anywhere; }
.dy-item-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dy-item-h b { color: var(--text); font-size: 1.02rem; overflow-wrap: anywhere; }
.dy-item-h time { margin-left: auto; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.dy-item .dy-kind { margin-top: 2px; color: var(--muted); font-size: .86rem; }
.dy-kind:empty { display: none; }
.dy-how { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: var(--tint); color: var(--dusk); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.dy-how-email, .dy-how-portal { background: var(--gold-tint); color: var(--gold-ink); }
.dy-how-letter { background: var(--sand-2); color: var(--text); }
.dy-how-visit { background: var(--good-tint); color: var(--good); }
.dy-item .dy-promised { padding: 8px 12px; border-radius: 12px; background: var(--gold-tint); color: var(--text); }
.dy-promised span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); }
.dy-item .dy-files { display: flex; gap: 7px; align-items: flex-start; color: var(--muted); font-size: .88rem; }
.dy-files .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--gold-ink); }
.dy-item-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.dy-item-f .tag .icon { width: 14px; height: 14px; }
.dy-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.dy-acts .btn { min-height: 44px; padding: 8px 14px; font-size: .88rem; }
.dy-acts .btn .icon { width: 16px; height: 16px; }
.dy-ended > :not(.dy-item-f) { opacity: .72; }
.dy-none { padding: 14px 0; color: var(--muted); list-style: none; }
.dy-group + .dy-group { margin-top: 18px; }
.dy-group h3 { margin: 0 0 2px; padding-bottom: 6px; border-bottom: 2px solid var(--tint-2); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dy-n { float: right; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--gold-ink); }
.dy-dl { display: grid; gap: 4px; margin: 8px 0 0; font-size: .92rem; }
.dy-dl div { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.dy-dl dt { color: var(--muted); }
.dy-dl dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.dy-dl a { display: inline-flex; align-items: center; min-height: 32px; }

/* Handover summary. */
.dy-claim { margin: 0 0 18px; padding-block: 0; }
.dy-claim summary { display: list-item; min-height: 44px; padding: 16px 0; cursor: pointer; font-weight: 650; color: var(--text); }
.dy-claim summary::marker { color: var(--gold-ink); }
.dy-claim[open] { padding-bottom: 8px; }
.dy-hand-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--dusk); margin-bottom: 6px; }
.dy-hand-h .tool-card-h { margin-bottom: 2px; }
.dy-hand-h p { margin: 0; }
.dy-hand h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.dy-hand .tbl-wrap { margin: 0; }
.dy-hand table.ref { font-size: .9rem; }
.dy-hand td b { color: var(--text); }
.dy-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.dy-facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dy-facts dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.dy-hnote { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--sand); color: var(--text); }
.dy-hand-f { margin: 18px 0 0; }

/* Backup and data card. */
.dy-data { display: grid; gap: 10px 24px; margin-top: 20px; }
@media (min-width: 900px) { .dy-data { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .dy-data .tools-lock { grid-column: 1 / -1; } }
.dy-data .tool-card-h { margin-bottom: 4px; }
.dy-data p { margin: 0; }
.dy-data .btn { min-height: 44px; }
@media (max-width: 519px) { .dy-data .btn-row .btn { flex: 1 1 100%; } }

/* Confirmation email dialog and the template in the guide. */
.dy-dlg { max-width: min(620px, calc(100vw - 24px)); }
.dy-dlg textarea { min-height: 260px; font-size: .95rem; }
.dy-dlg .btn { min-height: 44px; }
.dy-mail { margin: 8px 0 1.4em; padding: 20px 22px; background: #fff; border: 1px solid var(--hairline); border-radius: 18px; box-shadow: var(--lift); }
.dy-mail .dy-mail-k { margin: 0 0 12px; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gold-ink); }
.dy-mail #dy-template { padding: 14px 16px; border-left: 3px solid var(--gold); background: var(--paper); border-radius: 0 12px 12px 0; color: var(--text); font-size: .96rem; }
.dy-mail #dy-template p { margin: 0 0 .7em; }
.dy-mail #dy-template ul { margin: 0 0 .7em; }
.dy-mail #dy-template > :last-child { margin-bottom: 0; }
.dy-mail .btn-row { margin-top: 14px; }
.dy-mail .btn-row p { margin: 0; }
.dy-mail .btn { min-height: 44px; }

@media print {
  .dy-tabs, .dy-noprint, .dy-filters, .dy-data, .dy-dlg, .dy-acts, .dy-cancel { display: none !important; }
  .dy-item { break-inside: avoid; }
  .dy-hand { border: 0; }
  .dy-hand-h { border-bottom-color: #000; }
  .dy-hand h3 { break-after: avoid; }
  .dy-ended > :not(.dy-item-f) { opacity: 1; }
}
