.auth-wrap {
  min-height: 100dvh;
  background: var(--grad-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
  position: relative;
}

.auth-credit {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--muted);
}

.auth-credit a {
  color: var(--gold-600);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.auth-credit a:hover {
  color: var(--gold-500);
}

html[data-theme="dark"] .auth-credit a {
  color: var(--gold-300);
}

html[data-theme="dark"] .auth-credit a:hover {
  color: var(--gold-200);
}

.auth-shell {
  width: 100%;
  max-width: 1080px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  display: grid;
  grid-template-columns: 5fr 6fr;
  position: relative;
  animation: fadeSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-shell::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 4px;
  background: var(--grad-accent-line);
  z-index: 3;
}

.auth-hero {
  position: relative;
  background: var(--grad-emerald);
  color: var(--hero-text);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23C8963E' stroke-opacity='0.14' stroke-width='1'%3E%3Cpath d='M36 4 L44 28 L68 36 L44 44 L36 68 L28 44 L4 36 L28 28 Z'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3Cpath d='M4 4 L14 14 M68 4 L58 14 M4 68 L14 58 M68 68 L58 58'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-hero::after {
  content: "";
  position: absolute;
  top: -60px;
  inset-inline-end: -60px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 150, 62, 0.3), transparent 68%);
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-svg {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  box-shadow: var(--shadow-gold);
  display: block;
}

.logo-brand {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.auth-hero-brand .brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  display: block;
}

.auth-hero-brand .brand-sub {
  font-size: 12px;
  color: var(--hero-dim);
  line-height: 1.4;
  display: block;
}

.auth-hero-brand .brand-badge {
  margin-inline-start: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-300);
  background: var(--hero-chip-bg);
  border: 1px solid rgba(200, 150, 62, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.auth-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--hero-chip-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e9e7d;
  flex: none;
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.auth-hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  margin: 6px 0 0;
}

.auth-hero-title .gold {
  color: var(--gold-300);
}

.auth-hero-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--hero-dim);
  max-width: 360px;
  margin: 0;
}

.auth-hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.hero-feature {
  background: var(--hero-card-bg);
  border: 1px solid var(--hero-card-border);
  border-radius: 16px;
  padding: 14px;
  backdrop-filter: blur(6px);
}

.hero-feature .icon {
  width: 20px;
  height: 20px;
  color: var(--gold-300);
}

.hero-feature h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 8px 0 4px;
  line-height: 1.4;
}

.hero-feature p {
  font-size: 11.5px;
  color: var(--hero-dim);
  line-height: 1.55;
  margin: 0;
}

.auth-quick-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  background: var(--hero-card-bg);
  border: 1px solid var(--hero-card-border);
  border-radius: 16px;
  padding: 14px;
  color: inherit;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: var(--gold-300);
}

.quick-link .icon {
  width: 22px;
  height: 22px;
  color: var(--gold-300);
  flex-shrink: 0;
}

.quick-link .icon:last-child {
  margin-inline-start: auto;
  width: 18px;
  height: 18px;
  color: var(--hero-dim);
}

.quick-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-link-text strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.quick-link-text small {
  font-size: 11.5px;
  color: var(--hero-dim);
  line-height: 1.5;
}

.auth-hero-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--hero-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--hero-dim);
  flex-wrap: wrap;
}

.auth-hero-foot .foot-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-hero-foot .icon {
  width: 15px;
  height: 15px;
  color: var(--gold-300);
}

.auth-form-side {
  padding: 30px 34px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-form-side .auth-tools {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 5;
}

.auth-form-head .auth-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.auth-form-head .auth-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.55;
}

.auth-inst-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding-inline-end: 116px;
  animation: authInstIn 0.3s ease;
}

.auth-inst-head[hidden] {
  display: none;
}

.auth-inst-head.no-anim {
  animation: none;
}

@keyframes authInstIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-inst-logo {
  flex: none;
  width: 54px;
  height: 54px;
}

.auth-inst-logo .logo-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.auth-inst-letter {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #062b22, #0f6851);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-inst-name {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--brand-700);
  min-width: 0;
  padding-inline-start: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-theme="dark"] .auth-inst-name {
  color: var(--gold-300);
}

.auth-form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form .field {
  margin-bottom: 0;
}

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.label-row label {
  margin-bottom: 0;
}

