:root{
  --text:#2f2b24;
  --muted:#756f64;
  --line:#eadfcd;
  --gold:#bfa56a;
  --gold-dark:#a88e54;
  --danger:#c43b32;
  --warning:#d98621;
  --success:#2f8b57;
  --info:#2d6f95;
  --shadow:0 18px 45px rgba(80,62,32,.14);
  --touch:44px;
}
*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--text);
  background:linear-gradient(135deg,#f7f2e8,#eef4f5);
}
.gabarit-page{min-height:100vh;padding:24px}
.gabarit-header{
  max-width:1180px;
  margin:0 auto 18px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  color:#6b5e48;
  font-size:14px;
}
.desktop-main{
  max-width:1180px;
  margin:0 auto;
  min-width:0;
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:18px;
}
.desktop-topbar{
  position:sticky;
  top:16px;
  z-index:20;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  background:rgba(255,255,255,.86);
  border:1px solid var(--line);
  border-radius:24px;
  padding:16px 18px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(8px);
}
.topbar-left{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
}
.topbar-menu-wrap{position:relative;flex:0 0 auto}
.topbar-left .txt{min-width:0}
.desktop-topbar h1{
  margin:0;
  font-size:32px;
  line-height:1.05;
  color:#2f2b24;
}
.desktop-topbar p{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.4;
}
.drawer-toggle{
  min-width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:800;
  cursor:pointer;
  color:var(--text);
}
.topbar-common-menu{
  position:absolute;
  top:54px;
  left:0;
  width:min(320px,calc(100vw - 32px));
  max-height:calc(100vh - 120px);
  overflow:auto;
  padding:12px;
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(255,255,255,.98);
  box-shadow:0 22px 55px rgba(60,45,22,.22);
}
.menu-section{
  padding:8px 0 10px;
  border-bottom:1px solid #efe5d6;
}
.menu-section:last-child{border-bottom:0;padding-bottom:0}
.menu-section h2{
  margin:0 0 6px;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#8a7a5e;
}
.menu-section button{
  width:100%;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--text);
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.menu-section button:hover,
.menu-section button:focus-visible{
  background:#f6efe3;
  outline:none;
}
.menu-section button.has-alert{color:#6f3b20}
.menu-badge{
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--danger);
  color:#fff;
  font-size:12px;
  font-weight:900;
  box-shadow:0 0 0 4px rgba(196,59,50,.14);
}

.topbar-status-pills{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.status-pill{
  min-height:44px;
  border:1px solid rgba(47,43,36,.12);
  border-radius:999px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  cursor:pointer;
  color:var(--text);
  font-weight:900;
  box-shadow:0 10px 24px rgba(80,62,32,.10);
}
.status-pill:hover{transform:translateY(-1px)}
.status-pill[aria-pressed="true"]{
  outline:3px solid rgba(191,165,106,.30);
  box-shadow:0 14px 32px rgba(80,62,32,.18);
}
.pill-icon{
  width:24px;
  height:24px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  color:#fff;
  font-size:14px;
  line-height:1;
}
.status-critical .pill-icon{background:var(--danger)}
.status-warning .pill-icon{background:var(--warning)}
.status-ok .pill-icon{background:var(--success)}
.pill-count{font-size:18px;line-height:1;color:#241f18}
.pill-label{font-size:13px;color:#5f5546}
.body-preview{
  margin-top:14px;
  padding:14px 16px;
  border:1px dashed #d8c8ac;
  border-radius:16px;
  background:#fffaf1;
  color:#4f4434;
  font-weight:700;
}

.top-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.btn{
  min-width:150px;
  min-height:var(--touch);
  border-radius:15px;
  border:1px solid transparent;
  padding:13px 16px;
  cursor:pointer;
  font-weight:800;
  transition:transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.btn:hover,.drawer-toggle:hover{transform:translateY(-1px)}
.btn-primary{
  color:#fff;
  background:linear-gradient(180deg,var(--gold),var(--gold-dark));
  box-shadow:0 14px 28px rgba(168,142,84,.28);
}
.btn-secondary{
  background:#fff;
  color:var(--text);
  border-color:#e8decd;
}
.demo-panel{
  background:rgba(255,255,255,.82);
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow);
}
.demo-panel h2{margin:0 0 8px;font-size:18px;color:#584b37}
.demo-panel p{margin:0;color:var(--muted)}
@media (max-width:720px){
  .topbar-status-pills{justify-content:stretch}
  .status-pill{flex:1 1 100%;justify-content:flex-start}

  .gabarit-page{padding:12px}
  .desktop-main{padding:12px}
  .desktop-topbar{top:10px;flex-direction:column;align-items:stretch}
  .topbar-left{align-items:flex-start}
  .topbar-common-menu{position:fixed;top:72px;left:12px;right:12px;width:auto}
  .top-actions{width:100%}
  .btn{width:100%;min-width:0}
  .desktop-topbar h1{font-size:24px}
}
