/* ===== BASE ===== */
body {
  font-family: Arial, sans-serif;
  margin:0;
  background:#f6f7f9;
}

.container {
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 14px;
}

/* ===== TOPO / HEADER ===== */
.topbar {
  display:flex;
  align-items:center;
  gap:16px;
  padding:12px 14px;
  background:#fff;
  border-bottom:1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display:flex;
  align-items:center;
  gap:10px;
}

.brand {
  display:flex;
  align-items:center;
  text-decoration:none;
}

.brand-logo {
  height: 36px;
  width: auto;
  display:block;
}

.nav {
  display:flex;
  gap:8px;
}

.nav a {
  text-decoration:none;
  color:#222;
  padding:6px 10px;
  border-radius:10px;
  background:#f4f5f7;
}

.userbox {
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}

.link {
  text-decoration:none;
  color:#444;
}

/* ===== MENU MOBILE ===== */
.menu-btn {
  display:none;
  border:1px solid #e5e5e5;
  background:#fff;
  height: 40px;
  width: 44px;
  border-radius: 12px;
  cursor:pointer;
  font-size: 20px;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  z-index: 60;
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(320px, 86vw);
  background: #fff;
  border-right: 1px solid #e5e5e5;
  transform: translateX(-102%);
  transition: transform .18s ease;
  z-index: 70;
  padding: 14px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  text-decoration:none;
  color:#111;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.mobile-nav a:hover {
  background:#f6f7f9;
  border-color:#eee;
}

.mobile-nav-head {
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mobile-title {
  font-weight: 800;
}

.close-btn {
  border:1px solid #e5e5e5;
  background:#fff;
  height: 38px;
  width: 42px;
  border-radius: 12px;
  cursor:pointer;
}

.mobile-sep {
  height:1px;
  background:#eee;
  margin: 8px 0;
}

/* ===== COMPONENTES ===== */
.grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap:14px;
  margin-top:12px;
}

.card {
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  padding:14px;
  text-decoration:none;
  color:#111;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  max-width:100%;
  overflow-x:auto;
}

.card.big {
  padding:18px;
}

.btn {
  border:0;
  padding:10px 14px;
  border-radius:8px;
  cursor:pointer;
}

.btn.primary {
  background:#1f6feb;
  color:#fff;
}

.alert {
  background:#ffe9e9;
  border:1px solid #ffb3b3;
  padding:10px;
  border-radius:8px;
  margin:10px 0;
}

/* ===== FORM ===== */
input, select, textarea {
  width:100%;
  padding:10px;
  border:1px solid #ddd;
  border-radius:8px;
  margin:6px 0 12px 0;
  background:#fff;
}

.row {
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}

/* ===== TABELAS ===== */
table {
  width:100%;
  border-collapse: collapse;
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  overflow:hidden;
  min-width: 680px;
}

th, td {
  padding:10px;
  border-bottom:1px solid #eee;
  text-align:left;
}

th {
  background:#fafafa;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 820px){
  .desktop-nav { display:none; }
  .menu-btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .user-name { display:none; }
  .container { padding: 0 10px; }
}

@media (min-width: 900px){
  .row { grid-template-columns: 1fr 1fr; }
}
/* =========================
   PREMIUM UI PACK
   ========================= */

/* Paleta e ajustes finos */
:root{
  --p-blue:#1f6feb;
  --p-blue2:#2a7cff;
  --p-bg:#f6f7f9;
  --p-text:#111;
  --p-muted:#5b5b5b;
  --p-border:rgba(0,0,0,.10);
  --p-card:rgba(255,255,255,.92);
  --p-shadow: 0 18px 60px rgba(0,0,0,.12);
}

body{
  color: var(--p-text);
}

/* Melhor toque no mobile */
*{ -webkit-tap-highlight-color: transparent; }

/* Topbar mais premium */
.topbar{
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
}

/* Links do menu com estado ativo */
.nav a{
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  border: 1px solid rgba(0,0,0,.06);
}
.nav a:hover{
  transform: translateY(-1px);
  background: rgba(31,111,235,.08);
  border-color: rgba(31,111,235,.20);
}

