:root {
  --sidebar-width: 260px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f9;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  background: linear-gradient(135deg, var(--marsaw-primary, #0d6efd) 0%, #1a1a2e 100%);
}

.auth-page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1rem 1rem;
}

.auth-login-center {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
}

.auth-page .brand-logo {
  width: auto;
  max-width: min(280px, 85vw);
  max-height: 120px;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.app-footer-copyright--auth {
  width: 100%;
  margin-top: auto;
  text-align: center;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.12);
}

.app-footer-copyright--auth .footer-link {
  color: #fff;
}

.app-footer-copyright--auth .footer-link:hover {
  color: #fff;
  opacity: 0.85;
  text-decoration: underline;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.sidebar-brand {
  width: 100%;
  padding: 0 0.35rem;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--sidebar-logo-width, 180px);
  margin: 0 auto 0.65rem;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: var(--sidebar-logo-width, 180px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.brand-text {
  font-size: calc(0.9rem - 4px);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0 0.15rem;
}

.sidebar-divider {
  margin: 0 0 0.75rem;
  opacity: 0.2;
}

.app-wrapper {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.sidebar-dark .sidebar {
  background: #1e293b;
  color: #e2e8f0;
}

.sidebar-dark .sidebar .nav-link {
  color: #cbd5e1;
}

.sidebar-dark .sidebar .nav-link.active,
.sidebar-dark .sidebar .nav-link:hover {
  background: var(--marsaw-primary, #0d6efd);
  color: #fff;
}

.sidebar-light .sidebar {
  background: #fff;
  border-right: 1px solid #dee2e6;
}

.sidebar-light .sidebar .nav-link.active {
  background: var(--marsaw-primary, #0d6efd);
  color: #fff;
}

.brand-link,
.brand-text {
  color: inherit;
}

.main-content {
  min-width: 0;
  min-height: 100vh;
  background: #f4f6f9;
}

.app-footer-copyright {
  margin-top: auto;
  line-height: 1.6;
}

.app-footer-copyright .footer-link {
  color: inherit;
  text-decoration: none;
}

.app-footer-copyright .footer-link:hover {
  color: var(--marsaw-primary, #0d6efd);
  text-decoration: underline;
}

@media (max-width: 576px) {
  .app-footer-copyright {
    font-size: 0.75rem;
  }
}

.btn-primary,
.nav-pills .nav-link.active {
  background-color: var(--marsaw-primary, #0d6efd) !important;
  border-color: var(--marsaw-primary, #0d6efd) !important;
}

.btn-outline-primary {
  color: var(--marsaw-primary, #0d6efd);
  border-color: var(--marsaw-primary, #0d6efd);
}

.btn-outline-primary:hover {
  background: var(--marsaw-primary, #0d6efd);
  border-color: var(--marsaw-primary, #0d6efd);
}

.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06);
}

.card-net-profit {
  background: #86efac;
  border: none;
  color: #000;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);
}

.card-net-profit h6,
.card-net-profit p,
.card-net-profit .small {
  color: #000;
}

.stat-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.table-products th {
  white-space: nowrap;
  font-size: 0.85rem;
}

.table-products td {
  vertical-align: middle;
  font-size: 0.9rem;
}

.product-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 0.25rem;
  background: #e9ecef;
}

.filter-panel {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
}

@media (max-width: 991.98px) {
  .sidebar {
    display: none;
  }
}
