@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

:root {
  --topbar-height: 60px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 75px;
  --surface: #ffffff;
  --page-bg: #f4f6f9;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --sidebar-bg: #ffffff;
  --sidebar-text: #4b5563;
  --sidebar-active-bg: rgba(17, 24, 39, .07);
  --topbar-bg: #ffffff;
  --topbar-text: #273142;
  --accent: #1f2937;
  --accent-rgb: 31, 41, 55;
  --shadow: 0 8px 26px rgba(15, 23, 42, .08);
}

html[data-bs-theme="dark"] {
  --surface: #171b22;
  --page-bg: #111318;
  --text: #e8edf4;
  --muted: #a9b4c2;
  --border: #2b313b;
  --sidebar-bg: #171b22;
  --sidebar-text: #c8d1dd;
  --sidebar-active-bg: rgba(255, 255, 255, .08);
  --accent: #e5e7eb;
  --accent-rgb: 229, 231, 235;
  --topbar-bg: #171b22;
  --topbar-text: #edf2f7;
  --shadow: 0 8px 26px rgba(0, 0, 0, .24);
}

html[data-skin="corporate"] { --accent: #0f766e; --accent-rgb: 15, 118, 110; }
html[data-skin="spotify"] { --accent: #1db954; --accent-rgb: 29, 185, 84; }
html[data-skin="saas"] { --accent: #7c3aed; --accent-rgb: 124, 58, 237; }
html[data-skin="nature"] { --accent: #15803d; --accent-rgb: 21, 128, 61; }
html[data-skin="vintage"] { --accent: #b45309; --accent-rgb: 180, 83, 9; }
html[data-skin="slack"] { --accent: #4a154b; --accent-rgb: 74, 21, 75; }
html[data-skin="material"] { --accent: #0ea5e9; --accent-rgb: 14, 165, 233; }
html.monochrome { --accent: #525252; --accent-rgb: 82, 82, 82; }

html[data-topbar-color="dark"] {
  --topbar-bg: #111827;
  --topbar-text: #f8fafc;
}

html[data-sidenav-color="dark"] {
  --sidebar-bg: #111827;
  --sidebar-text: #d1d5db;
  --sidebar-active-bg: rgba(255, 255, 255, .08);
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(-.5 * var(--bs-gutter-x, 1rem));
  margin-left: calc(-.5 * var(--bs-gutter-x, 1rem));
  margin-top: calc(-1 * var(--bs-gutter-y, 0));
}

.row > * {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x, 1rem) * .5);
  padding-left: calc(var(--bs-gutter-x, 1rem) * .5);
  margin-top: var(--bs-gutter-y, 0);
}

.g-2 {
  --bs-gutter-x: .5rem;
  --bs-gutter-y: .5rem;
}

.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

.col-6 {
  flex: 0 0 auto;
  width: 50%;
}

@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
}

@media (min-width: 1200px) {
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
}

.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.w-100 { width: 100% !important; }
.fw-semibold { font-weight: 650 !important; }
.text-muted { color: var(--muted) !important; }

@media (min-width: 576px) {
  .d-sm-block { display: block !important; }
}

@media (min-width: 768px) {
  .d-md-block { display: block !important; }
}

@media (min-width: 992px) {
  .d-lg-flex { display: flex !important; }
  .d-lg-none { display: none !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
}

@media (min-width: 1200px) {
  .d-xl-block { display: block !important; }
  .d-xl-inline-flex { display: inline-flex !important; }
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .4rem .75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  background: transparent;
}

.btn-light {
  color: var(--text);
  background: var(--page-bg);
  border-color: var(--border);
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline-primary:hover,
.btn-light:hover {
  background: rgba(var(--accent-rgb), .1);
}

.btn-group {
  display: inline-flex;
}

.btn-group > .btn {
  flex: 1 1 auto;
}

.btn-check {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  pointer-events: none;
}

.form-control {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), .14);
}

.form-switch .form-check-input {
  width: 2.25rem;
  height: 1.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: .2rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
}

.text-bg-primary { color: #fff !important; background: var(--accent) !important; }
.text-bg-success { color: #fff !important; background: #16a34a !important; }
.text-bg-warning { color: #111827 !important; background: #fbbf24 !important; }
.text-bg-danger { color: #fff !important; background: #ef4444 !important; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  gap: .35rem;
  color: var(--muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding-right: .35rem;
  color: var(--muted);
}

.collapse:not(.show) {
  display: none;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  min-width: 12rem;
  padding: .45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
}

.dropdown-menu:not(.show) {
  display: none;
}

.dropdown-menu-end {
  right: 0;
  left: auto;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1px 0;
  padding: .42rem .7rem;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}

.dropdown-item:hover,
.dropdown-item.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), .1);
}

.dropdown-item i {
  margin-right: 0;
}

.dropdown-header {
  padding: .75rem 1rem;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.offcanvas {
  position: fixed;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  color: var(--text);
  background: var(--surface);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease;
}

.offcanvas-end {
  top: 0;
  right: 0;
  width: var(--bs-offcanvas-width, 400px);
  height: 100vh;
  transform: translateX(100%);
}

.offcanvas.show {
  visibility: visible;
  transform: none;
}

.offcanvas-body {
  flex: 1 1 auto;
  padding: 22px;
  overflow-y: auto;
}

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, .46);
}

.btn-close {
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .85;
}

.btn-close::before {
  content: "x";
  font-size: 1.35rem;
  line-height: 1;
}

.btn-close-white {
  color: #fff;
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: color-mix(in srgb, var(--accent) 88%, black);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--accent) 88%, black);
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff;
  background-color: #111827;
  border-color: #111827;
}

.layout-shell {
  min-height: 100vh;
}

.app-topbar {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 1020;
  min-height: var(--topbar-height);
  background: var(--topbar-bg);
  color: var(--topbar-text);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  transition: inset .2s ease, background .2s ease;
}

.topbar-menu {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 750;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(var(--accent-rgb), .24);
  flex: 0 0 auto;
}

.brand-text {
  font-size: 1.08rem;
  color: var(--topbar-text);
  white-space: nowrap;
}

.brand-top {
  display: none;
}

.icon-btn,
.topbar-link,
.profile-btn {
  height: 36px;
  border: 0;
  color: var(--topbar-text);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}

.icon-btn {
  width: 36px;
  font-size: 1rem;
}

.topbar-link {
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  gap: 6px;
}

.topbar-link:hover,
.topbar-link.active,
.icon-btn:hover,
.profile-btn:hover {
  color: var(--accent);
  background: rgba(var(--accent-rgb), .1);
}

.topbar-link.active {
  font-weight: 650;
}

.version-pill {
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.topbar-nav,
.topbar-actions {
  align-items: center;
  gap: 4px;
}

.topbar-actions {
  display: flex;
  min-width: 0;
}

.topbar-search {
  position: relative;
  width: min(280px, 24vw);
}

.topbar-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.topbar-search .form-control {
  height: 36px;
  border-color: var(--border);
  background: var(--page-bg);
  color: var(--text);
  padding-left: 38px;
  font-size: 13px;
  line-height: 1.35;
}

.topbar-search .form-control::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.topbar-nav .dropdown-menu,
.topbar-actions .dropdown-menu {
  font-size: 13px;
}

.mega-menu {
  width: min(680px, calc(100vw - 40px));
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.mega-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  margin: 2px 12px 8px;
}

.mega-callout {
  height: 100%;
  min-height: 122px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #111827);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
}

.mega-callout .fw-semibold {
  font-size: 13px;
  font-weight: 600 !important;
}

.mega-callout span {
  font-size: 12px;
  line-height: 1.4;
}

.notification-btn {
  position: relative;
}

.notification-btn span {
  position: absolute;
  right: 4px;
  top: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  font-size: .7rem;
  line-height: 16px;
}

.notification-menu {
  width: min(340px, calc(100vw - 24px));
  box-shadow: var(--shadow);
}

.list-group-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notify-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.list-group-item small {
  display: block;
  color: var(--muted);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0f172a);
  font-size: .8rem;
  font-weight: 600;
}

.avatar-lg {
  width: 36px;
  height: 36px;
}

.profile-btn {
  padding: 0 4px;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--border);
  transition: width .2s ease, transform .2s ease, background .2s ease;
}

.sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  min-height: calc(var(--topbar-height) + 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 8px;
}

.sidebar-brand .brand-text {
  color: var(--sidebar-text);
}

.sidebar-brand .brand img {
  width: auto;
  max-width: 150px;
  max-height: 42px;
}

.sidebar-user {
  margin: 0 12px 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), .08);
}

