/* SG MediaTech Client Files
   The same visual system as sgmediatech.com: light ground, navy accent used
   sparingly, Bricolage Grotesque for headings and controls, Source Serif 4
   for sentences, IBM Plex Mono for the small labels above headings. */

:root {
  --ground: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #121722;
  --ink-2: #3A4657;
  --muted: #64738A;
  --rule: #DDE3EC;
  --rule-strong: #C2CBD9;
  --accent: #1D3F73;
  --accent-deep: #12294D;
  --wash: #E5EBF5;
  --good: #1B5E3F;
  --good-wash: #E6F2EC;
  --bad: #9B2C2C;
  --bad-wash: #FBEAEA;
  --warn-wash: #FFF6E0;
  --shadow: 0 1px 2px rgba(18,23,34,.05), 0 10px 28px -18px rgba(18,23,34,.28);
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--ground);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .h3 {
  font-family: var(--sans);
  color: var(--ink);
  letter-spacing: -.015em;
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 4.4vw, 44px); }
h2 { font-size: 23px; margin-bottom: 4px; }
h3, .h3 { font-size: 18px; line-height: 1.3; margin-bottom: 10px; }

a { color: var(--accent-deep); text-underline-offset: 3px; }
strong { color: var(--ink); }
code { font-family: var(--mono); font-size: .82em; background: var(--wash); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }
main.wrap { flex: 1 0 auto; padding-top: 40px; padding-bottom: 56px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js-only { display: none; }
.js .js-only { display: block; }

/* --------------------------------------------------------------- header */
.site-header { background: var(--ground); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
/* the lockup ships on its own navy tile; MEDIATECH needs this size to stay legible */
.brand img { width: 93px; height: 60px; border-radius: 8px; display: block; }
.brand .wordmark { font-family: var(--sans); font-weight: 700; font-size: 20px; color: #fff; background: var(--accent-deep); padding: 10px 14px; border-radius: 8px; }
.brand .portal {
  font-family: var(--sans); font-weight: 700; font-size: 17px; color: var(--ink);
  padding-left: 14px; border-left: 1px solid var(--rule-strong);
}
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav a, .linkish {
  font-family: var(--sans); font-size: 15.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 0;
}
.nav a:hover, .linkish:hover { color: var(--accent-deep); }
.nav a.active { color: var(--accent-deep); box-shadow: inset 0 -2px 0 var(--accent); }
form.inline { display: inline; }

/* ------------------------------------------------------------ type bits */
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 10px;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { font-size: 18.5px; margin-top: 12px; max-width: 62ch; }
.sub { color: var(--muted); font-size: 15.5px; margin-bottom: 18px; }
.small { font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
.center { text-align: center; margin-top: 18px; }
.opt { font-weight: 400; color: var(--muted); font-size: .92em; }
.empty { color: var(--muted); font-style: italic; padding: 14px 0; }
.warn { color: #8A5A00; }
.nowrap { white-space: nowrap; }

.page-head { margin-bottom: 30px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.page-head .notes {
  margin-top: 16px; padding: 12px 16px; background: var(--warn-wash); border-radius: 10px;
  font-size: 15px; max-width: 70ch;
}
.narrow { max-width: 460px; margin: 4vh auto 0; }
.narrow .card { margin-top: 24px; }

/* --------------------------------------------------------------- layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.split.wide-left { grid-template-columns: 1.55fr 1fr; }
.panel-col > h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-title { margin-top: 30px; }

@media (max-width: 860px) {
  .split, .split.wide-left { grid-template-columns: 1fr; gap: 40px; }
  main.wrap { padding-top: 28px; }
  .wrap { padding: 0 18px; }
  .brand img { width: 78px; height: 50px; }
  .brand .wordmark { font-family: var(--sans); font-weight: 700; font-size: 20px; color: #fff; background: var(--accent-deep); padding: 10px 14px; border-radius: 8px; }
.brand .portal { font-size: 15.5px; padding-left: 12px; }
  .nav { width: 100%; gap: 18px; border-top: 1px solid var(--rule); padding-top: 8px; }
}

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  padding: 24px 24px 22px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.empty-card p { margin-top: 6px; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--sans); font-size: 15.5px; font-weight: 700;
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent); border-radius: 9px;
  padding: 10px 18px; min-height: 44px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.small { font-size: 14px; padding: 6px 12px; min-height: 36px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-deep); background: transparent; }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: #E3C2C2; }
.btn.danger-ghost:hover { background: var(--bad-wash); border-color: var(--bad); }
.btn input[type=file] { display: none; }

/* ---------------------------------------------------------------- forms */
.stack { display: flex; flex-direction: column; }
.stack label, .note-label {
  font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink); margin: 14px 0 6px;
}
.stack label:first-of-type { margin-top: 2px; }
.stack .btn { margin-top: 20px; align-self: flex-start; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font-family: var(--serif); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--rule-strong); border-radius: 9px;
  padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--wash); }

/* --------------------------------------------------------------- flash */
.flash {
  border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-family: var(--sans);
  font-size: 15px; border: 1px solid var(--rule); background: var(--surface);
}
.flash.success { background: var(--good-wash); border-color: #BFDCCB; color: var(--good); }
.flash.error   { background: var(--bad-wash); border-color: #EBC5C5; color: var(--bad); }
.flash.info    { background: var(--wash); border-color: var(--rule-strong); color: var(--accent-deep); }
.flash.warn    { background: var(--warn-wash); border-color: #EEDBA7; color: #6B4B00; margin-top: 18px; }
.flash div + div { margin-top: 4px; }

/* --------------------------------------------------------------- badges */
.badge {
  display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .02em; color: #fff; background: var(--accent); border-radius: 999px;
  padding: 2px 9px; vertical-align: middle; line-height: 1.5;
}
.badge.muted { background: var(--wash); color: var(--muted); }

.chip {
  flex: 0 0 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; background: var(--wash); color: var(--accent-deep);
}
.chip.img { background: #E8EEF8; color: #2C4F86; }
.chip.av  { background: #EDE9F6; color: #4B3B80; }
.chip.zip { background: #EEF1F4; color: #4C5869; }

/* ----------------------------------------------------------- file list */
.files { list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.file { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.file:last-child { border-bottom: 0; }
.file.is-new { background: linear-gradient(90deg, var(--wash), var(--surface) 55%); }
.fmain { flex: 1 1 0; min-width: 0; }
.fname {
  font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none;
  overflow-wrap: anywhere;
}
.fname:hover { color: var(--accent-deep); text-decoration: underline; }
.fnote { font-size: 15px; color: var(--ink-2); margin-top: 2px; font-style: italic; }
.fmeta { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.fmeta .seen { color: var(--good); }
.fmeta .unseen { color: #8A5A00; }
.factions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
@media (max-width: 560px) {
  .file { flex-wrap: wrap; }
  .factions { width: 100%; justify-content: flex-start; padding-left: 60px; }
}

/* ------------------------------------------------------------ uploader */
.upload { margin-bottom: 6px; }
.drop {
  border: 2px dashed var(--rule-strong); border-radius: 14px; background: var(--surface);
  padding: 26px 20px; text-align: center; transition: border-color .12s, background .12s;
}
.drop.over { border-color: var(--accent); background: var(--wash); }
.drop-title { font-family: var(--sans); font-weight: 700; font-size: 18px; color: var(--ink); }
.drop-hint { color: var(--muted); font-size: 15px; margin: 4px 0 14px; }
.drop-or { color: var(--muted); font-size: 14px; margin-top: 8px; }
.note-label { display: block; margin-top: 16px; }
.limits { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 10px; }

.queue { list-style: none; margin-top: 12px; }
.qrow { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.qtop { display: flex; justify-content: space-between; gap: 12px; font-family: var(--sans); font-size: 14px; }
.qname { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.qstatus { color: var(--muted); white-space: nowrap; }
.qbar { height: 6px; background: var(--wash); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.qfill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.qrow.ok .qfill { background: var(--good); }
.qrow.ok .qstatus { color: var(--good); }
.qrow.err { border-color: #EBC5C5; background: var(--bad-wash); }
.qrow.err .qfill { background: var(--bad); }
.qrow.err .qtop { flex-direction: column; gap: 2px; }
.qrow.err .qstatus { color: var(--bad); white-space: normal; text-align: left; }
.qdone { font-family: var(--sans); font-size: 14px; color: var(--ink-2); padding: 6px 2px; }
@media (prefers-reduced-motion: reduce) { .qfill, .drop { transition: none; } }

/* ------------------------------------------------------------ dashboard */
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.stats div {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 12px 18px; min-width: 130px; box-shadow: var(--shadow);
}
.stats strong { display: block; font-family: var(--sans); font-size: 24px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats span { font-family: var(--sans); font-size: 13.5px; color: var(--muted); }
.stats .hot { border-color: var(--accent); background: var(--wash); }
.stats .hot strong { color: var(--accent-deep); }

.clients, .people { list-style: none; }
.clients { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.clients li { padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.clients li:last-child { border-bottom: 0; }
.clients li.paused { background: var(--ground); }
.clients li.paused .cname { color: var(--muted); }
.cname { font-family: var(--sans); font-weight: 700; font-size: 17.5px; color: var(--ink); text-decoration: none; margin-right: 6px; }
.cname:hover { color: var(--accent-deep); text-decoration: underline; }
.cmeta { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

.people li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.people li:last-child { border-bottom: 0; }
.people li.paused strong { color: var(--muted); }
.pactions { display: flex; gap: 8px; flex-wrap: wrap; }

.credentials { border-color: var(--accent); }
.copybox { font-family: var(--mono); font-size: 13px; line-height: 1.55; margin: 6px 0 12px; background: var(--ground); }

/* ------------------------------------------------------------- activity */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
table.activity { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14.5px; min-width: 640px; }
.activity th { text-align: left; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--ground); padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.activity td { padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.activity tr:last-child td { border-bottom: 0; }
.activity .detail { color: var(--ink-2); overflow-wrap: anywhere; }
.act { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--wash); color: var(--accent-deep); white-space: nowrap; }
.act-uploaded, .act-delivered { background: var(--good-wash); color: var(--good); }
.act-deleted, .act-clientpaused, .act-logindisabled { background: var(--bad-wash); color: var(--bad); }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 28px 0 30px; font-size: 15px; }
.site-footer .meta { color: var(--muted); font-size: 14px; margin-top: 4px; }

body.bare .site-header .wrap { justify-content: center; }
body.bare .brand { margin-right: 0; }

@media (pointer: coarse) {
  .btn.small { min-height: 42px; }
}

/* ---------------------------------------- sending files from the Clients page */
.deliver-card { margin-bottom: 22px; }
.deliver-card .upload { margin-top: 12px; }
.pick-label { display: block; font-family: var(--sans); font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 0 6px; }
.js-client-pick, #pick-client { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 10px; padding: 11px 12px; min-height: 46px; margin-bottom: 12px; }
#pick-client:focus { outline: 3px solid rgba(29, 63, 115, .25); border-color: var(--accent); }
#pick-client.needs { border-color: #A12C2C; outline: 3px solid rgba(161, 44, 44, .18); }
.list-head { margin: 0 0 10px; }
.clients li { position: relative; }
.deliver-link { float: right; margin-left: 10px; }
@media (max-width: 560px) { .deliver-link { float: none; display: inline-flex; margin: 8px 0 0; } }

/* ---------------------------------------------- files wait for Send */
.sendbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.sendbar[hidden] { display: none; }
.sendhint { font-size: 14px; color: var(--muted); }
.qremove { margin-left: 10px; background: none; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 4px 10px; font: 600 13px var(--sans); color: var(--ink-2); cursor: pointer; min-height: 30px; flex: none; }
.qremove:hover { border-color: #A12C2C; color: #A12C2C; }
@media (max-width: 560px) { .qremove { min-height: 40px; } .sendbar .btn { width: 100%; } }
.qtop .qstatus { margin-left: auto; }
.qtop .qname { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.email-card { margin-top: 22px; }

/* review box before SEND */
.sendbar { display: block; margin-top: 14px; padding: 16px 18px; background: var(--wash); border: 1px solid #C9D5E8; border-radius: 12px; }
.sendsummary { margin: 0 0 4px; font-family: var(--sans); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.sendnote { margin: 0 0 12px; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.sendnote.empty { color: var(--muted); font-style: italic; }
.sendrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sendrow .js-send { letter-spacing: .06em; min-width: 120px; }
@media (max-width: 560px) { .sendrow .btn { flex: 1 1 auto; } .sendhint { flex-basis: 100%; } }
