/* =========================================================
   Application page structure using shared Yegan theme tokens
   ========================================================= */

body.admin-body,
body.auth-body {
  min-height: 100vh;
  background: var(--gradient-soft);
  color: var(--color-text);
}

.admin-shell,
.auth-shell {
  position: relative;
  min-height: 100vh;
}

.admin-shell::before,
.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.18), transparent 26%), radial-gradient(circle at left bottom, rgba(var(--color-primary-rgb), 0.12), transparent 22%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--y-surface) 82%, transparent);
    border-bottom: 0px solid var(--color-border-soft);
    box-shadow: 0 12px 30px var(--color-shadow-soft);
}

.topbar .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--color-heading);
  font-weight: 700;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: transparent;
    color: var(--color-text-inverse);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 28px rgb(var(--y-primary-rgb) / 28%);
    font-size: 16px;
}


.brand-copy small,
.muted-label {
  color: var(--color-text-soft);
  display: block;
  font-size: 12px;
  letter-spacing: .2px;
}

.brand-copy strong {
  display: block;
  font-size: 16px;
  color: var(--color-heading);
}

.topbar .topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-search {
  position: relative;
  min-width: 280px;
}

.quick-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-soft);
}

.quick-search input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--bs-form-control-bg);
  color: var(--bs-form-control-color);
  padding: 0 18px 0 44px;
  outline: none;
  transition: .25s ease;
}

.quick-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 .25rem var(--color-focus-ring);
}

.icon-action,
.theme-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-elevated);
  color: var(--color-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--bs-box-shadow-sm);
  transition: .25s ease;
}

.icon-action:hover,
.theme-fab:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary-border);
  color: var(--color-primary);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--bs-box-shadow-sm);
}

.profile-chip img,
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-circle {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.profile-chip strong {
  display: block;
  line-height: 1.2;
  font-size: 14px;
}

.profile-chip small {
  color: var(--color-text-soft);
  font-size: 12px;
}

.admin-layout {
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 98px;
  height: calc(100vh - 118px);
  border-radius: 32px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface-elevated) 94%, transparent), color-mix(in srgb, var(--color-surface) 92%, transparent));
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--bs-box-shadow-lg);
  padding: 28px 20px;
  overflow: auto;
}

.sidebar-group + .sidebar-group {
  margin-top: 28px;
}

.sidebar-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-soft);
  letter-spacing: .14em;
  margin-bottom: 12px;
  padding: 0 14px;
  opacity: .92;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 26px;
  border-radius: 18px;
  color: var(--color-text-muted);
  transition: .25s ease;
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 6px;
}

[dir="rtl"] .sidebar-link {
  padding-left: 14px;
  padding-right: 26px;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--color-heading);
  background: color-mix(in srgb, var(--color-primary-subtle) 70%, transparent);
  transform: translateX(3px);
  font-weight: 600;
}

[dir="rtl"] .sidebar-link:hover,
[dir="rtl"] .sidebar-link.active {
  transform: translateX(-3px);
}

.sidebar-promo {
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 20px 40px rgba(var(--color-primary-rgb), 0.28);
}

.sidebar-promo h5,
.sidebar-promo p {
  color: var(--color-text-inverse);
}

.sidebar-promo .main-button a {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.sidebar-promo .main-button a:hover {
  background: var(--y-surface);
  color: var(--color-primary);
}

.admin-content {
  padding: 34px 0 42px;
}

.page-intro {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-intro h2 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.page-intro p {
  max-width: 720px;
  margin-bottom: 0;
}

.page-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.soft-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--color-primary-subtle);
  color: var(--color-heading);
  font-size: 13px;
  font-weight: 600;
}

.admin-card,
.metric-card,
.glass-card,
.auth-card {
  background: color-mix(in srgb, var(--color-surface-elevated) 95%, transparent);
  border: 1px solid var(--color-border-soft);
  border-radius: 28px;
  box-shadow: var(--bs-box-shadow);
}

.metric-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
  min-height: 175px;
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -32px;
  top: -32px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.10);
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.metric-label {
  font-size: 13px;
  color: var(--color-text-soft);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 34px;
  line-height: 1;
  color: var(--color-heading);
  font-weight: 700;
}

.metric-icon {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 20px;
}

.metric-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.growth-up,
.growth-down {
  font-weight: 600;
}