.sidebar-user small {
  color: var(--muted);
}

html[data-sidenav-user="false"] .sidebar-user {
  display: none;
}

.side-nav {
  list-style: none;
  margin: 0;
  padding: 8px 10px 18px;
}

#side-menu {
  flex: 1 1 auto;
}

.side-nav-group[hidden] {
  display: none;
}

.sidebar-separator {
  width: calc(100% - 32px);
  margin: 0 16px 6px;
  border: 0;
  border-top: 1px solid var(--border);
}

.side-nav-exit {
  flex: 0 0 auto;
  padding-top: 6px;
}

.side-nav-item {
  margin-bottom: 2px;
}

.side-nav-title {
  padding: 18px 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.side-nav-link {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.side-nav-link i:first-child {
  width: 16px;
  text-align: center;
  font-size: 1rem;
  flex: 0 0 auto;
}

.side-nav-link:hover,
.side-nav-link.active {
  color: var(--accent);
  background: var(--sidebar-active-bg);
}

.side-nav-link.disabled {
  opacity: .48;
  pointer-events: none;
}

.menu-arrow {
  margin-left: auto;
  font-size: .78rem;
  transition: transform .2s ease;
}

.side-nav-link[aria-expanded="true"] .menu-arrow {
  transform: rotate(180deg);
}

.side-nav-second-level {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 34px;
}

.side-nav-second-level a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 13px;
}

.side-nav-second-level a i {
  margin-right: 6px;
}

.side-nav-second-level a:hover,
.side-nav-second-level a.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), .08);
}

