/* Header, tab bar and tables follow Splendour Pay (warm grey header, navy buttons). */
.top { background: var(--head); color: #fff; padding: 14px 24px; display: flex; gap: 16px; align-items: center; position: sticky; top: 0; z-index: 40; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.top .logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.top .sub { color: #e2ded8; font-size: 13px; }
.top select { width: auto; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); padding: 5px 8px; }
.top select option { color: var(--ink); background: #fff; }
.top nav { display: flex; gap: 6px; align-items: center; }
.top nav .btn, .top nav button { background: none; border: none; color: #ded9d1; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 6px; }
.top nav .btn:hover, .top nav button:hover { color: #fff; border: none; }
.top nav .btn.on { background: rgba(255,255,255,.15); color: #fff; }
.top nav .btn.primary { background: #fff; color: var(--head); font-weight: 600; }
.top nav .btn.primary:hover { background: #f2f0ec; color: var(--head); }
main { padding: 24px 24px 60px; max-width: 1280px; margin: 0 auto; }
.login { max-width: 460px; margin: 48px auto; }
.login #gbtn { min-height: 44px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; background: var(--tint); border-radius: 8px; padding: 6px; margin-bottom: 16px; }
.filters button { background: none; border: none; border-radius: 6px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.filters button:hover:not(.on) { background: #e6e2db; }
.filters button.on { background: var(--accent); color: #fff; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card table.list { border: none; box-shadow: none; border-radius: 0; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
table.list th { color: var(--ink); font-weight: 700; background: #f0f0f2; white-space: nowrap; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: var(--highlight); }
@media (max-width: 700px) { .top { padding: 12px 12px 8px; gap: 6px 10px; } .top nav { flex: 0 0 100%; overflow-x: auto; } main { padding: 12px 10px 60px; } .card { padding: 14px 12px; } }
@media (max-width: 700px) { table.list .hide-sm { display: none; } }

.editor { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.editor aside { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .editor aside { position: static; max-height: none; } }
/* Field buttons stay in view while scrolling down a long document. */
#toolsCard { position: sticky; top: 64px; z-index: 25; max-height: 45vh; overflow: auto; box-shadow: 0 4px 12px rgba(16,24,40,.08); }
@media (max-width: 900px) { #toolsCard { position: static; max-height: none; } }
.signer-row { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; }
.signer-row .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 10px; }
.signer-row input { padding: 6px 8px; font-size: 14px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.placing .layer { cursor: crosshair; }
.fld { position: absolute; border: 1.5px solid; border-radius: 3px; font-size: 11px; display: flex; align-items: center; padding: 0 3px; overflow: hidden; cursor: move; user-select: none; touch-action: none; white-space: nowrap; }
.fld.sel { box-shadow: 0 0 0 2px var(--accent); }
.fld .x { position: absolute; top: -1px; right: 1px; cursor: pointer; font-weight: 700; }
.fld .rs { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; cursor: nwse-resize; background: currentColor; opacity: .6; }
.docbar { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.timeline li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.timeline time { color: var(--muted); white-space: nowrap; min-width: 130px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
.problems { background: #fff6e5; border: 1px solid #f0d9a8; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.problems li { margin: 2px 0; }

/* New envelope drop zone (Splendour Pay's invoice drop). */
.drop { display: flex; flex-direction: column; gap: 4px; align-items: center; border: 1.5px dashed #b7ddd1; border-radius: 8px; padding: 26px; margin: 0; text-align: center; color: var(--ink); cursor: pointer; background: #eef8f4; }
.drop b { font-size: 14px; }
.drop.over, .drop:hover { border-color: var(--accent); background: #dcf0e7; }
.drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.picked { margin: 0; padding-left: 18px; }
/* Blanks the sender fills in: amber, dashed until filled. */
.fld.blank { border-style: dashed; }
.fld.blank:not(.empty) { border-style: solid; color: #102040 !important; }
.suggest-note { border-left: 3px solid var(--accent); margin-bottom: 16px; }
