@font-face {
  font-family: Pinar;
  src: url("/assets/fonts/Pinar-VF.ttf");
}
*,
*::before,
*::after {
  font-family: Pinar;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: Pinar;
}
html,
body {
  font-family: Pinar;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}
body {
  display: flex;
  flex-direction: row-reverse;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: auto;
}
.content {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:100vh;
  min-height:100dvh;
  min-width:0;
}
main {
  direction: rtl;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem;
  padding-bottom: 10rem;
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
  border-radius: 8px;
  overflow-y:auto;
  overflow-x:auto;
  scrollbar-color: var(--salmon) transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.5s ease;
  min-height:0;
  min-width:0;
}
.logged-in main {
  margin: 0 0 0.3rem 0.3rem;
}
.guest main {
  margin: 0 0.3rem 0.3rem 0.3rem;
}
.header-mobile {
  display: none;
}
.header-desktop {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 900;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  border-radius: var(--border-radius);
}
.header-center {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 1rem;
  flex-direction: row-reverse;
}
.search-bar {
  flex: 0 1 520px;
  width: 520px;
  max-width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  padding: 0 12px;
}
.header-center > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 3rem;
  height: 100%;
  text-decoration: none;
  color: var(--text-color, #111);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.header-center > a:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.header-center .icon-home {
  font-size: 20px;
  line-height: 1;
}
.user-profile-image {
  border-radius: 50%;
  overflow: hidden;
}
.user-profile-image img {
  width: 3rem;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-desktop {
  display: flex;
}
.bottom-nav-mobile {
  display: none;
}
.nav-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar {
  width: 5rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  background-color: var(--bg-main);
  border-right: 1px solid rgba(4, 32, 69, 0.1);
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.sidebar-logo:hover {
  box-shadow: 0 0 0 3px var(--salmon);
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-color);
  border-radius: 12px;
  transition: background-color 0.2s ease, transform 0.2s;
}
.sidebar-nav li a:hover {
  background-color: rgba(4, 32, 69, 0.05);
  transform: scale(1.05);
}
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
  .logged-in main {
    margin: 0.3rem 0.3rem 4.3rem 0.3rem !important;
  }
  .guest main {
    margin: 0.3rem 0.3rem 0.3rem 0.3rem !important;
  }
  .content {
    flex: 1;
    min-height: 0;
    height: auto;
  }
  .sidebar-desktop {
    display: none;
  }
  .bottom-nav-mobile {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    align-items: center;
    justify-content: space-around;
    padding: 8px 12px;
    z-index: 2000;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
  }
  .bottom-nav-mobile a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
  }
  .bottom-nav-mobile a i {
    font-size: 20px;
  }
  .header-desktop {
    display: none;
  }
  .header-mobile {
    display: flex;
    align-items: baseline;
    position: sticky;
    top: 0;
    z-index: 900;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 1rem;
    backdrop-filter: blur(10px);
}
  .header-mobile-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
    align-items: center;
}
  .mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-logo img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
  }
  .mobile-user {
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    text-decoration: none;
  }
  .mobile-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }
}