/* Renovis Klar — approved visual direction 1. Presentation only; keep DOM and scroll ownership. */
:root {
  --ink: #163d34;
  --green: #153e34;
  --green2: #185b48;
  --mint: #e8f1ec;
  --paper: #edf2ef;
  --muted: #53685f;
  --line: #d8e4dc;
  --shadow: 0 5px 18px rgba(22, 61, 52, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
body { background: var(--paper); }
.app-shell { background: var(--paper); }
.topbar { background: var(--green); box-shadow: 0 2px 12px rgba(22,61,52,.1); }
.page-title h1 { letter-spacing: -.035em; font-weight: 750; }
.eyebrow { color: var(--green2); letter-spacing: .13em; font-weight: 700; }
h2, h3, h4 { line-height: 1.35; letter-spacing: -.015em; }
.job-list { gap: 14px; }
.job-card, .admin-project-card, .upload-card, .daily-overview,
.message-detail-area, #hrdOrderTools {
  border-color: var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.job-card h3, .admin-project-card h3 { font-weight: 750; }
.job-card-arrow { color: var(--green2); }
.primary { background: var(--green2); border-radius: 11px; font-weight: 700; line-height: 1.45; }
.secondary { border-color: var(--line); border-radius: 11px; font-weight: 650; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-color: var(--line); border-radius: 10px; background-color: #fff; color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #64776e; opacity: 1; }
label { font-weight: 650; }
button:focus-visible, summary:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #387f68; outline-offset: 2px;
}
.bottom-nav { background: #fff; border-top-color: var(--line); box-shadow: 0 -3px 14px rgba(22,61,52,.04); }
.bottom-nav button { border-radius: 12px; color: var(--muted); }
.bottom-nav button.active { background: var(--mint); color: var(--green2); }
.app-dialog-bar { background: #fff; border-bottom-color: var(--line); }
.app-dialog-title { font-weight: 750; }
.app-dialog-body { background: var(--paper); }
.app-dialog-back, .app-dialog-bar .dialog-close { background: var(--mint); color: var(--green2); font-weight: 650; }
.hrd-own-remark-panel { padding: 16px; gap: 14px; border-color: var(--line); border-radius: 18px; background: #f7faf8; }
.hrd-own-head h3 { font-size: 18px; font-weight: 750; }
.hrd-trade-group {
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  box-shadow: 0 3px 12px rgba(22,61,52,.04);
}
.hrd-trade-group > summary { padding: 16px; font-size: 14px; line-height: 1.5; background: #fff; }
.hrd-trade-group > summary strong { font-weight: 750; }
.hrd-trade-group > summary::before { color: var(--green2); }
.hrd-trade-group > summary > span:not(.hrd-attention) { font-size: 12px; color: var(--muted); }
.hrd-trade-group[open] > summary { border-bottom: 1px solid var(--line); }
.hrd-trade-group > [data-hrd-trade-panel] {
  padding: 14px; gap: 14px; border-top: 0; background: var(--mint);
}
.hrd-own-current, .hrd-own-order-facts span {
  background: #fff; border-color: var(--line); border-radius: 12px; padding: 14px;
}
.hrd-own-current p, .hrd-own-preview p, .hrd-own-success p {
  font-size: 14px; line-height: 1.7;
}
.hrd-own-current small, .hrd-own-current time, .hrd-own-form small { font-size: 12px; line-height: 1.55; }
.hrd-own-current small { font-weight: 650; text-transform: none; }
.hrd-own-form { gap: 12px; }
.hrd-own-form label { font-size: 13px; }
.hrd-own-form textarea { line-height: 1.6; padding: 12px; }
.hrd-own-current details, details[data-reading-key="remark-history"] {
  background: #f7faf8; border: 1px solid var(--line); border-radius: 10px; padding: 0;
}
.hrd-own-current details > summary, details[data-reading-key="remark-history"] > summary {
  padding: 12px; color: var(--green2); font-size: 13px; font-weight: 650; cursor: pointer;
}
.hrd-own-current details[open] > summary, details[data-reading-key="remark-history"][open] > summary {
  border-bottom: 1px solid var(--line); background: var(--mint); border-radius: 10px 10px 0 0;
}
.hrd-own-current details > :not(summary), details[data-reading-key="remark-history"] > :not(summary) { margin: 12px; }
.rapport-section, .shared-files-section, .workproof-section, .job-admin-tools,
.admin-source-data details {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 3px 12px rgba(22,61,52,.035);
}
.rapport-section > summary, .shared-files-section > summary, .workproof-section > summary,
.job-admin-tools > summary, .admin-source-data details > summary {
  padding: 16px; font-size: 14px; line-height: 1.5; font-weight: 700;
  cursor: pointer; border-radius: 16px;
}
.rapport-section[open] > summary, .shared-files-section[open] > summary,
.workproof-section[open] > summary, .job-admin-tools[open] > summary,
.admin-source-data details[open] > summary { background: var(--mint); border-radius: 16px 16px 0 0; }
.rapport-content, .source-data-content { background: #fff; border-color: var(--line); }
.hrd-schedule { background: #fff; border-color: var(--line); border-radius: 12px; }
.hrd-schedule details > summary { color: var(--green2); font-weight: 650; }
.daily-checklist > li { padding: 10px 0; border-bottom-color: var(--line); }
.daily-checklist details[open] { background: #f3f7f4; border-radius: 10px; padding: 10px; }
.daily-checklist summary { font-weight: 600; line-height: 1.55; }
.daily-open > summary { padding: 10px 0; color: var(--green2); }
.daily-open p, .daily-checklist p { line-height: 1.65; }
.hrd-action-tabs, .hrd-hub-tabs { gap: 6px; }
.hrd-action-tabs button { border-radius: 10px; font-weight: 650; }
.hrd-action-tabs button.active { background: var(--green2); color: #fff; }
/* Status/approval colours deliberately retain their existing meaning. */
.hrd-attention, .hrd-own-head > .hrd-attention {
  border-color: #e6bcb3; background: #fff0ee; color: #a3241b; box-shadow: none;
}
@media (max-width: 430px) {
  .hrd-own-remark-panel { padding: 12px; }
  .hrd-trade-group > summary { padding: 14px; }
  .hrd-trade-group > [data-hrd-trade-panel] { padding: 12px; }
  .hrd-own-current { padding: 12px; }
}

#accountPasswordDialog { width:min(92vw,480px); max-height:90vh; overflow:auto; }
#accountPasswordIdentity { font-weight:700; overflow-wrap:anywhere; }
#accountPasswordForm { display:grid; gap:16px; }
#accountPasswordForm label { display:grid; gap:6px; }
#accountPasswordForm label:has(input[type=checkbox]) { display:flex; align-items:center; }
#accountPasswordForm input[type=checkbox] { width:20px; height:20px; }
#accountPasswordError { color:#9c2626; }

/* Project overview: vertical facts and one existing trade entry point per block. */
#allJobs.job-list, #allJobs .job-region-list, #adminProjectList { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; }
.project-overview-card { display:flex; flex-direction:column; align-items:stretch; gap:0; min-width:0; padding:22px; cursor:default; }
.project-overview-card header { min-width:0; }
.project-overview-card h3 { margin:8px 0; font-size:20px; overflow-wrap:anywhere; }
.project-location { margin:0 0 6px; color:var(--muted); }
.project-trade-entry { display:flex; flex-direction:column; align-items:stretch; gap:18px; border-top:1px solid var(--line); margin-top:20px; padding-top:20px; min-width:0; }
.project-fact { display:flex; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; }
.project-fact>span, .project-fact>small { color:var(--muted); font-size:12px; line-height:1.5; }
.project-fact>strong { font-size:15px; line-height:1.5; overflow-wrap:anywhere; }
.project-notices { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.project-notices:empty { display:none; }
.project-overview-card button { width:100%; white-space:normal; }

/* Compact object entry; trade details remain in the project dialog. */
.project-overview-card { padding:0; overflow:hidden; }
.project-open-button { display:flex; align-items:center; gap:16px; text-align:left; border:0; border-radius:inherit; background:transparent; color:var(--ink); padding:18px 22px; cursor:pointer; }
.project-open-button:hover { background:var(--mint); }
.project-open-button:focus-visible { outline:3px solid var(--green); outline-offset:-3px; }
.project-open-copy { display:flex; flex-direction:column; gap:8px; min-width:0; flex:1; }
.project-open-address { font-size:18px; line-height:1.4; overflow-wrap:anywhere; }
.project-open-arrow { font-size:28px; color:var(--muted); flex:none; }
.project-overview-card .project-notices:not(:empty) { padding:0 22px 16px; }
.work-package-card:has(.project-fact) { flex-wrap:wrap; }
.work-package-card>.project-fact { flex-basis:100%; }

/* Dedicated HRD inbox: first-level access, independent of project dialogs. */
#hrdInboxLauncher[hidden]{display:none}
.hrd-inbox-launcher{display:flex;align-items:center;gap:12px;flex:0 0 auto;margin:0 18px 10px;padding:12px 16px;border:1px solid #c7d8d1;border-radius:14px;background:#eef5f1;color:#123c36;text-align:left;cursor:pointer}
.hrd-inbox-launcher>span:first-child{display:grid;gap:3px;flex:1;min-width:0}.hrd-inbox-launcher strong{font-size:16px}.hrd-inbox-launcher small{font-size:12px;line-height:1.4}.hrd-inbox-count{display:grid;place-items:center;min-width:30px;min-height:30px;border-radius:20px;background:#d9e9e1;font-weight:800}
.hrd-inbox-launcher.has-open{background:#fff0ef;border:2px solid #b32525;color:#8f1717}.has-open .hrd-inbox-count{background:#b32525;color:white}.hrd-inbox-launcher:focus-visible{outline:3px solid #ab882a;outline-offset:2px}
.hrd-inbox-list{display:grid;gap:14px}.hrd-inbox-card>summary{display:flex;gap:12px;align-items:flex-start;cursor:pointer;padding:8px 0}.hrd-inbox-summary{display:grid;gap:5px;min-width:0;flex:1}.hrd-inbox-summary strong{font-size:16px}.hrd-inbox-summary small{color:#5a6f68}.hrd-inbox-excerpt{font-size:13px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}.hrd-inbox-card>section{padding-top:14px;border-top:1px solid #d7e1dc}.hrd-inbox-card p,.hrd-inbox-card textarea{white-space:pre-wrap}.hrd-inbox-compose{margin:24px 0;padding:18px;background:white;border:1px solid #d7e1dc;border-radius:16px}.hrd-inbox-compose>summary{font-weight:800;cursor:pointer}.hrd-inbox-compose label{margin-top:16px}#hrdInboxStatus{font-size:13px;line-height:1.6;color:#526b62}body:not([data-role="admin"]) #hrdInboxView{display:none!important}
@media(max-width:480px){.hrd-inbox-card>summary{flex-direction:column}.hrd-inbox-card .hrd-action-state{white-space:normal}.hrd-inbox-launcher{margin-left:12px;margin-right:12px;padding:10px 12px}}
.hrd-historical-failures{margin-top:1rem;padding:1rem;border:1px solid #cbd5e1;border-radius:12px;color:#475569;background:#f8fafc}.hrd-historical-failures summary{font-weight:600;cursor:pointer}.hrd-historical-failures article{margin-top:1rem;padding-top:.75rem;border-top:1px solid #e2e8f0}.hrd-historical-failures time{display:block;font-size:.8rem}.hrd-historical-failures p{white-space:pre-wrap;overflow-wrap:anywhere}

/* Auftraggeber: consistent red confirmation actions; navigation stays unchanged. */
body[data-role="admin"] button.confirmation-action,
body[data-role="admin"] button.danger-confirm {
  background: #a52d2d !important;
  border-color: #a52d2d !important;
  color: #fff !important;
}
body[data-role="admin"] button.confirmation-action:not(:disabled):hover,
body[data-role="admin"] button.danger-confirm:not(:disabled):hover {
  background: #892323 !important;
  border-color: #892323 !important;
}
body[data-role="admin"] button.confirmation-action:focus-visible,
body[data-role="admin"] button.danger-confirm:focus-visible {
  outline: 3px solid #a52d2d;
  outline-offset: 3px;
}
body[data-role="admin"] button.confirmation-action:disabled,
body[data-role="admin"] button.danger-confirm:disabled {
  opacity: .45;
  cursor: not-allowed;
}
