/* =====================================================
   Fixed icon rail, full sidebar, and top navigation
   ===================================================== */
.icon-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  align-items: center;
  border-right: 1px dashed var(--border);
  background: var(--surface);
}

.brand-mark {
  display: grid;
  width: var(--rail-width);
  height: 72px;
  place-items: center;
  color: var(--purple);
  font-size: 34px;
}

.rail-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 8px 10px;
}

.rail-link {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 7px;
  color: #8796ad;
  font-size: 18px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.rail-link:hover,
.rail-link.active {
  background: var(--purple);
  color: #fff;
  transform: translateY(-1px);
}

.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 var(--rail-width);
  z-index: 70;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.sidebar-title {
  display: flex;
  min-height: 72px;
  align-items: center;
  padding: 0 16px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 14px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 44px;
  border-radius: 7px;
  color: var(--muted);
  padding: 0 13px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.side-link i {
  width: 18px;
  text-align: center;
}

.side-link:hover,
.side-link.active {
  background: var(--purple);
  color: #fff;
  transform: translateX(2px);
}

.upgrade-card {
  margin: auto 12px 12px;
  border-radius: 6px;
  background: #9aabc2;
  color: #fff;
  padding: 18px;
}

.upgrade-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.upgrade-card p {
  margin: 4px 0 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  line-height: 1.35;
}

.upgrade-image {
  position: relative;
  height: 100px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 72% 38%, rgba(255, 255, 255, 0.75) 0 8%, transparent 9%),
    linear-gradient(135deg, #69d7ff 0 30%, #f8b56b 31% 58%, #44396a 59% 100%);
}

.upgrade-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.upgrade-play span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: rgba(35, 47, 65, 0.72);
}

.upgrade-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-weight: 850;
}

.profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  background: #2b394e;
  padding: 8px 14px;
}

.profile-strip h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.profile-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-strip .logout {
  margin-left: auto;
}

.topbar {
  position: fixed;
  inset: 0 0 auto calc(var(--rail-width) + var(--sidebar-width));
  z-index: 60;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 28px;
  transition: left 180ms ease;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  min-width: 260px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.flag {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(to bottom, #f2545b 0 3px, #fff 3px 6px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

body.sidebar-compact .sidebar {
  transform: translateX(calc(var(--sidebar-width) * -1));
}

body.sidebar-compact .topbar {
  left: var(--rail-width);
}

body.sidebar-compact .main-panel {
  margin-left: var(--rail-width);
}

/* ===============================
   Logged In User
================================ */

.user-profile{

    display:flex;

    align-items:center;

    gap:12px;

    margin-left:8px;

    cursor:pointer;

    transition:.3s;
}

.user-profile:hover{

    opacity:.9;
}

.user-name{

    color:#ffffff;

    font-size:15px;

    font-weight:700;

    white-space:nowrap;
}

.user-avatar{

    width:46px;

    height:46px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid rgba(255,255,255,.12);

    transition:.3s;
}

.user-avatar:hover{

    transform:scale(1.08);

    border-color:#35c9ff;
}

.language-flag{

    width:30px;

    height:30px;

    border-radius:50%;

    object-fit:cover;

    border:1px solid rgba(255,255,255,.15);

    display:block;

}
