:root{
  --tm-primary:#FF5248;
  --tm-secondary:#8338ec;
  --tm-dark:#0f172a;
  --tm-text:#6b7280;
  --tm-soft:#f6f7fb;
  --tm-border:#eef1f6;
  --tm-radius:22px;
  --tm-radius-md:18px;
  --tm-shadow:0 18px 45px rgba(0,0,0,.08);
  --tm-shadow-sm:0 12px 28px rgba(0,0,0,.06);
}

/* ===== Header bar ===== */
.tm-header{
  position: relative;
  z-index: 999;
}

.tm-header__bar{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tm-border);
}

.tm-header__row{
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Logo */
.tm-logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tm-logo img{
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

/* Desktop Nav */
.tm-nav{
  display: flex;
  align-items: center;
  gap: 28px;
}

.tm-nav__link{
  text-decoration: none;
  color: var(--tm-text);
  font-weight: 900;
  font-size: 20px;
  position: relative;
  padding: 10px 2px;
  transition: .2s ease;
}

.tm-nav__link:hover{
  color: var(--tm-primary);
}

.tm-nav__link.active{
  color: var(--tm-primary);
}

.tm-nav__link.active::after{
  content:"";
  position:absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--tm-primary);
}

/* Right Area */
.tm-header__right{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Profile */
.tm-profile{
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--tm-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.tm-profile img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Burger */
.tm-burger{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--tm-border);
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tm-burger span{
  width: 22px;
  height: 2px;
  background: var(--tm-text);
  border-radius: 99px;
  display: block;
}

/* ===== Mobile Drawer ===== */
.tm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  visibility: hidden;
  transition: .2s ease;
  z-index: 998;
}

.tm-drawer{
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: #fff;
  box-shadow: var(--tm-shadow);
  transition: .25s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}

.tm-drawer__top{
  padding: 16px 18px;
  border-bottom: 1px solid var(--tm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-drawer__close{
  border: 0;
  background: #f3f4f6;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-weight: 900;
}

.tm-drawer__nav{
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-drawer__nav a{
  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--tm-text);
  font-weight: 900;
  transition: .2s ease;
}

.tm-drawer__nav a:hover{
  background: rgba(47,107,255,.08);
  color: var(--tm-primary);
}

/* Mobile dropdown */
.tm-drawer__group{
  border: 1px solid var(--tm-border);
  border-radius: 14px;
  overflow: hidden;
}

.tm-drawer__toggle{
  width: 100%;
  border: 0;
  background: #fff;
  padding: 12px 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-drawer__submenu{
  display: none;
  border-top: 1px solid var(--tm-border);
  padding: 8px;
  background: #fafafa;
}

.tm-drawer__submenu a{
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  font-weight: 800;
  color: var(--tm-muted);
}

.tm-drawer__group.open .tm-drawer__submenu{
  display: block;
}

.tm-drawer__bottom{
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--tm-border);
}

.tm-drawer__profile{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 12px;
  border-radius: 14px;
  background: rgba(47,107,255,.08);
  color: var(--tm-primary);
  font-weight: 900;
}

.tm-drawer__profile img{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Open state ===== */
body.tm-menu-open .tm-overlay{
  opacity: 1;
  visibility: visible;
}

body.tm-menu-open .tm-drawer{
  right: 0;
}
