@font-face { font-family: Poppins; src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Poppins; src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
:root {
  color-scheme: dark;
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.55;
  color: #e8f2fb;
  background: #050f1d;
  --ink: #122b43;
  --muted: #a9c1d6;
  --line: #c9d8e6;
  --blue: #004b6e;
  --cyan: #7ddcff;
  --glass: rgba(8, 27, 49, .88);
  --edge: rgba(125, 200, 245, .22);
}
* { box-sizing: border-box; }
body {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0;
  background: radial-gradient(ellipse 75% 75% at 74% 42%, #0a2a4a, transparent 72%), #050f1d;
  background-attachment: fixed;
}
#globo { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
body > :not(#globo, .skip) { position: relative; z-index: 1; }
h1, h2 { margin: 0 0 .45rem; line-height: 1.2; font-weight: 600; letter-spacing: -.03em; color: #fff; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1.1rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.brand { border-bottom: 1px solid var(--edge); background: rgba(5, 16, 31, .86); }
.brand-inner {
  display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap;
  max-width: 88rem; min-height: 5.5rem; margin: 0 auto; padding: .5rem 1.5rem;
}
.brand-logo { margin-left: -.5rem; border-radius: .5rem; }
.brand-logo img { display: block; width: 10.5rem; height: auto; }
.brand-name { padding-left: 1.25rem; border-left: 1px solid var(--edge); color: #cfe3f3; font-size: .95rem; font-weight: 500; }
.account { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.avatar {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid var(--edge); border-radius: 50%;
  background: #0f4d74; color: #e6f8ff; font-size: .875rem; font-weight: 600;
}
.me { display: flex; align-items: center; gap: .75rem; padding: .25rem; border-radius: 2rem; color: inherit; text-decoration: none; }
.me:hover strong { text-decoration: underline; }
.tip-bar a { color: inherit; font-weight: 600; }
.account-name { display: grid; line-height: 1.3; font-size: .9rem; }
.account-name strong { font-weight: 500; }
.account-name small { color: var(--muted); font-size: .8rem; }

main { width: 100%; max-width: 88rem; margin: 0 auto; padding: 2.5rem 1.5rem; flex: 1; }
.foot { padding: 1rem 1.5rem 1.5rem; text-align: center; font-size: .85rem; color: #9db8ce; }
.hero { max-width: 36rem; padding: clamp(.5rem, 5vh, 3.5rem) 0 clamp(1.75rem, 6vh, 4rem); }
.hero h1 { margin-bottom: .9rem; font-size: clamp(2.1rem, 3.9vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; }
.hero p { margin: 0; font-size: 1.05rem; color: #c4d9ea; }
.hero .hero-hello { margin-bottom: .5rem; color: var(--cyan); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); gap: 1.25rem; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--edge); border-radius: 1rem; background: var(--glass);
  box-shadow: 0 18px 40px rgba(0, 6, 16, .4);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.grid > :only-child { max-width: 26rem; }
.card:hover, .card:focus-within { transform: translateY(-6px); border-color: rgba(125, 220, 255, .7); box-shadow: 0 24px 54px rgba(0, 110, 180, .34); }
.card-print { overflow: hidden; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--edge); background: #eef4f9; }
.card-print img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .5s ease; }
.card:hover .card-print img { transform: scale(1.045); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.3rem 1.35rem; }
.card-body p { font-size: .925rem; }
.card form { margin-top: auto; }
.card button { width: 100%; }
.card button::after { position: absolute; inset: 0; content: ""; }
.card svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.card:hover svg { transform: translateX(4px); }

button, .button {
  display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 2.85rem;
  border: 1px solid #1f8ec4; border-radius: .6rem; background: #0b6b9c; color: #fff;
  padding: .5rem 1.1rem; font: inherit; font-weight: 500; text-align: center; text-decoration: none; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
button:hover, .button:hover, .card:hover button { background: #0a7db8; border-color: #5cc8f5; }
button:disabled { opacity: .55; cursor: not-allowed; }
.ghost { border-color: var(--edge); background: rgba(18, 52, 86, .5); color: #e0f0fb; font-size: .9rem; }
.ghost:hover { background: #17486f; border-color: #69bce4; }
.secondary { border-color: #a9bfd1; background: #fff; color: var(--blue); }
.secondary:hover { background: #e5eff7; border-color: #6f98b6; }

.heading { display: flex; align-items: start; justify-content: space-between; gap: .8rem 1.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.heading p { color: #c4d9ea; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.panel {
  color-scheme: light; border: 1px solid var(--line); border-radius: 1rem; background: #fff; color: var(--ink);
  padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 18px 44px rgba(0, 8, 20, .35);
}
.panel h1, .panel h2 { color: var(--ink); }
.panel p { color: #48617a; }
.panel :focus-visible { outline-color: #0075b8; }
p.panel { color: var(--ink); }
.login { max-width: 30rem; margin: clamp(1rem, 10vh, 7rem) auto; }
.notice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; max-width: 64rem; margin: clamp(0rem, 6vh, 4rem) auto; }
.notice-print { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .7rem; }
.notice .tip { padding: .8rem 1rem; border-radius: .6rem; background: #eef5fb; font-size: .9rem; overflow-wrap: anywhere; }

form, .fields { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-size: .925rem; font-weight: 500; }
input:not([type=checkbox]), select {
  width: 100%; min-width: 0; min-height: 2.85rem; border: 1px solid #b4c6d6; border-radius: .5rem;
  background: #f6fafd; padding: .5rem .75rem; font: inherit; color: inherit;
}
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: #0b6b9c; }
.help { margin: 1.1rem 0 0; font-size: .9rem; }
.admin { margin-bottom: 1.75rem; }
.admin form { margin-top: 1rem; }
.admin button { justify-self: start; }
.fields, fieldset { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
fieldset { display: grid; gap: .85rem; min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; }
legend { padding: 0 .4rem; font-weight: 600; }
.grant { min-width: 0; padding: .8rem; border: 1px solid #dbe6ef; border-radius: .6rem; background: #f8fbfd; }
.grant:has(input:checked) { border-color: #58a7cf; background: #edf7fd; }
.grant label:not(.toggle) { margin-top: .5rem; font-size: .85rem; }
.account-select { position: relative; display: block; min-width: 0; }
.account-select::after {
  position: absolute; top: 1.05rem; right: .9rem; width: .45rem; height: .45rem; content: "";
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none;
}
.account-select select { appearance: none; padding-right: 2rem; background: #fff; text-overflow: ellipsis; }
.toggle { display: flex; align-items: center; gap: .5rem; }
.person { margin: .7rem 0; padding: 0; }
.person summary { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-radius: 1rem; cursor: pointer; }
.person summary:hover { background: #f1f7fb; }
summary strong { font-weight: 600; }
summary small { display: block; font-size: .875rem; color: #48617a; overflow-wrap: anywhere; }
.state { flex: none; padding: .2rem .75rem; border-radius: 1rem; background: #e6f1f9; color: #0c4e74; font-size: .825rem; font-weight: 500; }
.person-body { padding: 0 1.25rem 1.25rem; }
.person-body h3 { margin: 1.1rem 0 0; color: var(--ink); font-size: 1rem; font-weight: 600; }
.person-body form h3 { margin-top: 0; }
.person-body > form + form, .person-body > h3 { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.person-body .actions form { margin-top: .8rem; }
.state.blocked { background: #fde8e4; color: #85261d; }
.danger { border-color: #d9a49c; color: #962a20; }
.danger:hover { border-color: #b5483d; background: #fff0ec; }
.message { margin-bottom: 1.25rem; padding: .8rem 1rem; border: 1px solid #7cc3a0; border-radius: .6rem; background: #e2f6eb; color: #10472c; }
.error { border-color: #e0a79f; background: #fff0ec; color: #85261d; }
.skip { position: absolute; left: -100rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 5; padding: .5rem; background: #fff; color: var(--blue); }

.auth-layout {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); flex: 1;
  width: 100%; max-width: 100rem; margin: 0 auto;
}
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 2.5rem clamp(2rem, 4vw, 4.5rem) 2rem; }
.auth-logo { margin-left: -.5rem; }
.auth-logo img { display: block; width: 13rem; height: auto; }
.auth-story { max-width: 36rem; margin: 2rem 0; text-shadow: 0 2px 22px #041020, 0 0 6px #041020; }
.auth-title { margin: 0; color: #fff; font-size: clamp(2.2rem, 3.9vw, 3.8rem); font-weight: 600; line-height: 1.09; letter-spacing: -.05em; }
.auth-description { max-width: 26rem; margin: 1.05rem 0 0; color: #dcebf6; font-size: 1.05rem; }
.auth-foot { display: flex; align-items: center; gap: .5rem; margin: 0; color: #c6dbe7; font-size: .875rem; }
.auth-foot svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linejoin: round; stroke-linecap: round; }
.auth-main { display: grid; place-items: center; max-width: none; margin: 0; padding: 2rem clamp(1.5rem, 4vw, 3.5rem); }
.auth-form {
  color-scheme: light; width: min(100%, 27.5rem); padding: clamp(1.5rem, 3vw, 2.4rem); border-radius: 1.2rem;
  background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(125, 220, 255, .35), 0 30px 80px rgba(0, 100, 170, .4);
}
.auth-form h1 { color: var(--ink); font-size: clamp(1.6rem, 2.2vw, 1.9rem); letter-spacing: -.04em; }
.auth-form p { color: #48617a; }
.auth-form button { margin-top: .2rem; }
.auth-form input::placeholder { color: #657a8c; }
.auth-form :focus-visible { outline-color: #0075b8; }

@media (max-width: 62rem) {
  .brand-name, .account-name { display: none; }
}
@media (max-width: 48rem) {
  main { padding: 1.5rem 1rem 2rem; }
  .brand-inner { min-height: 4.5rem; padding: .5rem 1rem; gap: .5rem; }
  .brand-logo img { width: 7.5rem; }
  .account { gap: .5rem; }
  .account .ghost { padding: .4rem .7rem; font-size: .825rem; }
  .hero { padding: 2.5rem 0 2rem; text-shadow: 0 2px 18px #041020; }
  .notice { grid-template-columns: minmax(0, 1fr); margin: 0; }
  .auth-layout { display: flex; flex-direction: column; }
  .auth-brand { padding: 1.25rem 1.25rem 0; }
  .auth-logo img { width: 8.5rem; }
  .auth-story { margin: 1.5rem 0 0; }
  .auth-foot { display: none; }
  .auth-main { flex: none; padding: 1.75rem 1.25rem 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::after { transition: none !important; }
  .card:hover, .card:focus-within, .card:hover .card-print img { transform: none; }
}
