:root{
      --blue:#0062A0;
      --navy:#163A5C;
      --orange:#FD9400;
      --orange-2:#FE901A;
      --bg:#F3F7FB;
      --surface:rgba(255,255,255,.86);
      --surface-solid:#FFFFFF;
      --text:#132033;
      --muted:#64748B;
      --border:rgba(22,58,92,.14);
      --shadow:0 22px 55px rgba(15,23,42,.12);
      --soft-shadow:0 10px 28px rgba(15,23,42,.10);
    }

    body.dark{
      --bg:#0F172A;
      --surface:rgba(30,41,59,.84);
      --surface-solid:#1E293B;
      --text:#E5EDF7;
      --muted:#94A3B8;
      --border:rgba(148,163,184,.18);
      --shadow:0 28px 60px rgba(0,0,0,.35);
      --soft-shadow:0 16px 34px rgba(0,0,0,.28);
    }

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

    html{scroll-behavior:smooth}

    body{
      min-height:100vh;
      font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
      color:var(--text);
      background:
        radial-gradient(circle at top left, rgba(0,98,160,.20), transparent 32%),
        radial-gradient(circle at bottom right, rgba(253,148,0,.18), transparent 28%),
        linear-gradient(180deg,var(--bg),#FFFFFF 120%);
      overflow-x:hidden;
    }

    body.dark{
      background:
        radial-gradient(circle at top left, rgba(0,98,160,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(253,148,0,.16), transparent 30%),
        var(--bg);
    }

    a{text-decoration:none;color:inherit}

    .topbar{
      position:sticky;
      top:0;
      z-index:20;
      height:82px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:0 clamp(20px,4vw,64px);
      background:rgba(22,58,92,.92);
      backdrop-filter:blur(18px);
      border-bottom:1px solid rgba(255,255,255,.12);
    }

    .brand{
      display:flex;
      align-items:center;
      gap:16px;
      min-width:0;
    }

    .brand-logo-box{
      width:168px;
      height:58px;
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .brand-logo-box img{
      width:100%;
      max-height:58px;
      object-fit:contain;
      display:block;
    }

    .brand-divider{
      width:1px;
      height:34px;
      background:rgba(255,255,255,.22);
    }

    .brand-title{
      color:white;
      display:flex;
      flex-direction:column;
      gap:2px;
    }

    .brand-title strong{font-size:15px;font-weight:800;letter-spacing:.02em}
    .brand-title span{font-size:12px;color:rgba(255,255,255,.72)}

    .nav-actions{
      display:flex;
      align-items:center;
      gap:12px;
    }

    .nav-link{
      color:rgba(255,255,255,.86);
      font-size:14px;
      font-weight:700;
      padding:10px 12px;
      border-radius:12px;
      transition:.2s;
    }

    .nav-link:hover{background:rgba(255,255,255,.10);color:white}

    .theme-btn{
      width:44px;
      height:44px;
      border-radius:15px;
      border:1px solid rgba(255,255,255,.18);
      background:rgba(255,255,255,.08);
      color:white;
      display:grid;
      place-items:center;
      cursor:pointer;
      transition:.2s;
    }

    .theme-btn:hover{background:rgba(255,255,255,.16);transform:translateY(-1px)}

    .hero{
  position:relative;
  min-height:480px;
  padding:80px clamp(20px,5vw,84px);
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.hero-content{

max-width:900px;

margin:auto;

}

    .hero::before{
      content:"";
      position:absolute;
      inset:0;
      background:
        linear-gradient(115deg, rgba(22,58,92,.08), transparent 45%),
        url("https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&w=1800&q=80") center/cover;
      opacity:.11;
      pointer-events:none;
    }

    body.dark .hero::before{opacity:.08}

    .hero-content,.hero-panel{position:relative;z-index:1}

    .eyebrow{
      display:inline-flex;
      align-items:center;
      gap:8px;
      padding:8px 12px;
      border-radius:999px;
      background:rgba(0,98,160,.10);
      color:var(--blue);
      font-size:13px;
      font-weight:800;
      border:1px solid rgba(0,98,160,.16);
      margin-bottom:18px;
    }

    body.dark .eyebrow{background:rgba(253,148,0,.12);color:#FDBA3B;border-color:rgba(253,148,0,.24)}

    .hero h1{
      font-size:clamp(42px,6vw,78px);
      line-height:.98;
      letter-spacing:-.06em;
      font-weight:900;
      max-width:850px;
      margin-bottom:24px;
    }

    .hero h1 span{
      color:var(--blue);
      text-shadow:0 10px 30px rgba(0,98,160,.16);
    }

    body.dark .hero h1 span{color:#64B5E8}

    .hero p{
      max-width:720px;
      color:var(--muted);
      font-size:clamp(16px,1.4vw,20px);
      line-height:1.7;
      margin-bottom:30px;
    }

    .hero-buttons{
      display:flex;
      flex-wrap:wrap;
      gap:14px;
      align-items:center;
    }

    .btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:10px;
      min-height:50px;
      padding:0 20px;
      border-radius:16px;
      font-weight:800;
      border:1px solid var(--border);
      transition:.22s ease;
      cursor:pointer;
    }

    .btn-primary{
      background:linear-gradient(135deg,var(--blue),var(--navy));
      color:white;
      box-shadow:0 18px 34px rgba(0,98,160,.24);
      border-color:transparent;
    }

    .btn-primary:hover{transform:translateY(-3px);box-shadow:0 24px 42px rgba(0,98,160,.30)}

    .btn-secondary{
      background:var(--surface-solid);
      color:var(--text);
    }

    .btn-secondary:hover{transform:translateY(-3px);border-color:rgba(253,148,0,.45)}

    .hero-panel{
      border:1px solid var(--border);
      background:var(--surface);
      backdrop-filter:blur(18px);
      border-radius:32px;
      box-shadow:var(--shadow);
      padding:28px;
      overflow:hidden;
    }

    .panel-header{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:14px;
      margin-bottom:24px;
    }

    .panel-header strong{font-size:18px}
    .panel-pill{font-size:12px;font-weight:800;color:#fff;background:var(--orange);padding:7px 10px;border-radius:999px}

    .mini-chart{
      height:220px;
      display:flex;
      align-items:end;
      gap:12px;
      padding:20px;
      border-radius:24px;
      background:linear-gradient(180deg,rgba(0,98,160,.07),rgba(253,148,0,.08));
      border:1px solid var(--border);
    }

    .bar{
      flex:1;
      border-radius:999px 999px 6px 6px;
      background:linear-gradient(180deg,var(--orange),var(--blue));
      min-height:24px;
      opacity:.86;
      box-shadow:0 12px 22px rgba(0,98,160,.14);
      animation:rise .9s ease both;
    }

    .bar:nth-child(1){height:34%;animation-delay:.02s}
    .bar:nth-child(2){height:46%;animation-delay:.08s}
    .bar:nth-child(3){height:40%;animation-delay:.14s}
    .bar:nth-child(4){height:62%;animation-delay:.20s}
    .bar:nth-child(5){height:72%;animation-delay:.26s}
    .bar:nth-child(6){height:56%;animation-delay:.32s}
    .bar:nth-child(7){height:84%;animation-delay:.38s}
    .bar:nth-child(8){height:96%;animation-delay:.44s}

    @keyframes rise{from{height:0;opacity:0}to{opacity:.86}}

    .stats{
      width:min(1180px,92%);
      margin:-30px auto 34px;
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:18px;
      position:relative;
      z-index:3;
    }

    .stat{
      background:var(--surface);
      backdrop-filter:blur(18px);
      border:1px solid var(--border);
      border-radius:24px;
      box-shadow:var(--soft-shadow);
      padding:22px;
    }

    .stat strong{font-size:28px;color:var(--blue);display:block;margin-bottom:4px}
    body.dark .stat strong{color:#64B5E8}
    .stat span{font-size:13px;color:var(--muted);font-weight:700}

    .section{
      width:min(1180px,92%);
      margin:0 auto;
      padding:34px 0 74px;
    }

    .section-head{
      display:flex;
      align-items:end;
      justify-content:space-between;
      gap:20px;
      margin-bottom:24px;
    }

    .section-head h2{
      font-size:clamp(26px,3vw,42px);
      letter-spacing:-.04em;
      line-height:1.1;
    }

    .section-head p{
      color:var(--muted);
      max-width:580px;
      line-height:1.6;
    }

    .grid{
      display:grid;
      grid-template-columns:repeat(3,1fr);
      gap:22px;
    }

    .card{
      position:relative;
      min-height:230px;
      padding:26px;
      border-radius:28px;
      background:var(--surface);
      backdrop-filter:blur(18px);
      border:1px solid var(--border);
      box-shadow:var(--soft-shadow);
      overflow:hidden;
      transition:.25s ease;
    }

    .card::before{
      content:"";
      position:absolute;
      inset:0 0 auto 0;
      height:5px;
      background:linear-gradient(90deg,var(--blue),var(--orange));
      opacity:.9;
    }

    .card:hover{
      transform:translateY(-8px);
      box-shadow:var(--shadow);
      border-color:rgba(253,148,0,.38);
    }

    .card-top{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:24px;
    }

    .card-icon{
      width:56px;
      height:56px;
      border-radius:18px;
      display:grid;
      place-items:center;
      background:linear-gradient(135deg,rgba(0,98,160,.14),rgba(253,148,0,.14));
      color:var(--blue);
    }

    body.dark .card-icon{color:#FDBA3B}

    .card-icon .material-icons-round{font-size:30px}

    .card-status{
      font-size:11px;
      font-weight:900;
      letter-spacing:.08em;
      text-transform:uppercase;
      color:var(--orange);
    }

    .card h3{
      font-size:24px;
      line-height:1.15;
      letter-spacing:-.03em;
      margin-bottom:12px;
    }

    .card p{
      color:var(--muted);
      line-height:1.65;
      font-size:14px;
      margin-bottom:24px;
    }

    .card-link{
      position:absolute;
      bottom:24px;
      left:26px;
      right:26px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      color:var(--blue);
      font-weight:900;
      font-size:14px;
    }

    body.dark .card-link{color:#64B5E8}

    .footer{
      background:var(--navy);
      color:white;
      padding:44px clamp(20px,5vw,84px);
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:28px;
      flex-wrap:wrap;
    }

    .footer img{height:58px}
    .footer p{color:rgba(255,255,255,.72);font-size:14px;line-height:1.6}

    @media(max-width:980px){
      .hero{grid-template-columns:1fr;min-height:auto;padding-top:48px}
      .hero-panel{display:none}
      .stats{grid-template-columns:repeat(2,1fr);margin-top:0}
      .grid{grid-template-columns:repeat(2,1fr)}
      .brand-title,.brand-divider,.nav-link{display:none}
      .topbar{height:76px}
    }

    @media(max-width:640px){
      .grid,.stats{grid-template-columns:1fr}
      .hero h1{font-size:42px}
      .section-head{display:block}
      .section-head p{margin-top:12px}
      .brand-logo-box{width:142px}
      .topbar{padding:0 16px}
    }

    .card-buttons{
      position:absolute;
      bottom:24px;
      left:26px;
      right:26px;
      display:flex;
      gap:12px;
      align-items:center;
    }

    .btn-card{
      flex:1;
      min-height:46px;
      display:flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      padding:0 14px;
      border-radius:16px;
      font-size:14px;
      font-weight:900;
      text-align:center;
      text-decoration:none;
      transition:.22s ease;
      box-shadow:0 12px 24px rgba(0,98,160,.18);
    }

    .btn-info{
      background:linear-gradient(135deg,#163A5C,#0F2D48);
      color:#FFFFFF;
    }

    .btn-dashboard{
      background:linear-gradient(135deg,var(--blue),var(--navy));
      color:#FFFFFF;
    }

    .btn-card:hover{
      transform:translateY(-3px);
      opacity:.94;
    }

    @media(max-width:640px){
      .card-buttons{
        flex-direction:column;
        align-items:stretch;
      }

      .btn-card{
        width:100%;
      }
    }


    /* Sistema de páginas internas no mesmo HTML */
    .app-page{display:none;}
    .app-page.active{display:block;animation:pageFade .25s ease both;}
    @keyframes pageFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
    .info-page-hero{width:min(1180px,92%);margin:0 auto;padding:54px 0 20px;}
    .info-shell{width:min(1180px,92%);margin:0 auto 74px;display:grid;grid-template-columns:280px 1fr;gap:24px;align-items:start;}
    .info-sidebar{position:sticky;top:104px;border:1px solid var(--border);background:var(--surface);backdrop-filter:blur(18px);border-radius:26px;box-shadow:var(--soft-shadow);padding:20px;}
    .info-sidebar h3{font-size:18px;margin-bottom:14px;letter-spacing:-.02em;}
    .info-menu{display:flex;flex-direction:column;gap:8px;margin-bottom:18px;}
    .info-menu a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:14px;color:var(--muted);font-size:14px;font-weight:800;transition:.2s ease;}
    .info-menu a:hover{background:rgba(0,98,160,.10);color:var(--blue);}
    body.dark .info-menu a:hover{background:rgba(253,148,0,.12);color:#FDBA3B;}
    .info-content{border:1px solid var(--border);background:var(--surface);backdrop-filter:blur(18px);border-radius:30px;box-shadow:var(--shadow);padding:34px;}
    .info-block{padding:22px 0;border-bottom:1px solid var(--border);}
    .info-block:first-child{padding-top:0;}
    .info-block:last-child{border-bottom:0;padding-bottom:0;}
    .info-block h3{font-size:24px;letter-spacing:-.03em;margin-bottom:12px;color:var(--text);}
    .info-block p,.info-block li{color:var(--muted);line-height:1.75;font-size:15px;}
    .info-block ul{padding-left:20px;margin-top:10px;}
    .info-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px;}
    .placeholder-box{margin-top:14px;border:1px dashed rgba(0,98,160,.35);background:rgba(0,98,160,.06);border-radius:20px;padding:18px;color:var(--muted);line-height:1.7;font-size:14px;}
    body.dark .placeholder-box{border-color:rgba(253,148,0,.35);background:rgba(253,148,0,.08);}
    @media(max-width:900px){.info-shell{grid-template-columns:1fr}.info-sidebar{position:relative;top:auto}}


    /* Página interna: TDSE */
    .tdse-toolbar{
      display:grid;
      grid-template-columns:minmax(240px,1.35fr) repeat(3,minmax(150px,.72fr));
      gap:14px;
      margin:24px 0 16px;
    }

    .tdse-field{
      min-height:52px;
      display:flex;
      align-items:center;
      gap:10px;
      padding:0 15px;
      border:1px solid var(--border);
      border-radius:17px;
      background:rgba(255,255,255,.62);
      color:var(--muted);
      font-size:13px;
      font-weight:800;
    }

    body.dark .tdse-field{background:rgba(15,23,42,.24);}
    .tdse-field .material-icons-round{color:var(--blue);font-size:21px;}
    body.dark .tdse-field .material-icons-round{color:#FDBA3B;}

    .tdse-field input,
    .tdse-field select{
      width:100%;
      min-width:0;
      border:0;
      outline:0;
      background:transparent;
      color:var(--text);
      font:inherit;
      font-weight:800;
    }

    .tdse-field input::placeholder{color:var(--muted);}

    .tdse-results-bar{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:14px;
      flex-wrap:wrap;
      margin:0 0 20px;
    }

    .tdse-results-count{
      color:var(--muted);
      font-size:13px;
      font-weight:800;
    }

    .tdse-clear{
      border:0;
      background:transparent;
      color:var(--blue);
      font:inherit;
      font-size:13px;
      font-weight:900;
      cursor:pointer;
      padding:8px 0;
    }

    body.dark .tdse-clear{color:#64B5E8;}
    .tdse-clear:hover{text-decoration:underline;}

    .tdse-grid{
      display:grid;
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:18px;
      margin-top:18px;
    }

    .tdse-card{
      min-height:330px;
      display:flex;
      flex-direction:column;
      padding:22px;
      border-radius:24px;
      border:1px solid var(--border);
      background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(255,255,255,.62));
      box-shadow:var(--soft-shadow);
      transition:.22s ease;
      position:relative;
      overflow:hidden;
    }

    body.dark .tdse-card{background:linear-gradient(180deg,rgba(30,41,59,.90),rgba(30,41,59,.64));}

    .tdse-card::before{
      content:"";
      position:absolute;
      inset:0 0 auto 0;
      height:4px;
      background:linear-gradient(90deg,var(--orange),var(--blue));
      opacity:.85;
    }

    .tdse-card:hover{
      transform:translateY(-6px);
      border-color:rgba(253,148,0,.38);
      box-shadow:var(--shadow);
    }

    .tdse-meta{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:16px;
    }

    .tdse-badge{
      padding:6px 10px;
      border-radius:999px;
      background:rgba(253,148,0,.10);
      border:1px solid rgba(253,148,0,.36);
      color:var(--orange);
      font-size:11px;
      font-weight:900;
    }

    .tdse-year{color:var(--blue);font-size:12px;font-weight:900;}
    body.dark .tdse-year{color:#64B5E8;}

    .tdse-card h3{
      font-size:18px;
      line-height:1.34;
      letter-spacing:-.025em;
      margin-bottom:14px;
    }

    .tdse-themes{
      display:flex;
      flex-wrap:wrap;
      gap:7px;
      margin-bottom:16px;
    }

    .tdse-theme-chip{
      padding:5px 8px;
      border-radius:999px;
      background:rgba(0,98,160,.07);
      border:1px solid rgba(0,98,160,.12);
      color:var(--blue);
      font-size:10px;
      line-height:1.2;
      font-weight:850;
    }

    body.dark .tdse-theme-chip{
      background:rgba(253,148,0,.08);
      border-color:rgba(253,148,0,.18);
      color:#FDBA3B;
    }

    .tdse-authors{
      margin-top:auto;
      color:var(--muted);
      font-size:12px;
      line-height:1.55;
      padding-top:12px;
    }

    .tdse-authors strong{
      display:block;
      color:var(--text);
      font-size:12px;
      margin-bottom:5px;
    }

    .tdse-card-actions{
      display:grid;
      grid-template-columns:1fr;
      gap:10px;
      margin-top:16px;
    }

    .tdse-action{
      min-height:42px;
      border-radius:14px;
      display:flex;
      align-items:center;
      justify-content:center;
      gap:7px;
      font-size:13px;
      font-weight:900;
      border:1px solid var(--border);
      transition:.2s ease;
    }

    .tdse-action.open{color:var(--blue);background:rgba(0,98,160,.06);}
    .tdse-action.disabled{color:var(--muted);background:rgba(100,116,139,.06);cursor:not-allowed;opacity:.72;}
    .tdse-action:hover:not(.disabled){transform:translateY(-2px);box-shadow:0 10px 22px rgba(15,23,42,.10);}

    .tdse-empty{
      display:none;
      margin-top:18px;
      padding:32px 20px;
      border:1px dashed var(--border);
      border-radius:22px;
      text-align:center;
      color:var(--muted);
      line-height:1.7;
    }

    .tdse-empty.active{display:block;}

    .tdse-pagination{
      display:flex;
      align-items:center;
      justify-content:center;
      flex-wrap:wrap;
      gap:8px;
      margin-top:26px;
    }

    .tdse-page-button{
      min-width:40px;
      min-height:40px;
      padding:0 12px;
      border:1px solid var(--border);
      border-radius:13px;
      background:var(--surface-solid);
      color:var(--text);
      font:inherit;
      font-size:13px;
      font-weight:900;
      cursor:pointer;
      transition:.2s ease;
    }

    .tdse-page-button:hover:not(:disabled){transform:translateY(-2px);border-color:rgba(253,148,0,.45);}
    .tdse-page-button.active{background:linear-gradient(135deg,var(--blue),var(--navy));color:#fff;border-color:transparent;}
    .tdse-page-button:disabled{opacity:.45;cursor:not-allowed;}

    .tdse-note{
      margin-top:20px;
      display:flex;
      align-items:flex-start;
      gap:10px;
      color:var(--muted);
      font-size:13px;
      font-weight:700;
      line-height:1.6;
    }

    @media(max-width:1100px){
      .tdse-toolbar{grid-template-columns:1fr 1fr;}
      .tdse-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    }

    @media(max-width:640px){
      .tdse-toolbar,.tdse-grid{grid-template-columns:1fr;}
      .tdse-card{min-height:auto;}
    }


    /* Página de login */
    body.login-active{
      min-height:100vh;
    }

    body.login-active .topbar,
    body.login-active main,
    body.login-active .footer{
      display:none;
    }

    .login-page{
      min-height:100vh;
      display:none;
      align-items:center;
      justify-content:center;
      padding:34px clamp(18px,4vw,64px);
      position:relative;
      overflow:hidden;
    }

    body.login-active .login-page{
      display:flex;
    }

    .login-page::before{
      content:"";
      position:absolute;
      inset:0;
      background:
        linear-gradient(115deg, rgba(22,58,92,.14), transparent 44%),
        url("https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&w=1800&q=80") center/cover;
      opacity:.10;
      pointer-events:none;
    }

    body.dark .login-page::before{
      opacity:.08;
    }

    .login-card{
      width:min(100%,980px);
      min-height:590px;
      position:relative;
      z-index:1;
      display:grid;
      grid-template-columns:1.05fr .95fr;
      border:1px solid var(--border);
      background:var(--surface);
      backdrop-filter:blur(22px);
      border-radius:36px;
      box-shadow:var(--shadow);
      overflow:hidden;
    }

    .login-brand-panel{
      position:relative;
      padding:44px;
      background:
        radial-gradient(circle at top left, rgba(253,148,0,.26), transparent 38%),
        linear-gradient(145deg, var(--navy), #0F2D48);
      color:white;
      display:flex;
      flex-direction:column;
      justify-content:space-between;
      gap:34px;
      overflow:hidden;
    }

    .login-brand-panel::after{
      content:"";
      position:absolute;
      width:260px;
      height:260px;
      right:-90px;
      bottom:-90px;
      border-radius:50%;
      background:rgba(253,148,0,.20);
    }

    .login-logo-box{
      width:260px;
      height:64px;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      position:relative;
      z-index:1;
    }

    .login-logo-box img{
      width:100%;
      max-height:128px;
      object-fit:contain;
      display:block;
      filter:brightness(0) invert(1);
    }

    .login-brand-copy{
      position:absolute;
      width:260px;
      height:260px;
      right:200px;
      bottom:150px;
    }

    .login-brand-copy .eyebrow{
      background:rgba(255,255,255,.10);
      color:#FDBA3B;
      border-color:rgba(255,255,255,.16);
      margin-bottom:18px;
    }

    .login-brand-copy h1{
      font-size:clamp(34px,4vw,56px);
      line-height:1;
      letter-spacing:-.055em;
      font-weight:900;
      margin-bottom:18px;
    }

    .login-brand-copy p{
      color:rgba(255,255,255,.74);
      line-height:1.75;
      font-size:16px;
      max-width:430px;
    }

    .login-mini-list{
      position:relative;
      z-index:1;
      display:grid;
      gap:12px;
    }

    .login-mini-item{
      display:flex;
      align-items:center;
      gap:10px;
      color:rgba(255,255,255,.82);
      font-size:13px;
      font-weight:700;
    }

    .login-mini-item .material-icons-round{
      color:#FDBA3B;
      font-size:20px;
    }

    .login-form-panel{
      padding:44px;
      display:flex;
      flex-direction:column;
      justify-content:center;
      background:
        radial-gradient(circle at top right, rgba(0,98,160,.10), transparent 34%),
        var(--surface-solid);
    }

    .login-form-header{
      margin-bottom:28px;
    }

    .login-form-header h2{
      font-size:clamp(28px,3vw,40px);
      line-height:1.08;
      letter-spacing:-.045em;
      margin-bottom:10px;
    }

    .login-form-header p{
      color:var(--muted);
      line-height:1.65;
      font-size:15px;
    }

    .login-form{
      display:grid;
      gap:16px;
    }

    .login-field{
      display:grid;
      gap:8px;
    }

    .login-field label{
      font-size:13px;
      font-weight:900;
      color:var(--text);
    }

    .login-input-wrap{
      min-height:54px;
      display:flex;
      align-items:center;
      gap:10px;
      padding:0 15px;
      border:1px solid var(--border);
      border-radius:17px;
      background:rgba(255,255,255,.68);
      transition:.2s ease;
    }

    body.dark .login-input-wrap{
      background:rgba(15,23,42,.26);
    }

    .login-input-wrap:focus-within{
      border-color:rgba(253,148,0,.62);
      box-shadow:0 0 0 4px rgba(253,148,0,.12);
      transform:translateY(-1px);
    }

    .login-input-wrap .material-icons-round{
      color:var(--blue);
      font-size:22px;
    }

    body.dark .login-input-wrap .material-icons-round{
      color:#FDBA3B;
    }

    .login-input-wrap input{
      width:100%;
      border:0;
      outline:0;
      background:transparent;
      color:var(--text);
      font:inherit;
      font-weight:700;
      min-width:0;
    }

    .login-input-wrap input::placeholder{
      color:var(--muted);
      font-weight:600;
    }

    .password-toggle{
      width:34px;
      height:34px;
      border:0;
      border-radius:12px;
      background:transparent;
      color:var(--muted);
      cursor:pointer;
      display:grid;
      place-items:center;
      transition:.2s ease;
    }

    .password-toggle:hover{
      background:rgba(0,98,160,.10);
      color:var(--blue);
    }

    body.dark .password-toggle:hover{
      background:rgba(253,148,0,.12);
      color:#FDBA3B;
    }

    .login-error{
      display:none;
      align-items:center;
      gap:8px;
      padding:12px 14px;
      border-radius:16px;
      background:rgba(239,68,68,.10);
      border:1px solid rgba(239,68,68,.24);
      color:#B91C1C;
      font-size:13px;
      font-weight:800;
      line-height:1.4;
    }

    body.dark .login-error{
      color:#FCA5A5;
    }

    .login-error.active{
      display:flex;
    }

    .login-submit{
      width:100%;
      min-height:54px;
      margin-top:4px;
    }

    .login-helper{
      margin-top:18px;
      color:var(--muted);
      font-size:12px;
      line-height:1.6;
    }

    .logout-btn{
      width:auto;
      min-height:44px;
      padding:0 14px;
      border-radius:15px;
      border:1px solid rgba(255,255,255,.18);
      background:rgba(255,255,255,.08);
      color:white;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      font-weight:900;
      font-size:13px;
      cursor:pointer;
      transition:.2s;
    }

    .logout-btn:hover{
      background:rgba(255,255,255,.16);
      transform:translateY(-1px);
    }

    @media(max-width:860px){
      .login-card{
        grid-template-columns:1fr;
        min-height:auto;
      }

      .login-brand-panel{
        padding:34px;
      }

      .login-form-panel{
        padding:34px;
      }

      .login-mini-list{
        display:none;
      }
    }

    @media(max-width:520px){
      .login-page{
        padding:18px;
      }

      .login-card{
        border-radius:28px;
      }

      .login-brand-panel,
      .login-form-panel{
        padding:26px;
      }

      .login-logo-box{
        width:154px;
      }
    }


    /* Página interna: Livros */
    .books-toolbar{
      display:grid;
      grid-template-columns:minmax(260px,1.45fr) minmax(190px,.8fr) minmax(170px,.65fr);
      gap:14px;
      margin:24px 0 16px;
    }

    .book-card{min-height:410px;}
    .book-cover-wrap{
      width:100%;
      height:190px;
      margin:-2px 0 18px;
      border-radius:18px;
      overflow:hidden;
      background:linear-gradient(135deg,rgba(0,98,160,.10),rgba(253,148,0,.10));
      border:1px solid var(--border);
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .book-cover{
      width:100%;
      height:100%;
      object-fit:contain;
      display:block;
      padding:10px;
      transition:transform .25s ease;
    }
    .book-card:hover .book-cover{transform:scale(1.035);}
    .book-cover-download{
      position:absolute;
      right:12px;
      bottom:12px;
      width:42px;
      height:42px;
      border:0;
      border-radius:12px;
      display:grid;
      place-items:center;
      background:rgba(22,58,92,.92);
      color:#fff;
      cursor:pointer;
      box-shadow:0 8px 20px rgba(15,23,42,.25);
      transition:transform .2s ease, background .2s ease;
      z-index:2;
    }
    .book-cover-download:hover{
      transform:translateY(-2px);
      background:var(--blue);
    }
    .book-cover-download:focus-visible{
      outline:3px solid rgba(253,148,0,.55);
      outline-offset:2px;
    }
    .book-cover-download .material-icons-round{font-size:23px;}
    .book-cover-wrap{position:relative;}
    .book-cover-placeholder{
      width:100%;
      height:100%;
      display:grid;
      place-items:center;
      color:var(--muted);
    }
    .book-cover-placeholder .material-icons-round{font-size:54px;}
    .book-company{
      margin-top:auto;
      color:var(--muted);
      font-size:12px;
      line-height:1.55;
      padding-top:14px;
    }
    .book-company strong{
      display:block;
      color:var(--text);
      font-size:12px;
      margin-bottom:5px;
    }
    .book-card .tdse-card-actions{margin-top:18px; flex-wrap:wrap;}
    .book-cover-canvas{
      display:block;
      width:100%;
      height:100%;
      object-fit:contain;
      background:#fff;
    }
    .book-cover-status{
      display:flex;
      width:100%;
      height:100%;
      align-items:center;
      justify-content:center;
      flex-direction:column;
      gap:10px;
      padding:20px;
      text-align:center;
      color:var(--muted);
      font-size:13px;
    }
    .book-cover-status .material-icons-round{font-size:48px;}
    .book-download-cover[disabled]{
      opacity:.55;
      cursor:not-allowed;
      pointer-events:none;
    }

    @media(max-width:900px){.books-toolbar{grid-template-columns:1fr 1fr;}}
    @media(max-width:640px){.books-toolbar{grid-template-columns:1fr;}}


/* Titulos e descricoes das paginas internas */
.info-page-title{
  font-size:clamp(34px,4vw,58px);
  line-height:1.05;
  letter-spacing:-.055em;
  margin-bottom:18px;
}

.info-page-description{
  max-width:820px;
  color:var(--muted);
  line-height:1.7;
  font-size:16px;
}

.info-page-accent{color:var(--blue);}
body.dark .info-page-accent{color:#64B5E8;}


/* =========================================================
   Distribuicao global do Portal GESEL
   Objetivo: aproveitar melhor telas largas e manter a mesma
   linguagem visual em todas as paginas do site.
   ========================================================= */

/* Pagina inicial */
#page-home .hero{
  width:min(1500px,94%);
  min-height:430px;
  margin:0 auto;
  padding:64px 0 54px;
}

#page-home .hero-content{
  max-width:1040px;
}

#page-home .hero h1{
  max-width:1040px;
}

#page-home .hero p{
  max-width:860px;
  margin-left:auto;
  margin-right:auto;
}

#page-home .section{
  width:min(1500px,94%);
}

#page-home .section-head p{
  max-width:720px;
}

#page-home .grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

#page-home .card{
  min-width:0;
  min-height:235px;
  padding:24px;
  border-radius:24px;
}

/* Todas as paginas internas */
.app-page:not(#page-home) .info-page-hero,
.app-page:not(#page-home) .info-shell{
  width:min(1500px,94%);
}

.app-page:not(#page-home) .info-page-hero{
  padding-top:48px;
  padding-bottom:22px;
}

.app-page:not(#page-home) .info-page-description{
  max-width:980px;
}

.app-page:not(#page-home) .info-shell{
  grid-template-columns:250px minmax(0,1fr);
  gap:28px;
}

.app-page:not(#page-home) .info-sidebar{
  border-radius:24px;
  padding:18px;
}

.app-page:not(#page-home) .info-content{
  min-width:0;
  padding:28px;
  border-radius:28px;
}

/* Barras de filtro em TDSE, Artigos e Livros */
#page-tdse .tdse-toolbar,
#page-artigos .tdse-toolbar{
  grid-template-columns:minmax(280px,1.55fr) minmax(130px,.62fr) minmax(120px,.56fr) minmax(135px,.62fr);
  gap:12px;
}

#page-livros .books-toolbar{
  grid-template-columns:minmax(300px,1.65fr) minmax(170px,.72fr) minmax(170px,.72fr);
  gap:12px;
}

/* Grades de conteudo */
#page-tdse .tdse-grid,
#page-artigos .tdse-grid,
#page-livros .tdse-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

#page-tdse .tdse-card,
#page-artigos .tdse-card,
#page-livros .tdse-card{
  min-width:0;
  padding:19px;
  border-radius:22px;
}

#page-tdse .tdse-card,
#page-artigos .tdse-card{
  min-height:318px;
}

#page-tdse .tdse-card h3,
#page-artigos .tdse-card h3{
  font-size:17px;
}

/* Pagina informativa do Energy Institute */
#page-energy-institute .info-content{
  max-width:none;
}

#page-energy-institute .info-block p,
#page-energy-institute .info-block li{
  max-width:1100px;
}

/* Monitores intermediarios */
@media(max-width:1340px){
  #page-home .hero,
  #page-home .section,
  .app-page:not(#page-home) .info-page-hero,
  .app-page:not(#page-home) .info-shell{
    width:min(1260px,94%);
  }

  #page-home .grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .app-page:not(#page-home) .info-shell{
    grid-template-columns:230px minmax(0,1fr);
    gap:22px;
  }

  #page-tdse .tdse-grid,
  #page-artigos .tdse-grid,
  #page-livros .tdse-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  #page-tdse .tdse-toolbar,
  #page-artigos .tdse-toolbar{
    grid-template-columns:minmax(240px,1.4fr) repeat(3,minmax(120px,.7fr));
  }
}

/* Tablets e notebooks menores */
@media(max-width:1050px){
  #page-home .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .app-page:not(#page-home) .info-shell{
    grid-template-columns:1fr;
  }

  .app-page:not(#page-home) .info-sidebar{
    position:relative;
    top:auto;
  }

  #page-tdse .tdse-grid,
  #page-artigos .tdse-grid,
  #page-livros .tdse-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #page-tdse .tdse-toolbar,
  #page-artigos .tdse-toolbar,
  #page-livros .books-toolbar{
    grid-template-columns:1fr 1fr;
  }
}

