@font-face { font-family: Mulish; src: url(/assets/fonts/Mulish-variable.ttf) format('truetype'); font-weight: 200 900; font-display: swap; }
:root { --navy: #022B4C; --blue: #0F8FBC; --blue-ink: #0b6f93; --light: #EDEDED; --bg: #f4f6f8; --ink: #0d2236; --muted: #55687a; --line: #dbe1e7; --ok: #1d7a46; --warn: #a15c07; --bad: #b3261e; --r: 12px; }
* { box-sizing: border-box; }
body { margin: 0; font: 300 15px/1.55 Mulish, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 .4em; color: var(--navy); }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
a { color: var(--blue-ink); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login__art { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login__art img.logo { height: 34px; width: auto; align-self: flex-start; }
.login__art h1 { color: #fff; font-size: 40px; max-width: 12ch; }
.login__art p { color: #cfe3f0; max-width: 36ch; }
.login__art svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
.login__form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login__form form { width: min(360px, 100%); display: grid; gap: 14px; }
.login__form a.back { font-size: 14px; text-decoration: none; color: var(--muted); }

/* Estrutura */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 60px; background: var(--navy); color: #fff; }
.top img { height: 24px; width: auto; }
.top .area { font-size: 13px; color: #9fc6dc; border-left: 1px solid rgba(255,255,255,.2); padding-left: 14px; }
.top nav { display: flex; gap: 4px; margin-left: 16px; overflow-x: auto; }
.top nav a { color: #dbe9f3; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { background: rgba(255,255,255,.1); color: #fff; }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #cfe3f0; white-space: nowrap; }
.top .me button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
main { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.head p { color: var(--muted); margin: 0; }

/* Cartões do início */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 170px; padding: 22px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(2,43,76,.1); border-color: #c4d3df; }
.card .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #e6f4fa; color: var(--blue-ink); margin-bottom: 8px; }
.card .ic svg { width: 20px; height: 20px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.card .stat { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--blue-ink); }
.card .soon { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); background: #fff4e0; padding: 3px 8px; border-radius: 999px; }
.card--dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.card--dark h2 { color: #fff; } .card--dark p { color: #cfe3f0; } .card--dark .ic { background: rgba(255,255,255,.1); color: #fff; }

/* Painéis e tabelas */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs .badge { margin-left: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 13px; color: var(--muted); }
.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--light); display: block; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--light); color: var(--muted); white-space: nowrap; }
.badge--on { background: #e3f4ea; color: var(--ok); } .badge--new { background: #e6f4fa; color: var(--blue-ink); } .badge--warn { background: #fff4e0; color: var(--warn); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed #c6d0da; border-radius: var(--r); background: #fbfcfd; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* Formulários */
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form .full { grid-column: 1 / -1; }
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--navy); }
label.f small { font-weight: 300; color: var(--muted); }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=email], input[type=file], select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid #cdd6df; border-radius: 9px; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15,143,188,.18); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--light); color: var(--navy); border-color: #b9c5d0; }
.btn--sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn--danger { background: #fff; color: var(--bad); border-color: #f0c8c4; }
.btn--danger:hover { background: #fdecea; color: var(--bad); border-color: var(--bad); }
.msg { margin: 0; font-size: 14px; color: var(--bad); }
.hint { font-size: 13px; color: var(--muted); }

/* Modal */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(680px, calc(100% - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(2, 25, 45, .55); }
dialog .dhead { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
dialog .dhead button { border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); }
dialog .dbody { padding: 22px; max-height: 70vh; overflow: auto; }
dialog .dfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfc; }

/* Em breve */
.soon-page { text-align: center; padding: 72px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.soon-page .ic { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px; display: grid; place-items: center; background: #e6f4fa; color: var(--blue-ink); }
.soon-page .ic svg { width: 30px; height: 30px; }
.soon-page h1 { font-size: 30px; }
.soon-page p { color: var(--muted); max-width: 48ch; margin: 0 auto 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 100; }

@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login__art { min-height: 240px; padding: 28px; }
  .login__art h1 { font-size: 30px; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px; }
  .top .area { display: none; }
  .top nav { order: 3; width: 100%; margin: 0; }
  main { padding: 22px 16px 60px; }
  .form { grid-template-columns: 1fr; }
  table.resp thead { display: none; }
  table.resp tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.resp td { border: 0; padding: 2px 0; }
  table.resp td.wide { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; }
}

.pgs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pgs img { height: 140px; width: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