.growth-up { color: var(--color-success); }
.growth-down { color: var(--color-danger); }

.admin-card {
  padding: 28px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.card-title-row h4 {
  font-size: 24px;
}

.card-title-row p {
  margin: 6px 0 0;
}

.progress-track {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: var(--color-surface-muted);
  overflow: hidden;
}

.progress-bar-soft {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
}

.pill-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.pill-status.live { background: rgba(63, 163, 109, 0.14); color: var(--color-success); }
.pill-status.draft { background: rgba(214, 164, 75, 0.16); color: var(--color-warning); }
.pill-status.review { background: rgba(77, 136, 199, 0.16); color: var(--color-info); }

.data-table {
  width: 100%;
}

.data-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-soft);
  padding: 0 0 14px;
  border-bottom: 1px solid var(--color-border-soft);
}

.data-table tbody td {
  padding: 18px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border-soft) 65%, transparent);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
  padding-bottom: 0;
}

.team-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
}

.team-meta {
  flex: 1;
}

.team-rating {
  text-align: right;
  white-space: nowrap;
}

.activity-item,
.todo-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.activity-icon,
.todo-check {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.todo-item {
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
}

.todo-item.completed {
  opacity: .76;
}

.todo-item.completed .todo-check {
  background: rgba(63, 163, 109, 0.14);
  color: var(--color-success);
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.mini-calendar span {
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
}

.mini-calendar .active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(var(--color-primary-rgb), 0.28);
}

.auth-section {
  position: relative;
  z-index: 1;
  padding: 26px 0;
}

.auth-card {
  padding: 28px;
}

.auth-hero {
  height: 100%;
  padding: 28px;
  border-radius: 28px;
  background: var(--gradient-primary), var(--banner-bg) center/cover no-repeat;
  color: #fff;
  box-shadow: 0 24px 48px rgba(0,0,0,.22);
  position: relative;
  overflow: hidden;
}

html[data-mode="light"] .auth-hero {
  background: var(--gradient-primary), var(--banner-bg) center/cover no-repeat;
}

.auth-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  right: -50px;
  bottom: -60px;
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-hero h1,
.auth-hero h2,
.auth-hero p,
.auth-hero li,
.auth-hero .kpi-card strong,
.auth-hero .kpi-card small { color: #fff; }

.auth-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.kpi-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.kpi-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.auth-card h3 {
  font-size: 24px;
  margin-bottom: 6px;
}

.auth-card .form-label {
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 8px;
  font-size: 14px;
}

.auth-card .form-control,
.auth-card .form-select {
  border-radius: 16px;
  padding: 12px 15px;
  min-height: 48px;
  font-size: 14px;
  border-color: var(--color-border);
  background: var(--bs-form-control-bg);
  color: var(--bs-form-control-color);
}

.auth-card .input-group-text {
  border-radius: 16px 0 0 16px;
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-soft);
}

.form-note {
  font-size: 13px;
  color: var(--color-text-soft);
}

.password-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-soft);
  border-radius: 0 16px 16px 0;
  min-width: 50px;
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-text-soft);
  font-size: 13px;
  margin: 20px 0;
}

.divider-label::before,
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border-soft);
}

.social-btn {
  width: 100%;
  border: 1px solid var(--color-border-soft);
  border-radius: 16px;
  min-height: 48px;
  font-size: 14px;
  background: var(--color-surface-elevated);
  color: var(--color-heading);
  font-weight: 600;
}

.floating-link {
  color: var(--color-primary);
  font-weight: 600;
}


.social-btn .social-logo {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
}

@media (max-width: 991.98px) {
  .auth-hero {
    display: none;
  }

  .auth-section {
    padding: 18px 0;
  }
}

@media (max-width: 1199.98px) {
  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    margin-bottom: 26px;
  }
}

@media (max-width: 991.98px) {
  .quick-search {
    min-width: 100%;
  }

  .topbar .topbar-tools {
    justify-content: flex-start;
  }

  .auth-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .admin-content {
    padding-top: 24px;
  }

  .page-intro h2 {
    font-size: 28px;
  }

  .auth-card,
  .admin-card,
  .metric-card,
  .auth-hero {
    padding: 20px;
    border-radius: 20px;
  }

  .topbar {
    position: relative;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .mini-calendar {
    gap: 8px;
  }
}


/* --- Yegan admin rewrite --- */
.admin-toolbar-card {
  padding: 18px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--color-surface-elevated) 92%, transparent);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--bs-box-shadow-sm);
}