/* Celulares */
@media(max-width:640px){
  #page-home .hero,
  #page-home .section,
  .app-page:not(#page-home) .info-page-hero,
  .app-page:not(#page-home) .info-shell{
    width:92%;
  }

  #page-home .hero{
    padding-top:44px;
    padding-bottom:40px;
  }

  #page-home .grid{
    grid-template-columns:1fr;
  }

  .app-page:not(#page-home) .info-content{
    padding:20px;
    border-radius:22px;
  }

  #page-tdse .tdse-toolbar,
  #page-artigos .tdse-toolbar,
  #page-livros .books-toolbar,
  #page-tdse .tdse-grid,
  #page-artigos .tdse-grid,
  #page-livros .tdse-grid{
    grid-template-columns:1fr;
  }
}

/* Ajuste final: o banner principal ocupa toda a largura da tela */
#page-home .hero{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
  padding-left:clamp(24px,5vw,90px);
  padding-right:clamp(24px,5vw,90px);
}

@media(max-width:640px){
  #page-home .hero{
    width:100%;
    padding-left:20px;
    padding-right:20px;
  }
}

/* =========================================================
   Ajuste de legibilidade dos cards da pagina inicial
   Mais largura interna para evitar textos e botoes espremidos.
   ========================================================= */
#page-home .grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

