/* SafeLog rebuild 2026-10-27: styles for the working parts the redesign only sketched
   (sign-in, real forms, entry pages, sharing, account, legal pages). Uses the design's own
   tokens from styles.css :root; no new colours. */

/* ---------- forms, everywhere ---------- */
.auth-form label:not(.check), .entry-form label:not(.choice):not(.check):not(.report-entry-choice),
.file-add label, .share-url label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 20px 0 8px; line-height: 1.5 }
.auth-form input:not([type=checkbox]):not([type=radio]), .entry-form input[type=text], .entry-form input[type=email], .entry-form input[type=password],
.entry-form input[type=date], .entry-form input[type=time], .entry-form select, .entry-form textarea,
.file-add input[type=text], .share-url input {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px;
  border: 1px solid #9fb3a5; border-radius: var(--radius); background: var(--white); color: var(--ink);
  font: 16px/1.5 var(--sans)
}
.entry-form textarea { min-height: 140px; resize: vertical }
.auth-form input:focus-visible, .entry-form input:focus-visible, .entry-form select:focus-visible,
.entry-form textarea:focus-visible, .file-add input:focus-visible, .share-url input:focus-visible,
.auth-form button:focus-visible, .entry-form button:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px }
[aria-invalid=true] { border-color: var(--rose) !important; box-shadow: 0 0 0 1px var(--rose) }
.field-help { font-size: 15px; color: var(--text); margin: -2px 0 8px; line-height: 1.55 }
.field-error { color: var(--rose); font-size: 15px; font-weight: 600; margin: 8px 0 0 }
.check, .choice { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: 16px; line-height: 1.5; color: var(--ink); cursor: pointer }
.check input, .choice input { width: 24px; height: 24px; margin: 1px 0 0; flex: 0 0 24px; accent-color: var(--ink) }
.choice small { display: block; color: var(--muted); font-size: 14px }
.choice-group { border: 0; padding: 0; margin: 22px 0 6px }
.choice-group legend { font-size: 15px; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 4px }
.code-input { font: 600 26px/1.2 ui-monospace, Menlo, Consolas, monospace !important; letter-spacing: .35em; max-width: 14ch }
.auth-form .button, .entry-form .button { margin-top: 24px }
.button-quiet { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 11px 18px; border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); font: 600 14px/1.4 var(--sans); cursor: pointer; text-decoration: none }
.button-quiet:hover { background: var(--sage) }
.auth-form .button-quiet { margin: 14px 0 0 12px }
.button-danger { background: var(--rose) !important; color: #fff !important; border: 0 }
.button-danger:hover { background: #8e3842 !important }
.danger-link { color: var(--rose) !important }
.small-link { font-size: 14px }
.header-link-button { background: none; border: 0; color: var(--ink); font: 600 14px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 10px 6px; min-height: 44px }
.header-signout { margin: 0 }

/* ---------- notices ---------- */
.notice { border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; font-size: 16px; line-height: 1.55; border: 1px solid }
.notice p { margin: 0 }
.notice ul { margin: 8px 0 0 18px; padding: 0 }
.notice-ok { background: var(--sage); border-color: #b9cfb5; color: var(--ink-deep) }
.notice-error { background: var(--rose-pale); border-color: #e0b9b2; color: #6e2a33 }
.notice-error a { color: #6e2a33 }
.notice-info { background: var(--white); border-color: var(--line); color: var(--text) }

/* ---------- sign-in pages ---------- */
.auth-section { padding: 48px 0 72px }
.auth-layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 340px); gap: 48px; justify-content: center; align-items: start }
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 36px 34px 30px; box-shadow: var(--shadow) }
.auth-card h1 { font: 400 clamp(32px, 4vw, 44px)/1.12 var(--serif); color: var(--ink); margin: 6px 0 14px }
.auth-intro { font-size: 17px; color: var(--text); line-height: 1.6 }
.auth-links { font-size: 15px; color: var(--text); margin: 18px 0 0 }
.auth-aside { padding: 8px 0 }
.auth-aside h2 { font: 400 24px/1.2 var(--serif); color: var(--ink); margin: 0 0 12px }
.auth-aside p { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0 0 14px }

/* ---------- signed-in pages ---------- */
.page-app .workspace-panel { padding-bottom: 64px }
.narrow-panel { max-width: 720px }
.crumbs { font-size: 14px; color: var(--muted); margin: 4px 0 14px }
.crumbs a { color: var(--ink) }
.workspace-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px }
.workspace-filters a { border: 1px solid #b9c9ac; border-radius: 999px; padding: 8px 14px; font-size: 14px; color: var(--ink); text-decoration: none; background: var(--white) }
.workspace-filters a[aria-current=page] { background: var(--ink); color: var(--white); border-color: var(--ink) }
.workspace-entry-link { display: grid; text-decoration: none; color: inherit; transition: background .15s, box-shadow .15s }
.workspace-entry-link:hover { box-shadow: var(--shadow); background: var(--white) }
.workspace-entry-link:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px }
.entry-open { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 10px }
.card-link { text-decoration: none; color: inherit; display: block }
.card-link:hover { box-shadow: var(--shadow) }
.entry-form { max-width: 820px }
.entry-part { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 20px 24px 24px; margin: 0 0 20px; min-width: 0 }
.entry-part > legend, .entry-review h2 { font: 400 24px/1.25 var(--serif); color: var(--ink); padding: 0 6px; display: flex; gap: 12px; align-items: center }
.entry-review h2 { padding: 0; margin: 0 0 6px }
.entry-part > legend span, .entry-review h2 span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--white); font: 600 14px/1 var(--sans) }
.entry-page-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start }
.entry-page-grid h2 { font: 400 24px/1.25 var(--serif); color: var(--ink); margin: 6px 0 12px }
.entry-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px }
.entry-files { background: var(--sage); border-radius: 12px; padding: 22px 24px }
.file-list, .plain-list { list-style: none; margin: 0 0 18px; padding: 0 }
.file-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.file-list a { font-weight: 600; color: var(--ink); word-break: break-word }
.file-list small, .plain-list small { display: block; color: var(--muted); font-size: 14px }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--line) }
.file-add input[type=file] { font-size: 15px; max-width: 100% }
.file-add .button-quiet { margin-top: 14px }
.dd-prose { white-space: pre-wrap; overflow-wrap: anywhere }
.dd-break { overflow-wrap: anywhere }
.dd-note { color: var(--muted) }
.report-builder { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: start }
.report-picker fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 16px 18px; margin: 0 0 16px; min-width: 0 }
.report-picker legend { font-weight: 600; color: var(--ink); padding: 0 6px }
.report-picker input[type=date] { width: 100%; min-height: 46px; border: 1px solid #9fb3a5; border-radius: var(--radius); padding: 8px 10px; font: 16px var(--sans) }
.report-picker label:not(.report-entry-choice) { display: block; font-weight: 600; font-size: 14px; margin: 6px 0 6px }
.report-preview .entry-actions { margin-bottom: 8px }
.share-list { display: grid; gap: 14px }
.share-row { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px }
.share-row h2 { font: 400 22px/1.25 var(--serif); margin: 0 0 6px; color: var(--ink) }
.share-row h2 small { font: 14px var(--sans); color: var(--muted) }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.share-ref { font-size: 13px; color: var(--muted) }
.share-url input { font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; cursor: text }
.status-pill { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 600 }
.status-open { background: var(--mint); color: var(--ink-deep) }
.status-closed { background: var(--rose-pale); color: #6e2a33 }

/* ---------- reading pages ---------- */
.legal-intro { padding: 30px 0 10px }
.legal-intro h1 { font: 400 clamp(34px, 4.6vw, 54px)/1.1 var(--serif); color: var(--ink); max-width: 20ch }
.legal-updated { font-size: 14px; color: var(--muted) }
.privacy-map ol a { color: var(--ink) }
.prose-section ul { padding-left: 20px; line-height: 1.65 }
.prose-section li { margin: 0 0 8px }
.prose-section code { font-size: .92em; background: var(--sage); padding: 1px 5px; border-radius: 4px }
.footer-legal a { color: inherit }
.shared-section { padding: 36px 0 72px }
.shared-container { max-width: 980px }
.shared-top { margin-bottom: 18px }
.shared-top h1, .narrow-panel h1 { font: 400 clamp(30px, 4vw, 44px)/1.15 var(--serif); color: var(--ink) }

/* ---------- narrow screens (incl. ~886px at 150% zoom) ---------- */
@media (max-width: 960px) {
  .auth-layout, .entry-page-grid, .report-builder { grid-template-columns: minmax(0, 1fr); gap: 24px }
  .auth-aside { border-top: 1px solid var(--line); padding-top: 20px }
}
@media (max-width: 640px) {
  .auth-section { padding: 20px 0 48px }
  .auth-card { padding: 24px 18px }
  .entry-part { padding: 16px 16px 20px }
  .share-row { flex-direction: column }
  .auth-form .button-quiet { margin-left: 0 }
  .auth-form .button, .auth-form .button-quiet { width: 100% }
}

/* ---------- printing a report ---------- */
@media print {
  .site-header, .site-footer, .workspace-sidebar, .no-print, .skip-link, .crumbs, .notice, .report-picker { display: none !important }
  .workspace-layout, .report-builder { display: block !important }
  .workspace-main { padding: 0 !important }
  .workspace-report-entry { break-inside: avoid }
  body { background: #fff }
}

/* ---------- admin ---------- */
.admin-tiles { margin-top: 18px }
.admin-number { display: block; font: 400 44px/1 var(--serif); color: var(--ink); margin-bottom: 8px }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white) }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px }
.admin-table th, .admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap }
.admin-table th { font-weight: 600; color: var(--ink); background: var(--sage) }

