@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Arimo"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/arimo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Arimo"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/arimo-latin-700-normal.woff2") format("woff2"); }
:root {
  --navy: #2c2c74;
  --navy-2: #3d3d94;
  --deep: #15173f;
  --red: #ba1e2d;
  --red-dark: #9a1724;
  --gold: #d9b23c;
  --ink: #16213a;
  --muted: #56607a;
  --line: #dfe2ee;
  --paper: #f5f6fb;
  --white: #fff;
  --danger: #ba1e2d;
  --ok: #1d6b3f;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  font-family: Arimo, Arial, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
h1, h2, h3 { font-family: Montserrat, Arimo, Arial, sans-serif; font-weight: 800; letter-spacing: -.02em; color: var(--navy); margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }
a { color: var(--navy-2); }
.boot { padding: 3rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* header */
.top {
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(21,23,63,.06);
  padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 1rem; }
.brand img { height: 46px; width: auto; display: block; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); border-left: 2px solid var(--gold); padding-left: 1rem; }
.top .who { margin-left: auto; text-align: right; font-size: .95rem; color: var(--muted); }
.top .who strong { display: block; font-size: 1.05rem; color: var(--navy); }

/* buttons and fields */
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: var(--radius);
  border: 2px solid var(--navy); background: var(--navy); color: var(--white);
  padding: .5rem 1.1rem; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--navy-2); border-color: var(--navy-2); }