#page-home .card{
  min-height:250px;
  padding:26px;
}

#page-home .card-top{
  margin-bottom:20px;
}

#page-home .card h3{
  font-size:23px;
  line-height:1.2;
  margin-bottom:14px;
}

#page-home .card p{
  font-size:15px;
  line-height:1.7;
  margin-bottom:28px;
}

#page-home .card-link{
  left:26px;
  right:26px;
  bottom:22px;
}

#page-home .card-buttons{
  gap:10px;
}

#page-home .btn-card{
  min-width:0;
  padding-left:14px;
  padding-right:14px;
}

@media(max-width:1180px){
  #page-home .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  #page-home .grid{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   Ajuste fino dos cards da pagina inicial
   Mantem 4 colunas em telas largas e aumenta a separacao
   entre o texto descritivo e os botoes/links inferiores.
   ========================================================= */
#page-home .grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}

#page-home .card{
  min-height:278px;
  padding:24px;
}

#page-home .card-top{
  margin-bottom:18px;
}

#page-home .card h3{
  font-size:22px;
  line-height:1.2;
  margin-bottom:14px;
}

#page-home .card p{
  font-size:15px;
  line-height:1.6;
  margin-bottom:56px;
}

#page-home .card-link,
#page-home .card-buttons{
  left:24px;
  right:24px;
  bottom:22px;
}