.forgot-mobile {
  display: none;
}

.auth-cta {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  border-radius: 14px;
}

.auth-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-secondary .btn {
  padding: 11px 10px;
  border-radius: 12px;
}

.auth-foot-note {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

.inst-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}

.inst-site-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
}

.inst-site-link:hover {
  text-decoration: underline;
}

.inst-site-link svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.inst-site-link[hidden] {
  display: none;
}

.auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--muted);
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--brand-700);
  font-weight: 600;
  font-size: 12.5px;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme="dark"] .link-btn {
  color: var(--gold-300);
}

.auth-switch .link-btn {
  font-size: var(--fs-small);
}

.alert {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: var(--fs-small);
  line-height: 1.5;
  margin-bottom: 16px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(15, 104, 81, 0.2);
}

.auth-mobile-head {
  display: none;
}


.app-shell {
  display: flex;
  min-height: 100dvh;
  padding-inline-start: var(--sidebar-w);
  transition: padding-inline-start 0.22s ease;
}

html.sb-noanim .app-shell,
html.sb-noanim .sidebar,
html.sb-noanim .sidebar * {
  transition: none !important;
}

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--sb-bg);
  color: var(--sb-text);
  border-inline-end: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 100dvh;
  transition: width 0.22s ease, transform 0.24s ease;
  z-index: 200;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 10px;
  height: var(--topbar-h);
  flex: none;
  position: relative;
}

.sidebar-logo {
  flex: none;
}

.sidebar-logo .logo-svg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.sidebar-logo .logo-brand {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.sidebar-logo .logo-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.sidebar-branch-dd {
  min-width: 0;
  flex: 1 1 auto;
  position: static;
}

.sidebar-branch-dd[hidden] {
  display: none;
}

.sidebar-brand-name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  color: var(--sb-text);
  white-space: nowrap;
}

.sidebar-brand-name[hidden] {
  display: none;
}

.sidebar-branch-btn {
  border: none;
  background: transparent;
  color: var(--sb-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 9px;
  width: 100%;
  max-width: 100%;
}

.sidebar-branch-btn:hover {
  background: var(--sb-hover);
}

.sidebar-branch-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  min-width: 0;
}

.sidebar-branch-btn .icon-chev {
  width: 14px;
  height: 14px;
  color: var(--sb-dim);
  flex: none;
}

.sidebar-branch-dd .dd-panel {
  inset-inline-start: 10px;
  inset-inline-end: 10px;
  min-width: 0;
  top: calc(100% + 2px);
}

.sidebar-pin {
  margin-inline-start: auto;
  border: 1px solid var(--sb-pin-border);
  background: transparent;
  color: var(--sb-pin-text);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.sidebar-pin .icon {
  width: 15px;
  height: 15px;
}

.sidebar-pin.active {
  background: var(--gold-soft-bg);
  border-color: rgba(200, 150, 62, 0.45);
  color: var(--gold-600);
}

html[data-theme="dark"] .sidebar-pin.active {
  color: var(--gold-300);
}

.drawer-inst-name {
  display: none;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 5px 10px;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-section-label {
  font-size: var(--fs-cap);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sb-section);
  padding: 10px 8px 5px;
  padding-inline-start: 12px;
  white-space: nowrap;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.nav-label {
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.nav-item,
.nav-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--sb-text);
  padding: 7px 8px;
  padding-inline-start: 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: start;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover,
.nav-group-head:hover {
  background: var(--sb-hover);
}

.nav-item.active {
  background: var(--grad-gold);
  color: #231806;
  font-weight: 700;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: margin-inline-start 0.22s ease;
}

.nav-icon .icon {
  width: 17px;
  height: 17px;
}

.nav-group.open > .nav-group-head {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 700;
}

html[data-theme="dark"] .nav-group.open > .nav-group-head {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-300);
}

.nav-group.open > .nav-group-head .nav-icon {
  color: var(--gold-500);
}

.nav-group.open > .nav-group-head .nav-icon::after {
  content: "";
  position: absolute;
  bottom: -4px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold-400);
}

html[dir="rtl"] .nav-group.open > .nav-group-head .nav-icon::after {
  transform: translateX(50%);
}

