@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir.woff2") format("woff2"), url("../fonts/Vazir.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Medium.woff2") format("woff2"), url("../fonts/Vazir-Medium.woff") format("woff");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Bold.woff2") format("woff2"), url("../fonts/Vazir-Bold.woff") format("woff");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ar-primary: #0f5c67;
  --ar-primary-700: #0b4650;
  --ar-primary-800: #083943;
  --ar-primary-soft: #e8f4f4;
  --ar-accent: #e6a73c;
  --ar-accent-soft: #fff7e7;
  --ar-success: #23865c;
  --ar-danger: #c74343;
  --ar-warning: #b97813;
  --ar-info: #2672a6;
  --ar-ink: #172b34;
  --ar-muted: #667b84;
  --ar-bg: #f3f7f8;
  --ar-surface: #ffffff;
  --ar-surface-soft: #f8fbfb;
  --ar-border: #dce7e9;
  --ar-sidebar-width: 292px;
  --ar-sidebar-collapsed: 88px;
  --ar-topbar-height: 76px;
  --ar-radius-sm: 10px;
  --ar-radius: 16px;
  --ar-radius-lg: 22px;
  --ar-shadow-sm: 0 4px 16px rgba(20, 54, 64, .06);
  --ar-shadow: 0 12px 36px rgba(20, 54, 64, .10);
  --ar-focus: 0 0 0 4px rgba(15, 92, 103, .14);
}

html { scroll-behavior: smooth; }
body.abanrah-ui {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ar-ink);
  background: var(--ar-bg);
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.abanrah-ui button,
body.abanrah-ui input,
body.abanrah-ui select,
body.abanrah-ui textarea { font-family: inherit; }
body.abanrah-ui a { text-decoration: none; }