#page-home .card-buttons{
  gap:10px;
}

#page-home .btn-card{
  min-height:44px;
  padding-left:12px;
  padding-right:12px;
  font-size:13px;
}

@media(max-width:1250px){
  #page-home .grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:930px){
  #page-home .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:700px){
  #page-home .grid{
    grid-template-columns:1fr;
  }
}

/* Correção de legibilidade dos menus select no modo escuro */
body.dark .tdse-field select{
  color-scheme:dark;
  color:var(--text);
}

body.dark .tdse-field select option{
  background:#1E293B;
  color:#E5EDF7;
}

body.dark .tdse-field select option:checked{
  background:#334155;
  color:#FFFFFF;
}

/* =========================================================
   Página interna: Cursos
   ========================================================= */
#page-cursos{
  min-height:70vh;
}

.courses-hero{
  position:relative;
  overflow:hidden;
  padding:60px clamp(24px,5vw,90px) 54px;
  text-align:center;
  border-bottom:1px solid var(--border);
  background:
    radial-gradient(circle at 18% 18%, rgba(0,98,160,.13), transparent 32%),
    radial-gradient(circle at 88% 28%, rgba(253,148,0,.10), transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.56),rgba(255,255,255,.20));
}

body.dark .courses-hero{
  background:
    radial-gradient(circle at 18% 18%, rgba(0,98,160,.18), transparent 32%),
    radial-gradient(circle at 88% 28%, rgba(253,148,0,.10), transparent 28%),
    linear-gradient(180deg,rgba(30,41,59,.48),rgba(15,23,42,.14));
}

