:root { --navy: #0b1f3a; --navy-2: #142f52; --blue: #2563eb; --ink: #172033; --muted: #64748b; --line: #e2e8f0; --soft: #eaf2ff; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Poppins, Arial, sans-serif; color: var(--ink); }
[hidden] { display: none !important; }
.ui-icon { flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Login ---------- */
.auth { display: grid; grid-template-columns: 1.15fr 1fr; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #fff; }
.auth-brand { position: relative; min-height: 0; overflow: hidden; padding: 48px 64px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(circle at 80% 20%, rgba(37,99,235,.45), transparent 45%), radial-gradient(circle at 10% 90%, rgba(5,150,105,.28), transparent 40%), linear-gradient(160deg, #0b1f3a, #071427 75%); }
.auth-brand::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 40% 40%, #000, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); animation: float 9s ease-in-out infinite; }
.orb-1 { width: 320px; height: 320px; right: -90px; top: 30%; border: 56px solid rgba(96,165,250,.10); }
.orb-2 { width: 140px; height: 140px; left: 52%; bottom: 8%; background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.5), rgba(37,99,235,.05)); animation-delay: -4s; }
.auth-brand > :not(.orb) { position: relative; z-index: 1; }
.brand-chip { position: relative; display: inline-flex; align-self: flex-start; background: #fff; border-radius: 20px; padding: 14px 30px; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 60px rgba(96,165,250,.45), 0 18px 40px rgba(0,0,0,.35); transition: transform .25s; }
.brand-chip:hover { transform: scale(1.03); }
.brand-chip img { height: 76px; display: block; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin: 0 0 8px; }
.eyebrow.light { color: #93c5fd; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.2); }
.auth-hero { animation: rise .7s ease both; }
.auth-brand h2 { font-size: clamp(2.2rem, 4.4vw, 3.7rem); line-height: 1.08; font-weight: 700; margin: 10px 0 18px; letter-spacing: -.03em; }
.auth-brand h2 em { font-style: normal; background: linear-gradient(90deg, #60a5fa, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lead { color: #cbd5e1; max-width: 500px; line-height: 1.7; margin: 0 0 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.feature { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); transition: transform .2s, background .2s; }
.feature:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); }
.feature .ui-icon { grid-row: span 2; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--c1); color: #fff; }
.feature strong { font-size: .92rem; font-weight: 600; }
.feature small { color: #94a3b8; font-size: .74rem; }
.auth-foot { color: #94a3b8; font-size: .82rem; }

.auth-form { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: linear-gradient(180deg, #fff, #f8fafc); }
.auth-box { width: 100%; max-width: 410px; padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(15,23,42,.10); animation: rise .6s .1s ease both; }
.badge-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--navy), var(--navy-2)); color: #fff; margin-bottom: 20px; box-shadow: 0 10px 22px rgba(11,31,58,.3); }
.auth-box h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.02em; }
.auth-box .lead { color: var(--muted); margin: 0 0 26px; font-size: .92rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 6px; }
.input-wrap { position: relative; }
.input-wrap .ui-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.input-wrap input { width: 100%; height: 50px; padding: 0 14px 0 42px; border: 1px solid #cbd5e1; border-radius: 12px; background: #f1f5f9; font: inherit; font-size: .95rem; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.input-wrap input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.btn-enter { width: 100%; height: 52px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 10px 22px rgba(37,99,235,.35); transition: transform .15s, box-shadow .15s; }
.btn-enter:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(37,99,235,.45); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .76rem; margin: 18px 0 0; }
.secure-note .ui-icon { width: 14px; height: 14px; color: #059669; }
.auth-links { text-align: center; font-size: .85rem; color: var(--muted); margin: 18px 0 0; }
.auth-links a { color: var(--blue); font-weight: 600; }
.auth-lang { position: absolute; top: 20px; right: 28px; font-size: .82rem; color: var(--muted); }
.auth-lang a { color: var(--muted); text-decoration: none; }
.auth-lang a.selected { color: var(--blue); font-weight: 700; }
.alert-msg { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; font-size: .85rem; margin-bottom: 18px; }
.alert-msg.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* ---------- Hub de módulos ---------- */
.hub { background: #f4f7fb; min-height: 100vh; }
.hub-top { background: #071427; color: #fff; }
.hub-top-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; }
.hub-logo { height: 58px; background: #fff; border-radius: 14px; padding: 8px 20px; box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 0 40px rgba(96,165,250,.4); }
.hub-user { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.hub-user a { color: #94a3b8; text-decoration: none; }
.hub-user a.selected { color: #fff; font-weight: 700; }
.hub-avatar { margin-left: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2563eb, #059669); font-weight: 700; }
.hub-user .hub-logout { border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 14px; color: #fff; margin-left: 6px; }
.hub-user .hub-logout:hover { background: rgba(255,255,255,.1); }

.hub-hero { --hero-c: #2563eb; position: relative; overflow: hidden; color: #fff; padding: 56px 24px 110px;
  background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--hero-c) 60%, transparent), transparent 55%), linear-gradient(160deg, #0b1f3a, #071427); transition: background .3s; }
.hub-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent); }
.hub-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.hub-hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; animation: rise .5s ease both; }
.hub-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; margin: 0 0 10px; letter-spacing: -.03em; display: flex; align-items: center; gap: 14px; }
.hero-text { color: #cbd5e1; max-width: 640px; line-height: 1.7; margin: 0; }
.title-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.title-icon .ui-icon { width: 26px; height: 26px; }
.hub-back { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; padding: 7px 16px; border-radius: 999px; margin-bottom: 22px; }
.hub-back:hover { background: rgba(255,255,255,.16); }

.hub-main { max-width: 1180px; margin: -64px auto 0; padding: 0 24px 72px; position: relative; z-index: 2; }
.tile-grid { display: grid; gap: 20px; }
.modules { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.subs { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.module-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; min-height: 270px; padding: 28px; border: 0; border-radius: 22px; color: #fff; text-align: left; font-family: inherit; cursor: pointer;
  background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: 0 18px 40px color-mix(in srgb, var(--c2) 35%, transparent); animation: rise .6s calc(var(--i) * .08s) ease both; transition: transform .25s, box-shadow .25s; }
.module-card::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; border: 36px solid rgba(255,255,255,.12); transition: transform .4s; }
.module-card:hover, .module-card:focus-visible { transform: translateY(-8px); outline: none; box-shadow: 0 26px 50px color-mix(in srgb, var(--c2) 50%, transparent); }
.module-card:hover::after { transform: scale(1.25); }
.module-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 18px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); margin-bottom: 12px; }
.module-icon .ui-icon { width: 34px; height: 34px; }
.module-card strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.module-card small { font-size: .85rem; line-height: 1.5; opacity: .9; max-width: 220px; }
.module-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; background: rgba(0,0,0,.18); padding: 6px 14px; border-radius: 999px; }
.module-meta .arrow, .sub-card .arrow { transition: transform .2s; }
.module-card:hover .arrow { transform: translateX(5px); }

.sub-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px rgb(15 23 42 / 6%); animation: rise .5s calc(var(--i) * .04s) ease both; transition: transform .2s, box-shadow .2s, border-color .2s; }
.sub-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(145deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--c2) 35%, transparent); }
.sub-icon .ui-icon { width: 26px; height: 26px; }
.sub-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sub-text strong { font-size: 1rem; font-weight: 600; }
.sub-text small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.sub-card .arrow { color: var(--muted); font-size: 1.2rem; }
.sub-card:hover, .sub-card:focus-visible { transform: translateY(-4px); border-color: var(--c1); outline: none; box-shadow: 0 16px 32px color-mix(in srgb, var(--c2) 22%, transparent); }
.sub-card:hover .arrow { transform: translateX(5px); color: var(--c1); }

@media (max-width: 1100px) {
  .modules { grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; padding: 8px 0 40px; margin: -8px 0 -40px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 24px; gap: 24px; }
  .auth-brand .auth-foot, .orb { display: none; }
  .brand-chip img { height: 56px; }
  .auth-lang { position: static; text-align: right; padding: 0 0 12px; align-self: stretch; }
  .auth-form { flex-direction: column; justify-content: flex-start; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .auth-brand { padding: clamp(20px, 4vh, 32px) clamp(32px, 4.7vw, 64px); gap: clamp(12px, 2vh, 20px); }
  .brand-chip { padding: 10px 24px; }
  .brand-chip img { height: clamp(48px, 7vh, 60px); }
  .auth-brand h2 { font-size: clamp(2rem, 3.5vw, 3rem); margin: 8px 0 12px; }
  .auth-lead { font-size: .92rem; line-height: 1.5; margin-bottom: 18px; }
  .feature-grid { gap: 8px; }
  .feature { grid-template-columns: 34px 1fr; column-gap: 10px; padding: 10px; }
  .feature .ui-icon { width: 34px; height: 34px; padding: 7px; }
  .feature strong { font-size: .86rem; }
  .feature small { font-size: .68rem; }
  .auth-form { padding-top: 24px; padding-bottom: 24px; }
  .auth-box { padding: clamp(22px, 3vh, 30px); }
  .badge-icon { margin-bottom: 14px; }
  .auth-box .lead { margin-bottom: 18px; }
  .field { margin-bottom: 14px; }
  .input-wrap input { height: 46px; }
  .btn-enter { height: 48px; }
  .secure-note, .auth-links { margin-top: 14px; }
}
@media (min-width: 901px) and (max-height: 600px) {
  .auth-brand { padding-top: 16px; padding-bottom: 16px; gap: 8px; }
  .auth-brand .auth-foot { display: none; }
  .brand-chip { padding: 6px 18px; }
  .brand-chip img { height: 42px; }
  .auth-brand h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 4px 0 8px; }
  .auth-lead { display: none; }
  .feature-grid { gap: 6px; }
  .feature { padding: 6px; }
  .feature .ui-icon { width: 28px; height: 28px; padding: 5px; }
  .feature small { display: none; }
  .auth-box { padding: 16px 22px; }
  .badge-icon { width: 40px; height: 40px; margin-bottom: 8px; }
  .auth-box h1 { font-size: 1.55rem; }
  .auth-box .lead { margin-bottom: 10px; }
  .field { margin-bottom: 8px; }
  .input-wrap input { height: 40px; }
  .btn-enter { height: 42px; }
  .secure-note, .auth-links { margin-top: 8px; }
}
@media (max-width: 560px) {
  .auth-box { padding: 24px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature small { display: none; }
  .hub-top-inner { padding: 12px 16px; }
  .hub-name { display: none; }
  .hub-logo { height: 46px; padding: 6px 14px; }
  .hub-hero { padding: 36px 16px 96px; }
  .hub-main { padding: 0 16px 56px; }
  .module-card { min-height: 220px; padding: 22px; }
  .subs { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .auth-brand { padding: 10px 20px; gap: 0; justify-content: center; }
  .auth-brand .auth-hero, .auth-brand .auth-foot, .auth-brand .orb { display: none; }
  .brand-chip { padding: 5px 14px; border-radius: 12px; }
  .brand-chip img { height: 40px; }
  .auth-form { min-height: 0; padding: 42px 20px 16px; }
}
@media (max-width: 900px) and (max-height: 760px) {
  .auth-form { padding: 28px 20px 10px; }
  .auth-lang { padding-bottom: 6px; }
  .auth-box { padding: clamp(12px, 2.5vh, 22px); }
  .badge-icon { width: 42px; height: 42px; margin-bottom: 10px; }
  .auth-box h1 { font-size: clamp(1.45rem, 3.5vh, 1.8rem); }
  .auth-box .lead { margin-bottom: 12px; }
  .field { margin-bottom: 10px; }
  .input-wrap input { height: 44px; }
  .btn-enter { height: 46px; }
  .secure-note, .auth-links { margin-top: 10px; }
}
@media (max-width: 900px) and (max-height: 560px) {
  .auth-brand { display: none; }
  .auth { grid-template-rows: minmax(0, 1fr); }
  .auth-form { padding-top: 36px; }
  .auth-box { padding: 12px 20px; }
  .badge-icon, .auth-box .eyebrow, .auth-box .lead, .secure-note { display: none; }
  .auth-box h1 { font-size: 1.45rem; margin-bottom: 8px; }
  .field { margin-bottom: 8px; }
  .input-wrap input { height: 40px; }
  .btn-enter { height: 42px; }
  .auth-links { margin-top: 8px; }
}

.subs-tarefas{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.hub-task-group{grid-column:1/-1;min-width:0;padding-top:8px}.hub-task-group h2{display:flex;align-items:center;gap:10px;margin:8px 0 14px;font-size:18px;color:var(--navy)}.hub-task-group h2 .ui-icon{color:var(--c1)}.hub-task-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.subs-tarefas .sub-card{min-width:0}@media(max-width:560px){.subs-tarefas,.hub-task-links{grid-template-columns:1fr}.hub-task-group h2{font-size:16px}}