/* Botões premium */
.btn{
  font-weight: 800;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.10);
  border-color: rgba(31,111,235,.18);
}
.btn:active{
  transform: translateY(0);
}

.btn.primary{
  border: 0;
  background: linear-gradient(180deg, var(--p-blue2) 0%, var(--p-blue) 100%);
  box-shadow: 0 14px 26px rgba(31,111,235,.22), 0 2px 0 rgba(255,255,255,.20) inset;
}
.btn.primary:hover{
  box-shadow: 0 18px 34px rgba(31,111,235,.28), 0 2px 0 rgba(255,255,255,.20) inset;
}

/* Inputs premium */
input, select, textarea{
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset;
  transition: box-shadow .12s ease, border-color .12s ease;
}
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: rgba(31,111,235,.45);
  box-shadow: 0 0 0 4px rgba(31,111,235,.12), 0 1px 0 rgba(255,255,255,.85) inset;
}

/* Cards premium */
.card{
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 16px;
  box-shadow: var(--p-shadow), 0 2px 0 rgba(255,255,255,.85) inset, 0 -1px 0 rgba(0,0,0,.04) inset;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(31,111,235,.20);
  box-shadow: 0 26px 80px rgba(0,0,0,.16), 0 2px 0 rgba(255,255,255,.85) inset, 0 -1px 0 rgba(0,0,0,.04) inset;
}

/* Título e texto mais clean */
h1,h2,h3{
  letter-spacing:.2px;
}
.muted{
  color: var(--p-muted);
}

/* ===== Tiles premium pro HOME ===== */
.tiles-premium{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.tile-premium{
  grid-column: span 12;
  position: relative;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: 16px 14px;
  text-decoration:none;
  color:#111;
  overflow:hidden;
  box-shadow:
    0 18px 55px rgba(0,0,0,.10),
    0 2px 0 rgba(255,255,255,.85) inset,
    0 -1px 0 rgba(0,0,0,.04) inset;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.tile-premium:before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(650px 260px at 0% 0%, rgba(31,111,235,.18), transparent 58%),
    radial-gradient(650px 260px at 100% 0%, rgba(0,0,0,.10), transparent 58%);
  opacity:.75;
  pointer-events:none;
}

.tile-premium:hover{
  transform: translateY(-2px);
  border-color: rgba(31,111,235,.28);
  box-shadow:
    0 24px 78px rgba(0,0,0,.16),
    0 2px 0 rgba(255,255,255,.85) inset,
    0 -1px 0 rgba(0,0,0,.04) inset;
}

.tile-premium:active{ transform: translateY(0px); }

.tile-inner{
  position: relative;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.tile-icon{
  height: 48px;
  width: 48px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(31,111,235,.18), rgba(31,111,235,.10));
  border: 1px solid rgba(31,111,235,.18);
  box-shadow: 0 12px 24px rgba(31,111,235,.10);
  font-size: 22px;
  flex: 0 0 auto;
}

.tile-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
}

.tile-desc{
  margin:6px 0 0 0;
  color:#555;
  font-size: 13px;
  line-height: 1.35;
}

.tile-cta{
  margin-top: 10px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.08);
  font-weight: 900;
  font-size: 13px;
  width: fit-content;
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset;
}

@media (min-width: 780px){
  .tile-premium{ grid-column: span 4; min-height: 170px; }
}
/* =========================
   HEADER FIX FINAL
   ========================= */

.topbar{
  height: 64px;
  padding: 0;
}

.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  padding: 0 14px;
  display:flex;
  align-items:center;
  gap:16px;
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-logo{
  height: 34px;
}

.desktop-nav{
  display:flex;
  gap:8px;
}

.userbox{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.btn.small{
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

/* Mobile */
@media (max-width: 820px){
  .desktop-nav{ display:none; }
  .menu-btn{ display:inline-flex; }
  .user-name{ display:none; }
}
