:root {
  --navy: #192847;
  --navy-2: #24385f;
  --green: #08de86;
  --green-dark: #00a966;
  --blue-white: #e9ecf3;
  --gray: #a3a3a3;
  --paper: #f7f9fc;
  --white: #ffffff;
  --muted: #657087;
  --line: #dce2ec;
  --danger: #b93737;
  --shadow: 0 22px 60px rgba(25, 40, 71, .12);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-height: 100vh; color: var(--navy); background: var(--paper); font-family: Manrope, "Segoe UI", Arial, sans-serif; }
a { color: inherit; }
button, input { font: inherit; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 14px clamp(20px, 5vw, 64px); color: white; background: var(--navy); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: white; text-decoration: none; }
.brand-logo-crop { position: relative; display: block; width: 186px; height: 48px; overflow: hidden; }
.brand-logo-crop img { position: absolute; top: -81px; left: -11px; width: 207px; max-width: none; }
.brand small { padding-left: 14px; color: #dce3ee; border-left: 1px solid rgba(255,255,255,.25); font-size: 12px; letter-spacing: .04em; }
.account-nav { display: flex; align-items: center; gap: 18px; color: #dbe2ee; font-size: 14px; }
.account-nav form { margin: 0; }
.account-nav a, .link-button { color: white; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: clamp(34px, 6vw, 76px) 0; }
.eyebrow { display: block; margin-bottom: 12px; color: var(--green-dark); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(38px, 6vw, 70px); line-height: 1; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.025em; }

/* Login independente: leve, institucional e sem o cabeçalho do Portal. */
.login-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(8, 222, 134, .085), transparent 31rem),
    linear-gradient(135deg, #f3f8f5 0%, #f8faf9 52%, #f5f7fa 100%);
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .82fr);
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}
.login-brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 76px) clamp(34px, 6vw, 92px) clamp(46px, 7vw, 100px);
  overflow: hidden;
}
.login-logo {
  position: relative;
  z-index: 2;
  width: 222px;
  height: 57px;
  overflow: hidden;
}
.login-logo img {
  position: absolute;
  top: -97px;
  left: -13px;
  width: 247px;
  max-width: none;
}
.login-intro { position: relative; z-index: 2; max-width: 720px; margin: auto 0; padding: clamp(70px, 11vh, 130px) 0; }
.login-intro h1 {
  max-width: 700px;
  margin-bottom: 24px;
  font-size: clamp(43px, 5vw, 61px);
  line-height: 1.02;
  letter-spacing: -.042em;
}
.login-intro p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.65; }
.login-grafismo {
  position: absolute;
  z-index: 0;
  bottom: -20%;
  left: -37%;
  width: 1760px;
  max-width: none;
  opacity: .075;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
.login-form-panel {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(34px, 6vw, 92px);
}
.login-card {
  width: min(480px, 100%);
  padding: clamp(30px, 4vw, 48px);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(25, 40, 71, .11);
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(25, 40, 71, .08);
}
.login-card h2 { margin-bottom: 12px; font-size: clamp(30px, 3vw, 39px); line-height: 1.1; }
.login-card > p { max-width: 390px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.login-card .form-stack { margin-top: 30px; }
.login-card .form-stack input { min-height: 56px; border-width: 1px; border-radius: 9px; }
.login-card .primary-button { min-height: 56px; margin-top: 14px; border-radius: 9px; }
.login-card .help-link { margin-top: 22px; font-size: 14px; }
.password-field { position: relative; }
.password-field input { padding-right: 94px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 38px;
  padding: 7px 12px;
  color: var(--navy);
  background: var(--blue-white);
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  transform: translateY(-50%);
  cursor: pointer;
}
.password-toggle:hover { background: #dfe5ef; }
.password-toggle:focus-visible { outline: 3px solid rgba(8, 222, 134, .38); outline-offset: 2px; }

.auth-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .7fr); gap: clamp(36px, 8vw, 110px); align-items: center; min-height: calc(100vh - 190px); }
.auth-layout::before { content: ""; position: absolute; z-index: -1; top: 4%; left: -7%; width: 230px; height: 230px; opacity: .13; background: var(--green); clip-path: polygon(0 0, 100% 50%, 0 100%, 35% 50%); }
.auth-intro p { max-width: 680px; color: var(--muted); font-size: 19px; line-height: 1.7; }
.auth-card { padding: clamp(26px, 4vw, 42px); background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card h1, .auth-card h2 { font-size: 30px; }
.auth-card > p { color: var(--muted); line-height: 1.6; }
.auth-single { display: grid; place-items: center; min-height: 65vh; }
.auth-single .auth-card { width: min(520px, 100%); }
.form-stack { display: grid; gap: 10px; margin-top: 24px; }
.form-stack label { margin-top: 6px; font-size: 14px; font-weight: 800; }
.form-stack input { width: 100%; min-height: 50px; padding: 11px 13px; color: var(--navy); background: white; border: 2px solid var(--line); border-radius: 11px; }
.form-stack input:focus { outline: none; border-color: var(--green-dark); box-shadow: 0 0 0 4px rgba(8, 222, 134, .16); }
.primary-button { display: inline-grid; place-items: center; min-height: 52px; margin-top: 10px; padding: 12px 20px; color: var(--navy); background: var(--green); border: 0; border-radius: 11px; font-weight: 900; text-decoration: none; cursor: pointer; }
.primary-button:hover { background: #27e89a; }
.inline-button { display: inline-grid; }
.help-link { display: inline-block; margin-top: 20px; color: var(--navy-2); font-weight: 700; text-underline-offset: 4px; }
.form-error { padding: 12px; color: var(--danger) !important; background: #fff1f1; border-radius: 9px; font-weight: 700; }
.errorlist { margin: 0; padding: 10px 14px; color: var(--danger); background: #fff1f1; border-radius: 9px; list-style: none; }
.helptext { color: var(--muted); font-size: 12px; }

.dashboard-hero { position: relative; isolation: isolate; display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: clamp(28px, 5vw, 56px); overflow: hidden; color: white; background: var(--navy); border-radius: 26px; box-shadow: var(--shadow); }
.dashboard-hero::after { content: ""; position: absolute; z-index: -1; top: -56px; right: 10%; width: 290px; height: 290px; opacity: .18; background: var(--green); clip-path: polygon(0 0, 100% 50%, 0 100%, 38% 50%); transform: rotate(-12deg); }
.dashboard-hero h1 { margin-bottom: 12px; font-size: clamp(38px, 5vw, 62px); }
.dashboard-hero p { margin-bottom: 0; color: #ced8e7; font-size: 18px; }
.dashboard-hero .eyebrow { color: var(--green); }
.access-summary { flex: 0 0 230px; padding: 18px; color: var(--navy); background: var(--green); border-radius: 15px; }
.access-summary small, .access-summary strong, .access-summary span { display: block; }
.access-summary small { margin-bottom: 6px; font-weight: 700; }
.access-summary strong, .access-summary span { font-weight: 900; }
.content-section { margin-top: 56px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.count-badge { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; color: var(--navy); background: var(--green); border-radius: 999px; font-weight: 900; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card, .empty-state { padding: 25px; background: white; border: 1px solid var(--line); border-radius: 17px; }
.tool-card { min-height: 240px; box-shadow: 0 12px 35px rgba(25, 40, 71, .07); transition: transform .2s ease, box-shadow .2s ease; }
.tool-card-ready:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(25, 40, 71, .13); }
.tool-card h3 { margin: 15px 0 10px; font-size: 23px; }
.tool-card p, .empty-state p { color: var(--muted); line-height: 1.6; }
.tool-category { color: var(--green-dark); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.tool-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.tool-launch { color: var(--navy); font-weight: 900; text-decoration-color: var(--green-dark); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--green-dark); border-radius: 50%; }
.empty-state { grid-column: 1 / -1; text-align: center; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: auto; padding: 30px 28px 10px; overflow: visible; }
  .login-logo { width: 184px; height: 48px; }
  .login-logo img { top: -80px; left: -11px; width: 205px; }
  .login-intro { max-width: 640px; padding: 58px 0 24px; }
  .login-intro h1 { max-width: 620px; font-size: clamp(38px, 8vw, 52px); }
  .login-grafismo { bottom: -18%; left: -35%; width: 1260px; opacity: .055; }
  .login-form-panel { place-items: start center; padding: 26px 28px 54px; }
  .auth-layout { grid-template-columns: 1fr; min-height: auto; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .access-summary { flex-basis: auto; }
}
@media (max-width: 560px) {
  .login-brand-panel { padding: 24px 20px 4px; }
  .login-intro { padding: 46px 0 20px; }
  .login-intro h1 { margin-bottom: 17px; font-size: 39px; }
  .login-intro p { font-size: 16px; }
  .login-form-panel { padding: 22px 14px 38px; }
  .login-card { padding: 27px 22px; border-radius: 13px; }
  .login-card h2 { font-size: 30px; }
  .site-header { align-items: flex-start; }
  .account-nav { align-items: flex-end; flex-direction: column; gap: 8px; }
  .account-nav > span { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .page-shell { width: min(100% - 22px, 1180px); }
  .brand-logo-crop { width: 142px; height: 37px; }
  .brand-logo-crop img { top: -62px; left: -8px; width: 158px; }
  .brand small { display: none; }
}
