:root {
  --sidebar-bg: #1f2a32;
  --sidebar-bg2: #182129;
  --sidebar-text: #e9ecef;
  --sidebar-muted: #b8c1c7;
  --card-radius: 16px;
}
html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}
body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .08), transparent 28%),
    radial-gradient(circle at top right, rgba(22, 155, 143, .10), transparent 32%),
    linear-gradient(180deg, #eef4f8 0%, #f7fafc 45%, #eef3f7 100%);
}
.mobile-topbar,
.sidebar-backdrop,
.sidebar-mobile-head {
  display: none;
}
body.mobile-menu-open {
  overflow: hidden;
}
body > .d-flex {
  min-height: 100vh;
  width: 100%;
  align-items: stretch;
}
.sidebar {
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  flex: 0 0 260px !important;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg2));
  color: var(--sidebar-text);
  position: sticky;
  top: 0;
  align-self: stretch;
  box-sizing: border-box;
}
.sidebar * { box-sizing: border-box; }
.sidebar-brand {
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  display: block;
  max-width: 42px;
  width: 42px;
  max-height: 42px;
  height: 42px;
  margin: 0 auto 8px;
  object-fit: contain;
}
.brand-subtitle { color: #ffffff; opacity: .85; }
.sidebar-nav { padding: 12px 10px; }
.sidebar-link {
  display: block;
  padding: 10px 12px;
  margin: 4px 0;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
}
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 0; }
.content {
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 22%);
}
.content-body {
  padding: 0 1rem 1rem !important;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.app-footer {
  margin-top: auto;
  padding: 1rem 0 .4rem;
  display: block;
  width: 100%;
}
.app-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .95rem 1rem 0;
  border-top: 1px solid rgba(188, 203, 214, .85);
  color: #4e5d69;
  font-size: .86rem;
  background: rgba(255,255,255,.55);
  border-radius: 14px 14px 0 0;
}
.pwa-install-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1060;
  border: 0;
  border-radius: 999px;
  padding: .8rem 1rem;
  background: linear-gradient(135deg, #0f2740 0%, #16596a 48%, #198754 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(15, 39, 64, .28);
}
.content-body > :first-child,
.content-body > .container-fluid:first-child,
.content-body > .row:first-child,
.content-body > .card:first-child,
.content-body > .dashboard-shell:first-child,
.content-body > .alert:first-child {
  margin-top: 0 !important;
}
.content-header {
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(215,225,233,.9);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.card-soft {
  border: 1px solid rgba(224,232,238,.95);
  border-radius: var(--card-radius);
  box-shadow: 0 14px 36px rgba(18, 38, 63, .08);
  background: rgba(255,255,255,.92);
}
.dashboard-shell {
  max-width: 1540px;
  margin: 0 auto;
}
.dashboard-hero-user {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  font-size: .88rem;
  color: rgba(255,255,255,.88);
}
.dashboard-hero-user strong {
  color: #fff;
  font-size: .92rem;
}
.btn-primary {
  background-color: #198754;
  border-color: #198754;
}
.btn-primary:hover { filter: brightness(.95); }
.table thead th { white-space: nowrap; }
.badge-status { font-weight: 600; border-radius: 999px; }
.badge-status-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 999px;
  padding: .45rem .72rem;
  color: #fff !important;
  border: 0 !important;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.08);
}
.status-bg-blue { background: #2f6fed !important; }
.status-bg-indigo { background: #5b56d6 !important; }
.status-bg-amber { background: #d98b1d !important; }
.status-bg-orange { background: #f97316 !important; }
.status-bg-teal { background: #169b8f !important; }
.status-bg-green { background: #2f9b57 !important; }
.status-bg-rose { background: #d74e7f !important; }
.status-bg-red { background: #c94a4a !important; }
.status-bg-slate { background: #64707d !important; }
.status-bg-purple { background: #7c3aed !important; }
.login-shell {
  background: radial-gradient(circle at top, rgba(31,42,50,.14), transparent 50%), #f5f7fa;
  padding: 1.25rem 0;
}
.login-logo {
  display: block;
  width: auto;
  max-width: min(100%, 220px);
  max-height: 92px;
  height: auto;
  margin: 0 auto 12px;
  object-fit: contain;
}
.login-shell .text-center {
  overflow: hidden;
}
.login-shell .container {
  max-width: 100%;
}
.login-card-col {
  max-width: 640px;
}
.login-shell .card {
  border-radius: 20px;
  overflow: hidden;
}
.login-shell .card-body {
  padding: 1.75rem !important;
}
.login-shell .input-group > .btn {
  white-space: nowrap;
}
.login-shell .form-label {
  font-weight: 600;
}
.login-shell .form-control-lg,
.login-shell .btn-lg {
  min-height: 52px;
  font-size: 1rem;
}
.settings-logo-preview {
  max-width: 180px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.compact-page .card-body { padding: 1rem 1.1rem; }
.user-form-grid .form-control,
.user-form-grid .form-select { min-height: 42px; }
.order-new-page .badge { font-size: .9rem; padding: .5rem .7rem; }
.dashboard-hero {
  position: relative;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.24), transparent 22%),
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.12), transparent 20%),
    linear-gradient(135deg, #0f2740 0%, #16596a 48%, #73b79e 100%);
  color: #fff;
  overflow: hidden;
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -28% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.dashboard-hero .card-body {
  position: relative;
  z-index: 1;
}
.dashboard-eyebrow {
  letter-spacing: .12em;
  opacity: .78;
}
.dashboard-hero .text-muted {
  color: rgba(255,255,255,.78) !important;
}
.dashboard-empenho-box {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}
.dashboard-hero-side {
  display: grid;
  gap: 1rem;
}
.dashboard-hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.dashboard-hero-mini-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: .95rem 1rem;
}
.dashboard-hero-mini-card span {
  display: block;
  font-size: .82rem;
  color: rgba(255,255,255,.76);
}
.dashboard-hero-mini-card strong {
  display: block;
  font-size: 1.45rem;
  margin-top: .25rem;
}
.dashboard-empenho-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .9rem;
  color: rgba(255,255,255,.85);
}
.dashboard-stat {
  overflow: hidden;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-stat:hover,
.dashboard-alert-item:hover,
.dashboard-chip:hover,
.dashboard-hero-mini-card:hover {
  transform: translateY(-2px);
}
.dashboard-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 16px 0 0 16px;
  background: #198754;
}
.dashboard-stat .h2 {
  font-size: 2rem;
}
.stat-solid {
  color: #10202b;
}
.stat-solid .small.text-muted {
  color: rgba(16,32,43,.72) !important;
}
.stat-blue::before { background: #2f6fed; }
.stat-amber::before { background: #d98b1d; }
.stat-teal::before { background: #169b8f; }
.stat-rose::before { background: #d74e7f; }
.stat-blue .card-body {
  background: linear-gradient(135deg, #dfeaff 0%, #ffffff 100%);
}
.stat-amber .card-body {
  background: linear-gradient(135deg, #fff2d9 0%, #ffffff 100%);
}
.stat-teal .card-body {
  background: linear-gradient(135deg, #daf7f2 0%, #ffffff 100%);
}
.stat-rose .card-body {
  background: linear-gradient(135deg, #ffe0ea 0%, #ffffff 100%);
}
.dashboard-alert-list {
  display: grid;
  gap: .85rem;
}
.dashboard-alert-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e7eef3;
  border-radius: 14px;
  padding: .9rem 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-alert-item:hover {
  border-color: #cfdce6;
  box-shadow: 0 10px 22px rgba(24, 40, 64, .08);
}
.dashboard-alert-item strong,
.dashboard-alert-item span {
  display: block;
}
.dashboard-alert-item span {
  color: #64707d;
  font-size: .92rem;
}
.dashboard-alert-item.muted {
  background: #f8fafc;
}
.dashboard-chip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .9rem;
}
.dashboard-chip {
  border-radius: 18px;
  padding: 1rem;
  color: #13212c;
  border: 1px solid #e7edf3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-chip span {
  display: block;
  font-size: .82rem;
  color: #5f6b77;
}
.dashboard-chip strong {
  display: block;
  font-size: 1.6rem;
  margin-top: .3rem;
}
.chip-blue { background: linear-gradient(180deg, #eff5ff 0%, #ffffff 100%); }
.chip-amber { background: linear-gradient(180deg, #fff7e8 0%, #ffffff 100%); }
.chip-teal { background: linear-gradient(180deg, #ebfcfa 0%, #ffffff 100%); }
.chip-green { background: linear-gradient(180deg, #eff9ef 0%, #ffffff 100%); }
.chip-rose { background: linear-gradient(180deg, #fff1f6 0%, #ffffff 100%); }
.dashboard-progress-wrap {
  border-top: 1px solid #ecf1f5;
  padding-top: 1rem;
}
.dashboard-progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}
.dashboard-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d7f74 0%, #34b38a 100%);
}
.dashboard-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dashboard-donut {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.dashboard-donut-center {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e4ebf0;
}
.dashboard-donut-center strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1;
}
.dashboard-donut-center span {
  display: block;
  font-size: .72rem;
  color: #64707d;
}
.dashboard-donut-legend {
  display: grid;
  gap: .55rem;
  font-size: .9rem;
  color: #40505d;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: .45rem;
}
.legend-approved { background: #1d7f74; }
.legend-available { background: #dfe9ef; }
.dashboard-side-bars {
  display: grid;
  gap: .8rem;
}
.dashboard-side-bar-row {
  display: grid;
  gap: .35rem;
}
.dashboard-side-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
}
.dashboard-side-bar-track {
  width: 100%;
  height: 12px;
  background: #e8eef3;
  border-radius: 999px;
  overflow: hidden;
}
.dashboard-side-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.fill-blue { background: linear-gradient(90deg, #2f6fed 0%, #7ca4ff 100%); }
.fill-amber { background: linear-gradient(90deg, #d98b1d 0%, #f0be66 100%); }
.fill-teal { background: linear-gradient(90deg, #169b8f 0%, #63d2c0 100%); }
.fill-rose { background: linear-gradient(90deg, #d74e7f 0%, #ef8cae 100%); }
.dashboard-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 0;
  border-bottom: 1px solid #edf1f5;
}
.dashboard-balance-row.total {
  font-size: 1.03rem;
  border-bottom: 0;
}
.timeline-mini {
  display: grid;
  gap: 1rem;
}
.dashboard-bars {
  min-height: 250px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .85rem;
  align-items: end;
  padding: .5rem 0 0;
}
.dashboard-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
}
.dashboard-bar-value {
  font-size: .95rem;
  font-weight: 700;
  color: #334155;
}
.dashboard-bar-track {
  width: 100%;
  max-width: 52px;
  height: 170px;
  border-radius: 18px;
  background: linear-gradient(180deg, #edf3f8 0%, #dfe7ee 100%);
  padding: 6px;
  position: relative;
  overflow: hidden;
}
.dashboard-bar-fill {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: var(--bar-height, 16%);
  border-radius: 14px 14px 10px 10px;
  min-height: 12px;
  background: #198754;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.dashboard-bar-fill.is-solicitado { background: linear-gradient(180deg, #4f84ff 0%, #2f6fed 100%); }
.dashboard-bar-fill.is-separacao { background: linear-gradient(180deg, #f2b94b 0%, #d98b1d 100%); }
.dashboard-bar-fill.is-transporte { background: linear-gradient(180deg, #36c9b8 0%, #169b8f 100%); }
.dashboard-bar-fill.is-entregue { background: linear-gradient(180deg, #7ac76c 0%, #3b9b3e 100%); }
.dashboard-bar-fill.is-financeiro { background: linear-gradient(180deg, #ef7fa6 0%, #d74e7f 100%); }
.dashboard-bar-label {
  text-align: center;
  font-size: .82rem;
  color: #5f6b77;
}
.timeline-mini-item {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.timeline-mini-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #198754;
  box-shadow: 0 0 0 6px rgba(25,135,84,.12);
}
.timeline-mini-item .dot-alt {
  background: #d98b1d;
  box-shadow: 0 0 0 6px rgba(217,139,29,.12);
}
@media (max-width: 991px) {
  body > .d-flex {
    display: block !important;
  }
  .mobile-topbar {
    display: flex !important;
    position: sticky;
    top: 0;
    z-index: 1040;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1rem;
    background: linear-gradient(135deg, #0f2740 0%, #16596a 48%, #73b79e 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 39, 64, .16);
  }
  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
  }
  .mobile-topbar-brand .small {
    color: rgba(255,255,255,.78);
  }
  .mobile-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
  }
  .mobile-menu-btn,
  .sidebar-close-btn {
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }
  .mobile-menu-btn {
    flex-direction: column;
    gap: 4px;
  }
  .mobile-menu-btn span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    display: block;
  }
  .sidebar-mobile-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(13, 25, 35, .55);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw) !important;
    min-width: min(280px, 86vw) !important;
    max-width: min(280px, 86vw) !important;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 1050;
    overflow-y: auto;
  }
  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }
  body.mobile-menu-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }
  .content {
    min-height: calc(100vh - 72px);
    padding-top: 72px;
  }
  .content-body {
    padding: .85rem !important;
    min-height: calc(100vh - 144px);
  }
  .app-footer-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .pwa-install-btn {
    right: 12px;
    bottom: 12px;
  }
  .content-header {
    top: 72px;
    padding: 10px 12px;
  }
  .brand-logo {
    max-width: 30px;
    width: 30px;
    max-height: 30px;
    height: 30px;
  }
  .login-logo {
    max-width: min(100%, 180px);
    max-height: 68px;
  }
  .dashboard-bars {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    overflow-x: auto;
    padding-bottom: .25rem;
  }
  .dashboard-hero-mini-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-donut-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-shell {
    max-width: 100%;
  }
  .table-responsive {
    border-radius: 14px;
  }
}
@media (max-width: 767px) {
  .login-shell {
    align-items: flex-start !important;
    padding: 1rem 0;
  }
  .login-shell .container {
    padding-left: .35rem;
    padding-right: .35rem;
  }
  .login-shell .row {
    margin-left: 0;
    margin-right: 0;
  }
  .login-shell .card {
    border-radius: 18px;
  }
  .login-shell .card-body {
    padding: 1rem !important;
  }
  .login-card-col {
    max-width: 100%;
  }
  .login-logo {
    display: block;
    width: 100%;
    max-width: 120px;
    max-height: 48px;
    margin-bottom: .75rem;
  }
  .login-shell .fs-3 {
    font-size: 1.45rem !important;
  }
  .login-shell .d-flex.align-items-stretch.gap-2 {
    flex-direction: column;
  }
  .login-shell .d-flex.align-items-stretch.gap-2 > a.btn {
    width: 100%;
  }
  .sidebar-brand {
    padding: 10px 10px 8px;
  }
  .brand-logo {
    max-width: 26px;
    width: 26px;
    max-height: 26px;
    height: 26px;
  }
  .sidebar-nav {
    padding: 10px 8px 16px;
  }
  .sidebar-link {
    padding: 11px 12px;
    font-size: .96rem;
  }
  .content-body {
    padding: .75rem !important;
    min-height: calc(100vh - 144px);
  }
  .app-footer {
    margin-top: 1rem;
  }
  .app-footer-inner {
    font-size: .8rem;
    gap: .45rem .9rem;
    padding: .85rem .75rem 0;
  }
  .pwa-install-btn {
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    text-align: center;
    bottom: 12px;
  }
  .dashboard-hero .card-body,
  .card-soft .card-body {
    padding: 1rem !important;
  }
  .dashboard-stat .h2,
  .display-6 {
    font-size: 1.6rem;
  }
  .dashboard-hero-mini-grid,
  .dashboard-chip-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-donut {
    width: 112px;
    height: 112px;
  }
  .dashboard-donut-center {
    width: 72px;
    height: 72px;
  }
  .dashboard-bars {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
  }
  .table thead th,
  .table tbody td {
    font-size: .88rem;
  }
  .btn,
  .form-control,
  .form-select {
    min-height: 42px;
  }
  .mobile-topbar-brand .fw-bold {
    font-size: .95rem;
  }
  .mobile-topbar-brand .small {
    font-size: .72rem;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .content {
    width: calc(100vw - 260px);
    max-width: calc(100vw - 260px);
  }
  .content-body {
    display: block !important;
    padding: 0 1rem 1.25rem !important;
  }
  .content-body > .dashboard-shell,
  .dashboard-shell {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (min-width: 1400px) {
  .content {
    width: calc(100vw - 260px);
    max-width: calc(100vw - 260px);
  }
  .content-body {
    display: block !important;
    padding: 0 1.1rem 1.5rem !important;
  }
  .content-body > .dashboard-shell,
  .dashboard-shell {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .login-shell .container {
    max-width: 760px !important;
  }
}