button.primary { background: var(--red); border-color: var(--red); color: var(--white); }
button.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
button.ghost, .btn.ghost { background: var(--white); color: var(--navy); }
button.ghost:hover, .btn.ghost:hover { background: #eceef8; border-color: var(--navy); }
button.danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: #fbeaec; }
button.link { background: none; border: 0; color: var(--navy); text-decoration: underline; padding: 0; font-weight: 400; }
button.link:hover { background: none; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1 { margin-top: .2rem; }
label { display: block; font-weight: 600; margin-bottom: .8rem; }
input, select, textarea {
  font: inherit; display: block; width: 100%; margin-top: .25rem;
  padding: .5rem .6rem; border: 1px solid #b7c0cb; border-radius: var(--radius); background: var(--white); color: var(--ink);
}
input[type=file] { padding: .4rem; }
input[type=radio], input[type=checkbox] { display: inline-block; width: auto; margin: 0 .6rem 0 0; transform: scale(1.25); }
textarea { resize: vertical; }
label.pick { font-weight: 400; display: flex; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); }
label.pick:has(input:checked) { border-color: var(--navy); background: #eceef8; }
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; margin-bottom: .9rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }

/* sign in */
body.gate { background: linear-gradient(160deg, var(--deep) 0%, var(--navy) 100%); }
.signin { max-width: 460px; margin: 7vh auto 3rem; padding: 0 1rem; }
.signin .tagline { color: var(--gold); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; margin-bottom: 1rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.2rem; }
.signin .card { box-shadow: 0 18px 40px rgba(0,0,0,.28); border: 0; padding: 2rem; }
.signin .card img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 1.4rem; }
.signin button[type=submit] { width: 100%; margin-top: .3rem; }
.signin .help { color: #c7cce6; text-align: center; }
.signin .help button.link { color: var(--white); }

/* messages */
.msg { padding: .6rem .8rem; border-radius: var(--radius); margin-bottom: .9rem; border: 1px solid; }
.msg.err { color: var(--danger); background: #fbeaec; border-color: #eab9bf; }
.msg.ok { color: var(--ok); background: #e9f5ee; border-color: #b9dcc7; }
.secret { font-family: Consolas, Menlo, monospace; font-size: 1.15rem; background: #fbf6e4; border: 1px dashed var(--gold); padding: .5rem .8rem; border-radius: var(--radius); display: inline-block; user-select: all; }

/* layout */
main { max-width: 1080px; margin: 0 auto; padding: 1.5rem; }
.admin { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; max-width: 1320px; margin: 0 auto; padding: 1.5rem; align-items: start; }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } }
.side { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.side ul { list-style: none; margin: .6rem 0 0; padding: 0; max-height: 62vh; overflow: auto; }
.side li button { width: 100%; text-align: left; background: none; color: var(--ink); font-weight: 400; border: 0; border-left: 4px solid transparent; border-radius: 0; padding: .5rem .6rem; }
.side li button:hover { background: var(--paper); }
.side li button[aria-current=true] { border-left-color: var(--red); background: #eceef8; font-weight: 700; color: var(--navy); }
.side li .off { color: var(--muted); font-weight: 400; font-size: .85rem; }

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin: 1rem 0 1.2rem; }
.tabs button { background: none; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -2px; padding: .6rem .9rem; font-weight: 700; }
.tabs button:hover { color: var(--navy); background: none; }
.tabs button[aria-selected=true] { color: var(--navy); border-bottom-color: var(--red); }

/* file list */
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.files li:last-child { border-bottom: 0; }
.files .name { font-weight: 600; overflow-wrap: anywhere; }
.files .meta { color: var(--muted); font-size: .9rem; }
.files .grow { flex: 1 1 260px; min-width: 0; }
.tag { font-size: .8rem; background: #eceef8; border-radius: 99px; padding: .1rem .6rem; color: var(--navy-2); margin-left: .4rem; white-space: nowrap; }
.empty { color: var(--muted); padding: .6rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
progress { width: 100%; height: .7rem; accent-color: var(--navy); }

/* dashboard viewer */
.viewer { position: fixed; inset: 0; background: var(--white); display: flex; flex-direction: column; z-index: 10; }
.viewer header { background: var(--deep); color: var(--white); padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid var(--gold); }
.viewer header strong { flex: 1; overflow-wrap: anywhere; }
.viewer iframe { flex: 1; border: 0; width: 100%; }
.full { width: 100%; }
.mt { margin-top: .8rem; }
dialog.ask { border: 0; border-top: 4px solid var(--red); border-radius: var(--radius); padding: 1.4rem; max-width: 30rem; color: var(--ink); box-shadow: 0 18px 40px rgba(0,0,0,.3); }
dialog.ask::backdrop { background: rgba(21,23,63,.55); }
.demo-bar { background: #fbf6e4; border-bottom: 1px solid var(--gold); padding: .5rem 1rem; font-size: .92rem; text-align: center; color: var(--ink); }
.demo-bar button { margin: .15rem .3rem; padding: .2rem .7rem; border-width: 1px; }

/* footer */
html, body { min-height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
#app { flex: 1; display: flex; flex-direction: column; }
#app > main, #app > .admin, #app > .signin { flex: 1; width: 100%; }
.foot { background: var(--deep); color: #c7cce6; padding: 1.3rem 1.5rem; font-size: .9rem; text-align: center; }
.foot strong { color: var(--white); }
body.gate .foot { background: transparent; }

/* messages, activity, contacts */
.note { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.note:last-child { border-bottom: 0; }
.note .meta { color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.note .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.tag.new { background: var(--red); color: var(--white); }
.scroll { overflow-x: auto; }
table.log { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .93rem; }
table.log th { text-align: left; background: var(--navy); color: var(--white); padding: .5rem .7rem; white-space: nowrap; }
table.log td { padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.log td:first-child { white-space: nowrap; }
table.log tr:nth-child(even) td { background: #f8f9fd; }
.contact { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr auto; gap: .5rem; margin-bottom: .6rem; align-items: center; }
.contact input { margin-top: 0; }
@media (max-width: 700px) { .contact { grid-template-columns: 1fr; padding-bottom: .6rem; border-bottom: 1px solid var(--line); } }
.grow { flex: 1; }
.side .row button { padding: .4rem .5rem; font-size: .92rem; }
.asbar { background: #fbf6e4; border-bottom: 1px solid var(--gold); padding: .6rem 1.5rem; text-align: center; }
.asbar button { margin-left: .6rem; padding: .25rem .8rem; }
.row.between { justify-content: space-between; }
