/* Real records in the signed-in workspace: live module pages and the record
   dialog. Uses the same palette as the Hub screens (styles-preview.css). */

.hub-topbar-spacer{margin-left:auto}
.hub-nav-tag{margin-left:auto;font-style:normal;font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#d9b48f;border:1px solid #ffffff22;border-radius:999px;padding:1px 6px;flex-shrink:0}
.hub-nav-item .hub-nav-tag{overflow:visible}

/* Live pages */
.rec-actions{flex-wrap:wrap;justify-content:flex-end}
.rec-head-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.rec-cap{font-size:12px;color:var(--h-muted);font-weight:600}
.rec-link-btn{border:0;background:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:12px;font-weight:600;color:#a2441f!important;text-align:left}
.rec-link-btn svg{width:14px;height:14px}
.rec-link-btn:hover{text-decoration:underline}
.rec-open{border:0;background:none;padding:0;font:inherit;font-weight:600;color:var(--h-ink);cursor:pointer;text-align:left;text-decoration:underline;text-decoration-color:#c9d3c6;text-underline-offset:3px}
.rec-open:hover{color:#a2441f;text-decoration-color:currentColor}
.rec-table td{max-width:320px}
.rec-empty{padding:18px 4px 6px;color:var(--h-muted);font-size:13px;display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.rec-empty p{margin:0}
.rec-archived-toggle{margin:4px 2px 0}
.rec-error-note{background:#fbeceb;border-color:#efc3bd;color:#7d2219}
.rec-loading svg{animation:rec-spin 1.2s linear infinite}
@keyframes rec-spin{to{transform:rotate(360deg)}}
.rec-retry{margin-top:8px}

/* Dialog */
.rec-dialog{--h-line:#e2e7df;--h-ink:#15302a;--h-muted:#64736b;--h-primary:#173e33;--h-surface:#fff;--h-canvas:#f3f5f1;
  width:min(720px,calc(100% - 24px));max-height:min(92vh,900px);padding:0;border:0;border-radius:16px;box-shadow:0 30px 80px #0b1d1655;color:var(--h-ink);
  font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:14px;line-height:1.45}
.rec-dialog::backdrop{background:#0b1d1673}
.rec-dialog *{box-sizing:border-box}
.rec-dialog svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.rec-dialog :focus-visible{outline:3px solid #e09a6f;outline-offset:2px;border-radius:6px}
.rec-dialog-body{padding:22px 24px 24px;max-height:inherit;overflow-y:auto}
.rec-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}
.rec-dialog-head h2{font-size:20px;font-weight:650;margin:0;letter-spacing:-.01em;overflow-wrap:anywhere}
.rec-dialog .hub-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--h-muted);margin:0 0 4px}
.rec-close{border:0;background:var(--h-canvas);width:34px;height:34px;border-radius:50%;font-size:20px;line-height:1;cursor:pointer;flex-shrink:0;color:var(--h-ink)}
.rec-close:hover{background:#e6ebe3}
.rec-error{margin:8px 0 14px;padding:10px 12px;border-radius:8px;background:#f9e2de;color:#8e2a1f;font-size:13px;line-height:1.5}
.rec-error ul{margin:0;padding-left:18px}
.rec-error:focus{outline:none}
.rec-form{margin-top:6px}
.rec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}
.rec-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.rec-field[hidden]{display:none}
.rec-field-wide{grid-column:1/-1}
.rec-field label,.rec-dialog legend{font-size:12px;font-weight:600;color:#33483e}
.rec-req{color:#b23a2d}
.rec-dialog input:not([type=checkbox]),.rec-dialog select,.rec-dialog textarea{width:100%;margin:0;min-height:42px;font:inherit;font-size:14px;color:var(--h-ink);background:#fff;border:1px solid #cfd8cc;border-radius:9px;padding:8px 11px}
.rec-dialog textarea{min-height:84px;resize:vertical}
.rec-dialog input[type=file]{padding:7px;min-height:0}
.rec-dialog input:disabled,.rec-dialog select:disabled{background:var(--h-canvas);color:var(--h-muted)}
.rec-hint{font-size:12px;color:var(--h-muted);margin:4px 0 0;line-height:1.5}
.rec-required-note{margin-top:12px}
.rec-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--h-line)}
.rec-dialog .hub-btn{display:inline-flex;align-items:center;gap:7px;border-radius:9px;padding:10px 16px;font:inherit;font-weight:600;font-size:13px;cursor:pointer;border:1px solid var(--h-line);background:#fff;color:var(--h-ink)}
.rec-dialog .hub-btn-primary{background:var(--h-primary);border-color:var(--h-primary);color:#fff}
.rec-dialog .hub-btn-primary:hover{background:#21523f}
.rec-dialog .hub-btn-ghost:hover{background:var(--h-canvas)}
.rec-dialog .hub-btn:disabled{opacity:.6;cursor:progress}
.rec-small-btn{padding:7px 12px!important;font-size:12px!important;margin-top:8px}
.rec-dialog fieldset{border:1px solid var(--h-line);border-radius:10px;padding:10px 12px 12px;margin:0;min-width:0}
.rec-check-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:8px}
.rec-check-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 34px;gap:8px;align-items:center}
.rec-check-remove{border:1px solid var(--h-line);background:#fff;border-radius:8px;height:42px;cursor:pointer;font-size:18px;color:var(--h-muted)}
.rec-people-filter{margin:6px 0 8px!important}
.rec-people-list{max-height:220px;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:4px 12px;margin-top:6px}
.rec-check{display:flex;align-items:center;gap:8px;font-size:13px;padding:5px 2px;cursor:pointer}
.rec-check[hidden]{display:none}
.rec-check input{width:17px;height:17px;flex-shrink:0;accent-color:#173e33}

/* Detail view */
.rec-detail-status{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.rec-dialog .hub-pill{display:inline-block;font-size:11px;font-weight:650;padding:3px 9px;border-radius:999px;white-space:nowrap}
.rec-dialog .hub-tone-ok{background:#e4f2e8;color:#246a3e}.rec-dialog .hub-tone-warn{background:#fbefd9;color:#8f530b}.rec-dialog .hub-tone-danger{background:#f9e2de;color:#a12f23}.rec-dialog .hub-tone-info{background:#e2edf7;color:#225984}.rec-dialog .hub-tone-neutral{background:#eef1ec;color:#4e5d55}
.rec-meta{font-size:12px;color:var(--h-muted);margin:4px 0 12px}
.rec-source-note{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13px;background:#f3f6f0;border:1px solid var(--h-line);border-radius:9px;padding:8px 11px;margin:6px 0 14px}
.rec-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin:8px 0 6px}
.rec-facts div{min-width:0;border-bottom:1px solid #edf0eb;padding-bottom:8px}
.rec-facts dt{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--h-muted);font-weight:600}
.rec-facts dd{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.rec-subhead{font-size:14px;font-weight:650;margin:18px 0 8px}
.rec-check-view,.rec-linked{list-style:none;margin:0;padding:0}
.rec-check-view li,.rec-linked li{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:8px 0;border-top:1px solid #edf0eb}
.rec-check-view li:first-child,.rec-linked li:first-child{border-top:0}
.rec-linked .rec-hint{margin:0 0 0 auto;white-space:nowrap}
.rec-file{display:flex;align-items:center;gap:7px;margin:14px 0 0}

/* Prompt 7: search, sorting, repeating rows, history, case files */
.rec-search{min-height:34px;font:inherit;font-size:13px;border:1px solid #cfd8cc;border-radius:999px;padding:6px 12px;width:180px;background:#fff;color:var(--h-ink)}
.rec-search:focus-visible{outline:3px solid #e09a6f;outline-offset:1px}
.rec-sort{border:0;background:none;padding:0;font:inherit;font-size:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;font-weight:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.rec-sort:hover{color:var(--h-ink)}
.rec-sort[aria-sort=ascending]::after{content:'▲';font-size:8px}
.rec-sort[aria-sort=descending]::after{content:'▼';font-size:8px}
.rec-no-match{font-size:13px;color:var(--h-muted);padding:10px 4px 2px;margin:0}
.rec-intro{margin-bottom:14px}
.rec-form-note{margin:4px 0 12px;font-size:13px}
.rec-form-heading{border-top:1px solid var(--h-line);padding-top:6px}
.rec-form-heading .rec-subhead{margin:6px 0 0}
.rec-check-single{font-weight:600;font-size:13px}
.rec-rows-wrap{overflow-x:auto;margin-top:6px}
.rec-rows-table{width:100%;border-collapse:separate;border-spacing:6px 6px;font-size:12px}
.rec-rows-table th{text-align:left;font-size:11px;font-weight:600;color:var(--h-muted);padding:0 2px}
.rec-rows-table td{vertical-align:top;min-width:110px}
.rec-rows-table td:last-child{min-width:38px;width:38px}
.rec-rows-table input,.rec-rows-table select,.rec-rows-table textarea{min-height:38px!important;font-size:13px!important;padding:6px 8px!important}
.rec-rows-table textarea{min-height:38px!important}
.rec-rows-view td{vertical-align:top;white-space:pre-wrap}
.rec-child-table{font-size:12px}
.rec-history{margin-top:18px;border-top:1px solid var(--h-line);padding-top:10px}
.rec-history summary{cursor:pointer;font-weight:600;font-size:13px}
.rec-history-list{margin:8px 0 0;padding-left:18px;display:grid;gap:6px;font-size:13px}
.rec-case{margin-top:18px;border:1px solid #e2cfc9;background:#fcf6f4;border-radius:12px;padding:4px 14px 14px}
.rec-case .rec-subhead{display:flex;align-items:center;gap:6px}
.rec-restricted-note{display:flex;align-items:center;gap:6px;margin-top:12px}
.rec-quals{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:13px}
.rec-quals ul{list-style:none;margin:4px 0 0;padding:0 0 0 10px;display:grid;gap:4px}
.rec-overview{margin:6px 0 10px}
.rec-overview .hub-stat{min-width:0}
.rec-overview .hub-stat-sub{display:block;font-size:11px;margin-top:2px}
.rec-panel{margin-bottom:14px}
.rec-panel h3{font-size:15px;font-weight:650;margin:0 0 8px}
.rec-emergency{border:2px solid #e3b4a8;background:#fff8f6}
.rec-emergency-call{background:#a12f23;color:#fff;border-radius:10px;padding:10px 14px;margin:0 0 12px;font-size:14px}
.rec-emergency a{color:#a2441f;font-weight:700}
.rec-panel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 20px}
.rec-panel ul{margin:0;padding-left:18px;display:grid;gap:4px;font-size:13px}

.hub-more{margin-top:6px}
.hub-more summary{cursor:pointer;font-size:13px;font-weight:600;color:#a2441f;padding:6px 2px}

/* Mobile */
@media(max-width:700px){
  .rec-dialog{width:100%;max-width:100%;max-height:100%;height:100%;border-radius:0;margin:0}
  .rec-dialog-body{padding:16px 16px 28px;height:100%}
  .rec-grid,.rec-facts{grid-template-columns:1fr}
  .rec-buttons .hub-btn{flex:1 1 auto;justify-content:center}
  .rec-check-row{grid-template-columns:minmax(0,1fr) 92px 38px}
  .rec-head-tools{width:100%}
  .rec-actions{justify-content:stretch}
  .rec-table td{max-width:none}
  .rec-search{width:100%}
  .rec-rows-table thead{display:none}
  .rec-rows-table,.rec-rows-table tbody{display:block;border-spacing:0}
  .rec-rows-table tr{display:grid;grid-template-columns:1fr;gap:6px;border:1px solid var(--h-line);border-radius:10px;padding:10px 44px 10px 10px;margin-bottom:8px;position:relative}
  .rec-rows-table td{display:block;min-width:0!important;width:auto!important}
  .rec-rows-table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;font-weight:600;color:var(--h-muted);margin-bottom:3px}
  .rec-rows-table td:last-child{position:absolute;top:6px;right:6px}
  .rec-rows-table td:last-child .rec-check-remove{height:32px;width:32px}
  .rec-rows-wrap{overflow:visible}
  .rec-open{text-align:right}
}