.courses-hero::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.16;
  background:
    linear-gradient(120deg,transparent 56%,rgba(0,98,160,.12) 56.5%,transparent 57%),
    linear-gradient(102deg,transparent 72%,rgba(22,58,92,.08) 72.5%,transparent 73%);
}

.courses-hero-inner{
  position:relative;
  z-index:1;
  width:min(920px,100%);
  margin:0 auto;
}

#page-cursos .info-page-title{
  margin-bottom:14px;
}

#page-cursos .info-page-description{
  margin:0 auto;
  max-width:760px;
  font-size:18px;
}

.courses-section{
  width:min(1500px,94%);
  margin:0 auto;
  padding:38px 0 76px;
}

.courses-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}

.courses-heading h2{
  font-size:clamp(26px,3vw,38px);
  letter-spacing:-.04em;
  line-height:1.1;
}

.courses-heading-line{
  display:block;
  width:78px;
  height:4px;
  margin-top:10px;
  border-radius:999px;
  background:var(--orange);
}

.courses-count{
  color:var(--muted);
  font-size:15px;
  white-space:nowrap;
}

.courses-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.course-card{
  position:relative;
  min-width:0;
  min-height:360px;
  display:flex;
  flex-direction:column;
  padding:24px;
  border:1px solid var(--border);
  border-radius:24px;
  background:var(--surface);
  backdrop-filter:blur(18px);
  box-shadow:var(--soft-shadow);
  overflow:hidden;
  transition:.24s ease;
}