.nav-group-head .icon-chev {
  margin-inline-start: auto;
  width: 12px;
  height: 12px;
  transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
  flex: none;
}

.nav-group.open > .nav-group-head .icon-chev {
  transform: rotate(180deg);
}

.nav-sub {
  display: none;
  padding: 2px 0 5px;
  margin-inline-start: 13px;
  border-inline-start: 1.5px solid var(--sb-sub-border);
  transition: border-inline-start-color 0.22s ease;
}

.nav-group.open .nav-sub {
  display: block;
}

.nav-sub .nav-item {
  padding: 6px 8px;
  padding-inline-start: 10px;
  font-size: 13.5px;
}

.sidebar-foot {
  padding: 9px 10px 11px;
  border-top: 1px solid var(--sb-border);
  flex: none;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-user-row .sidebar-user {
  flex: 1;
  min-width: 0;
  width: auto;
}

.zoom-row {
  display: flex;
  align-items: center;
  flex: none;
}

.zoom-ctl {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--sb-border);
  border-radius: 9px;
  padding: 2px;
}

.zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--sb-text);
  border-radius: 7px;
  cursor: pointer;
}

.zoom-btn:hover:not(:disabled) {
  background: var(--sb-hover);
}

.zoom-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.zoom-btn .icon {
  width: 15px;
  height: 15px;
}

.zoom-value {
  min-width: 46px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--sb-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 7px;
  padding: 0 4px;
}

.zoom-value:hover {
  background: var(--sb-hover);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--sb-text);
  text-align: start;
  padding: 5px 3px;
  padding-inline-start: 7px;
  border-radius: 9px;
}

.sidebar-user:hover {
  background: var(--sb-hover);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: #231806;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
  font-size: 13px;
  box-shadow: var(--shadow-gold);
  transition: margin-inline-start 0.22s ease;
}

