:root{
  --primary-color:#0038A8;
  --bg-app:#F4F7FA;
  --surface:#FFFFFF;
  --text-main:#1A1C1E;
  --text-muted:#64748B;
  --border:#E2E8F0;
  --success:#10B981;
  --danger:#EF4444;
}

*{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg-app);
  color:var(--text-main);
  line-height:1.45;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.container{
  width:min(1100px, calc(100% - 32px));
  margin:0 auto;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.08);
}

/* ================= HEADER ================= */

.app-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(244,247,250,.92);
  backdrop-filter:saturate(180%) blur(8px);
  border-bottom:1px solid var(--border);
}

.app-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:260px;
}

.brand__logo{
  display:block;
  height:54px;
  width:auto;
  object-fit:contain;
}

.brand__logo--vertical{
  display:none;
  height:54px;
}

@media (max-width:680px){
  .brand__logo--horizontal{ display:none; }
  .brand__logo--vertical{ display:block; }
}

.header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.user-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:999px;
}

.user-info{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.user-info__label{
  font-size:11px;
  color:var(--text-muted);
}

.user-info__name{
  font-size:13px;
  font-weight:600;
  max-width:220px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ================= BOTÕES ================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;
  padding:0 14px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text-main);
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  transition:all .2s ease;
}

.btn:hover{
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}

.btn-primary{
  border:none;
  background:var(--primary-color);
  color:#fff;
}

.btn-primary:hover{
  box-shadow:0 8px 18px rgba(0,56,168,.25);
}

/* ================= MENU ================= */

.app-nav{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.75);
  position:relative;
  z-index:30;
}

.app-nav__inner{
  display:flex;
  gap:10px;
  padding:10px 0;
  position:relative;

  overflow-x:auto;
  overflow-y:visible;

  scrollbar-width:thin;
}

.nav-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid transparent;
  color:var(--text-muted);
  font-weight:600;
  white-space:nowrap;
  transition:all .2s ease;
  background:transparent;
}

.nav-item:hover{
  background:rgba(0,56,168,.05);
  border-color:rgba(0,56,168,.12);
  color:var(--text-main);
}

.nav-item.is-active{
  background:rgba(0,56,168,.10);
  border-color:rgba(0,56,168,.20);
  color:var(--primary-color);
}

/* ================= DROPDOWN CONFIG ================= */

.nav-dropdown{
  position:relative;
  display:inline-flex;
}

.nav-config-btn{
  appearance:none;
  background:transparent;
  border:0;
  font:inherit;
  cursor:pointer;
}

.nav-dropdown-panel{
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  width:280px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.15);
  padding:8px;
  display:none;
  z-index:9999;
}

.nav-dropdown-panel.is-open{
  display:block;
}

.nav-dd-title{
  font-size:12px;
  font-weight:800;
  color:var(--text-muted);
  padding:10px 10px 6px;
}

.nav-dd-item{
  display:flex;
  align-items:flex-start;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  transition:all .2s ease;
}

.nav-dd-item:hover{
  background:rgba(0,56,168,.05);
  border-color:rgba(0,56,168,.12);
}

.nav-dd-desc{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.nav-dd-label{
  font-weight:700;
  font-size:13px;
}

.nav-dd-sub{
  font-size:12px;
  color:var(--text-muted);
}

/* ================= MAIN ================= */

.app-main{
  padding:20px 0 26px;
}

/* ================= FOOTER ================= */

.app-footer{
  border-top:1px solid var(--border);
  padding:18px 0;
  background:var(--bg-app);
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-muted);
  font-size:13px;
}

/* ================= RESPONSIVO ================= */

@media (max-width:680px){
  .brand{ min-width:auto; }
  .user-info__name{ max-width:140px; }
}