:root {
  --tmc-navbar-bg: #ffffff;
  --tmc-menu-bg: #ffffff;
  --tmc-menu-border: rgba(15, 23, 42, 0.08);
  --tmc-menu-link: #475569;
  --tmc-menu-link-hover: #0f172a;
  --tmc-menu-link-active-bg: rgba(37, 99, 235, 0.12);
  --tmc-menu-link-active-color: #1d4ed8;
  --tmc-page-bg: #f8fafc;
  --tmc-page-text: #1f2937;
}

html.dark-style {
  --tmc-navbar-bg: #1f2937;
  --tmc-menu-bg: #111827;
  --tmc-menu-border: rgba(148, 163, 184, 0.2);
  --tmc-menu-link: #cbd5e1;
  --tmc-menu-link-hover: #f8fafc;
  --tmc-menu-link-active-bg: rgba(59, 130, 246, 0.2);
  --tmc-menu-link-active-color: #bfdbfe;
  --tmc-page-bg: #0f172a;
  --tmc-page-text: #e2e8f0;

  --bs-body-bg: #0f172a;
  --bs-body-color: #e2e8f0;
  --bs-secondary-color: #94a3b8;
  --bs-tertiary-bg: #1e293b;
  --bs-border-color: rgba(148, 163, 184, 0.24);
  --bs-card-bg: #111827;
  --bs-heading-color: #f8fafc;
}

html.light-style {
  --bs-body-bg: #f8fafc;
  --bs-body-color: #1f2937;
  --bs-secondary-color: #64748b;
  --bs-tertiary-bg: #f1f5f9;
  --bs-border-color: rgba(15, 23, 42, 0.1);
  --bs-card-bg: #ffffff;
  --bs-heading-color: #0f172a;
}

body {
  min-height: 100vh;
  background: var(--tmc-page-bg);
  color: var(--tmc-page-text);
}

.container-p-y {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper,
.layout-content-navbar {
  width: 100%;
}

.layout-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout-container {
  min-height: 100vh;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.layout-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.layout-navbar {
  border-bottom: 1px solid var(--tmc-menu-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(8px);
}

.bg-navbar-theme {
  background: var(--tmc-navbar-bg) !important;
}

.bg-menu-theme {
  background: var(--tmc-menu-bg) !important;
}

.navbar-detached {
  border-radius: 0.8rem;
  margin-top: 1rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.layout-menu-horizontal {
  border-bottom: 1px solid var(--tmc-menu-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.menu {
  position: relative;
}

.menu .menu-inner {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.menu .menu-item {
  position: relative;
}

.menu .menu-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: var(--tmc-menu-link);
  font-weight: 600;
  transition: all 0.18s ease;
}

.menu .menu-link:hover {
  color: var(--tmc-menu-link-hover);
  background: rgba(15, 23, 42, 0.06);
}

html.dark-style .menu .menu-link:hover {
  background: rgba(148, 163, 184, 0.16);
}

.menu .menu-item.active > .menu-link,
.menu .menu-item.open > .menu-link {
  color: var(--tmc-menu-link-active-color);
  background: var(--tmc-menu-link-active-bg);
}

.menu-icon,
.tf-icons {
  font-size: 1.05rem;
  line-height: 1;
}

.menu-link.menu-toggle::after {
  content: "";
  margin-left: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

.menu-sub {
  display: none;
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  min-width: 14rem;
  z-index: 1050;
  padding: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid var(--tmc-menu-border);
  background: var(--tmc-menu-bg);
  box-shadow: 0 20px 35px rgba(2, 6, 23, 0.18);
}

.menu-item.open > .menu-sub {
  display: block;
}

.menu-sub .menu-link {
  width: 100%;
  min-height: 2.5rem;
}

.layout-overlay {
  display: none;
}

.layout-overlay.layout-menu-toggle {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(2, 6, 23, 0.5);
}

.drag-target {
  display: none;
}

.app-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.app-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-brand-text {
  color: var(--bs-heading-color);
}

.avatar {
  position: relative;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-online::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bs-body-bg);
}

.avatar-initial {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.bg-label-primary {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

html.dark-style .bg-label-primary {
  background: rgba(96, 165, 250, 0.24);
  color: #bfdbfe;
}

.btn-label-secondary {
  background: transparent;
  border: 1px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}

.hide-arrow::after {
  display: none !important;
}

.badge-notifications {
  position: absolute;
  top: 0.2rem;
  right: 0.1rem;
}

.content-footer {
  border-top: 1px solid var(--tmc-menu-border);
  margin-top: 2rem;
}

@media (max-width: 1199.98px) {
  .layout-menu-horizontal {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    z-index: 1050;
    box-shadow: 0 16px 35px rgba(2, 6, 23, 0.25);
  }

  .layout-menu-horizontal .menu-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .layout-menu-horizontal .menu-link {
    width: 100%;
    min-height: 2.6rem;
    border-radius: 0.55rem;
  }

  .layout-menu-horizontal .menu-sub {
    position: static;
    margin-top: 0.35rem;
    box-shadow: none;
    border: 1px dashed var(--tmc-menu-border);
    background: transparent;
  }

  html.layout-menu-expanded .layout-menu-horizontal {
    display: block;
  }

  html.layout-menu-expanded .layout-overlay.layout-menu-toggle {
    display: block;
  }

  .layout-navbar .container-xxl,
  .layout-page .container-xxl {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}