.sidebar-user .u-text {
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.sidebar-user .u-name {
  font-weight: 600;
  font-size: 13px;
  display: block;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .u-role {
  font-size: var(--fs-cap);
  color: var(--sb-dim);
  display: block;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-link {
  display: block;
  margin-top: 5px;
  padding: 2px 3px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--sb-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.sidebar-brand-anchor {
  color: var(--gold-300);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.sidebar-brand-anchor:hover {
  color: var(--gold-400);
}

.app-shell.sb-collapsed {
  padding-inline-start: var(--sidebar-w-mini);
}

.app-shell.sb-collapsed .sidebar {
  width: var(--sidebar-w-mini);
  overflow: hidden;
}

.app-shell.sb-collapsed .nav-item,
.app-shell.sb-collapsed .nav-group-head {
  padding-inline-start: 19px;
}

.app-shell.sb-collapsed .nav-label,
.app-shell.sb-collapsed .nav-section-label,
.app-shell.sb-collapsed .nav-group-head .icon-chev,
.app-shell.sb-collapsed .sidebar-user .u-text,
.app-shell.sb-collapsed .sidebar-branch-dd,
.app-shell.sb-collapsed .sidebar-brand-name,
.app-shell.sb-collapsed .zoom-row,
.app-shell.sb-collapsed .sidebar-pin {
  opacity: 0;
  visibility: hidden;
}

.app-shell.sb-collapsed .sidebar-brand-link {
  opacity: 0;
  visibility: hidden;
}

.app-shell.sb-collapsed .nav-icon {
  margin-inline-start: 0;
}

.app-shell.sb-collapsed .avatar {
  margin-inline-start: 0;
}

.app-shell.sb-collapsed .nav-sub {
  display: none;
}

.app-shell.sb-collapsed.sb-hover .sidebar {
  width: var(--sidebar-w);
  box-shadow: var(--shadow-pop);
}

.app-shell.sb-collapsed.sb-hover .nav-label,
.app-shell.sb-collapsed.sb-hover .nav-section-label,
.app-shell.sb-collapsed.sb-hover .nav-group-head .icon-chev,
.app-shell.sb-collapsed.sb-hover .sidebar-user .u-text,
.app-shell.sb-collapsed.sb-hover .sidebar-branch-dd,
.app-shell.sb-collapsed.sb-hover .sidebar-brand-name,
.app-shell.sb-collapsed.sb-hover .zoom-row,
.app-shell.sb-collapsed.sb-hover .sidebar-pin {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.05s;
}

.app-shell.sb-collapsed.sb-hover .sidebar-brand-link {
  opacity: 1;
  visibility: visible;
}

.app-shell.sb-collapsed.sb-hover .nav-icon {
  margin-inline-start: 0;
}

.app-shell.sb-collapsed.sb-hover .avatar {
  margin-inline-start: 0;
}

.app-shell.sb-collapsed.sb-hover .nav-item,
.app-shell.sb-collapsed.sb-hover .nav-group-head {
  padding-inline-start: 12px;
}

.app-shell.sb-collapsed.sb-hover .nav-group.open .nav-sub {
  display: block;
  margin-inline-start: 13px;
  border-inline-start-color: var(--sb-sub-border);
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 24px -18px rgba(6, 43, 34, 0.22);
  position: sticky;
  top: 0;
  z-index: 150;
}

.topbar-side {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar > .topbar-side:first-child {
  flex: 0 1 auto;
  max-width: min(240px, 24vw);
  margin-inline-start: -3px;
}

.topbar-side-end {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.topbar-center {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-inline: 4px;
  text-align: center;
}

.topbar-chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

html[data-theme="dark"] .topbar {
  background: rgba(10, 26, 20, 0.92);
  backdrop-filter: blur(8px);
}

.topbar .page-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  padding-inline-start: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-inst-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.45;
  max-width: 100%;
  padding-inline-start: 3px;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#searchMount {
  display: block;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 26, 20, 0.5);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
}

.search-sheet {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 4px;
}

.search-sheet-head .s-icon {
  color: var(--muted);
  display: inline-flex;
  padding-inline-start: 4px;
}

.search-sheet-head .s-icon .icon {
  width: 20px;
  height: 20px;
}

.search-sheet-head .input {
  flex: 1;
  width: auto;
  border: none;
  background: transparent;
  padding: 8px 2px;
}

.search-sheet-head .input:focus {
  border: none;
  box-shadow: none;
}

.search-empty {
  padding: 26px 18px 34px;
}

.search-results {
  max-height: min(60dvh, 460px);
  overflow-y: auto;
  padding: 8px;
}

.search-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 10px 10px 4px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  color: var(--text);
}

.search-row:hover {
  background: var(--surface-muted, var(--surface));
}

.search-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-row-main strong {
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-row-main small {
  font-size: 12px;
  color: var(--muted);
}

.search-row .icon {
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  color: var(--muted);
  flex-shrink: 0;
}

.search-empty p {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0;
}

.content {
  padding: 12px 12px 84px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#homeSections {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#homeSections[hidden] {
  display: none;
}

.dd-panel .dd-branch-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.dd-panel .dd-branch-item .dd-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dd-panel .dd-branch-item:hover {
  background: var(--surface-2);
}

.dd-panel .dd-branch-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dd-panel .dd-branch-item:disabled:hover {
  background: transparent;
}

.dd-panel .dd-branch-item .check-ico {
  margin-inline-start: auto;
  color: var(--brand-600);
  display: inline-flex;
}

html[data-theme="dark"] .dd-panel .dd-branch-item .check-ico {
  color: var(--gold-300);
}

.branch-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 26, 20, 0.5);
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.branch-modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  animation: fadeSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.branch-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.branch-modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.branch-modal-list {
  overflow-y: auto;
  padding: 6px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.branch-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}

.branch-modal-item:hover {
  background: var(--surface-2);
}

.branch-modal-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.branch-modal-item:disabled:hover {
  background: transparent;
}

.branch-modal-label {
  min-width: 0;
}

.branch-modal-item .check-ico {
  margin-inline-start: auto;
  color: var(--brand-600);
  flex: none;
  display: inline-flex;
}

.dd-panel .dd-branch-item .check-ico .icon {
  width: 16px;
  height: 16px;
}

.home-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.home-header-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 4px 0 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 320px));
  gap: 10px;
  align-items: start;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 10px 11px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sk-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-card .sk-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: var(--grad-accent-line);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.stat-card .s-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.stat-card .s-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: 0 3px 8px -3px rgba(11, 79, 62, 0.28), inset 0 0 0 1px rgba(11, 79, 62, 0.08);
}

html[data-theme="dark"] .stat-card .s-ico {
  background: var(--brand-900);
  color: var(--brand-300);
}

.stat-card .s-ico .icon {
  width: 17px;
  height: 17px;
}

.stat-card .s-ico.tone-green {
  background: var(--success-bg);
  color: var(--brand-700);
}

html[data-theme="dark"] .stat-card .s-ico.tone-green {
  color: var(--brand-300);
}

.stat-card .s-ico.tone-gold {
  background: var(--gold-soft-bg);
  color: var(--gold-600);
}

html[data-theme="dark"] .stat-card .s-ico.tone-gold {
  color: var(--gold-300);
}

.stat-card .s-ico.tone-teal {
  background: rgba(46, 158, 125, 0.14);
  color: #1d7a5f;
}

html[data-theme="dark"] .stat-card .s-ico.tone-teal {
  color: #5fc7a8;
}

.stat-card .s-ico.tone-slate {
  background: rgba(100, 116, 139, 0.14);
  color: #52616f;
}

html[data-theme="dark"] .stat-card .s-ico.tone-slate {
  color: #a9b8c4;
}

.stat-card .s-delta {
  margin-inline-start: auto;
}

.stat-card .s-val {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 7px;
  display: block;
}

.stat-card .s-lbl {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: block;
  line-height: 1.45;
}

.stat-card .progress {
  margin-top: 7px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 15px 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}

.section-head .sh-text {
  min-width: 0;
}

.section-head h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.section-head .sh-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.section-head .sh-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.receipts-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.receipts-filter .rf-search {
  flex: 1 1 200px;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: start;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approval-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.approval-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.approval-item:first-child {
  padding-top: 2px;
}

.approval-item .a-ico {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.approval-item .a-ico .icon {
  width: 17px;
  height: 17px;
}

.approval-item .a-main {
  min-width: 0;
  flex: 1;
}

.approval-item .a-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
  display: block;
}

.approval-item .a-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}

.approval-item .a-act {
  flex: none;
  align-self: center;
}

.side-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 16px 8px;
  line-height: 1.6;
}

