/* ============================================================
   BASE.CSS — reset e esqueleto de layout (sidebar, topbar,
   área de conteúdo, menu inferior mobile). Estilos de
   componentes (cards, tabelas, modal...) ficam em components.css
   ============================================================ */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
  background-image:radial-gradient(circle at 100% 0%, rgba(110,36,56,0.04), transparent 42%);
}
h1,h2,h3,.display{font-family:var(--font-display);font-weight:600;letter-spacing:-0.01em;line-height:1.2;}
a{color:inherit;}
button{font-family:inherit;cursor:pointer;}
input,select,textarea{font-family:inherit;}
::selection{background:var(--rose-light);}
::-webkit-scrollbar{width:9px;height:9px;}
::-webkit-scrollbar-thumb{background:var(--rose-dust);border-radius:20px;}

/* ---------- LAYOUT GERAL ---------- */
.app{display:flex;min-height:100vh;}

.sidebar{
  width:240px;flex-shrink:0;background:#3B1220;
  padding:20px 12px 16px;position:sticky;top:0;height:100vh;
  display:flex;flex-direction:column;gap:18px;color:#F6E9EA;
}
.brand{display:flex;align-items:center;gap:10px;padding:2px 8px 6px;}
.brand-logo{
  width:34px;height:34px;border-radius:10px;flex-shrink:0;
  background:var(--rose);color:var(--marsala-dark);
  display:grid;place-items:center;font-family:Georgia,serif;font-size:20px;font-weight:700;
}
.brand-mark{display:block;font-family:var(--font-display);font-weight:700;font-size:17px;color:#fff;letter-spacing:0.2px;line-height:1.1;}
.brand-sub{display:block;font-size:10px;letter-spacing:0.6px;color:rgba(246,233,234,0.55);font-weight:600;}
.sidebar-foot{font-size:11px;color:rgba(246,233,234,0.45);padding:0 8px;line-height:1.5;border-top:1px solid rgba(255,255,255,0.1);padding-top:14px;}

.main{flex:1;min-width:0;padding-bottom:90px;}

.topbar{
  position:sticky;top:0;z-index:20;background:rgba(244,238,232,0.92);backdrop-filter:blur(12px);
  padding:18px 28px 14px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.topbar h1{font-size:22px;margin:0;font-weight:600;color:var(--ink);}
.topbar-sub{font-size:12.5px;color:var(--ink-faint);margin-top:2px;}
.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}

.view{padding:20px 28px 12px;}

/* ---------- MENU INFERIOR (mobile) ---------- */
.bottom-nav{display:none;}
@media(max-width:900px){
  .sidebar{display:none;}
  .bottom-nav{
    display:flex;position:fixed;bottom:0;left:0;right:0;z-index:30;background:var(--surface);
    border-top:1px solid var(--border);padding:8px 4px calc(env(safe-area-inset-bottom,0px) + 6px);
    overflow-x:auto;gap:2px;box-shadow:0 -8px 24px rgba(78,24,38,0.1);
  }
  .bottom-nav button{
    flex:1;min-width:60px;display:flex;flex-direction:column;align-items:center;gap:3px;
    background:none;border:none;color:var(--ink-faint);font-size:9.5px;font-weight:700;padding:6px 2px;border-radius:10px;position:relative;
  }
  .bottom-nav button svg{width:19px;height:19px;}
  .bottom-nav button.active{color:var(--marsala);background:var(--rose-light);}
  .bottom-nav .dot{position:absolute;top:2px;right:14px;width:7px;height:7px;border-radius:50%;background:var(--danger);}
  .topbar{padding:18px 16px 12px;}
  .view{padding:16px 16px 10px;}
}
@media(min-width:901px){.mobile-only{display:none;}}

.fab{
  position:fixed;right:20px;bottom:22px;z-index:25;width:56px;height:56px;border-radius:50%;
  background:var(--marsala);color:#fff;border:none;box-shadow:var(--shadow-lift);font-size:26px;
  display:none;align-items:center;justify-content:center;
}
@media(max-width:900px){.fab{display:flex;bottom:86px;}}