.course-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--blue),var(--orange));
}

.course-card:hover{
  transform:translateY(-6px);
  border-color:rgba(253,148,0,.38);
  box-shadow:var(--shadow);
}

.course-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.course-icon{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:18px;
  color:#FFFFFF;
  background:linear-gradient(180deg,#264A89 0%, #19396F 100%);
  border:1px solid rgba(12,31,64,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10), 0 8px 18px rgba(17,24,39,.10);
}

.course-icon .material-icons-round{
  display:block;
  width:1em;
  height:1em;
  line-height:1;
  font-size:30px;
}

body.dark .course-icon{
  color:#FFFFFF;
  border-color:rgba(255,255,255,.10);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.22);
}

.course-badge{
  align-self:flex-start;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(253,148,0,.11);
  border:1px solid rgba(253,148,0,.22);
  color:var(--orange);
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.course-card h3{
  font-size:21px;
  line-height:1.25;
  letter-spacing:-.03em;
  min-height:3.2em;
  margin-bottom:14px;
}

.course-duration{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  color:var(--text);
  font-size:14px;
}

.course-duration .material-icons-round{
  font-size:20px;
  color:var(--blue);
}

body.dark .course-duration .material-icons-round{
  color:#64B5E8;
}

.course-card p{
  color:var(--muted);
  font-size:14px;
  line-height:1.62;
  min-height:7.2em;
  margin-bottom:22px;
}

.course-card-footer{
  margin-top:auto;
  padding-top:16px;
  border-top:1px solid var(--border);
}

.course-action{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--blue);
  font-size:14px;
  font-weight:900;
  transition:.2s ease;
}

