/* -------------------------------------------------
   UI upgrade (RTL) — professional navigation + improved readability
   Loaded after landing/styles.css and portal.css
   ------------------------------------------------- */

:root{
  --nav-height: 78px;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.08);
  --surface-3: rgba(255,255,255,.10);
  --surface-strong: rgba(255,255,255,.14);
  --ink: rgba(255,255,255,.92);
  --ink-2: rgba(255,255,255,.74);
  --ink-3: rgba(255,255,255,.56);
}

/* Ensure decorative layers never block content */
.bg-orb, .dots{ pointer-events:none; }
.page{ position:relative; z-index:1; }

/* ----------------
   Top navigation
   ---------------- */
.topbar{
  background: rgba(3, 7, 24, .72);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.topbar__inner{
  height: var(--nav-height);
  gap: 14px;
}

/* Hide legacy link styling from landing for new nav elements */
.nav a{ border-bottom: none; padding: 0; }

.nav{
  gap: 10px;
  align-items:center;
}

.nav__link,
.nav__btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration:none;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}

.nav__btn{ font-family: inherit; }

.nav__link:hover,
.nav__btn:hover{
  color: var(--ink);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
}

.nav__link.is-active,
.nav__btn.is-active{
  color: #fff;
  background: rgba(247,201,72,.12);
  border-color: rgba(247,201,72,.35);
}

.nav__item{ position: relative; }

.nav__chev{
  width: 10px;
  height: 10px;
  display:inline-block;
  border-left: 2px solid rgba(255,255,255,.65);
  border-bottom: 2px solid rgba(255,255,255,.65);
  transform: rotate(-45deg);
  margin-top: 2px;
  opacity: .9;
}

.nav__item--account .nav__btn{
  padding: 9px 12px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.12);
}

.nav__item--account .nav__btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.avatar{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(247,201,72,.18);
  border: 1px solid rgba(247,201,72,.35);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.account__label{
  font-weight: 900;
  color: #fff;
}

/* Dropdown menus */
.nav__menu{
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 280px;
  background: rgba(3, 7, 24, .94);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.48);
  padding: 10px;
  display: none;
  z-index: 60;
}

.nav__menu::before{
  content:"";
  position:absolute;
  top:-7px;
  inset-inline-end: 18px;
  width: 14px;
  height: 14px;
  background: rgba(3, 7, 24, .94);
  border-left: 1px solid rgba(255,255,255,.14);
  border-top: 1px solid rgba(255,255,255,.14);
  transform: rotate(45deg);
}

.nav__item:hover > .nav__menu,
.nav__item:focus-within > .nav__menu,
.nav__item.is-open > .nav__menu{
  display:block;
}

.nav__menu--account{ min-width: 320px; }

.nav__menu-link{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: rgba(255,255,255,.90);
  border: 1px solid transparent;
  background: transparent;
  transition: background .12s ease, border-color .12s ease;
}

.nav__menu-link:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

.nav__menu-link.danger{ color: #ffd1d1; }
.nav__menu-link.danger:hover{ background: rgba(255,107,107,.10); border-color: rgba(255,107,107,.18); }

.nav__meta{
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nav__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(247,201,72,.16);
  border: 1px solid rgba(247,201,72,.35);
  color: #fff;
  white-space: nowrap;
}

.nav__menu-link.is-locked{
  opacity: .70;
}

.nav__hint{
  padding: 6px 8px;
}

.nav__hint-title{ font-weight: 900; }
.nav__hint-sub{ color: rgba(255,255,255,.62); font-size: 12px; margin-top: 2px; }

.nav__divider{
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 8px 6px;
}

/* Mobile toggle */
.nav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease;
}

.nav-toggle:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}

.nav-toggle__bars{
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.88);
  position: relative;
  border-radius: 2px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after{
  content:"";
  position:absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.88);
  border-radius: 2px;
}

