/* Vehicles: the information box (the maintenance table uses shared/css/records.css). */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 24px; }
.info-item dt { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); margin-bottom: 3px; }
.info-item dd { font-size: 0.98em; white-space: pre-wrap; overflow-wrap: anywhere; }
.info-item dd.mono { font-family: Consolas, 'SF Mono', monospace; }
.info-item.wide { grid-column: 1 / -1; }
.info-name { max-width: 420px; margin-bottom: 14px; }
.info-edit td { padding: 4px 6px; vertical-align: top; }
.info-edit td.move { width: 1%; white-space: nowrap; }
.info-edit td.move + td { width: 30%; }
.info-edit input, .info-edit textarea { width: 100%; }
.info-edit textarea {
    font: inherit; font-size: 0.9em; resize: vertical;
    padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #f8faff;
}
.info-edit td.remove { width: 1%; white-space: nowrap; }
.info-edit td.remove button { padding: 3px 9px; }
.new-vehicle { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
/* Current mileage: the newest reading and the miles a month and a year, above the mileage log */
.mileage-stats { margin-bottom: 6px; }
.info-item dd.mileage-stat { font-size: 1.25em; font-weight: 600; }
.mileage-sub { font-size: 0.85em; margin-top: 2px; }
p.mileage-sub { margin: 0 0 10px; }
.mileage-log .record-table, .mileage-log .table-wrap { max-width: 640px; } /* Date, Mileage and the two worked out */

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo {
    display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px;
    overflow: hidden; background: var(--surface); cursor: zoom-in; text-align: left;
}
.photo:hover { background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #eef1f6; }
.photo span { font-size: 0.8em; color: #555; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox {
    position: fixed; inset: 0; z-index: 200; background: rgba(10, 12, 20, 0.92);
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px;
}
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100% - 120px); max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 4px; }
.lightbox iframe { width: min(92vw, 900px); height: calc(100vh - 90px); border: 0; border-radius: 4px; background: #fff; } /* a PDF invoice */
.lightbox figcaption { color: #ccd3e0; font-size: 0.85em; }
.lightbox button { background: rgba(255,255,255,0.12); border: 0; color: #fff; font-size: 1.6em; line-height: 1; padding: 10px 16px; border-radius: 8px; }
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lightbox .lb-close { position: absolute; top: 14px; right: 16px; font-size: 1.1em; }
@media (max-width: 640px) {
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .lightbox figure { max-width: 100%; }
    .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 16px; }
    .lightbox .lb-prev { left: 16px; } .lightbox .lb-next { right: 16px; }
}

/* Service places */
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.place { border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px 16px; }
.place h3 { font-size: 1.02em; margin-bottom: 4px; }
.place p { font-size: 0.9em; margin: 4px 0; overflow-wrap: anywhere; }
.place a { color: var(--blue-text); }
.place-notes { color: var(--muted); font-style: italic; }
.place.crossed { opacity: 0.6; background: #f4f5f7; }
/* House → Projects: each project's card links to its page */
a.place.project-card { display: block; color: inherit; text-decoration: none; }
a.place.project-card:hover { border-color: var(--blue); background: var(--hover); }
.project-updates { margin: 4px 0 10px 18px; font-size: 0.93em; }
.project-updates li { margin: 4px 0; }
.crossed-tag { font-size: 0.7em; font-weight: 600; color: #fff; background: #b42318; border-radius: 8px; padding: 1px 6px; vertical-align: middle; }
.crossed-check { font-size: 0.85em; display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; cursor: pointer; }
.hours { width: auto; margin-top: 8px; font-size: 0.85em; }
.hours td { padding: 2px 14px 2px 0; border: 0; }
.hours tbody tr:hover td { background: none; }
.hours tr.today td { font-weight: 600; color: var(--navy-2); }
.today-tag { font-size: 0.75em; font-weight: 600; color: #fff; background: var(--blue); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.place-form { border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.place-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 8px; }
.place-form-grid .wide { grid-column: 1 / -1; }
.place-form-grid textarea {
    font: inherit; font-size: 0.9em; resize: vertical;
    padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #f8faff;
}
@media (max-width: 640px) { .place-form-grid { grid-template-columns: 1fr; } }

/* Guides */
.guide { border: 1px solid var(--line-strong); border-radius: 8px; margin-bottom: 10px; background: var(--surface); }
.guide > summary {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none;
}
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary::before { content: '▸'; color: var(--blue); transition: transform 0.15s; }
.guide[open] > summary::before { transform: rotate(90deg); }
.guide > summary:hover { background: var(--hover); border-radius: 8px; }
.g-count { margin-left: auto; font-weight: 400; font-size: 0.85em; }
.g-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.g-text { font-size: 0.93em; line-height: 1.5; margin: 6px 0 14px; max-width: 860px; }
.g-text p { margin: 4px 0; }
.g-step { display: flex; gap: 8px; margin: 5px 0; }
.g-num { flex: 0 0 auto; min-width: 22px; font-weight: 600; color: var(--blue-text); }
.g-gap { height: 8px; }
.g-head { font-size: 0.98em; margin: 14px 0 4px; }
.g-head:first-child { margin-top: 0; }
.g-done > span:last-child { color: var(--muted); text-decoration: line-through; }
.imp-done > summary .g-title { color: var(--muted); text-decoration: line-through; }
h3.g-images { font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); margin: 10px 0 6px; }
.guide-form { display: flex; flex-direction: column; gap: 12px; margin: 10px 0; }
.guide-form textarea {
    font: inherit; font-size: 0.9em; line-height: 1.45; resize: vertical; width: 100%;
    padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #f8faff;
}
#g-new .guide-form { border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px 16px; }

/* Notes */
#n-search { min-width: 220px; flex: 0 1 320px; }
.vnote { border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-date { font-size: 0.85em; color: var(--muted); white-space: nowrap; }
.note-title { font-weight: 600; }
.vnote-text { white-space: pre-wrap; font-size: 0.93em; line-height: 1.5; margin: 6px 0 4px; max-width: 860px; }
.note-gallery .table-tools { margin: 6px 0 0; }
.note-gallery .photo-grid { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.note-form { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 4px; }
.note-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.note-form-title { flex: 1 1 260px; }
.note-form textarea {
    font: inherit; font-size: 0.9em; line-height: 1.45; resize: vertical; width: 100%;
    padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #f8faff;
}
#n-new .note-form { border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }

/* Maintenance schedule (Vehicles, House): each item's Status */
.cat-badge.due-red { background: #fdecea; color: #a8322a; }
.cat-badge.due-yellow { background: #fff8e1; color: #8a5a00; }
.cat-badge.due-ok { background: #e8f8ef; color: #1e7a46; }
.sched [data-read] td:nth-child(6) { min-width: 300px; } /* a schedule's Notes (Vehicles, House): wide enough to read without very tall rows */