.admin-toolbar-search {
  position: relative;
  min-width: min(100%, 340px);
}
.admin-toolbar-search i {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-soft);
}
.admin-toolbar-search .form-control {
  padding-inline-start: 44px;
}

.admin-card {
  background: color-mix(in srgb, var(--color-surface-elevated) 94%, transparent);
  border: 1px solid var(--color-border-soft);
  border-radius: 28px;
  box-shadow: var(--bs-box-shadow-lg);
  padding: 24px;
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.company-card__logo {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-primary-subtle) 80%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 30px;
  overflow: hidden;
}
.company-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.company-card__body h5 {
  margin: 0;
  color: var(--color-heading);
}
.company-code {
  color: var(--color-text-soft);
  font-size: 14px;
  margin-top: 4px;
}
.company-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.admin-empty-state {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-table thead th {
  background: color-mix(in srgb, var(--color-primary-subtle) 50%, transparent);
  color: var(--color-heading);
  border-bottom: 0;
  padding: 18px 20px;
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 18px 20px;
  border-color: var(--color-border-soft);
}
.admin-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-primary-subtle) 35%, transparent);
}

.admin-form-card .form-label {
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: .6rem;
}

.topbar .dropdown-menu,
.admin-shell .dropdown-menu {
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--bs-box-shadow-lg);
  border-radius: 18px;
  padding: 10px;
  background: var(--color-surface-elevated);
}

.admin-shell .dropdown-item {
  border-radius: 12px;
  padding: 10px 14px;
}

.admin-shell .form-control,
.admin-shell .form-select,
.admin-shell select {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background-color: var(--bs-form-control-bg, var(--color-surface-elevated));
  color: var(--bs-form-control-color, var(--color-text));
  box-shadow: none;
}

.admin-shell select,
.admin-shell .form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-inline-end: 46px;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-primary) 50%), linear-gradient(135deg, var(--color-primary) 50%, transparent 50%);
  background-position: calc(100% - 24px) calc(50% - 3px), calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-shell .form-control:focus,
.admin-shell .form-select:focus,
.admin-shell select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 .25rem var(--color-focus-ring);
}

.admin-shell .btn {
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 600;
}

.Yegan-sidebar.sidebar--collapsed {
  display: none;
}

.admin-shell .Yegan-sidebar .sidebar-title,
.admin-shell .Yegan-sidebar summary.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0 0 10px;
  padding: 0 14px;
  color: var(--color-heading);
  font-size: .9rem !important;
  font-weight: 800 !important;
  letter-spacing: .12em;
  line-height: 1.2;
  opacity: .86;
  text-transform: uppercase;
}

.admin-shell .Yegan-sidebar summary.sidebar-title {
  cursor: pointer;
  list-style: none;
}

.admin-shell .Yegan-sidebar summary.sidebar-title::-webkit-details-marker {
  display: none;
}

.admin-shell .Yegan-sidebar .sidebar-link {
  min-height: 42px;
  padding: 9px 14px 9px 30px;
  color: var(--color-text-muted);
  font-size: .84rem !important;
  font-weight: 500 !important;
  letter-spacing: normal;
}

[dir="rtl"] .admin-shell .Yegan-sidebar .sidebar-link {
  padding-left: 14px;
  padding-right: 30px;
}

.admin-shell .Yegan-sidebar .sidebar-link.active {
  font-size: .84rem !important;
  font-weight: 650 !important;
}

.app-modal {
  z-index: 1060;
}

.app-modal-content {
  border: 1px solid var(--color-border-soft);
  border-radius: 24px;
  background: var(--color-surface-elevated);
  color: var(--color-text);
  box-shadow: var(--bs-box-shadow-lg);
}

@media (max-width: 1199.98px) {
  .sidebar {
    position: relative;
    top: 0;
    height: auto;
  }
  .page-intro {
    flex-direction: column;
  }
}

@media (min-width: 1200px) {
  .Yegan-sidebar.sidebar--collapsed {
    display: block;
  }
}