/* design-pass fixes, 27 Oct */
.workspace-panel .check.workspace-checkbox, .workspace-panel .choice.workspace-checkbox, .auth-form .check.workspace-checkbox { margin: 12px 0; font-size: 16px; line-height: 1.5; color: var(--ink); font-weight: 400 }
.workspace-panel .workspace-checkbox input, .auth-form .workspace-checkbox input { width: 24px; height: 24px; margin: 1px 0 0 }
.entry-tags span { font-size: 13px !important; padding: 4px 9px !important; color: var(--ink) !important }
.app-site-header .header-actions { margin-left: auto }
.timeline-group-heading { font: 400 20px/1.3 var(--serif); color: var(--ink); margin: 28px 0 6px }
.report-picker .field-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 }
.report-picker input[type=date] { max-width: 100%; box-sizing: border-box }
.report-picker #report-entry-options { padding: 14px 16px }
.report-picker #report-entry-options > p { margin: 4px 0 10px }
.entry-detail-list { grid-template-columns: minmax(150px, 32%) minmax(0, 1fr) !important }
@media (max-width: 640px) { .entry-detail-list { grid-template-columns: minmax(0, 1fr) !important } .entry-detail-list dd { margin-bottom: 10px } }
.entry-detail-list { font-size: 15px !important; line-height: 1.6 !important }
/* report picker: both group headings look the same (the design styled only one) */
.report-picker legend{font:600 17px/1.4 var(--sans)!important;color:#183d3b!important;letter-spacing:0!important;text-transform:none!important;padding:0 8px!important}

/* Checkbox and radio rows on every layout. The base rule used to live only in dashboard.css, so on
   sign-in/sign-up (which do not load it) each box sat on its own line above its label (27 Oct 2026). */
.workspace-checkbox { display: flex; align-items: flex-start; gap: 12px; cursor: pointer }
.workspace-checkbox input { width: 24px; height: 24px; min-height: 0; flex-shrink: 0; margin: 1px 0 0; accent-color: #204b3b }
/* Links in the sign-in side panel: on their own line and visibly links (they read as run-on text). */
.auth-aside a { display: block; margin-top: 4px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px }
.auth-links a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px }

/* Google sign-in (6 Nov 2026) */
.auth-alt { margin: 22px 0 0 }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--text); font-size: 14px }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line, #d8dece) }
.auth-alt a.button-google, .auth-alt a.button-google:hover { width: 100%; justify-content: center; text-decoration: none; font-size: 16px; min-height: 48px }
.auth-alt .field-help { margin: 10px 0 0 }
.auth-note { margin: 24px 0 0; padding: 16px 18px; border: 1px solid var(--line, #d8dece); border-radius: var(--radius); background: var(--white) }
.auth-note-title { font: 600 16px/1.4 var(--sans); margin: 0 0 6px; color: var(--ink) }
.auth-note p { margin: 0; font-size: 15px; line-height: 1.6 }
.auth-form-quiet { margin-top: 8px }
.auth-form-quiet .button-quiet { margin-left: 0 }
