/* ===== Mundo Shiny v6.2: app shell mais moderno ===== */
body{
  background:
    radial-gradient(circle at 8% 0%, rgba(14,165,183,.20), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgba(246,195,67,.16), transparent 22rem),
    linear-gradient(135deg, var(--bg-2), var(--bg));
}

.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:248px minmax(0, 1fr);
}

.app-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:16px 12px;
  color:#fff;
  background:
    linear-gradient(180deg, rgba(0,80,130,.98), rgba(6,50,78,.98)),
    radial-gradient(circle at 30% 0%, rgba(255,255,255,.18), transparent 18rem);
  border-right:1px solid rgba(255,255,255,.12);
  box-shadow:10px 0 34px rgba(0,42,74,.20);
  z-index:30;
}

.sidebar-brand{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 10px 16px;
  color:#fff;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.14);
  margin-bottom:12px;
}
.sidebar-brand:visited{ color:#fff; }
.sidebar-brand-mark{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.08));
  border:1px solid rgba(255,255,255,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24);
}
.sidebar-brand-mark img{ width:26px; height:26px; display:block; }
.sidebar-brand-title{ display:block; font-weight:900; letter-spacing:.1px; line-height:1; }
.sidebar-brand-subtitle{ display:block; margin-top:4px; color:rgba(255,255,255,.72); font-size:11px; font-weight:700; }

.side-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:2px 4px;
}
.side-nav-group{
  margin:14px 8px 6px;
  color:rgba(255,255,255,.52);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.side-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.82);
  text-decoration:none;
  padding:9px 10px;
  border-radius:10px;
  font-weight:800;
  transition:background .15s ease, color .15s ease, transform .15s ease;
}
.side-nav a:visited{ color:rgba(255,255,255,.82); }
.side-nav a:hover{
  color:#fff;
  background:rgba(255,255,255,.10);
  transform:translateX(2px);
}
.side-nav a.active{
  color:#08324d;
  background:linear-gradient(135deg, #fff, #e9f7fc);
  box-shadow:0 12px 24px rgba(0,0,0,.18);
}
.nav-glyph{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:12px;
  font-weight:900;
  flex:0 0 auto;
}
.side-nav a.active .nav-glyph{
  color:#fff;
  background:linear-gradient(135deg, var(--brand), var(--brand-3));
}

.sidebar-footer{
  margin-top:auto;
  display:grid;
  gap:8px;
  padding:12px 4px 2px;
}
.sidebar-footer .theme-toggle,
.sidebar-footer .power-btn{
  width:100%;
  height:38px;
  justify-content:flex-start;
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.09);
}
.sidebar-footer .power-btn{ justify-content:center; }

.app-content-shell{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.workspace-topbar{
  position:sticky;
  top:0;
  z-index:25;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 22px;
  background:color-mix(in srgb, var(--bg-2) 86%, transparent);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(16px);
}
.workspace-kicker{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.workspace-title{
  color:var(--text);
  font-size:22px;
  font-weight:900;
  line-height:1.15;
}
.workspace-actions{ display:flex; align-items:center; gap:8px; }
.quick-sale{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:0 13px;
  border-radius:10px;
  color:#fff;
  text-decoration:none;
  font-weight:900;
  background:linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow:0 10px 22px rgba(0,80,130,.22);
}
.quick-sale:visited{ color:#fff; }
.quick-sale span{
  display:inline-grid;
  place-items:center;
  height:22px;
  min-width:28px;
  padding:0 6px;
  border-radius:7px;
  background:rgba(255,255,255,.18);
  font-size:11px;
}

.app-main{
  width:100%;
  max-width:none;
  margin:0;
  padding:18px 22px 30px;
}

.card{
  border-radius:10px;
  padding:15px;
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset, var(--shadow-soft);
}
.card:hover{ transform:none; }

table{
  border:1px solid var(--border);
  border-radius:10px;
}
th{
  font-size:11px;
  letter-spacing:.02em;
  color:var(--muted);
}
td{ font-size:13px; }
th, td{ padding:8px 10px; }

button,
.btn-primary,
.btn-secondary,
a.btn-secondary{
  border-radius:8px;
}

.home-hero{
  grid-template-columns:minmax(280px, 420px) minmax(0, 1fr);
  min-height:300px;
  background:
    linear-gradient(135deg, rgba(0,80,130,.12), rgba(14,165,183,.08)),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface-2) 55%, var(--surface)));
}
.home-logo-panel{
  min-height:245px;
  border-radius:16px;
  transform:rotate(-1deg);
}
.home-logo-panel img{ transform:rotate(1deg); }
.home-title{ font-size:40px; max-width:720px; }
.module-card{
  position:relative;
  overflow:hidden;
  min-height:176px;
}
.module-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg, var(--brand), var(--brand-3));
  opacity:.88;
}
.module-card > *{ position:relative; }
.module-kicker{
  color:var(--muted);
  letter-spacing:.08em;
}

@media (max-width:1050px){
  .app-shell{ grid-template-columns:1fr; }
  .app-sidebar{
    position:relative;
    height:auto;
    padding:10px;
  }
  .sidebar-brand{ padding:8px 8px 10px; margin-bottom:8px; }
  .side-nav{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
  }
  .side-nav-group{ display:none; }
  .sidebar-footer{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
  }
  .sidebar-footer .theme-toggle,
  .sidebar-footer .power-btn{ width:auto; }
  .workspace-topbar{ top:0; }
}

@media (max-width:650px){
  .workspace-topbar{
    align-items:flex-start;
    flex-direction:column;
    padding:12px 14px;
  }
  .app-main{ padding:14px; }
  .home-hero{ grid-template-columns:1fr; min-height:0; }
  .home-title{ font-size:30px; }
}