/* Added fixes for auth/public/admin integration */
.header-cta-primary, .header-cta-secondary {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 18px !important; border-radius:999px; font-weight:600;
}
.header-cta-primary { background: var(--accent-color); color:#fff !important; }
.header-cta-secondary { background: rgba(255,255,255,.12); color:#fff !important; border:1px solid rgba(255,255,255,.24); }
.auth-topbar { position:sticky; top:0; z-index:1030; padding:16px 0; background:var(--y-surface); backdrop-filter: blur(14px); border-bottom:1px solid rgba(122,106,216,.12); }
[data-bs-theme="dark"] .auth-topbar { background:var(--y-surface); border-bottom-color:rgba(255,255,255,.08); }
.auth-topbar-brand { display:inline-flex; align-items:center; gap:12px; color:inherit; }
.auth-topbar-brand .brand-mark { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--gradient-primary); color:#fff; font-weight:800; }
.auth-topbar-brand small { display:block; opacity:.7; }
.auth-layout-shell { min-height: calc(100vh - 75px); }
.auth-theme-toggle { min-width:46px; min-height:46px; }
.topbar .theme-fab, .auth-theme-toggle { border:0; }
.form-select, select, .form-control, .input-group-text { border-radius:16px !important; }
.form-select, select { background-color: var(--panel-bg); border:1px solid rgba(122,106,216,.18); box-shadow: 0 8px 20px rgba(28,35,49,.06); padding: .75rem 2.5rem .75rem 1rem; }
[data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] select, [data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .input-group-text { background-color:var(--y-input-bg); color:var(--y-text); border-color:rgba(255,255,255,.08); }
.dropdown-menu { border-radius:18px; overflow:hidden; }
.public-site-shell[dir="rtl"] .main-banner .item,
html[dir="rtl"] .main-banner .item { margin-left:0; margin-right:130px; text-align:right; }
.public-site-shell[dir="rtl"] .main-banner .item h2,
.public-site-shell[dir="rtl"] .main-banner .item p,
html[dir="rtl"] .main-banner .item h2,
html[dir="rtl"] .main-banner .item p { margin-left:auto; }
.public-site-shell[dir="rtl"] .main-banner .item .buttons,
html[dir="rtl"] .main-banner .item .buttons { justify-content:flex-end; }
.public-site-shell[dir="rtl"] .main-banner .item .buttons .main-button,
html[dir="rtl"] .main-banner .item .buttons .main-button { margin-right:0; margin-left:30px; }

@media (max-width: 1199.98px) {
}

@media (max-width: 991.98px) {
  .public-site-shell[dir="rtl"] .main-banner .item,
  html[dir="rtl"] .main-banner .item { margin-right: 0; }
}
@media (max-width: 991.98px) {
}

/* tablet + mobile: use one collapsed menu style similar to admin panel */
@media (max-width: 1199.98px) {
  .public-site-header {
    top: 0;
    padding: 0 14px;
    background: transparent;
  }
  .public-site-header .container {
    padding: 0;
    max-width: 100%;
  }
  .public-site-header .main-nav {
    min-height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
  }
  .public-site-header .main-nav .logo {
    position: relative;
    inset: auto;
    margin: 0;
    z-index: 4;
  }
  .public-site-header .main-nav .logo h1 {
    margin: 0;
    padding: 0 18px 0 0;
    border-right: 1px solid rgba(255,255,255,.28);
    border-left: 0;
    font-size: 30px;
    height: 44px;
    line-height: 44px;
  }
  html[dir="rtl"] .public-site-header .main-nav .logo h1 {
    padding: 0 0 0 18px;
    border-right: 0;
    border-left: 1px solid rgba(255,255,255,.28);
  }
  .public-site-header .menu-trigger {
    display: block !important;
    top: 28px;
    right: 10px;
    z-index: 5;
  }
  html[dir="rtl"] .public-site-header .menu-trigger {
    right: auto;
    left: 10px;
  }
  .public-site-header .main-nav > .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 !important;
    padding: 10px;
    border-radius: 24px;
    background: var(--color-primary);
    box-shadow: 0 18px 45px rgba(18,24,38,.22);
    z-index: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .public-site-header .main-nav > .nav.is-open {
    display: flex;
  }
  .public-site-header .main-nav > .nav > li {
    width: 100%;
    height: auto;
    line-height: normal;
    display: block;
    background: transparent;
    margin: 0;
  }
  .public-site-header .main-nav > .nav > li.scroll-to-section > a,
  .public-site-header .main-nav > .nav > li > a.header-cta-secondary,
  .public-site-header .main-nav > .nav > li > .public-lang-select,
  .public-site-header .main-nav > .nav > li > .theme-fab {
    width: 100%;
    min-height: 48px;
    border-radius: 18px;
    justify-content: center;
    margin: 0;
  }
  .public-site-header .main-nav > .nav > li.scroll-to-section > a {
    background: rgba(255,255,255,.12);
    color: #fff !important;
    font-weight: 600;
  }
  .public-site-header .main-nav > .nav > li.scroll-to-section > a.active,
  .public-site-header .main-nav > .nav > li.scroll-to-section:hover > a {
    background: rgba(255,255,255,.2);
    color: #fff !important;
  }
  .public-site-header .header-cta-secondary {
    background: rgba(255,255,255,.16);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.18);
  }
  .public-site-header .public-lang-select,
  .public-site-header .theme-fab,
  .public-site-header .public-theme-toggle {
    background-color: var(--y-surface);
    color: var(--color-text);
  }
}

@media (max-width: 767.98px) {
}


/* Yegan button system */
.app-btn,
.app-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.app-btn {
  min-height: 42px;
  padding: 0 18px;
  box-shadow: var(--bs-box-shadow-sm);
}

.app-btn-sm {
  min-height: 34px;
  padding: 0 13px;
  font-size: .78rem;
}

.app-btn-primary {
  background: var(--gradient-primary);
  color: var(--color-heading);
  border-color: color-mix(in srgb, var(--color-primary) 82%, transparent);
}

.app-btn-secondary,
.app-btn-soft {
  background: color-mix(in srgb, var(--color-surface-elevated) 88%, transparent);
  color: var(--color-heading);
  border-color: var(--color-border-soft);
}

.app-btn-danger {
  background: color-mix(in srgb, var(--color-danger) 12%, var(--color-surface-elevated));
  color: var(--color-danger);
  border-color: color-mix(in srgb, var(--color-danger) 28%, var(--color-border-soft));
}

.app-btn:hover,
.app-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--bs-box-shadow);
}