.abanrah-app-shell { min-height: 100vh; }
.abanrah-sidebar {
  position: fixed;
  z-index: 1040;
  inset: 0 0 0 auto;
  width: var(--ar-sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #e7f2f3;
  background:
    radial-gradient(circle at 20% 5%, rgba(230,167,60,.16), transparent 24%),
    linear-gradient(180deg, #0d4853 0%, #07343e 100%);
  border-left: 1px solid rgba(255,255,255,.08);
  box-shadow: -12px 0 35px rgba(10, 40, 48, .13);
  transition: width .24s ease, transform .24s ease;
}
.abanrah-sidebar-head {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.abanrah-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
}
.abanrah-brand:hover { color: inherit; }
.abanrah-brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}
.abanrah-brand-mark img { width: 88%; height: 88%; object-fit: contain; }
.abanrah-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  white-space: nowrap;
  transition: opacity .16s ease;
}
.abanrah-brand-copy strong { font-size: 1rem; color: #fff; }
.abanrah-brand-copy small { font-size: .72rem; color: rgba(232,246,247,.68); }

.abanrah-user-card {
  margin: 14px 14px 4px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: rgba(255,255,255,.065);
}
.abanrah-user-avatar,
.abanrah-profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #17313a;
  font-weight: 800;
  background: linear-gradient(145deg, #ffe7b5, #e6a73c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.abanrah-user-avatar { width: 40px; height: 40px; border-radius: 12px; }
.abanrah-user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.abanrah-user-copy strong { overflow: hidden; color: #fff; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.abanrah-user-copy small { color: rgba(232,246,247,.62); font-size: .68rem; }
.abanrah-user-settings { color: rgba(255,255,255,.65); padding: 6px; }
.abanrah-user-settings:hover { color: #fff; }

.abanrah-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.abanrah-nav-section { margin-top: 12px; }
.abanrah-nav-label {
  display: block;
  padding: 4px 12px 8px;
  color: rgba(218,239,241,.48);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.abanrah-nav-link {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 9px 12px;
  color: rgba(238,249,250,.83);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: .83rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.abanrah-nav-link > i:first-child {
  width: 22px;
  flex: 0 0 22px;
  color: rgba(207,235,238,.72);
  font-size: 1rem;
  text-align: center;
}
.abanrah-nav-link:hover,
.abanrah-nav-link.is-active {
  color: #fff;
  background: rgba(255,255,255,.105);
}
.abanrah-nav-link:hover { transform: translateX(-2px); }
.abanrah-nav-link.is-active {
  box-shadow: inset -3px 0 0 var(--ar-accent);
  background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.15));
}
.abanrah-nav-link.is-active > i:first-child { color: #ffd58a; }
.abanrah-nav-link-accent { color: #ffe3ae; }
.abanrah-nav-link-danger { color: #ffc9c9; }
.abanrah-nav-toggle { cursor: pointer; }
.abanrah-nav-toggle span { flex: 1; }
.abanrah-nav-chevron { margin-right: auto; color: rgba(255,255,255,.43); font-size: .7rem; transition: transform .2s ease; }
.abanrah-nav-group.is-open .abanrah-nav-chevron { transform: rotate(-90deg); }
.abanrah-submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-right: 34px;
  transition: max-height .28s ease, opacity .18s ease, padding .18s ease;
}
.abanrah-nav-group.is-open .abanrah-submenu { max-height: 520px; opacity: 1; padding-top: 3px; padding-bottom: 5px; }
.abanrah-submenu a {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  color: rgba(226,243,245,.68);
  border-right: 1px solid rgba(255,255,255,.11);
  font-size: .75rem;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.abanrah-submenu a:hover,
.abanrah-submenu a.is-active {
  color: #fff;
  background: rgba(255,255,255,.065);
  border-right-color: var(--ar-accent);
}
.abanrah-submenu a i { color: #efb958; font-size: .72rem; }
.abanrah-sidebar-foot {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  color: rgba(229,245,246,.57);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .69rem;
  white-space: nowrap;
}
.abanrah-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #45d38a; box-shadow: 0 0 0 4px rgba(69,211,138,.12); }

.abanrah-workspace {
  min-height: 100vh;
  margin-right: var(--ar-sidebar-width);
  display: flex;
  flex-direction: column;
  transition: margin-right .24s ease;
}
.abanrah-topbar {
  position: sticky;
  z-index: 1020;
  top: 0;
  min-height: var(--ar-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px clamp(14px, 2vw, 28px);
  background: rgba(255,255,255,.91);
  border-bottom: 1px solid rgba(211,225,228,.86);
  box-shadow: 0 4px 18px rgba(22, 51, 61, .04);
  backdrop-filter: blur(12px);
}
.abanrah-topbar-start,
.abanrah-topbar-actions { display: flex; align-items: center; gap: 11px; }
.abanrah-topbar-title-wrap { min-width: 0; display: flex; flex-direction: column; }
.abanrah-topbar-eyebrow { color: var(--ar-primary); font-size: .65rem; font-weight: 700; }
.abanrah-topbar-title { margin: 0; overflow: hidden; color: var(--ar-ink); font-size: clamp(.95rem, 2vw, 1.17rem); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.abanrah-icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-grid;
  place-items: center;
  color: #45616a;
  background: #f4f8f8;
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, color .15s ease, background .15s ease, border-color .15s ease;
}
.abanrah-icon-button:hover { color: var(--ar-primary); background: var(--ar-primary-soft); border-color: #bdd6d9; transform: translateY(-1px); }
.abanrah-topbar-action {
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #45616a;
  background: #f8fbfb;
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 600;
}
.abanrah-topbar-action:hover { color: var(--ar-primary); background: var(--ar-primary-soft); }
.abanrah-profile-chip {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 5px 4px 10px;
  color: var(--ar-ink);
  background: #fff;
  border: 1px solid var(--ar-border);
  border-radius: 14px;
}
.abanrah-profile-chip:hover { color: var(--ar-primary); border-color: #bdd6d9; box-shadow: var(--ar-shadow-sm); }
.abanrah-profile-avatar { width: 36px; height: 36px; border-radius: 10px; font-size: .76rem; }
.abanrah-profile-copy { flex-direction: column; line-height: 1.3; }
.abanrah-profile-copy strong { font-size: .75rem; }
.abanrah-profile-copy small { color: var(--ar-muted); font-size: .62rem; }

.abanrah-main { flex: 1; min-width: 0; }
.abanrah-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: clamp(16px, 2.2vw, 32px); }
.abanrah-app-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 2.2vw, 32px);
  color: #7a8d94;
  border-top: 1px solid var(--ar-border);
  background: rgba(255,255,255,.65);
  font-size: .7rem;
}

.abanrah-sidebar-backdrop { display: none; }
body.sidebar-collapsed .abanrah-sidebar { width: var(--ar-sidebar-collapsed); }
body.sidebar-collapsed .abanrah-workspace { margin-right: var(--ar-sidebar-collapsed); }
body.sidebar-collapsed .abanrah-brand-copy,
body.sidebar-collapsed .abanrah-user-copy,
body.sidebar-collapsed .abanrah-user-settings,
body.sidebar-collapsed .abanrah-nav-label,
body.sidebar-collapsed .abanrah-nav-link span,
body.sidebar-collapsed .abanrah-nav-chevron,
body.sidebar-collapsed .abanrah-sidebar-foot span { display: none; }
body.sidebar-collapsed .abanrah-sidebar-head { justify-content: center; padding-inline: 10px; }
body.sidebar-collapsed .abanrah-user-card { justify-content: center; margin-inline: 10px; padding-inline: 7px; }
body.sidebar-collapsed .abanrah-nav-link { justify-content: center; padding-inline: 8px; }
body.sidebar-collapsed .abanrah-nav-link > i:first-child { width: 26px; flex-basis: 26px; font-size: 1.08rem; }
body.sidebar-collapsed .abanrah-submenu { display: none; }
body.sidebar-collapsed .abanrah-sidebar-foot { justify-content: center; padding-inline: 8px; }

/* Public shell */
.abanrah-public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.abanrah-public-header {
  position: sticky;
  z-index: 1030;
  top: 0;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--ar-border);
  box-shadow: 0 5px 20px rgba(20,54,64,.05);
  backdrop-filter: blur(12px);
}
.abanrah-public-header-inner {
  width: min(1240px, calc(100% - 28px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.abanrah-brand-public { color: var(--ar-ink); }
.abanrah-brand-public:hover { color: var(--ar-primary); }
.abanrah-brand-public .abanrah-brand-mark { box-shadow: var(--ar-shadow-sm); border: 1px solid var(--ar-border); }
.abanrah-brand-public .abanrah-brand-copy strong { color: var(--ar-ink); }
.abanrah-brand-public .abanrah-brand-copy small { color: var(--ar-muted); }
.abanrah-public-nav { display: flex; align-items: center; gap: 5px; }
.abanrah-public-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  color: #4c646d;
  border-radius: 11px;
  font-size: .78rem;
  font-weight: 600;
}
.abanrah-public-nav a:hover { color: var(--ar-primary); background: var(--ar-primary-soft); }
.abanrah-public-nav .abanrah-public-login { margin-right: 8px; color: #fff; background: var(--ar-primary); box-shadow: 0 7px 18px rgba(15,92,103,.18); }
.abanrah-public-nav .abanrah-public-login:hover { color: #fff; background: var(--ar-primary-700); }
.abanrah-public-main { flex: 1; }
.abanrah-public-content { max-width: 1440px; }
.abanrah-public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(24px, calc((100vw - 1240px) / 2));
  color: #cadde0;
  background: #0a3c46;
  font-size: .73rem;
}
.abanrah-public-footer > div { display: flex; flex-direction: column; gap: 4px; }
.abanrah-public-footer a { color: #ffd58a; }

@media (max-width: 991.98px) {
  .abanrah-sidebar {
    width: min(88vw, 310px);
    transform: translateX(105%);
    box-shadow: -20px 0 50px rgba(5,35,42,.28);
  }
  .abanrah-workspace,
  body.sidebar-collapsed .abanrah-workspace { margin-right: 0; }
  body.sidebar-collapsed .abanrah-sidebar { width: min(88vw, 310px); }
  body.sidebar-collapsed .abanrah-brand-copy,
  body.sidebar-collapsed .abanrah-user-copy,
  body.sidebar-collapsed .abanrah-user-settings,
  body.sidebar-collapsed .abanrah-nav-label,
  body.sidebar-collapsed .abanrah-nav-link span,
  body.sidebar-collapsed .abanrah-nav-chevron,
  body.sidebar-collapsed .abanrah-sidebar-foot span { display: initial; }
  body.sidebar-collapsed .abanrah-sidebar-head { justify-content: space-between; padding-inline: 16px; }
  body.sidebar-collapsed .abanrah-user-card { justify-content: flex-start; margin-inline: 14px; padding-inline: 11px; }
  body.sidebar-collapsed .abanrah-nav-link { justify-content: flex-start; padding-inline: 12px; }
  body.sidebar-collapsed .abanrah-submenu { display: block; }
  body.sidebar-collapsed .abanrah-sidebar-foot { justify-content: flex-start; padding-inline: 18px; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .abanrah-sidebar { transform: translateX(0); }
  .abanrah-sidebar-backdrop {
    position: fixed;
    z-index: 1035;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(5,28,34,.48);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease, visibility .2s ease;
  }
  body.sidebar-open .abanrah-sidebar-backdrop { visibility: visible; opacity: 1; }
  .abanrah-topbar { min-height: 68px; }
  .abanrah-public-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--ar-border);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--ar-shadow);
  }
  .abanrah-public-nav.is-open { display: flex; }
  .abanrah-public-nav a { justify-content: flex-start; }
  .abanrah-public-nav .abanrah-public-login { margin: 4px 0 0; justify-content: center; }
}

@media (max-width: 575.98px) {
  .abanrah-content { padding: 13px; }
  .abanrah-topbar { padding-inline: 10px; }
  .abanrah-topbar-eyebrow { display: none; }
  .abanrah-topbar-actions { gap: 6px; }
  .abanrah-icon-button { width: 40px; height: 40px; flex-basis: 40px; }
  .abanrah-profile-chip { padding-left: 4px; }
  .abanrah-app-footer { justify-content: center; text-align: center; }
  .abanrah-public-footer { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .abanrah-brand-public .abanrah-brand-copy small { display: none; }
}

@media print {
  .abanrah-sidebar,
  .abanrah-topbar,
  .abanrah-app-footer,
  .abanrah-public-header,
  .abanrah-public-footer { display: none !important; }
  .abanrah-workspace { margin: 0 !important; }
  .abanrah-content { max-width: none !important; padding: 0 !important; }
}

.abanrah-public-nav a.is-active {
  color: var(--ar-primary);
  background: var(--ar-primary-soft);
}
.abanrah-ui :focus-visible {
  outline: 2px solid var(--ar-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .abanrah-ui *,
  .abanrah-ui *::before,
  .abanrah-ui *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

html,
body.abanrah-ui {
  max-width: 100%;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html,
  body.abanrah-ui { overflow-x: clip; }
}
