/* SEI Document Repository — look and layout */
:root {
  --ink: #16242e; --muted: #5d6c76; --line: #d9e0e4; --bg: #f4f6f7; --card: #ffffff;
  --brand: #0b5c6b; --brand-dark: #084752; --brand-soft: #e3f1f3;
  --green: #18794e; --green-bg: #e2f4ea; --amber: #8a5a00; --amber-bg: #fdefcf; --red: #b3261e; --red-bg: #fbe4e2; --none-bg: #eceff1;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; } h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; } h3 { font-size: 1rem; margin: 1rem 0 .25rem; }
small { display: block; color: var(--muted); font-size: .82rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: .45rem .8rem; min-height: 38px; }
button:hover { border-color: #b7c2c8; } button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; } button.primary:hover { background: var(--brand-dark); }
button.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
button.danger-quiet { color: var(--red); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--brand); text-decoration: underline; text-align: left; }
:focus-visible { outline: 3px solid #7cc4cf; outline-offset: 1px; }
input, select, textarea { width: 100%; border: 1px solid #b9c4ca; border-radius: 8px; padding: .5rem .6rem; background: #fff; min-height: 40px; }
input:disabled, select:disabled, textarea:disabled { background: #f1f3f4; color: #55626a; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .7rem 0 0; } label > input, label > select, label > textarea { margin-top: .25rem; font-weight: 400; font-size: 1rem; }
label.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; font-size: .95rem; } label.check input { width: 18px; height: 18px; min-height: 0; margin: .15rem 0 0; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 1rem 0 0; padding: .2rem .9rem .8rem; } legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.loading, .empty { color: var(--muted); padding: 2rem 1rem; text-align: center; }
.note, .hint { color: var(--muted); font-size: .9rem; } .error { color: var(--red); font-weight: 600; }
.logo { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; border-radius: 6px; padding: .05rem .4rem; letter-spacing: .03em; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .1rem .55rem; vertical-align: middle; white-space: nowrap; }
.badge.demo { background: #fde9a8; color: #5c4300; } .badge.fin { background: #e8e3f7; color: #43307e; } .badge.off { background: var(--none-bg); color: var(--muted); }

/* sign-in */
.login { max-width: 560px; margin: 8vh auto 2rem; padding: 0 16px; } .login .sub { color: var(--muted); margin: 0 0 1.2rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.people { display: grid; gap: .5rem; margin-top: .8rem; } .person { text-align: left; padding: .65rem .9rem; } .person strong { display: block; }
.btns { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.1rem; }

/* frame */
.top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--card); border-bottom: 1px solid var(--line); padding: .6rem 16px; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; white-space: nowrap; }
.top nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.tab { border: 0; background: none; border-radius: 8px; padding: .4rem .7rem; color: var(--muted); font-weight: 600; } .tab b { font-weight: 600; background: var(--none-bg); border-radius: 999px; padding: 0 .45rem; font-size: .8rem; margin-left: .15rem; }
.tab.on { background: var(--brand-soft); color: var(--brand-dark); } .tab.on b { background: #fff; }
.who { display: flex; align-items: center; gap: .6rem; font-size: .9rem; } .who button { min-height: 32px; padding: .25rem .6rem; }
.demo-bar { background: #fff6d6; border-bottom: 1px solid #ecd98e; color: #5c4300; font-size: .88rem; padding: .4rem 16px; }
main { max-width: 1180px; margin: 0 auto; padding: 1rem 16px 4rem; }

/* documents */
.drop { border: 2px dashed #9fb3bb; border-radius: var(--radius); background: var(--card); text-align: center; padding: 1.4rem 1rem; margin-bottom: 1rem; transition: background .15s, border-color .15s; }
.drop strong { font-size: 1.05rem; } .drop small { margin-top: .4rem; }
body.dragging .drop { border-color: var(--brand); background: var(--brand-soft); }
.filters { display: grid; grid-template-columns: 2.2fr 1fr 1.4fr 1.1fr 1.1fr; gap: .5rem; margin-bottom: .6rem; }
.count { color: var(--muted); font-size: .88rem; margin: .4rem 0; }
table.docs { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.docs th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafb; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
table.docs td { padding: .6rem .7rem; border-bottom: 1px solid #edf0f2; vertical-align: top; } table.docs tr:last-child td { border-bottom: 0; }
table.docs tr.off td { color: var(--muted); }
.title { font-weight: 600; color: var(--ink) !important; text-decoration: none !important; } .title:hover { text-decoration: underline !important; }
.acts { white-space: nowrap; text-align: right; } .acts button { min-height: 32px; padding: .25rem .6rem; font-size: .88rem; margin-left: .25rem; }
.pill { display: inline-block; border-radius: 999px; padding: .12rem .6rem; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); } .pill.amber { background: var(--amber-bg); color: var(--amber); } .pill.red { background: var(--red-bg); color: var(--red); } .pill.none { background: var(--none-bg); color: var(--muted); }
.yes { color: var(--green); font-weight: 600; } .no { color: #a3adb3; }
.cats { list-style: none; padding: 0; margin: 0 0 .8rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cats li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem .8rem; border-bottom: 1px solid #edf0f2; } .cats li:last-child { border-bottom: 0; } .cats li.off > span { color: var(--muted); }
.cats button { min-height: 32px; padding: .2rem .6rem; font-size: .88rem; }
form.inline { display: flex; gap: .5rem; max-width: 520px; } form.inline button { white-space: nowrap; }

/* dialogs */
dialog { border: 0; border-radius: 14px; padding: 1.3rem; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--ink); }
dialog.wide { width: min(720px, calc(100vw - 24px)); } dialog.small { width: min(440px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(15, 30, 38, .5); }
dialog h2 { margin: 0 0 .4rem; } .ask p { margin: 0; font-size: 1.02rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.file-line { margin: 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.filebox { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #f6f9fa; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin-top: 1rem; overflow-wrap: anywhere; }
.activity-mini ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: #16242e; color: #fff; padding: .6rem 1rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); z-index: 50; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.bad { background: var(--red); }

/* phones */
@media (max-width: 760px) {
  .filters { grid-template-columns: 1fr 1fr; } .filters #q { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
  table.docs, table.docs tbody, table.docs tr, table.docs td { display: block; width: 100%; } table.docs thead { display: none; }
  table.docs tr { border-bottom: 1px solid var(--line); padding: .5rem 0; } table.docs tr:last-child { border-bottom: 0; }
  table.docs td { border: 0; padding: .2rem .8rem; }
  table.docs td[data-l]:not([data-l="Document"]):not([data-l="Person"])::before { content: attr(data-l) ": "; color: var(--muted); font-size: .82rem; }
  .acts { text-align: left; white-space: normal; padding-top: .45rem !important; } .acts button { margin: 0 .35rem .3rem 0; }
  .who span { display: none; } .filebox { flex-direction: column; align-items: flex-start; }
}