.content-page {
  min-height: 100vh;
  padding-top: var(--topbar-height);
  margin-left: var(--sidebar-width);
  transition: margin-left .2s ease;
}

.page-container {
  padding: 20px;
}

.page-title {
  margin-bottom: 22px;
}

.page-title h1 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 500;
}

.breadcrumb {
  --bs-breadcrumb-font-size: .86rem;
}

.sample-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.metric-box {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--page-bg);
}

.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.metric-box small {
  display: block;
  color: var(--muted);
  margin-bottom: 3px;
}

.metric-box strong {
  display: block;
  font-size: .98rem;
}

.empty-state {
  min-height: 360px;
  margin-top: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), .11);
  font-size: 1.8rem;
}

.empty-state h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 560px;
  color: var(--muted);
}

.customizer {
  --bs-offcanvas-width: min(400px, 100vw);
}

.customizer-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #111827);
}

.customizer-header h5 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.customizer-header p {
  margin: 0;
  opacity: .86;
  font-size: .9rem;
}

.setting-group {
  padding: 0 0 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.setting-group h6 {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.setting-card {
  min-height: 48px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  background: var(--surface);
  font-weight: 500;
}

.btn-check:checked + .setting-card,
.btn-check:checked + .btn {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}

.preview {
  width: 42px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.light-preview {
  background: linear-gradient(90deg, #fff 0 35%, #edf2f7 35%);
}

.dark-preview {
  background: linear-gradient(90deg, #111827 0 35%, #1f2937 35%);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1025;
  display: none;
  background: rgba(15, 23, 42, .46);
}

html[data-sidenav-size="collapse"] .app-sidebar {
  width: var(--sidebar-collapsed-width);
}

html[data-sidenav-size="collapse"] .app-topbar {
  left: var(--sidebar-collapsed-width);
}

html[data-sidenav-size="collapse"] .content-page {
  margin-left: var(--sidebar-collapsed-width);
}

html[data-sidenav-size="collapse"] .sidebar-brand {
  justify-content: center;
  padding-inline: 8px;
}

html[data-sidenav-size="collapse"] .app-sidebar .brand-text,
html[data-sidenav-size="collapse"] .sidebar-user,
html[data-sidenav-size="collapse"] .side-nav-title,
html[data-sidenav-size="collapse"] .side-nav-link span,
html[data-sidenav-size="collapse"] .side-nav-link .badge,
html[data-sidenav-size="collapse"] .menu-arrow,
html[data-sidenav-size="collapse"] .side-nav-second-level {
  display: none;
}

html[data-sidenav-size="collapse"] .side-nav-link {
  justify-content: center;
  padding-inline: 0;
}

html[data-sidenav-size="collapse"] .side-nav-link i:first-child {
  width: auto;
}

html[data-sidenav-size="collapse"] .app-sidebar:hover {
  width: var(--sidebar-width);
  box-shadow: var(--shadow);
}

html[data-sidenav-size="collapse"] .app-sidebar:hover .brand-text,
html[data-sidenav-size="collapse"] .app-sidebar:hover .side-nav-title,
html[data-sidenav-size="collapse"] .app-sidebar:hover .side-nav-link span,
html[data-sidenav-size="collapse"] .app-sidebar:hover .side-nav-link .badge,
html[data-sidenav-size="collapse"] .app-sidebar:hover .menu-arrow {
  display: inline-flex;
}

html[data-sidenav-size="collapse"][data-sidenav-user="true"] .app-sidebar:hover .sidebar-user,
html[data-sidenav-size="collapse"] .app-sidebar:hover .side-nav-second-level {
  display: block;
}

html[data-sidenav-size="collapse"] .app-sidebar:hover .side-nav-link {
  justify-content: flex-start;
  padding-inline: 10px;
}

html[data-layout-position="scrollable"] .app-topbar,
html[data-layout-position="scrollable"] .app-sidebar {
  position: absolute;
}

html[data-layout-position="scrollable"] body {
  overflow-x: hidden;
}

@media (max-width: 991.98px) {
  .brand-top {
    display: inline-flex;
  }

  .app-topbar {
    left: 0;
  }

  .topbar-menu {
    padding-inline: 12px;
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: min(var(--sidebar-width), 88vw);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .content-page {
    margin-left: 0;
  }

  html[data-sidenav-size="collapse"] .app-topbar {
    left: 0;
  }

  html[data-sidenav-size="collapse"] .content-page {
    margin-left: 0;
  }

  html[data-sidenav-size="collapse"] .app-sidebar,
  html[data-sidenav-size="collapse"] .app-sidebar:hover {
    width: min(var(--sidebar-width), 88vw);
  }

  html[data-sidenav-size="collapse"] .app-sidebar .brand-text,
  html[data-sidenav-size="collapse"] .app-sidebar .side-nav-title,
  html[data-sidenav-size="collapse"] .app-sidebar .side-nav-link span,
  html[data-sidenav-size="collapse"] .app-sidebar .side-nav-link .badge,
  html[data-sidenav-size="collapse"] .app-sidebar .menu-arrow {
    display: inline-flex;
  }

  html[data-sidenav-size="collapse"][data-sidenav-user="true"] .app-sidebar .sidebar-user,
  html[data-sidenav-size="collapse"] .app-sidebar .side-nav-second-level {
    display: block;
  }

  html[data-sidenav-size="collapse"] .side-nav-link {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .page-container {
    padding: 18px 12px;
  }
}

@media (max-width: 575.98px) {
  .brand-text {
    font-size: 1.08rem;
  }

  .topbar-actions {
    gap: 0;
  }

  .icon-btn {
    width: 36px;
  }

  .empty-state {
    min-height: 300px;
    padding: 24px 16px;
  }
}

/* Authentication page */
.auth-page {
  min-height: 100vh;
  background: var(--page-bg);
}

.auth-box {
  min-height: 100vh;
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 100%;
  max-width: 430px;
}

.auth-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(130, 143, 163, .15);
}

.auth-card-body {
  padding: 40px;
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-logo {
  margin-bottom: 14px;
}

.auth-logo .brand-text {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.auth-brand p {
  max-width: 320px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field .form-label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.auth-control {
  height: 38px;
  padding: 7px 12px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  font-size: 13px;
  line-height: 1.4;
}

.auth-control::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.auth-row {
  margin: 2px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-row .form-check {
  color: var(--text);
  font-size: 13px;
}

.auth-row .form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 0;
  border-color: #9ca3af;
  accent-color: #111827;
}

.auth-row .form-check-input:checked {
  background-color: #111827;
  border-color: #111827;
}

.auth-row .form-check-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 .18rem rgba(17, 24, 39, .16);
}

.auth-muted-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.auth-muted-link:hover {
  color: var(--text);
}

.auth-submit {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  background: #111827;
  border-color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.auth-submit:hover,
.auth-submit:focus {
  color: #fff;
  background: #0b1220;
  border-color: #0b1220;
}

.auth-footer {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.auth-footer span {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .auth-box {
    padding: 24px 14px;
  }

  .auth-card-body {
    padding: 28px 22px;
  }

  .auth-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