.app-icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: color-mix(in srgb, var(--color-surface-elevated) 90%, transparent);
  color: var(--color-heading);
  border-color: var(--color-border-soft);
  box-shadow: var(--bs-box-shadow-sm);
}

.app-icon-btn-sm {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: .78rem;
}

.app-icon-btn-send {
  background: var(--gradient-primary);
  color: var(--color-heading);
  border-color: transparent;
}

.app-icon-btn-danger {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-surface-elevated));
}

.app-btn:disabled,
.app-icon-btn:disabled {
  opacity: .55;
  pointer-events: none;
  transform: none;
}

.dashboard-intro h2 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.8rem);
}

.dashboard-grid,
.dashboard-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.dashboard-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem;
  color: var(--color-heading);
  text-decoration: none;
  overflow: hidden;
  min-height: 122px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-card:hover {
  color: var(--color-heading);
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow);
}

.dashboard-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
  flex: 0 0 auto;
}

.dashboard-card-title {
  font-size: .78rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.dashboard-card-value {
  font-size: clamp(1.35rem, 1.2vw + 1rem, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-top: .25rem;
}

.dashboard-card-subtitle {
  color: var(--color-text-muted);
  font-size: .84rem;
  margin-top: .2rem;
}

.dashboard-card-blue .dashboard-card-icon { background: rgba(40, 111, 255, .12); color: var(--y-link); }
.dashboard-card-gold .dashboard-card-icon { background: rgba(211, 166, 74, .16); color: var(--color-primary); }
.dashboard-card-green .dashboard-card-icon { background: rgba(24, 147, 104, .14); color: var(--y-success); }
.dashboard-card-orange .dashboard-card-icon { background: rgba(245, 155, 35, .15); color: var(--y-warning); }
.dashboard-card-red .dashboard-card-icon { background: rgba(220, 53, 69, .13); color: var(--y-danger); }
.dashboard-card-purple .dashboard-card-icon { background: rgba(115, 88, 255, .13); color: var(--y-link); }

.dashboard-section-title {
  font-weight: 800;
  font-size: .96rem;
  margin-bottom: 1rem;
}

.dashboard-activity-list {
  display: grid;
  gap: .65rem;
}

.dashboard-activity-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem .95rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface-elevated) 88%, var(--color-primary) 4%);
  border: 1px solid var(--color-border-soft);
  color: var(--color-heading);
  text-decoration: none;
}