.course-action .material-icons-round{
  font-size:19px;
  transition:transform .2s ease;
}

.course-action:hover{
  color:var(--navy);
}

.course-action:hover .material-icons-round{
  transform:translateX(4px);
}

body.dark .course-action{
  color:#64B5E8;
}

.course-action.disabled{
  color:var(--muted);
  cursor:not-allowed;
  opacity:.68;
}

.course-action.disabled:hover .material-icons-round{
  transform:none;
}

@media(max-width:1180px){
  .courses-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:700px){
  .courses-hero{padding-top:44px;padding-bottom:42px;}
  #page-cursos .info-page-description{font-size:16px;}
  .courses-section{width:92%;padding-top:30px;}
  .courses-heading{align-items:flex-start;}
  .courses-grid{grid-template-columns:1fr;}
  .course-card{min-height:auto;}
}


/* Ajustes da pagina de Cursos: voltar, pesquisa e icone hidreletrico */
.courses-toolbar-top{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin-bottom:22px;
}

.courses-back{
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
}

.courses-tools{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 24px;
}

.courses-search{
  flex:1;
  min-height:54px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  border:1px solid var(--border);
  border-radius:17px;
  background:rgba(255,255,255,.64);
  color:var(--muted);
  box-shadow:var(--soft-shadow);
  transition:.2s ease;
}