.nav-toggle__bars::before{ top: -6px; }
.nav-toggle__bars::after{ top: 6px; }

@media (min-width: 900px){
  .nav-toggle{ display:none; }
}

/* Off-canvas mobile navigation */
.mobile-nav{
  display:none;
}

.mobile-nav.is-open{
  display:block;
}

.mobile-nav__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  z-index: 70;
}

.mobile-nav__panel{
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(380px, 92vw);
  height: 100vh;
  background: rgba(3, 7, 24, .96);
  border-inline-start: 1px solid rgba(255,255,255,.10);
  z-index: 71;
  padding: 18px 16px;
  overflow:auto;
}

.mobile-nav__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mobile-nav__title{ font-weight: 900; font-size: 16px; }

.mobile-nav__close{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor:pointer;
}

.mobile-nav__section{ margin-top: 12px; }
.mobile-nav__label{ color: rgba(255,255,255,.62); font-weight: 900; font-size: 12px; margin: 10px 0 8px; }

.mobile-nav__link{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  text-decoration:none;
  color: rgba(255,255,255,.92);
}

.mobile-nav__link + .mobile-nav__link{ margin-top: 8px; }

.mobile-nav__link:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.mobile-nav__link.danger{ color: #ffd1d1; }

.mobile-nav__badge{
  display:inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(247,201,72,.14);
  border: 1px solid rgba(247,201,72,.35);
  color: #fff;
}

.mobile-nav__link.is-locked{ opacity: .72; }

.mobile-nav__user{
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}

.mobile-nav__user-title{ font-weight: 900; }
.mobile-nav__user-sub{ color: rgba(255,255,255,.62); font-size: 12px; margin-top: 2px; }

/* ----------------
   Readability fixes
   ---------------- */

/* Better default link color across pages (except buttons/nav) */
.page a{ color: var(--yellow); }
.page a:hover{ color: var(--yellow2); }
.page a.btn{ color: inherit; }

/* Clickable cards should keep their own typography colors */
.page a.card,
.page a.card:hover{
  color: var(--ink);
}

.page a.card{
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.page a.card:hover{
  transform: translateY(-2px);
  border-color: rgba(247,201,72,.22);
  background: rgba(255,255,255,.07);
}

/* Lists inside cards */
.page ul{ line-height: 1.85; }
.page li{ margin: 6px 0; }

/* Headings for inner pages */
.section__title{
  letter-spacing: .2px;
}

/* Simple vertical spacing helper */
.stack{ display:grid; gap: 14px; }

/* Improve cards and tables on content pages */
.card{
  background: rgba(255,255,255,.055);
}

/* Progress bar (usage limits) */
.progress{
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
}
.progress__bar{
  height: 100%;
  width: 0;
  background: rgba(247,201,72,.85);
}

.table thead th{
  background: rgba(255,255,255,.06);
}

/* Clickable list items */
.list.list--one{
  grid-template-columns: 1fr !important;
}

.list-item.is-link{
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.list-item.is-link:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(247,201,72,.22);
  transform: translateY(-1px);
}

/* When list items are links, keep typography clean */
a.list-item{
  text-decoration: none;
  color: var(--ink);
}
a.list-item:hover{
  color: var(--ink);
}

.list-item__row{
  display:flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.list-item .item-meta{
  color: rgba(255,255,255,.62);
  font-size: 12px;
  font-weight: 700;
}
.list-item .item-arrow{
  width: 10px;
  height: 10px;
  border-left: 2px solid rgba(255,255,255,.70);
  border-bottom: 2px solid rgba(255,255,255,.70);
  transform: rotate(45deg);
}

/* Make select dropdown readable on Windows/Edge */
select{ background: rgba(0,0,0,.18); color: rgba(255,255,255,.92); }
select option{ background: #04071b; color: #fff; }

/* Prevent any unexpected overlay from capturing clicks */
.dots, .bg-orb{ pointer-events:none !important; }