.dashboard-activity-item:hover {
  color: var(--color-heading);
  border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border-soft));
}

.dashboard-alert {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border-soft));
}

.dashboard-skeleton-card {
  display: grid;
  gap: .8rem;
  padding: 1.2rem;
}

.dashboard-skeleton-card span,
.dashboard-skeleton-card strong,
.dashboard-skeleton-card em {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, .15), rgba(148, 163, 184, .34), rgba(148, 163, 184, .15));
  background-size: 220% 100%;
  animation: dashboard-skeleton 1.35s ease-in-out infinite;
}

.dashboard-skeleton-card span { width: 45%; height: .72rem; }
.dashboard-skeleton-card strong { width: 62%; height: 1.8rem; }
.dashboard-skeleton-card em { width: 75%; height: .72rem; }

@keyframes dashboard-skeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--color-border-soft);
}

.pagination-meta {
  color: var(--color-text-muted);
  font-size: .86rem;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.pagination-size {
  width: auto;
  min-width: 86px;
}

@media (max-width: 575.98px) {
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    justify-content: space-between;
  }
}

@media (max-width: 1199.98px) {
}

@media (max-width: 991.98px) {
}

@media (max-width: 575.98px) {
}

@media (max-width: 991.98px) {
}

@media (max-width: 575.98px) {
}

.app-toast-container {
  position: fixed;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  z-index: 1100;
  display: grid;
  gap: .65rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

[dir="rtl"] .app-toast-container {
  inset-inline-end: auto;
  inset-inline-start: 1rem;
}

.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem;
  padding: .85rem .95rem;
  border-radius: 1rem;
  color: var(--color-text);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-soft, rgba(0, 0, 0, .12));
  box-shadow: 0 18px 45px var(--color-shadow-soft, rgba(0, 0, 0, .18));
  animation: app-toast-in .18s ease-out;
}

.app-toast-error {
  border-inline-start: 4px solid var(--y-danger);
}

.app-toast-success {
  border-inline-start: 4px solid var(--y-success);
}

.app-toast-warning {
  border-inline-start: 4px solid var(--y-warning);
}

.app-toast-info {
  border-inline-start: 4px solid var(--color-primary);
}

.app-toast-message {
  font-size: .92rem;
  line-height: 1.45;
}

.app-toast-close {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  padding: 0;
  line-height: 1;
}

.app-toast-close:hover,
.app-toast-close:focus {
  color: var(--color-text);
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
}

@media (max-width: 575.98px) {
}


/* Shared table values remain intact on screen and in browser print. */
.data-value, table bdi, table time, .pagination-meta, .pagination-actions button {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  font-variant-numeric: tabular-nums;
}
.transaction-list-table th { white-space: nowrap; font-size: .8rem; }
.transaction-list-table td { padding: .8rem .65rem; border-color: var(--color-border-soft); }
/* Band whole documents; use theme tokens in both light and dark modes. */
.transaction-list-table .transaction-document-group { --transaction-group-bg: var(--y-surface); }
.transaction-list-table .transaction-document-group:nth-of-type(even) { --transaction-group-bg: var(--y-surface-2); }
.transaction-list-table .transaction-document-group > tr > td {
    --bs-table-bg: var(--transaction-group-bg);
    --bs-table-accent-bg: transparent;
    color: var(--y-text);
    background: var(--transaction-group-bg);
    border-color: var(--y-border);
}
.transaction-list-table .transaction-document-group + .transaction-document-group > tr:first-child > td {
    border-top: 2px solid var(--y-border);
}
.transaction-list-table .transaction-document-group:hover > tr > td { --bs-table-bg: var(--y-hover); background: var(--y-hover); }
.transaction-list-table .transaction-description-cell { min-width: 220px; max-width: 360px; }
.transaction-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: normal; }
.pagination-bar { margin-block: 1rem 0; padding-block: 1rem .25rem; }
.pagination-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
@media print {
  .pagination-bar { display: none !important; }
  .table-responsive { overflow: visible; }
  .transaction-description { display: block; overflow: visible; }
}