body.dark .courses-search{
  background:rgba(15,23,42,.24);
}

.courses-search:focus-within{
  border-color:rgba(253,148,0,.55);
  box-shadow:0 0 0 4px rgba(253,148,0,.10);
}

.courses-search .material-icons-round{
  color:var(--blue);
  font-size:22px;
}

body.dark .courses-search .material-icons-round{
  color:#FDBA3B;
}

.courses-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-weight:700;
}

.courses-search input::placeholder{
  color:var(--muted);
  font-weight:600;
}

.courses-clear{
  border:0;
  background:transparent;
  color:var(--blue);
  font:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
  padding:10px 2px;
  white-space:nowrap;
}

body.dark .courses-clear{color:#64B5E8;}
.courses-clear:hover{text-decoration:underline;}

.course-icon-hydro{
  position:relative;
  overflow:hidden;
}

.course-icon-hydro .hydro-water{
  position:absolute;
  left:8px;
  bottom:8px;
  font-size:29px;
  line-height:1;
}

.course-icon-hydro .hydro-bolt{
  position:absolute;
  right:7px;
  top:7px;
  font-size:24px;
  line-height:1;
  text-shadow:0 2px 8px rgba(0,0,0,.18);
}

@media(max-width:700px){
  .courses-tools{
    align-items:stretch;
    flex-direction:column;
  }

  .courses-clear{
    align-self:flex-start;
  }
}
