/* Retains the prototype's layout and colours, with server-rendered controls. */
a{color:#0c6658;text-underline-offset:3px}a.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 15px;border:1px solid var(--border);border-radius:7px;background:#fff;text-decoration:none;font-size:14px;font-weight:600;color:var(--ink)}a.primary{background:var(--green);color:white;border-color:var(--green)}.nav a{color:#b8cdc7;text-decoration:none;padding:13px;border-radius:7px;font-size:14px}.nav a.active,.nav a:hover{background:#28463e;color:#e4f5d1}.heading h1{margin-top:0}.brand{text-decoration:none}.brandmark{font-size:22px}.nav a:focus-visible,a.button:focus-visible{outline:3px solid #e8a43f;outline-offset:3px}.pagepanel{padding:25px}.formcard{max-width:630px;margin:0 auto}.formcard p,.formcard label{font-size:15px}.formcard label{display:block;font-weight:600;margin-bottom:9px}.formcard input:not([type=checkbox]):not([type=hidden]),.formcard select,.formcard textarea{display:block;width:100%;padding:11px 12px;border:1px solid #ccdacf;border-radius:6px;margin:7px 0 20px;background:white;font:inherit}.formcard input[type=checkbox]{margin-right:8px}.helptext{font-size:13px;color:#627969;line-height:1.6;display:block;margin-bottom:18px}.errorlist{color:#9b3c32;background:#fff1ec;padding:12px 12px 12px 30px;border-radius:6px;font-size:14px}.messages{list-style:none;padding:0}.messages li{padding:14px 18px;border:1px solid #cbdccd;background:#edf6e9;border-radius:7px;margin:12px 0;font-size:14px}.messages .error,.messages .warning{background:#fff6df;border-color:#e9dab6;color:#816225}.authpage{max-width:540px;margin:7vh auto;padding:24px}.authpage>.brand{color:#193c34;padding:0;margin-bottom:28px}.authpage .panel{padding:28px}.authpage h1,.authpage h2{font-family:Manrope,sans-serif;letter-spacing:-.7px;font-size:27px}.authpage p{font-size:15px;line-height:1.7}.authpage input:not([type=checkbox]):not([type=hidden]){display:block;width:100%;border:1px solid #cad8cc;border-radius:6px;padding:11px;margin:8px 0 18px;font:inherit}.authpage label{font-size:14px}.authpage button[type=submit]{background:var(--green);color:white}.authpage nav{font-size:13px;display:flex;flex-wrap:wrap;gap:15px;margin-top:22px}.authpage img,.authpage svg{max-width:100%}.authpage textarea{width:100%;min-height:140px;font:inherit}.authpage pre{white-space:pre-wrap;word-break:break-all}.devnote{background:#fff3d8;color:#795c1d;font-size:13px;padding:10px 15px;text-align:center}.hint{font-size:14px}.badge{display:inline-block;background:#edf4eb;border-radius:5px;padding:5px 9px;font-size:13px;color:#3b714e}.badge.error,.badge.rejected{background:#fff0e9;color:#964837}.badge.pending{background:#fff4d7;color:#8c6d23}.documentrow{display:grid;grid-template-columns:1fr auto;gap:15px;padding:20px 0;border-bottom:1px solid #e3e9e1}.documentrow:last-child{border-bottom:0}.documentrow h3{margin:0 0 8px;font-size:16px;overflow-wrap:anywhere}.documentrow small{font-size:13px;color:#728578}.documentrow .actions{justify-content:flex-end}.danger{color:#9c4035}.qrpicture{width:185px;height:185px;background:white;max-width:100%;margin:14px auto;display:block}.detailmeta{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:25px 0}.detailmeta dt{font-size:13px;color:#6b8173;margin-bottom:7px}.detailmeta dd{margin:0;font-size:15px;overflow-wrap:anywhere}.publiclink{overflow-wrap:anywhere;font-size:13px;line-height:1.7}.footerline{margin-top:25px;font-size:13px;color:#708476}.public .brand{font-size:24px}.public .panel{padding:23px}.public .docpreview{width:100%;height:65vh}.brandmark svg{width:21px}.inlineform{display:inline}.nobreak{white-space:nowrap}.printlabel{max-width:400px;margin:30px auto;padding:25px;text-align:center;border:1px solid var(--border);border-radius:8px;background:white}.printlabel .qrpicture{width:240px;height:240px}.printlabel h1{font-size:22px}.printlabel p{overflow-wrap:anywhere}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:780px){.nav a{white-space:nowrap;padding:9px 12px;font-size:13px}.detailmeta{grid-template-columns:1fr}.documentrow{grid-template-columns:1fr}.documentrow .actions{justify-content:flex-start}.authpage{margin:25px auto}.topbar{height:auto;padding-block:14px}.topright{flex-wrap:wrap}.qrpicture{width:180px}.printlabel{margin:15px}}@media print{body>*{display:block!important}.printlabel{border:0;margin:0 auto}.printlabel .actions,.printlabel .hint,.devnote{display:none!important}.printlabel a{color:black}}

dialog { border: 1px solid #dbe3e2; border-radius: 12px; padding: 28px; max-width: 460px; width: calc(100% - 48px); color: #163e44; }
dialog::backdrop { background: rgb(10 30 35 / 55%); }
.delete-link { color: #a62929; }
button.danger { background: #a62929; border-color: #a62929; color: white; }

.batch-action-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid #dbe3e2; border-radius: 7px; text-decoration: none; background: white; }
.batch-action-icon:hover { background: #edf4eb; }
.batch-action-icon.delete-link:hover { background: #fff0ee; border-color: #e4b7b2; }
.batch-action-icon:focus-visible { outline: 3px solid #e8a43f; outline-offset: 3px; }

/* Keep secondary actions grouped and the main action aligned at the row edge. */
.batch-actions-cell { width: 1%; white-space: nowrap; }
.batch-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.batch-secondary-actions { display: flex; align-items: center; gap: 6px; padding-right: 16px; border-right: 1px solid #dbe3e2; }
.batch-row-actions .batch-action-icon { width: 36px; height: 36px; border-color: transparent; background: transparent; }
.batch-row-actions .batch-action-icon svg { display: block; width: 18px; height: 18px; }
.batch-row-actions .batch-action-icon:hover { background: #edf4eb; border-color: #dbe3e2; }
.batch-row-actions .delete-link { color: #73817d; }
.batch-row-actions .delete-link:hover { color: #a62929; background: #fff0ee; border-color: #e4b7b2; }
.batch-row-actions a.button { min-width: 80px; height: 36px; box-sizing: border-box; padding: 0 14px; flex-shrink: 0; }

.topnav-user, .topnav-security, .topnav-signout { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topnav-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.topnav-user > .topnav-icon { color: #6b8173; }
.topnav-security { text-decoration: none; padding: 8px; border-radius: 6px; }
.topnav-security:hover { background: #edf4eb; }
.topnav-security:focus-visible { outline: 3px solid #e8a43f; outline-offset: 2px; }

/* A shared container aligns the header and workspace on both sides. */
.shell { display: block; }
.workspace-content { min-width: 0; }
.shell .main { max-width: 1200px; }
.shell .topbar { padding-inline: 0; }
.topbar-inner { width: 100%; max-width: 1200px; box-sizing: border-box; margin-inline: auto; padding-inline: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar-inner .brand { color: #163e36; padding: 0; flex-shrink: 0; }
.topbar-inner .topright { width: auto; justify-content: flex-end; }
.topbar-inner .brand:focus-visible { outline: 3px solid #e8a43f; outline-offset: 4px; border-radius: 4px; }
@media (max-width: 1100px) { .topbar-inner { padding-inline: 24px; } }
@media (max-width: 780px) {
  .topbar-inner { padding-inline: 16px; flex-wrap: wrap; gap: 12px; }
  .topbar-inner .brand { font-size: 22px; }
  .topbar-inner .topright { flex-wrap: wrap; gap: 10px; margin-left: auto; }
}

.documentrow .batch-action-icon:disabled { opacity: .35; cursor: not-allowed; }

.qrbox .actions { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
.qrbox .actions > a.button { width: 100%; box-sizing: border-box; }

.page-history { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.page-history[hidden] { display: none; }
.page-history .history-arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #526e67; }
.history-arrow svg { display: block; flex-shrink: 0; }
.page-history .history-arrow:hover:not(:disabled) { background: #e8efec; border-color: #d6e1dc; color: #0c6658; }
.page-history .history-arrow:disabled { opacity: .3; cursor: default; }
.page-history .history-arrow:focus-visible { outline: 3px solid #e8a43f; outline-offset: 2px; }
@media (max-width: 780px) { .page-history { display: none; } }
@media print { .page-history { display: none; } }

.security-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.security-card { padding: 26px; display: flex; flex-direction: column; }
.security-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.security-card h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.security-card p { color: #647c74; font-size: 14px; line-height: 1.7; margin: 16px 0 22px; }
.security-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.security-card a.security-danger { color: #a62929; border-color: #e6c8c4; }
.security-card a.security-danger:hover { background: #fff0ee; }
@media (max-width: 780px) { .security-cards { grid-template-columns: 1fr; } .security-card { padding: 22px; } }