.dash-alert-list {
  display: flex;
  flex-direction: column;
}

.dash-alert-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: start;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 9px 6px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  border-radius: 8px;
}

.dash-alert-row:nth-child(even) {
  background: var(--surface-2);
}

.dash-alert-row:last-child {
  border-bottom: none;
}

.dash-alert-row:hover {
  background: var(--brand-50);
}

html[data-theme="dark"] .dash-alert-row:hover {
  background: var(--surface-2);
}

.dash-alert-ico {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--warning-bg);
  color: var(--warning);
}

.dash-alert-ico .icon {
  width: 17px;
  height: 17px;
}

.dash-alert-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dash-alert-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
}

.dash-alert-line {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-alert-count {
  flex: none;
  margin-top: 2px;
}

.dash-alert-chev {
  flex: none;
  align-self: center;
  color: var(--muted);
  display: inline-flex;
}

html[dir="rtl"] .dash-alert-chev {
  transform: scaleX(-1);
}

.hifz-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.hifz-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.hifz-row:first-child {
  padding-top: 2px;
}

.hifz-row .h-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
}

.hifz-row .h-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
}

.hifz-row .h-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.hifz-row .h-pct {
  margin-inline-start: auto;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-700);
}

html[data-theme="dark"] .hifz-row .h-pct {
  color: var(--gold-300);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 18px;
}

.panel h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  margin: 0 0 8px;
  line-height: var(--lh-head);
}

.panel p {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 42px 18px;
  color: var(--muted);
}

.empty-state .icon {
  width: 52px;
  height: 52px;
  color: var(--brand-300);
  margin-bottom: 14px;
  background: var(--surface-2);
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--surface-2);
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 6px;
}

.mobile-nav {
  display: none;
}

.drawer-backdrop {
  display: none;
}

