:root {
  --sw-brown: #5b3a29;
  --sw-brown-dark: #3e281c;
  --sw-gold: #c8933b;
  --sw-cream: #faf6f1;
  --sw-neon: #39ff6a;
  --sw-neon-dark: #1f8f45;
}
.sw-full-bleed { padding: 0; margin: 0; min-height: 100vh; }
body { background-color: var(--sw-cream); }
h1, h2, h3, h4, h5, h6, .navbar-brand, .sw-sidebar-brand span, .dd-card .title, .btn {
  font-family: 'Poppins', 'Sora', sans-serif;
}

/* ---------- Sidebar layout ---------- */
.sw-app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sw-sidebar {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, #14161f 0%, #1b1e2c 100%);
  color: #e7e8f2; display: flex; flex-direction: column;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1040;
}
.sw-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 16px; }
.sw-sidebar-brand img { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; background: #fff; padding: 3px; }
.sw-sidebar-brand span { font-weight: 700; font-size: 1.08rem; letter-spacing: .3px; background: linear-gradient(90deg, #fff, var(--sw-neon)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sw-sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.sw-nav-link {
  display: flex; align-items: center; gap: 13px; padding: 9px 12px; border-radius: 12px;
  color: #b8bccb; text-decoration: none; font-size: .89rem; font-weight: 500;
  border-left: 3px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.sw-nav-link i {
  width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.sw-nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sw-nav-link:hover i { background: rgba(255,255,255,.12); }
.sw-nav-link.active {
  background: linear-gradient(90deg, rgba(57,255,106,.16), rgba(57,255,106,.02));
  border-left-color: var(--sw-neon); color: #fff;
}
.sw-nav-link.active i { background: var(--sw-neon); color: #0b0d13; box-shadow: 0 0 14px rgba(57,255,106,.55); }

.sw-sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sw-user-chip { font-size: .76rem; color: #9a9db3; margin-bottom: 8px; text-align: center; text-transform: capitalize; }
.sw-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sw-topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: linear-gradient(135deg, var(--sw-brown-dark), var(--sw-brown)); color: #fff;
}
.sw-menu-toggle { background: none; border: none; color: #fff; font-size: 1.4rem; line-height: 1; padding: 0; }
.sw-sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
  .sw-sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: 0 0 30px rgba(0,0,0,.45);
  }
  .sw-sidebar.show { transform: translateX(0); }
  .sw-sidebar-backdrop.show {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035;
  }
}
@media (min-width: 992px) {
  .sw-topbar { display: none !important; }
}

.navbar-brand span { font-weight: 600; letter-spacing: .3px; }

.pulse-card {
  border: none;
  border-radius: 14px;
  color: #fff;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.pulse-card h3 { font-weight: 700; margin-bottom: 0; }
.pulse-card .label { font-size: .85rem; opacity: .9; }
.pulse-revenue { background: linear-gradient(135deg,#2d6a4f,#40916c); }
.pulse-expense { background: linear-gradient(135deg,#9d0208,#d00000); }
.pulse-profit { background: linear-gradient(135deg,#5b3a29,#8a5a3b); }
.pulse-tasks { background: linear-gradient(135deg,#1d3557,#457b9d); }

.card { border-radius: 12px; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.table thead th { background-color: #f1e9df; }
.low-stock-row { background-color: #fff3cd !important; }
.badge-status-Pending { background-color: #ffb703 !important; }
.badge-status-Done, .badge-status-Paid, .badge-status-Completed, .badge-status-Accepted { background-color: #2a9d8f !important; }
.badge-status-Overdue, .badge-status-Rejected, .badge-status-Blocked { background-color: #d00000 !important; }
.badge-status-Draft, .badge-status-Sent, .badge-status-InProgress { background-color: #457b9d !important; }

@media print {
  .no-print { display: none !important; }
}