html.drawer-lock,
body.drawer-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid .stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .chart-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .auth-hero {
    display: none;
  }

  .auth-mobile-head {
    display: block;
    background: var(--surface);
    color: var(--text);
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    margin: 0 -16px;
  }

  .auth-mobile-head .auth-hero-brand .brand-name {
    color: var(--brand-700);
  }

  html[data-theme="dark"] .auth-mobile-head .auth-hero-brand .brand-name {
    color: var(--brand-300);
  }

  .auth-mobile-head .auth-hero-brand .brand-sub {
    color: var(--muted);
  }

  .auth-mobile-head > * {
    position: relative;
    z-index: 1;
  }

  .auth-mobile-head .brand-badge {
    display: none;
  }

  .auth-mobile-head .greeting {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin: 16px 0 0;
    line-height: 1.4;
  }

  .auth-mobile-head .greeting-sub {
    font-size: 12.5px;
    color: var(--muted);
    margin: 3px 0 0;
    line-height: 1.55;
  }

  .auth-form-side {
    padding: 0 16px 20px;
  }

  .auth-form-side .auth-tools {
    top: 12px;
    inset-inline-end: 12px;
  }

  .auth-form-head .auth-title {
    font-size: 20px;
  }

  .auth-inst-head {
    gap: 11px;
    margin-bottom: 14px;
    padding-inline-end: 0;
  }

  .auth-inst-logo,
  .auth-inst-logo .logo-img,
  .auth-inst-letter {
    width: 46px;
    height: 46px;
  }

  .auth-inst-letter {
    font-size: 20px;
  }

  .auth-inst-name {
    font-size: 20px;
  }

  #loginView,
  #activateView {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lift);
    padding: 18px 16px;
    margin-top: -2px;
    position: relative;
    z-index: 2;
  }

  #loginView .auth-form-head {
    display: none;
  }

  #loginView .auth-form {
    margin-top: 0;
  }

  .auth-form .field-type {
    order: -1;
  }

  .forgot-row {
    display: none;
  }

  .forgot-mobile {
    display: inline-block;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding-inline-start: 0;
  }

  .sidebar {
    position: fixed;
    inset-inline: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: min(80dvh, 640px);
    border-inline-end: none;
    border-top: 1px solid var(--sb-border);
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    box-shadow: var(--shadow-pop);
  }

  .app-shell.sb-open .sidebar {
    transform: translateY(0);
  }

  .sidebar-pin {
    display: none;
  }

  .app-shell.sb-collapsed .sidebar {
    width: auto;
    overflow: visible;
  }

  .app-shell.sb-collapsed.sb-hover .sidebar {
    width: auto;
  }

  .app-shell.sb-collapsed .nav-label,
  .app-shell.sb-collapsed .nav-section-label,
  .app-shell.sb-collapsed .nav-group-head .icon-chev,
  .app-shell.sb-collapsed .sidebar-user .u-text,
  .app-shell.sb-collapsed .sidebar-branch-dd,
  .app-shell.sb-collapsed .sidebar-brand-name,
  .app-shell.sb-collapsed .sidebar-brand-link {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .app-shell.sb-collapsed .nav-icon,
  .app-shell.sb-collapsed .avatar {
    margin-inline-start: 0;
  }

  .app-shell.sb-collapsed .sidebar-head {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .app-shell.sb-collapsed .nav-item,
  .app-shell.sb-collapsed .nav-group-head {
    justify-content: flex-start;
    padding-inline: 9px;
  }

  .nav-item,
  .nav-group-head {
    font-size: 15px;
    padding: 9px 8px;
    padding-inline-start: 12px;
  }

  .nav-sub .nav-item {
    font-size: 14px;
    padding: 7px 8px;
    padding-inline-start: 10px;
  }

  .nav-section-label {
    font-size: 13px;
  }

  .app-shell.sb-collapsed .nav-sub {
    margin-inline-start: 19px;
    border-inline-start: 1.5px solid var(--sb-sub-border);
  }

  .app-shell.sb-collapsed .nav-group.open .nav-sub {
    display: block;
  }

  .drawer-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3, 26, 20, 0.5);
    z-index: 190;
  }

  html {
    scroll-padding-bottom: 150px;
  }

  body {
    overflow-x: clip;
  }

  .content {
    padding: 14px 14px calc(146px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .content > * {
    min-width: 0;
  }

  .topbar {
    padding: 8px 14px;
    gap: 10px;
  }

  .topbar > .topbar-side:first-child {
    display: none;
  }

  .topbar-side-end {
    flex: 0 0 auto;
    gap: 10px;
  }

  .topbar-center {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: 6px;
    row-gap: 4px;
    text-align: start;
  }

  .topbar-center .demo-chip,
  .topbar-center .bil-chip {
    margin-inline-start: 0;
    padding: 2px 8px;
    font-size: 0.78rem;
  }

  .topbar-inst-name {
    width: 100%;
    font-size: 21px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: start;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #notifMount {
    display: none;
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 10px 11px;
  }

  .stat-card .s-val {
    font-size: 19px;
  }

  .home-header h2 {
    font-size: 21px;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 180;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(3, 26, 20, 0.08);
  }

  html[data-theme="dark"] .mobile-nav {
    background: rgba(10, 26, 20, 0.96);
    backdrop-filter: blur(8px);
  }

  .mobile-nav button {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 6px 2px;
    border-radius: 12px;
    line-height: 1.3;
  }

  .mobile-nav button .icon {
    width: 20px;
    height: 20px;
  }

  .mobile-nav button.active {
    color: var(--brand-700);
    background: var(--brand-50);
    box-shadow: inset 0 2px 0 var(--gold-400);
  }

  html[data-theme="dark"] .mobile-nav button.active {
    color: var(--gold-300);
    background: rgba(200, 150, 62, 0.12);
  }

  .toast-wrap {
    bottom: 84px;
  }

  .section-card {
    padding: 14px;
  }

  .auth-wrap {
    padding: 12px;
    justify-content: flex-start;
  }

  .auth-shell {
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .topbar-side-end {
    gap: 8px;
  }

  .topbar-inst-name {
    line-height: 1.45;
  }

  .topbar-center .demo-chip,
  .topbar-center .bil-chip {
    padding: 2px 7px;
    font-size: 0.74rem;
  }

  .topbar-center .demo-chip .icon,
  .topbar-center .bil-chip .icon {
    width: 12px;
    height: 12px;
  }

  .drawer-inst-name {
    display: block;
    margin: 0 12px 8px;
    padding: 8px 12px;
    border: 1px solid rgba(200, 150, 62, 0.35);
    background: var(--surface-2);
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
  }

  html[data-theme="dark"] .drawer-inst-name {
    background: rgba(3, 26, 20, 0.5);
  }

  .auth-form-side {
    padding: 0 12px 16px;
  }

  .auth-mobile-head {
    margin: 0 -12px;
    padding: 20px 18px 18px;
  }

  #loginView,
  #activateView {
    padding: 16px 14px;
    margin-top: -2px;
  }

}

.help-fab-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 190;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.help-fab {
  width: 48px;
  height: 48px;
  pointer-events: auto;
  border-radius: 50%;
  border: 1px solid var(--brand-600);
  background: linear-gradient(180deg, var(--brand-600), var(--brand-800));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.help-fab:hover {
  transform: translateY(-2px);
}

.help-fab .icon {
  width: 24px;
  height: 24px;
  display: flex;
}

.help-popover {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.help-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.help-pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  text-align: start;
}

.help-pop-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

html[data-theme="dark"] .help-pop-item:hover {
  background: rgba(200, 150, 62, 0.12);
  color: var(--gold-300);
}

.help-pop-item .icon {
  width: 20px;
  height: 20px;
  display: flex;
  flex: none;
}

.help-note-modal {
  max-width: 560px;
}

.help-note-hint {
  margin: 0 0 12px;
}

.help-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.help-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.help-task-item:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
}

html[data-theme="dark"] .help-task-item:hover {
  background: rgba(200, 150, 62, 0.1);
}

.help-task-title {
  flex: 1;
}

.help-task-arrow {
  display: flex;
  flex: none;
  color: var(--muted);
}

.help-task-arrow .icon {
  width: 18px;
  height: 18px;
  display: flex;
}

[dir="rtl"] .help-task-arrow {
  transform: scaleX(-1);
}

.help-back-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-back-btn .icon {
  width: 16px;
  height: 16px;
  display: flex;
}

[dir="rtl"] .help-back-btn .icon {
  transform: scaleX(-1);
}

.help-step-list {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.65;
}

.help-step-list li::marker {
  color: var(--brand-600);
  font-weight: 700;
}

@media (max-width: 820px) {
  .help-fab-wrap {
    bottom: calc(84px + env(safe-area-inset-bottom));
    right: 14px;
  }

  .help-fab {
    width: 46px;
    height: 46px;
  }
}
