﻿:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --nav: #ffffff;
  --nav-2: #f9fafb;
  --brand-ink: #05282d;
  --brand-ink-2: #0b3a40;
  --brand-lime: #4F6EF7;
  --brand-lime-d: #3B57E8;
  --brand-lime-soft: #EEF1FE;
  --primary: #4F6EF7;
  --primary-2: #3B57E8;
  --primary-soft: #EEF1FE;
  --lime: #4F6EF7;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --amber-soft: #fffbeb;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 8px;
  --sidebar: 376px;
  --sidebar-collapsed: 92px;
  --topbar: 78px;
}

[data-theme="dark"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --nav: #05282d;
  --nav-2: #0b3a40;
  --primary: #05282d;
  --primary-2: #0b3a40;
  --primary-soft: #EEF1FE;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

body,
button,
input,
select,
textarea {
  font: 500 15px/1.45 Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

img,
svg {
  display: block;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  min-height: 48px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 118px;
  resize: vertical;
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.22);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #fff;
  padding: 28px 24px;
  transition: width 0.22s ease, transform 0.22s ease;
}

[dir="rtl"] .sidebar {
  inset: 0 0 0 auto;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
}

.brand {
  display: block;
  width: 210px;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.05);
  border-radius: 6px;
}

.sidebar-toggle svg {
  transition: transform 0.2s ease;
}

.back-link {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 20px 0 22px;
  scrollbar-width: thin;
}

.nav-link,
.nav-group summary {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.92);
  list-style: none;
  transition: background 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.nav-link:hover,
.nav-group summary:hover,
.nav-link.active,
.nav-group summary.active {
  background: var(--nav-2);
  color: #fff;
}

.nav-link:hover,
.nav-group summary:hover {
  transform: translateX(3px);
}

[dir="rtl"] .nav-link:hover,
[dir="rtl"] .nav-group summary:hover {
  transform: translateX(-3px);
}

.nav-link svg,
.nav-group summary svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group .chev {
  margin-left: auto;
  transition: transform 0.18s ease;
}

[dir="rtl"] .nav-group .chev {
  margin-right: auto;
  margin-left: 0;
}

.nav-group[open] .chev {
  transform: rotate(180deg);
}

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 4px 46px;
}

[dir="rtl"] .nav-children {
  padding: 4px 46px 4px 0;
}

.nav-children .nav-link {
  min-height: 42px;
  font-size: 15px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
}

.sidebar-footer small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  padding: 12px 8px 0;
}

.content-wrap {
  min-height: 100vh;
  margin-left: var(--sidebar);
  transition: margin 0.22s ease;
}

[dir="rtl"] .content-wrap {
  margin-left: 0;
  margin-right: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(14, 25, 46, 0.04);
}

.topbar-primary,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-primary {
  position: relative;
  flex: 0 0 auto;
}

.topbar-actions {
  margin-inline-start: auto;
}

.top-search {
  display: flex;
  min-width: 410px;
  max-width: 520px;
  flex: 1 1 410px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.top-search > button {
  min-width: 156px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

[dir="rtl"] .top-search > button {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.top-search label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 0 12px;
}

.top-search input {
  border: 0;
  min-height: 56px;
  padding: 0;
  box-shadow: none;
}

.navi-btn,
.workspace-btn {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 30px;
  font-weight: 800;
  white-space: nowrap;
}

.navi-btn {
  color: var(--brand-ink);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(5, 40, 45, 0.16);
  animation: softPulse 2.9s ease-in-out infinite;
}

.workspace-btn {
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius);
}

.workspace-btn[aria-expanded="true"],
.navi-btn[aria-expanded="true"],
.icon-btn[aria-expanded="true"],
.profile-trigger[aria-expanded="true"] {
  outline: 2px solid rgba(79, 110, 247, 0.35);
  outline-offset: 3px;
}

.divider {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.icon-btn {
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(79, 110, 247, 0.36);
  transform: translateY(-1px);
}

.mobile-sidebar-toggle {
  display: none;
}

.notify {
  position: relative;
}

.notify b {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e9292a;
  color: #fff;
  font-size: 12px;
}

.lang-switch {
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.nav-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: 260px;
  max-width: min(92vw, 520px);
  display: none;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(12, 21, 36, 0.18);
  color: var(--text);
}

[dir="rtl"] .nav-popover {
  right: auto;
  left: 0;
}

.nav-popover.is-open {
  display: grid;
  gap: 6px;
  animation: menuIn 0.14s ease-out;
}

.topbar-primary > .navi-popover {
  left: 0;
  right: auto;
}

[dir="rtl"] .topbar-primary > .navi-popover {
  right: 0;
  left: auto;
}

.nav-popover b,
.nav-popover h2 {
  margin: 0;
  padding: 10px 12px;
  font-size: 18px;
  font-weight: 900;
}

.nav-popover a,
.nav-popover button {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #5d6778;
  text-align: start;
  font-weight: 800;
  white-space: normal;
}

.nav-popover a:hover,
.nav-popover button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-popover i,
.nav-popover svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nav-popover em {
  margin-inline-start: auto;
  color: #9aa4b6;
  font-style: normal;
  font-weight: 700;
}

.workspace-popover {
  width: 210px;
}

.workspace-popover b {
  color: var(--primary);
}

.quick-actions-menu {
  width: 286px;
}

.notifications-panel {
  width: min(620px, 92vw);
  padding: 24px;
  gap: 18px;
}

.notifications-panel h2 {
  padding: 0;
  font-size: 26px;
}

.notification-tabs,
.notification-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notification-tabs button,
.notification-filter button {
  min-height: 46px;
  border-radius: var(--radius);
  color: #556071;
  background: transparent;
}

.notification-tabs button.is-active {
  color: var(--primary);
  border-bottom: 4px solid var(--primary);
  border-radius: 0;
}

.notification-filter button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.notification-tabs span,
.notification-filter span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: #eef6e7;
  color: var(--primary);
}

.notification-filter .clear {
  margin-inline-start: auto;
  color: #445066;
}

.notification-item {
  display: grid !important;
  grid-template-columns: 56px 1fr;
  gap: 16px !important;
  align-items: start !important;
  min-height: 118px !important;
  padding: 18px 0 !important;
  border-top: 1px solid var(--line-soft) !important;
  border-radius: 0 !important;
}

.notification-item > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #253149;
}

.notification-item small,
.notification-item time {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.notification-item b {
  display: block;
  padding: 0;
  margin: 2px 0;
  font-size: 17px;
  line-height: 1.35;
}

.profile-trigger {
  border: 0;
  padding: 0;
}

.profile-menu {
  width: 330px;
  padding: 0;
  overflow: hidden;
}

.profile-menu > a,
.profile-menu > button {
  min-height: 58px;
  padding: 13px 18px;
  border-radius: 0;
  border-bottom: 1px solid var(--line-soft);
}

.profile-menu > a:last-child {
  border-bottom: 0;
}

.profile-card {
  display: grid !important;
  grid-template-columns: 56px 1fr;
  min-height: 100px !important;
  background: var(--surface) !important;
}

.profile-card span:last-child {
  display: grid;
  gap: 2px;
}

.profile-card small {
  color: #596579;
  font-weight: 700;
}

.profile-card small:last-child {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.calendar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding: 48px 26px;
  background: rgba(7, 19, 38, 0.42);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}

.calendar-modal {
  width: min(1180px, 100%);
  min-height: 680px;
  position: relative;
  padding: 28px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(12, 21, 36, 0.24);
}

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 22px;
}

.calendar-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding-inline-end: 48px;
  margin-bottom: 44px;
}

[dir="rtl"] .calendar-head {
  padding-inline-end: 0;
  padding-inline-start: 48px;
}

.calendar-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: #253149;
  box-shadow: var(--shadow-soft);
}

.calendar-head h1 {
  margin: 8px 0 4px;
  font-size: 28px;
}

.calendar-head p {
  margin: 0;
  color: var(--muted);
}

.calendar-filters,
.calendar-view,
.calendar-month {
  display: flex;
  align-items: center;
}

.calendar-filters,
.calendar-view {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-filters button,
.calendar-view button,
.calendar-month button {
  min-height: 48px;
  border: 0;
  border-inline-end: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.calendar-filters button:last-child,
.calendar-view button:last-child {
  border-inline-end: 0;
}

.calendar-filters .is-active,
.calendar-view .is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}

.calendar-month {
  justify-content: center;
  gap: 54px;
}

.calendar-month button {
  width: 54px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.calendar-month strong {
  min-width: 180px;
  text-align: center;
  font-size: 26px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-grid b,
.calendar-grid span {
  min-height: 74px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
  font-size: 18px;
}

.calendar-grid b {
  min-height: 52px;
  justify-content: center;
  align-items: center;
  background: #eef0f5;
}

.calendar-grid span {
  min-height: 92px;
  background: #f7f8fb;
  font-weight: 900;
}

.calendar-grid .muted {
  color: #a8b0bd;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eef2f6;
  color: #5f6d8c;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.tiny {
  width: 38px;
  height: 38px;
}

.user-avatar {
  border: 3px solid var(--primary-soft);
}

.main-content {
  padding: clamp(44px, 5vw, 76px) clamp(24px, 3vw, 44px) 90px;
  max-width: 1560px;
  margin-inline: auto;
}

.page-head {
  margin-bottom: 32px;
}

.page-head.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-head h1,
.academy-head h1,
.timeline-shell h1 {
  margin: 0;
  color: var(--text);
  font-size: 36px;
  line-height: 1.12;
  font-weight: 900;
}

.page-head p,
.academy-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.head-filters,
.page-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.head-filters label {
  color: var(--text);
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.btn {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn.outline {
  background: var(--surface);
  color: var(--text);
}

.btn.dark {
  border-color: #10192a;
  background: #10192a;
  color: #fff;
}

.btn.subtle,
.btn.muted {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary);
}

.btn.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.btn.wide {
  width: 100%;
}

.btn.disabled,
.btn:disabled,
button:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.panel,
.metric-card,
.settings-card,
.account-card,
.settings-form,
.report-card,
.course-card,
.plan-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 20px;
  min-width: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}

.metrics-grid.compact {
  margin-top: 28px;
}

.metric-card {
  min-height: 150px;
  padding: 24px 30px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.metric-card h3 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 900;
}

.metric-card strong {
  font-size: 38px;
  line-height: 1;
  font-weight: 500;
}

.trend {
  color: #008a52;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.ghost-icon {
  position: absolute;
  width: 100px;
  height: 100px;
  right: -18px;
  top: -18px;
  color: var(--primary-soft);
  opacity: 0.75;
}

[dir="rtl"] .ghost-icon {
  right: auto;
  left: -18px;
}

.show-cards {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: start;
  min-width: 0;
}

.dashboard-grid > *,
.metrics-grid > *,
.side-stack,
.table-panel,
.table-scroll {
  min-width: 0;
}

.panel.wide {
  grid-column: 1;
}

.side-stack {
  grid-column: 2;
  grid-row: span 3;
  display: grid;
  gap: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin: -2px -20px 14px;
  padding: 0 20px 14px;
}

.panel-title h2,
.panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.delay-tabs,
.tabs,
.segment {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.delay-tabs {
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.delay-tabs button,
.tabs button,
.segment button {
  min-height: 52px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-weight: 800;
}

.delay-tabs button {
  border-width: 0 0 2px;
  border-radius: 0;
  background: transparent;
}

.delay-tabs button.is-active,
.tabs button.is-active,
.segment button.is-active {
  color: #0b6b63;
  background: var(--primary-soft);
  border-color: #cfd9e9;
}

.delay-tabs span,
.account-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f8;
  color: #1c2a41;
}

.table-panel {
  padding: 14px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 18px;
  flex-wrap: wrap;
}

.table-toolbar.end {
  justify-content: flex-end;
}

.toolbar-actions.fill {
  align-items: stretch;
}

.search-box {
  display: flex;
  align-items: center;
  min-width: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.search-box.small {
  min-width: 260px;
}

.search-box input,
.search-box select {
  min-height: 50px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.search-box select {
  width: 86px;
  border-right: 1px solid var(--line);
}

[dir="rtl"] .search-box select {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.search-box button {
  width: 48px;
  height: 42px;
  margin-inline-end: 6px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.data-table thead th {
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

[dir="rtl"] .data-table thead th {
  text-align: right;
}

.data-table thead th:first-child {
  width: 58px;
}

.data-table tbody td {
  padding: 18px 26px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface), var(--surface-2) 38%);
  vertical-align: middle;
  font-size: 17px;
}

.data-table tbody tr:hover td {
  background: var(--primary-soft);
}

.data-table td > div {
  display: inline-grid;
  vertical-align: middle;
  margin-inline-start: 10px;
}

.data-table small {
  color: var(--muted);
}

.data-table input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 4px;
}

.data-table.rounded thead th:first-child {
  border-top-left-radius: var(--radius);
}

.data-table.rounded thead th:last-child {
  border-top-right-radius: var(--radius);
}

.data-table.bordered {
  border: 1px solid var(--line);
}

.badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
  background: #f1f3f7;
  color: var(--text);
}

.badge.green {
  color: #008d55;
  background: #e8fff2;
}

.badge.blue {
  color: #1163d5;
  background: #eaf6ff;
}

.badge.amber {
  color: #cf5a00;
  background: #fff6e4;
}

.badge.rose {
  color: #d12c24;
  background: #fff1ef;
}

.badge.info {
  color: #0075b8;
  background: #e8f8ff;
}

.badge.soft {
  color: #415066;
  background: #f0f2f6;
}

.tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 10px 2px;
  flex-wrap: wrap;
}

.pagination label,
.pagination button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-weight: 800;
}

.pagination select {
  min-height: 40px;
  width: 80px;
  border: 0;
  padding: 0;
}

.pagination div {
  display: flex;
  gap: 0;
}

.empty-state,
.empty-line {
  min-height: 90px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state svg {
  width: 70px;
  height: 70px;
  color: var(--primary-soft);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1fr);
  gap: 30px;
}

.project-list {
  display: grid;
  gap: 18px;
  max-height: 720px;
  overflow-y: auto;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 280px);
  min-height: 252px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.project-info {
  position: relative;
  padding: 18px;
}

.project-info .menu {
  position: absolute;
  top: 12px;
  right: 8px;
}

[dir="rtl"] .project-info .menu {
  right: auto;
  left: 8px;
}

.project-info h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.project-info p {
  color: var(--muted);
}

.chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 46px 0 12px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f2f6;
  border-radius: 999px;
  padding: 8px 12px;
}

.icon-btn.accent {
  background: var(--primary-soft);
  color: var(--primary);
}

.project-photo,
.course-image {
  min-height: 100%;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 30%),
    linear-gradient(160deg, #dcbf94 0 24%, #886d52 24% 28%, #f1d8ae 28% 48%, #2e8fb9 48% 52%, #c18b5b 52% 70%, #f7e4c5 70%);
  position: relative;
}

.project-photo::after,
.course-image::after {
  content: "";
  position: absolute;
  inset: 22% 24% 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(255,255,255,.55) 30px 48px, transparent 48px 76px),
    linear-gradient(#dfc09d, #b98558);
  clip-path: polygon(12% 100%, 18% 24%, 66% 0, 88% 100%);
  opacity: 0.95;
}

.building-b {
  filter: hue-rotate(28deg) saturate(1.1);
}

.building-c {
  filter: hue-rotate(-26deg) saturate(1.05);
}

.preview-pane {
  min-height: 700px;
  display: grid;
  place-items: center;
}

.empty-illustration {
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: rgba(5, 40, 45, 0.16);
}

.empty-illustration svg {
  width: 150px;
  height: 150px;
}

.stat-box-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 20px;
  margin: 16px 0 24px;
}

.stat-box {
  min-height: 68px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px;
  color: #304057;
  background: var(--surface);
}

[data-theme="dark"] .stat-box {
  color: var(--text);
}

.stat-box-grid.tall .stat-box {
  min-height: 108px;
  align-items: flex-start;
}

.numbers-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 210px 150px 210px;
  gap: 24px;
  align-items: center;
}

.numbers-panel.slim {
  grid-template-columns: 1fr 1fr 1fr;
}

.numbers-panel p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0;
}

.donut {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: conic-gradient(var(--primary) 0 0deg, transparent 0);
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.legend span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: var(--primary);
  margin-inline-end: 8px;
}

.legend li:nth-child(2) span {
  background: #e9edf3;
}

.legend li:nth-child(3) span {
  background: var(--orange);
}

.gauge-card {
  padding: 0;
  overflow: hidden;
}

.gauge-card h2 {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.gauge {
  width: 240px;
  height: 130px;
  margin: 36px auto 22px;
  position: relative;
  overflow: hidden;
}

.gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 28px solid #e9ecef;
  border-bottom: 0;
  border-radius: 160px 160px 0 0;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.15);
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 28px solid var(--gauge-color);
  border-right-color: transparent;
  border-bottom: 0;
  border-radius: 160px 160px 0 0;
  transform: rotate(-10deg);
}

.gauge span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.gauge b {
  font-size: 24px;
  display: block;
}

.mini-stat {
  min-height: 120px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 16px;
}

.mini-stat strong {
  font-size: 38px;
}

.avatar.online {
  position: relative;
}

.avatar.online::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  right: 6px;
  bottom: 8px;
  background: #00bf6f;
}

.whatsapp span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2ad55e;
  color: #fff;
}

.chart-lines {
  min-height: 250px;
  display: grid;
  place-items: center;
}

.chart-lines svg,
.panel.wide > svg {
  width: 100%;
  min-height: 220px;
}

.comment-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.comment-row h3,
.comment-row p {
  margin: 0 0 8px;
}

.comment-row time {
  color: var(--muted);
  white-space: nowrap;
}

.reports-grid,
.courses-grid,
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.report-card {
  min-height: 220px;
  position: relative;
  padding: 18px 70px 18px 14px;
}

[dir="rtl"] .report-card {
  padding: 18px 14px 18px 70px;
}

.report-card .menu {
  position: absolute;
  top: 10px;
  right: 10px;
}

[dir="rtl"] .report-card .menu {
  right: auto;
  left: 10px;
}

.report-icon {
  width: 90px;
  height: 90px;
  color: var(--primary);
  stroke-width: 1.4;
}

.report-card h2 {
  margin: 8px 0 4px;
}

.report-card p {
  margin: 0;
  color: var(--muted);
}

.report-card .arrow {
  position: absolute;
  right: 12px;
  bottom: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

[dir="rtl"] .report-card .arrow {
  right: auto;
  left: 12px;
}

.settings-card,
.account-card {
  padding: 28px 30px;
}

.settings-card {
  max-width: 1460px;
  margin-inline: auto;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #23324a;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 8px 12px;
}

[data-theme="dark"] .crumb {
  color: var(--text);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  margin-inline-end: 16px;
  font-size: 18px;
}

.link-btn.danger {
  color: #0e1628;
}

[data-theme="dark"] .link-btn.danger {
  color: var(--text);
}

.settings-form {
  padding: 28px;
}

.settings-form.in-card {
  border: 0;
  box-shadow: none;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(230px, 0.38fr) minmax(320px, 0.7fr);
  gap: 32px;
  align-items: start;
  padding: 24px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.form-row label {
  font-size: 18px;
  color: var(--text);
}

.form-row p {
  color: var(--muted);
  margin: 6px 0 0;
}

.control {
  display: grid;
  gap: 10px;
}

.logo-upload {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  align-items: center;
}

.logo-upload img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.logo-upload div {
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.logo-upload b {
  color: var(--primary);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: #d0d5dd;
  position: relative;
  transition: background 0.18s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 5px;
  left: 5px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: #4385f5;
}

.switch input:checked + span::after {
  transform: translateX(24px);
}

[dir="rtl"] .switch input:checked + span::after {
  transform: translateX(-24px);
}

.provider-row,
.time-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.provider-row button {
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.time-row input,
.time-row select {
  max-width: 170px;
}

.editor-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--muted);
}

.editor-bar + textarea {
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.save-bar {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 24px 0 0;
}

.hierarchy {
  min-height: 460px;
  display: grid;
  align-items: center;
}

.hierarchy-actions {
  justify-self: end;
  display: grid;
  gap: 24px;
}

.hierarchy-actions button {
  border: 0;
  background: transparent;
  color: #99a2b5;
  font-size: 22px;
  font-weight: 800;
}

.alert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.alert.danger {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffc9c4;
}

.alert.warning {
  color: #b45309;
  background: #fffbeb;
  border-color: #f8c15b;
  text-align: center;
}

.integration-hero,
.integration-form {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 30px;
  margin-bottom: 22px;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.platforms span {
  min-height: 92px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 24px;
  font-weight: 900;
  border-radius: var(--radius);
}

.integration-form {
  align-items: end;
}

.mapping-page {
  display: grid;
  gap: 16px;
}

.token-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: stretch;
}

.modal-backdrop.inline {
  min-height: calc(100vh - var(--topbar) - 120px);
  display: grid;
  place-items: center;
}

.upload-modal {
  width: min(1120px, 100%);
  min-height: 620px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  position: relative;
}

.modal-icons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.sample {
  position: absolute;
  top: 118px;
  right: 30px;
}

[dir="rtl"] .sample {
  right: auto;
  left: 30px;
}

.upload-zone {
  min-height: 390px;
  display: grid;
  place-items: center;
  text-align: center;
}

.cloud {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: #9ca7b8;
}

.cloud svg {
  width: 70px;
  height: 70px;
}

.timeline-shell {
  max-width: 1110px;
  margin: 0 auto;
}

.timeline-shell h1,
.academy-head {
  text-align: center;
  margin-bottom: 24px;
}

.composer {
  padding: 0;
  overflow: hidden;
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.segment button {
  border-top: 0;
  border-inline: 0;
}

.post-box {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 14px;
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.post {
  margin-top: 12px;
}

.post header {
  display: flex;
  gap: 16px;
}

.post p {
  margin: 28px 0;
  text-align: right;
}

.post footer {
  display: flex;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.academy-head {
  margin-top: 10px;
}

.course-card {
  overflow: hidden;
}

.course-image {
  height: 250px;
  min-height: 250px;
  background:
    linear-gradient(135deg, #ffb11b 0 62%, #ff7a2d 62%),
    linear-gradient(45deg, #1c6b91, #fff);
}

.course-card h2 {
  padding: 18px 20px 0;
}

.course-meta {
  display: grid;
  grid-template-columns: 48px 1fr 140px 140px;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 24px;
}

.course-meta span:not(.avatar) {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.account-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
  flex-wrap: wrap;
}

.account-tabs a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.account-tabs a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.profile-hero {
  height: 138px;
  margin: 0 -30px;
  background: var(--primary);
}

.profile-main {
  display: flex;
  gap: 64px;
  align-items: center;
  margin-top: -50px;
  padding: 0 24px;
}

.profile-avatar {
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #5d6989;
  color: #e9eff3;
  border: 10px solid var(--surface);
}

.profile-avatar svg {
  width: 120px;
  height: 120px;
}

.profile-main h2 {
  font-size: 38px;
  margin: 0 0 8px;
}

.profile-main h2 span {
  font-size: 20px;
  color: var(--primary);
}

.profile-details {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 20px 24px;
}

.devices {
  padding: 18px 10px;
}

.device-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}

.browser-logo {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: conic-gradient(#f44336 0 33%, #ffdf00 33% 66%, #4caf50 66% 100%);
  position: relative;
}

.browser-logo::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: inherit;
  background: #52a8e9;
  border: 4px solid #fff;
}

.security-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}

.security-tabs button {
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-weight: 800;
  font-size: 20px;
}

.security-tabs button.is-active {
  color: var(--primary);
  border-color: var(--primary);
}

.rules {
  color: #ff3b3b;
  display: grid;
  gap: 8px;
  list-style: "Ã—  ";
}

.kijaf-hero {
  min-height: 250px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(120deg, rgba(79, 110, 247, 0.18), transparent 35%),
    linear-gradient(135deg, #061f25, #0b3238);
  color: #fff;
}

.kijaf-hero img {
  width: 260px;
  height: 120px;
  object-fit: cover;
  margin: 0 auto 18px;
  border-radius: var(--radius);
}

.plans-grid {
  grid-template-columns: repeat(3, 1fr);
}

.plan-card {
  padding: 28px;
}

.plan-card strong {
  display: block;
  font-size: 30px;
  margin: 22px 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 110, 247, 0.14), transparent 30%),
    linear-gradient(135deg, #031e24, #092f36);
}

.login-card {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.login-brand {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 40px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(3, 30, 36, 0.15), rgba(3, 30, 36, 0.15)),
    url("../img/kijaf-cover.jpeg") center/cover;
}

.login-brand img {
  width: 360px;
  max-width: 100%;
  border-radius: var(--radius);
}

.login-form {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 44px;
}

.login-form h1 {
  margin: 0 0 4px;
  font-size: 34px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.field input {
  border: 0;
  padding: 0;
  box-shadow: none;
}

.checkline {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.checkline input {
  width: 20px;
  height: 20px;
  min-height: 20px;
}

.login-topline {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.login-topline a {
  min-width: 42px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
}

.login-topline a.is-active {
  background: var(--primary);
  color: #fff;
}

.login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(7, 19, 38, 0.42);
  backdrop-filter: blur(1px);
}

[dir="rtl"] .drawer-backdrop {
  justify-content: flex-start;
}

.drawer {
  width: min(980px, calc(100vw - 40px));
  min-height: 100vh;
  padding: 34px 38px;
  background: var(--bg);
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: drawerIn 0.18s ease-out;
}

.drawer-close {
  float: right;
  color: var(--text);
}

[dir="rtl"] .drawer-close {
  float: left;
}

.lead-form {
  margin-top: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 34px;
}

.form-grid label {
  display: grid;
  gap: 8px;
}

.input-plus {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 10px;
}

.input-plus button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.drawer footer {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
  padding-inline: 14px;
}

.sidebar-collapsed .content-wrap {
  margin-left: var(--sidebar-collapsed);
}

[dir="rtl"] .sidebar-collapsed .content-wrap {
  margin-left: 0;
  margin-right: var(--sidebar-collapsed);
}

.sidebar-collapsed .brand {
  width: 58px;
}

.sidebar-collapsed .brand img {
  width: 58px;
  height: 58px;
}

.sidebar-collapsed .sidebar span,
.sidebar-collapsed .sidebar small,
.sidebar-collapsed .back-link,
.sidebar-collapsed .nav-group .chev {
  display: none;
}

.sidebar-collapsed .nav-children {
  padding: 4px 0;
}

.sidebar-collapsed .nav-link,
.sidebar-collapsed .nav-group summary {
  justify-content: center;
  padding: 10px;
}

.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

@keyframes softPulse {
  0%, 100% {
    box-shadow: 0 12px 24px rgba(5, 40, 45, 0.16);
  }
  50% {
    box-shadow: 0 16px 32px rgba(79, 110, 247, 0.28);
  }
}

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

@keyframes drawerIn {
  from {
    transform: translateX(24px);
    opacity: 0.4;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 1500px) {
  .topbar {
    flex-wrap: wrap;
  }

  .top-search {
    order: 2;
    flex-basis: 100%;
    min-width: 100%;
  }

  .topbar-primary,
  .topbar-actions {
    order: 1;
  }
}

@media (max-width: 1320px) {
  :root {
    --sidebar: 310px;
  }

  .metrics-grid,
  .reports-grid,
  .courses-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .dashboard-grid,
  .project-layout,
  .integration-hero,
  .integration-form {
    grid-template-columns: 1fr;
  }

  .side-stack,
  .panel.wide {
    grid-column: auto;
  }

  .numbers-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 290px;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: 24px 0 44px rgba(0, 0, 0, 0.22);
  }

  [dir="rtl"] .sidebar {
    transform: translateX(100%);
    box-shadow: -24px 0 44px rgba(0, 0, 0, 0.22);
  }

  body.sidebar-open .sidebar,
  [dir="rtl"] body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar);
    padding: 28px 24px;
  }

  [dir="rtl"] .sidebar-collapsed .sidebar {
    transform: translateX(100%);
  }

  .sidebar-collapsed .sidebar span,
  .sidebar-collapsed .sidebar small,
  .sidebar-collapsed .back-link,
  .sidebar-collapsed .nav-group .chev {
    display: inline;
  }

  .sidebar-collapsed .nav-link,
  .sidebar-collapsed .nav-group summary {
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .content-wrap,
  .sidebar-collapsed .content-wrap,
  [dir="rtl"] .content-wrap,
  [dir="rtl"] .sidebar-collapsed .content-wrap {
    margin: 0;
  }

  .main-content {
    padding: 34px 16px 60px;
  }

  .topbar {
    padding: 8px 12px;
    gap: 8px;
  }

  .topbar-primary {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .topbar-primary .nav-menu-wrap,
  .topbar-primary .workspace-btn,
  .topbar-primary .navi-btn {
    width: 100%;
  }

  .topbar-actions {
    margin-inline-start: auto;
    gap: 6px;
  }

  .navi-btn,
  .workspace-btn {
    min-height: 46px;
    padding: 0 14px;
    font-size: 14px;
  }

  .divider {
    display: none;
  }

  .page-head.split,
  .table-toolbar,
  .comment-row,
  .profile-details,
  .profile-main,
  .device-row,
  .form-row,
  .login-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-head.split {
    align-items: start;
  }

  .metrics-grid,
  .reports-grid,
  .courses-grid,
  .plans-grid,
  .stat-box-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .course-meta,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .project-photo {
    min-height: 220px;
  }

  .numbers-panel {
    grid-template-columns: 1fr;
  }

  .top-search {
    min-width: 100%;
  }

  .top-search > button {
    min-width: 120px;
  }

  .nav-popover,
  .topbar-primary > .navi-popover,
  [dir="rtl"] .nav-popover,
  [dir="rtl"] .topbar-primary > .navi-popover {
    position: fixed;
    top: calc(var(--topbar-live, 184px) + 10px);
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 98px);
    overflow-y: auto;
  }

  .notifications-panel {
    padding: 18px;
  }

  .notification-item {
    grid-template-columns: 46px 1fr;
  }

  .calendar-backdrop {
    padding: 14px;
  }

  .calendar-modal {
    min-height: auto;
    padding: 20px;
    overflow-x: auto;
  }

  .calendar-head,
  [dir="rtl"] .calendar-head {
    grid-template-columns: auto 1fr;
    padding-inline: 0;
    margin-bottom: 28px;
  }

  .calendar-filters {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .calendar-month {
    gap: 18px;
    justify-content: space-between;
  }

  .calendar-grid {
    min-width: 760px;
  }

  .drawer {
    width: 100vw;
  }
}

@media (max-width: 560px) {
  .page-head h1,
  .academy-head h1,
  .timeline-shell h1 {
    font-size: 28px;
  }

  .metric-card {
    min-height: 128px;
    padding: 18px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    margin-inline-start: 0;
  }

  .topbar-actions .icon-btn {
    width: 42px;
    height: 42px;
  }

  .top-search {
    order: 4;
  }

  .top-search > button {
    min-width: 104px;
    font-size: 13px;
  }

  .navi-btn,
  .workspace-btn {
    padding: 0 10px;
    font-size: 13px;
  }

  .profile-menu,
  .quick-actions-menu,
  .workspace-popover,
  .notifications-panel {
    width: auto;
  }

  .login-form,
  .login-brand,
  .settings-card,
  .account-card,
  .settings-form {
    padding: 20px;
  }

  .profile-hero {
    margin: 0 -20px;
  }

  .profile-avatar {
    width: 150px;
    height: 150px;
  }
}

/* Engaz-density pass: tighter, production-style screens. */
:root {
  --sidebar: 238px;
  --sidebar-collapsed: 66px;
  --topbar: 54px;
}

body,
button,
input,
select,
textarea {
  font-size: 12px;
}

input,
select,
textarea {
  min-height: 34px;
  padding: 0 9px;
}

.sidebar {
  padding: 14px 13px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar,
.nav-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.nav-list {
  gap: 3px;
  padding: 10px 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.brand {
  width: 150px;
}

.brand img {
  height: 46px;
}

.nav-link,
.nav-group summary {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.nav-link svg,
.nav-group summary svg {
  width: 15px;
  height: 15px;
}

.nav-children {
  padding-left: 32px;
}

[dir="rtl"] .nav-children {
  padding-right: 32px;
}

.nav-children .nav-link {
  min-height: 30px;
  font-size: 11px;
}

.topbar {
  gap: 8px;
  min-height: var(--topbar);
  padding: 6px 13px;
}

.top-search {
  min-width: 280px;
  max-width: 380px;
  flex-basis: 280px;
}

.top-search > button {
  min-width: 104px;
}

.top-search input {
  min-height: 36px;
}

.navi-btn,
.workspace-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
}

.icon-btn svg,
.btn svg,
.nav-popover svg {
  width: 15px;
  height: 15px;
}

.avatar {
  width: 34px;
  height: 34px;
}

.lang-switch {
  min-width: 32px;
  min-height: 32px;
}

.main-content {
  max-width: 1220px;
  padding: clamp(20px, 2.5vw, 34px) clamp(14px, 2vw, 24px) 48px;
}

.page-head {
  margin-bottom: 16px;
}

.page-head h1,
.academy-head h1,
.timeline-shell h1 {
  font-size: 23px;
}

.page-head p,
.academy-head p {
  font-size: 12px;
}

.btn {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.panel {
  padding: 12px;
}

.metrics-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card {
  min-height: 86px;
  padding: 12px 15px;
}

.metric-card h3 {
  margin-bottom: 10px;
  font-size: 13px;
}

.metric-card strong {
  font-size: 24px;
}

.ghost-icon {
  width: 58px;
  height: 58px;
}

.show-cards {
  margin-bottom: 12px;
  font-size: 13px;
}

.dashboard-grid {
  gap: 12px;
}

.panel-title {
  margin: -2px -12px 8px;
  padding: 0 12px 8px;
}

.panel-title h2,
.panel h2 {
  font-size: 14px;
}

.delay-tabs button,
.tabs button,
.segment button {
  min-height: 34px;
  padding: 0 9px;
}

.table-panel {
  padding: 8px;
}

.table-toolbar {
  padding: 6px 6px 10px;
}

.data-table {
  min-width: 600px;
}

.data-table thead th,
.data-table tbody td {
  padding: 10px 13px;
  font-size: 12px;
}

.badge {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
}

.gauge {
  width: 160px;
  height: 88px;
  margin: 18px auto 12px;
}

.gauge::before,
.gauge::after {
  border-width: 18px;
}

.mini-stat {
  min-height: 78px;
  grid-template-columns: 46px 1fr auto;
}

.mini-stat strong {
  font-size: 23px;
}

.calendar-modal {
  min-height: 520px;
  padding: 18px;
}

.login-card {
  width: min(760px, 100%);
  min-height: 430px;
}

.login-form {
  gap: 10px;
  padding: 26px;
}

.login-form h1 {
  font-size: 22px;
}

.login-brand img {
  width: 220px;
  height: 104px;
}

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

@media (max-width: 1320px) {
  :root {
    --sidebar: 224px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 232px;
  }

  .topbar {
    padding: 6px 9px;
  }

  .top-search {
    min-width: 100%;
  }

  .topbar-primary {
    gap: 7px;
  }

  .main-content {
    padding: 20px 12px 42px;
  }

  .metric-card {
    min-height: 80px;
  }
}

@media (max-width: 560px) {
  .topbar-actions .icon-btn {
    width: 31px;
    height: 31px;
  }

  .page-head h1,
  .academy-head h1,
  .timeline-shell h1 {
    font-size: 21px;
  }
}

.alert.success {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.switch.mini span {
  width: 42px;
  height: 24px;
}

.switch.mini span::after {
  width: 16px;
  height: 16px;
  top: 4px;
  left: 4px;
}

.switch.mini input:checked + span::after {
  transform: translateX(18px);
}

[dir="rtl"] .switch.mini input:checked + span::after {
  transform: translateX(-18px);
}

.module-drawer h1 {
  margin-top: 0;
  font-size: 22px;
}

.module-drawer .lead-form {
  margin-top: 18px;
}

.permissions-panel .data-table {
  min-width: 720px;
}

.permissions-panel {
  overflow: hidden;
}

.permissions-panel .table-scroll {
  max-width: 100%;
  overflow: auto;
}

.switch input {
  width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
}

/* Compact density pass: keeps the UI roomy but removes the zoomed-in feel. */
:root {
  --sidebar: 300px;
  --sidebar-collapsed: 76px;
  --topbar: 62px;
}

body,
button,
input,
select,
textarea {
  font-size: 13px;
  line-height: 1.4;
}

input,
select,
textarea {
  min-height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 96px;
  padding: 10px 11px;
}

.sidebar {
  padding: 18px 16px;
}

.brand-row {
  min-height: 52px;
}

.brand {
  width: 172px;
}

.brand img {
  height: 54px;
}

.nav-list {
  gap: 5px;
  padding: 14px 0 16px;
}

.nav-link,
.nav-group summary {
  min-height: 38px;
  gap: 10px;
  padding: 8px 11px;
  font-size: 13px;
}

.nav-children .nav-link {
  min-height: 36px;
  font-size: 13px;
}

.nav-link svg,
.nav-group summary svg {
  width: 17px;
  height: 17px;
}

.sidebar-footer {
  padding-top: 12px;
}

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

.topbar-primary,
.topbar-actions {
  gap: 8px;
}

.top-search {
  min-width: 340px;
  max-width: 450px;
  flex-basis: 340px;
}

.top-search > button {
  min-width: 126px;
}

.top-search input {
  min-height: 44px;
}

.navi-btn,
.workspace-btn {
  min-height: 44px;
  gap: 8px;
  padding: 0 18px;
  font-size: 13px;
}

.icon-btn {
  width: 38px;
  height: 38px;
}

.icon-btn svg,
.btn svg,
.lang-switch svg {
  width: 17px;
  height: 17px;
}

.notify b {
  min-width: 22px;
  height: 18px;
  font-size: 10px;
}

.lang-switch {
  min-width: 36px;
  min-height: 36px;
}

.avatar {
  width: 40px;
  height: 40px;
}

.avatar.tiny {
  width: 32px;
  height: 32px;
}

.user-avatar {
  border-width: 2px;
}

.nav-popover {
  width: 224px;
  padding: 8px;
}

.nav-popover b,
.nav-popover h2 {
  padding: 8px 10px;
  font-size: 15px;
}

.nav-popover a,
.nav-popover button {
  min-height: 38px;
  gap: 9px;
  padding: 8px 10px;
  font-size: 13px;
}

.quick-actions-menu {
  width: 244px;
}

.notifications-panel {
  width: min(520px, 92vw);
  padding: 18px;
}

.notifications-panel h2 {
  font-size: 21px;
}

.notification-tabs button,
.notification-filter button {
  min-height: 38px;
}

.notification-tabs span,
.notification-filter span {
  min-width: 24px;
  height: 24px;
  font-size: 12px;
}

.notification-item {
  grid-template-columns: 46px 1fr;
  min-height: 96px !important;
  padding: 14px 0 !important;
}

.notification-item > span {
  width: 40px;
  height: 40px;
}

.notification-item b {
  font-size: 14px;
}

.notification-item small,
.notification-item time {
  font-size: 12px;
}

.profile-menu {
  width: 286px;
}

.profile-menu > a,
.profile-menu > button {
  min-height: 48px;
  padding: 10px 14px;
}

.profile-card {
  grid-template-columns: 46px 1fr;
  min-height: 84px !important;
}

.main-content {
  max-width: 1320px;
  padding: clamp(28px, 3.4vw, 48px) clamp(18px, 2.4vw, 32px) 64px;
}

.page-head {
  margin-bottom: 22px;
}

.page-head.split {
  gap: 14px;
}

.page-head h1,
.academy-head h1,
.timeline-shell h1 {
  font-size: 28px;
}

.page-head p,
.academy-head p {
  font-size: 14px;
}

.head-filters label {
  min-width: 176px;
}

.btn {
  min-height: 42px;
  gap: 7px;
  padding: 0 14px;
  font-size: 13px;
}

.panel {
  padding: 15px;
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 112px;
  padding: 17px 20px;
  gap: 12px;
}

.metric-card h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.metric-card strong {
  font-size: 30px;
}

.ghost-icon {
  width: 76px;
  height: 76px;
}

.show-cards {
  margin-bottom: 18px;
  font-size: 16px;
}

.dashboard-grid {
  gap: 18px;
}

.side-stack {
  gap: 11px;
}

.panel-title {
  margin: -2px -15px 11px;
  padding: 0 15px 11px;
}

.panel-title h2,
.panel h2 {
  font-size: 17px;
}

.delay-tabs {
  gap: 12px;
  margin-bottom: 11px;
}

.delay-tabs button,
.tabs button,
.segment button {
  min-height: 42px;
  padding: 0 11px;
}

.table-panel {
  padding: 10px;
}

.table-toolbar {
  gap: 12px;
  padding: 8px 8px 13px;
}

.search-box {
  min-width: 230px;
}

.search-box.small {
  min-width: 220px;
}

.search-box input,
.search-box select {
  min-height: 42px;
}

.data-table {
  min-width: 680px;
}

.data-table thead th {
  font-size: 14px;
  padding: 13px 18px;
}

.data-table tbody td {
  padding: 13px 18px;
  font-size: 13px;
}

.badge {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12px;
}

.pagination {
  padding: 12px 8px 2px;
}

.pagination label,
.pagination button {
  min-height: 38px;
  padding: 0 11px;
}

.gauge-card h2 {
  padding: 15px;
}

.gauge {
  width: 190px;
  height: 104px;
  margin: 24px auto 16px;
}

.gauge::before,
.gauge::after {
  border-width: 22px;
}

.gauge span {
  font-size: 15px;
}

.gauge b {
  font-size: 20px;
}

.mini-stat {
  min-height: 92px;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
}

.mini-stat strong {
  font-size: 28px;
}

.comment-row {
  grid-template-columns: 120px 1fr auto;
  gap: 14px;
  padding: 13px 0;
}

.reports-grid,
.courses-grid,
.plans-grid {
  gap: 10px;
}

.report-card {
  min-height: 174px;
  padding: 14px 58px 14px 12px;
}

.report-icon {
  width: 68px;
  height: 68px;
}

.settings-card,
.account-card {
  padding: 20px 22px;
}

.settings-form {
  padding: 20px;
}

.form-row {
  grid-template-columns: minmax(190px, 0.36fr) minmax(260px, 0.7fr);
  gap: 24px;
  padding: 18px 10px;
}

.form-row label {
  font-size: 14px;
}

.provider-row button {
  min-height: 42px;
  padding: 0 18px;
}

.editor-bar {
  min-height: 44px;
  gap: 12px;
}

.save-bar {
  gap: 12px;
  padding-top: 18px;
}

.calendar-modal {
  min-height: 600px;
  padding: 22px;
}

.calendar-head {
  margin-bottom: 30px;
}

.calendar-head h1 {
  font-size: 23px;
}

.calendar-icon {
  width: 40px;
  height: 40px;
}

.calendar-filters button,
.calendar-view button,
.calendar-month button {
  min-height: 40px;
  padding: 0 15px;
}

.calendar-month strong {
  font-size: 21px;
}

.calendar-grid b,
.calendar-grid span {
  font-size: 14px;
  padding: 12px;
}

.calendar-grid b {
  min-height: 44px;
}

.calendar-grid span {
  min-height: 76px;
}

.login-shell {
  padding: 20px;
}

.login-card {
  width: min(880px, 100%);
  min-height: 500px;
}

.login-brand {
  gap: 18px;
  padding: 30px;
}

.login-brand img {
  width: 280px;
  height: 132px;
  object-fit: contain;
}

.login-form {
  gap: 14px;
  padding: 34px;
}

.login-form h1 {
  font-size: 27px;
}

.field {
  padding: 0 10px;
}

.login-topline a {
  min-width: 36px;
  min-height: 30px;
}

.drawer {
  width: min(840px, calc(100vw - 32px));
  padding: 26px 30px;
}

.form-grid {
  gap: 14px 24px;
}

@media (max-width: 1320px) {
  :root {
    --sidebar: 260px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 260px;
  }

  .topbar {
    padding: 7px 10px;
  }

  .main-content {
    padding: 26px 14px 52px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid,
  .reports-grid,
  .courses-grid,
  .plans-grid,
  .stat-box-grid {
    gap: 12px;
  }

  .calendar-grid {
    min-width: 660px;
  }

  .login-shell {
    place-items: start center;
    align-items: start;
    padding: 16px;
  }

  .login-card {
    width: min(520px, 100%);
    min-height: auto;
    margin-inline: auto;
  }

  .login-brand {
    min-height: 176px;
    gap: 10px;
    padding: 18px;
  }

  .login-brand img {
    width: 210px;
    height: 92px;
  }

  .login-brand p {
    margin: 0;
    max-width: 360px;
  }

  .login-form {
    gap: 11px;
    padding: 24px;
  }

  .login-form label {
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .page-head h1,
  .academy-head h1,
  .timeline-shell h1 {
    font-size: 24px;
  }

  .metric-card {
    min-height: 102px;
    padding: 14px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions .icon-btn {
    width: 36px;
    height: 36px;
  }

  .navi-btn,
  .workspace-btn {
    min-height: 40px;
    font-size: 12px;
  }

  .login-form,
  .login-brand,
  .settings-card,
  .account-card,
  .settings-form {
    padding: 16px;
  }

  .login-brand {
    min-height: 150px;
  }

  .login-brand img {
    width: 178px;
    height: 76px;
  }

  .login-form h1 {
    font-size: 23px;
  }
}

/* Final density override, intentionally last. */
:root {
  --sidebar: 238px;
  --sidebar-collapsed: 66px;
  --topbar: 54px;
}

body,
button,
input,
select,
textarea {
  font-size: 12px;
}

.sidebar {
  width: var(--sidebar);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar,
.nav-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.content-wrap {
  margin-left: var(--sidebar);
}

[dir="rtl"] .content-wrap {
  margin-right: var(--sidebar);
}

.topbar {
  min-height: var(--topbar);
}

.main-content {
  max-width: 1220px;
}

.page-head h1,
.academy-head h1,
.timeline-shell h1 {
  font-size: 23px;
}

.metric-card {
  min-height: 86px;
}

.metric-card h3 {
  font-size: 13px;
}

.metric-card strong {
  font-size: 24px;
}

@media (max-width: 1320px) {
  :root {
    --sidebar: 224px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar: 232px;
  }

  .content-wrap,
  .sidebar-collapsed .content-wrap,
  [dir="rtl"] .content-wrap,
  [dir="rtl"] .sidebar-collapsed .content-wrap {
    margin: 0;
  }
}

.permissions-panel .data-table {
  min-width: 560px;
  width: 100%;
}

.permissions-panel .data-table th,
.permissions-panel .data-table td {
  padding: 8px 9px;
}

.switch.mini {
  width: 34px;
  overflow: hidden;
}

.switch.mini span {
  width: 30px;
  height: 18px;
}

.switch.mini span::after {
  width: 12px;
  height: 12px;
  top: 3px;
  left: 3px;
}

.switch.mini input:checked + span::after {
  transform: translateX(12px);
}

[dir="rtl"] .switch.mini input:checked + span::after {
  transform: translateX(-12px);
}

.switch input {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.module-drawer .lead-form {
  padding: 16px;
}

.module-drawer .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-section-title {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

.check-card {
  min-height: 42px;
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
}

.module-drawer input[type="file"] {
  padding: 9px;
  background: #fff;
}

.module-drawer textarea {
  min-height: 88px;
}

.stat-box-grid {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.stat-box {
  min-width: 0;
  padding: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .module-drawer .form-grid {
    grid-template-columns: 1fr;
  }
}

/* KIJAF branding refresh */
.brand-row {
  min-height: 74px;
  align-items: center;
}

.brand {
  width: 178px;
  height: 64px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.brand-icon {
  display: none;
}

.sidebar-collapsed .brand {
  width: 44px !important;
  min-width: 44px;
  height: 44px !important;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #06282d;
  border-color: rgba(189, 242, 75, 0.34);
}

.sidebar-collapsed .brand .brand-full {
  display: none;
}

.sidebar-collapsed .brand .brand-icon {
  display: block;
  width: 44px !important;
  height: 44px !important;
  object-fit: cover;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(189, 242, 75, 0.08), transparent 34%),
    linear-gradient(145deg, #031f24 0%, #082e31 48%, #111827 100%);
}

.login-card {
  width: min(1120px, calc(100vw - 40px));
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.8fr);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.login-brand {
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(189, 242, 75, 0.16), transparent 42%),
    linear-gradient(160deg, #041f24, #052d31);
}

.login-brand-panel {
  width: min(500px, 100%);
  display: grid;
  justify-items: center;
  gap: 22px;
}

.login-mark {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(189, 242, 75, 0.34);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
}

.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-brand-logo {
  width: min(440px, 100%);
  height: 150px;
  object-fit: contain;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.login-brand .login-brand-logo {
  width: min(440px, 100%);
  height: 150px;
  object-fit: contain;
}

.login-brand p {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.7;
}

.login-proof {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-proof span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.login-proof b {
  color: #4F6EF7;
  font-size: 14px;
}

.login-form {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 48px 52px;
  background: #fff;
}

.login-form-logo {
  width: 170px;
  height: 62px;
  object-fit: contain;
  justify-self: start;
  margin-bottom: 2px;
  padding: 6px 0;
}

.login-form h1 {
  margin: 0 0 6px;
  color: #061520;
  font-size: 30px;
  line-height: 1.12;
}

.login-form label {
  gap: 7px;
  color: #111827;
  font-weight: 700;
}

.login-form .field {
  min-height: 54px;
  border-radius: 12px;
  border-color: #d7dfeb;
  background: #fff;
}

.login-form .field:focus-within {
  border-color: #4F6EF7;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.22);
}

.login-form .btn.primary {
  min-height: 54px;
  border-radius: 12px;
  background: #4F6EF7;
  color: #05282d;
}

.login-form .btn.subtle {
  min-height: 48px;
  border-radius: 12px;
  background: #eef6e7;
}

.main-content,
.dashboard-grid,
.panel,
.table-panel,
.table-scroll {
  min-width: 0;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

html,
body {
  overflow-x: hidden;
}

.login-topline {
  position: absolute;
  top: 28px;
  right: 34px;
}

[dir="rtl"] .login-topline {
  right: auto;
  left: 34px;
}

@media (max-width: 900px) {
  .login-shell {
    padding: 16px;
    place-items: start center;
  }

  .login-card {
    width: min(520px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 240px;
    padding: 24px;
  }

  .login-mark,
  .login-proof {
    display: none;
  }

  .login-brand-logo {
    width: min(320px, 100%);
    height: 110px;
  }

  .login-brand .login-brand-logo {
    width: min(320px, 100%);
    height: 110px;
  }

  .login-form {
    padding: 34px 24px 28px;
  }

  .login-form h1 {
    font-size: 24px;
  }
}

/* KIJAF Workspace logo-led identity palette */
:root {
  --brand-ink: #05282d;
  --brand-ink-2: #0b3a40;
  --brand-lime: #4F6EF7;
  --brand-lime-d: #3B57E8;
  --brand-lime-soft: #EEF1FE;
  --page-bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --surface-hover: #f3f4f6;
  --text-h: #111827;
  --text-b: #374151;
  --text-m: #6b7280;
  --text-x: #9ca3af;
  --text-inv: #ffffff;
  --accent: var(--brand-lime);
  --accent-d: var(--brand-lime-d);
  --accent-bg: var(--brand-lime-soft);
  --accent-text: var(--brand-ink);
  --status-new: #3b82f6;
  --status-new-bg: #eff6ff;
  --status-contact: #8b5cf6;
  --status-contact-bg: #f5f3ff;
  --status-qualified: #10b981;
  --status-qualified-bg: #ecfdf5;
  --status-won: #059669;
  --status-won-bg: #d1fae5;
  --status-lost: #ef4444;
  --status-lost-bg: #fef2f2;
  --status-pending: #f59e0b;
  --status-pending-bg: #fffbeb;
  --status-progress: #6366f1;
  --status-progress-bg: #eef2ff;
  --status-overdue: #ef4444;
  --status-overdue-bg: #fef2f2;
  --priority-urgent: #ef4444;
  --priority-urgent-bg: #fef2f2;
  --priority-high: #f97316;
  --priority-high-bg: #fff7ed;
  --priority-medium: #3b82f6;
  --priority-medium-bg: #eff6ff;
  --priority-low: #9ca3af;
  --priority-low-bg: #f9fafb;
  --property-available: #10b981;
  --property-available-bg: #ecfdf5;
  --property-reserved: #f59e0b;
  --property-reserved-bg: #fffbeb;
  --property-sold: #ef4444;
  --property-sold-bg: #fef2f2;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --selection-bg: #DBE4FF;
  --selection-text: var(--brand-ink);
  --scrollbar-thumb: #d1d5db;
  --bg: var(--page-bg);
  --surface-2: var(--surface-subtle);
  --text: var(--text-h);
  --muted: var(--text-m);
  --line: var(--border);
  --line-soft: var(--border-light);
  --nav: #ffffff;
  --nav-2: var(--surface-subtle);
  --primary: var(--accent);
  --primary-2: var(--accent-d);
  --primary-soft: var(--accent-bg);
  --lime: var(--accent);
  --green: var(--status-qualified);
  --orange: var(--status-pending);
  --red: var(--status-lost);
  --amber-soft: var(--status-pending-bg);
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 6px 18px rgba(17, 24, 39, 0.06);
}

[data-theme="dark"] {
  --page-bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f9fafb;
  --surface-hover: #f3f4f6;
  --text-h: #111827;
  --text-b: #374151;
  --text-m: #6b7280;
  --text-x: #9ca3af;
  --bg: var(--page-bg);
  --surface-2: var(--surface-subtle);
  --text: var(--text-h);
  --muted: var(--text-m);
  --line: var(--border);
  --line-soft: var(--border-light);
  --nav: var(--brand-ink);
  --nav-2: var(--brand-ink-2);
  --primary: var(--brand-ink);
  --primary-2: var(--brand-ink-2);
  --primary-soft: var(--brand-lime-soft);
}

body,
.app-shell {
  background: var(--page-bg);
  color: var(--text-b);
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

.sidebar {
  background: var(--surface);
  color: var(--text-b);
  border-right: 1px solid var(--border);
}

[data-theme="dark"] .sidebar {
  background: var(--brand-ink);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar .nav-list,
[data-theme="dark"] .sidebar .nav-link,
[data-theme="dark"] .sidebar .nav-group summary,
[data-theme="dark"] .sidebar-footer,
[data-theme="dark"] .sidebar-footer small {
  color: rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] .sidebar .nav-link:hover,
[data-theme="dark"] .sidebar .nav-group summary:hover {
  background: rgba(79, 110, 247, 0.12);
  color: #ffffff;
}

[dir="rtl"] .sidebar {
  border-right: 0;
  border-left: 1px solid var(--border);
}

.brand {
  background: #111827;
  border-color: #111827;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.nav-link.active,
.nav-group summary.active {
  background: var(--accent-bg);
  color: var(--accent-text);
  box-shadow: inset 3px 0 0 var(--accent);
}

[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .nav-group summary.active {
  background: rgba(79, 110, 247, 0.18);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--brand-lime);
}

[dir="rtl"] .nav-link.active,
[dir="rtl"] .nav-group summary.active {
  box-shadow: inset -3px 0 0 var(--lime);
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--border);
}

.btn.primary,
.login-form .btn.primary,
.navi-btn {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 12px 24px rgba(5, 40, 45, 0.16);
}

.btn.primary:hover,
.login-form .btn.primary:hover,
.navi-btn:hover {
  background: var(--accent-d);
}

[data-theme="dark"] .btn.primary,
[data-theme="dark"] .login-form .btn.primary,
[data-theme="dark"] .navi-btn {
  background: var(--brand-ink);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(5, 40, 45, 0.22);
}

[data-theme="dark"] .btn.primary:hover,
[data-theme="dark"] .login-form .btn.primary:hover,
[data-theme="dark"] .navi-btn:hover {
  background: var(--brand-ink-2);
}

.btn.subtle,
.login-form .btn.subtle,
.workspace-btn,
.tabs button.is-active,
.segment button.is-active,
.calendar-tabs .is-active {
  background: var(--accent-bg);
  color: var(--accent-text);
}

.btn.outline {
  border-color: var(--border);
  color: var(--text-b);
  background: var(--surface);
}

.btn.dark {
  background: #111827;
  color: var(--text-inv);
}

.icon-btn:hover,
.topbar-actions .icon-btn:hover {
  background: var(--surface-hover);
  color: var(--accent-text);
}

.metric-card .trend,
.show-cards .icon-btn,
.report-icon,
.link-btn,
.login-topline a.is-active {
  color: var(--accent-text);
}

.login-topline a.is-active {
  background: var(--accent);
  color: var(--text-inv);
}

.tabs button.is-active {
  border-color: rgba(79, 110, 247, 0.44);
}

.tabs button.is-active::after,
.calendar-tabs .is-active::after {
  background: var(--accent);
}

.badge.blue,
.badge.soft {
  background: var(--status-new-bg);
  color: var(--status-new);
}

.badge.green {
  background: var(--status-qualified-bg);
  color: var(--status-qualified);
}

.badge.amber {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}

input:focus,
select:focus,
textarea:focus,
.login-form .field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.22);
}

.login-shell {
  background:
    linear-gradient(135deg, rgba(79, 110, 247, 0.22), transparent 34%),
    linear-gradient(145deg, #f4f5f7 0%, #EEF1FE 48%, #ffffff 100%);
}

.login-brand {
  background:
    linear-gradient(135deg, rgba(79, 110, 247, 0.18), transparent 42%),
    linear-gradient(160deg, #05282d, #0b3a40 62%, #4F6EF7);
}

.login-form .btn.subtle {
  background: var(--accent-bg);
}

.login-proof b {
  color: #4F6EF7;
}

.switch input:checked + span {
  background: var(--accent);
}

.gauge {
  --gauge-color: var(--accent);
}

.data-table tr:hover,
.metric-card:hover,
.panel:hover,
.report-card:hover,
.project-card:hover {
  background: var(--surface-hover);
}

.data-table th,
.page-head p,
.academy-head p,
.pagination,
.muted,
small {
  color: var(--text-m);
}

.page-head h1,
.academy-head h1,
.timeline-shell h1,
.panel h2,
.metric-card h3,
.data-table td b {
  color: var(--text-h);
}

.sidebar .nav-list,
.sidebar .nav-link,
.sidebar .nav-group summary,
.sidebar-footer,
.sidebar-footer small {
  color: var(--text-b);
}

.sidebar .nav-link:hover,
.sidebar .nav-group summary:hover {
  background: var(--surface-hover);
  color: var(--text-h);
}

.sidebar-collapsed .brand {
  background: var(--accent);
  border-color: var(--accent);
}

.badge.status-new,
.badge.status-fresh {
  color: var(--status-new);
  background: var(--status-new-bg);
}

.badge.status-contact,
.badge.status-contacted {
  color: var(--status-contact);
  background: var(--status-contact-bg);
}

.badge.status-qualified,
.badge.status-available {
  color: var(--status-qualified);
  background: var(--status-qualified-bg);
}

.badge.status-won,
.badge.status-paid,
.badge.status-active {
  color: var(--status-won);
  background: var(--status-won-bg);
}

.badge.status-lost,
.badge.status-cancelled,
.badge.status-rejected,
.badge.status-sold,
.badge.status-sold-out,
.badge.status-overdue {
  color: var(--status-lost);
  background: var(--status-lost-bg);
}

.badge.status-overdue {
  color: var(--status-overdue);
  background: var(--status-overdue-bg);
}

.badge.status-pending,
.badge.status-trial,
.badge.status-reserved,
.badge.status-un-paid {
  color: var(--status-pending);
  background: var(--status-pending-bg);
}

.badge.status-progress,
.badge.status-following,
.badge.status-meeting,
.badge.status-in-progress {
  color: var(--status-progress);
  background: var(--status-progress-bg);
}

.badge.priority-urgent {
  color: var(--priority-urgent);
  background: var(--priority-urgent-bg);
}

.badge.priority-high {
  color: var(--priority-high);
  background: var(--priority-high-bg);
}

.badge.priority-medium {
  color: var(--priority-medium);
  background: var(--priority-medium-bg);
}

.badge.priority-low {
  color: var(--priority-low);
  background: var(--priority-low-bg);
}

.property-status.available,
.unit.available,
.badge.property-available {
  color: var(--property-available);
  background: var(--property-available-bg);
  border-color: color-mix(in srgb, var(--property-available), transparent 65%);
}

.property-status.reserved,
.unit.reserved,
.badge.property-reserved {
  color: var(--property-reserved);
  background: var(--property-reserved-bg);
  border-color: color-mix(in srgb, var(--property-reserved), transparent 65%);
}

.property-status.sold,
.unit.sold,
.badge.property-sold {
  color: var(--property-sold);
  background: var(--property-sold-bg);
  border-color: color-mix(in srgb, var(--property-sold), transparent 65%);
}

.pipeline-stage-new,
.stage-new {
  --stage-color: #4F6EF7;
}

.pipeline-stage-contacted,
.stage-contacted {
  --stage-color: #0b3a40;
}

.pipeline-stage-proposal,
.stage-proposal {
  --stage-color: #3B57E8;
}

.pipeline-stage-negotiation,
.stage-negotiation {
  --stage-color: #f59e0b;
}

.pipeline-stage-won,
.stage-won {
  --stage-color: #10b981;
}

.pipeline-stage-new,
.pipeline-stage-contacted,
.pipeline-stage-proposal,
.pipeline-stage-negotiation,
.pipeline-stage-won,
.stage-new,
.stage-contacted,
.stage-proposal,
.stage-negotiation,
.stage-won {
  border-top: 3px solid var(--stage-color);
}

.metric-card:nth-child(5n + 1) {
  border-top: 3px solid #4F6EF7;
}

.metric-card:nth-child(5n + 2) {
  border-top: 3px solid #0b3a40;
}

.metric-card:nth-child(5n + 3) {
  border-top: 3px solid #10b981;
}

.metric-card:nth-child(5n + 4) {
  border-top: 3px solid #f59e0b;
}

.metric-card:nth-child(5n + 5) {
  border-top: 3px solid #3B57E8;
}

.badge.rose {
  color: var(--status-lost);
  background: var(--status-lost-bg);
}

.badge.info {
  color: var(--status-progress);
  background: var(--status-progress-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

/* Minimal app scrollbars */
html,
body,
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(209, 213, 219, 0.42) transparent;
  -ms-overflow-style: auto;
}

.nav-list {
  padding-inline-end: 6px;
}

*::-webkit-scrollbar {
  display: block;
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border-radius: 999px;
  background: rgba(209, 213, 219, 0.32);
  background-clip: padding-box;
  border: 2px solid transparent;
}

html:hover,
body:hover,
*:hover {
  scrollbar-color: rgba(107, 114, 128, 0.68) transparent;
}

html:hover::-webkit-scrollbar-thumb,
body:hover::-webkit-scrollbar-thumb,
*:hover::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.68);
  background-clip: padding-box;
}

.sidebar-collapsed .nav-list {
  padding-inline-end: 2px;
}

/* Language flag icons */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flag-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 16px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.16), 0 1px 2px rgba(17, 24, 39, 0.1);
}

.flag-us {
  background: repeating-linear-gradient(
    to bottom,
    #b22234 0,
    #b22234 1.23px,
    #ffffff 1.23px,
    #ffffff 2.46px
  );
}

.flag-us::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10.5px;
  height: 8.7px;
  background:
    radial-gradient(circle at 2px 2px, #ffffff 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 5px 4px, #ffffff 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 8px 6px, #ffffff 0 0.7px, transparent 0.8px),
    #3c3b6e;
}

.flag-eg {
  background: linear-gradient(to bottom, #ce1126 0 33.33%, #ffffff 33.33% 66.66%, #000000 66.66%);
}

.flag-eg::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 6px;
  border-radius: 2px 2px 1px 1px;
  background: #c09300;
  transform: translate(-50%, -50%);
}

.lang-switch,
.login-topline a {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-b);
}

.lang-switch {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
}

.lang-switch:hover,
.login-topline a:hover {
  background: var(--accent-bg);
  border-color: rgba(79, 110, 247, 0.52);
}

.login-topline a {
  width: 44px;
  min-width: 44px;
  height: 36px;
  min-height: 36px;
  border-radius: 12px;
}

.login-topline a.is-active {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: #ffffff;
}

.login-topline a.is-active .flag-icon {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 2px 6px rgba(5, 40, 45, 0.18);
}

.menu-flag {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}

.menu-flag .flag-icon {
  width: 22px;
  height: 15px;
  border-radius: 4px;
}

/* Sidebar logo refinement */
body:not(.sidebar-collapsed) .sidebar .brand-row {
  min-height: 58px;
}

body:not(.sidebar-collapsed) .sidebar .brand {
  width: 164px !important;
  height: 58px !important;
  border-radius: 10px;
  background: var(--brand-ink);
}

body:not(.sidebar-collapsed) .sidebar .brand .brand-full {
  display: block;
  width: 100% !important;
  height: 58px !important;
  object-fit: contain;
  padding: 7px 10px;
}

body:not(.sidebar-collapsed) .sidebar .brand .brand-icon {
  display: none;
}

/* Engaz-style login with KIJAF real-estate CRM animation */
.login-shell {
  min-height: 100vh;
  display: block;
  padding: 0;
  background: #ffffff;
}

.login-card {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 0.9fr) minmax(560px, 1.1fr);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  overflow: hidden;
}

.login-form {
  grid-column: 1;
  grid-row: 1;
  width: min(620px, 100%);
  justify-self: center;
  align-content: center;
  padding: clamp(42px, 7vw, 92px) clamp(34px, 7vw, 104px);
  background: #ffffff;
}

.login-brand {
  grid-column: 2;
  grid-row: 1;
  min-height: calc(100vh - 16px);
  margin: 8px 8px 8px 0;
  padding: clamp(34px, 5vw, 70px);
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 24%, rgba(79, 110, 247, 0.28), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.13), transparent 28%),
    linear-gradient(135deg, #05282d 0%, #07343a 48%, #0b3a40 100%);
}

[dir="rtl"] .login-brand {
  margin: 8px 0 8px 8px;
}

.login-brand-panel {
  width: min(690px, 100%);
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
}

.login-brand-logo,
.login-brand .login-brand-logo {
  width: min(230px, 42vw);
  height: 72px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.2));
}

.login-brand p {
  width: min(520px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
}

.login-form-logo {
  width: 220px;
  height: 76px;
  margin-bottom: 18px;
}

.login-form h1 {
  margin: 0 0 12px;
  color: var(--text-h);
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.1;
}

.login-form label {
  color: var(--text-h);
}

.login-form .field {
  min-height: 58px;
  border-radius: 8px;
  background: #f9fafb;
}

.login-form .btn.primary {
  min-height: 58px;
  border-radius: 8px;
}

.login-form .btn.subtle {
  min-height: 52px;
  border-radius: 8px;
}

.crm-login-animation {
  position: relative;
  width: min(600px, 100%);
  aspect-ratio: 1.16;
  isolation: isolate;
}

.crm-glow {
  position: absolute;
  inset: 14% 10% 12%;
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 45%),
    radial-gradient(circle, rgba(79, 110, 247, 0.22), transparent 68%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.crm-route {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 22%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(79, 110, 247, 0.88), rgba(255, 255, 255, 0.16));
  animation: crmRoute 2.8s ease-in-out infinite;
}

.crm-skyline {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 24%;
  height: 48%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 14px;
}

.building {
  width: 19%;
  min-width: 48px;
  border-radius: 14px 14px 5px 5px;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.32) 0 7px, transparent 7px 18px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(227, 238, 236, 0.72));
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.22);
  animation: buildingFloat 4.8s ease-in-out infinite;
}

.tower-one {
  height: 62%;
  animation-delay: -0.4s;
}

.tower-two {
  height: 86%;
  background:
    repeating-linear-gradient(to bottom, rgba(5, 40, 45, 0.18) 0 6px, transparent 6px 16px),
    linear-gradient(180deg, #4F6EF7, #DBE4FF);
}

.tower-three {
  height: 72%;
  animation-delay: -0.9s;
}

.tower-four {
  height: 54%;
  animation-delay: -1.4s;
}

.crm-card-float {
  position: absolute;
  z-index: 2;
  min-width: 132px;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--brand-ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
  animation: cardFloat 4.2s ease-in-out infinite;
}

.crm-card-float b {
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crm-card-float strong {
  font-size: 24px;
  line-height: 1;
}

.crm-card-float span {
  width: 70%;
  height: 5px;
  border-radius: 999px;
  background: var(--brand-lime);
}

.lead-float {
  top: 12%;
  left: 5%;
}

.unit-float {
  top: 20%;
  right: 2%;
  animation-delay: -1.2s;
}

.deal-float {
  right: 15%;
  bottom: 9%;
  animation-delay: -2s;
}

.crm-pipeline {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 10%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.crm-pipeline span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.crm-pipeline span::before {
  content: "";
  display: block;
  height: 100%;
  width: 70%;
  border-radius: inherit;
  background: var(--brand-lime);
  animation: pipelinePulse 2.6s ease-in-out infinite;
}

.crm-pipeline span:nth-child(2)::before {
  width: 48%;
  animation-delay: -0.45s;
}

.crm-pipeline span:nth-child(3)::before {
  width: 84%;
  animation-delay: -0.9s;
}

.crm-pipeline span:nth-child(4)::before {
  width: 58%;
  animation-delay: -1.3s;
}

@keyframes cardFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes buildingFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes pipelinePulse {
  0%, 100% {
    opacity: 0.72;
    transform: scaleX(0.82);
    transform-origin: left center;
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes crmRoute {
  0%, 100% {
    opacity: 0.55;
    transform: translateX(-8px);
  }
  50% {
    opacity: 1;
    transform: translateX(8px);
  }
}

@media (max-width: 980px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-form,
  .login-brand {
    grid-column: 1;
  }

  .login-form {
    grid-row: 1;
    padding: 32px 22px;
  }

  .login-brand {
    grid-row: 2;
    min-height: 420px;
    margin: 0 16px 16px;
  }
}

@media (max-width: 560px) {
  body:not(.sidebar-collapsed) .sidebar .brand {
    width: 150px !important;
  }

  .login-form-logo {
    width: 180px;
  }

  .crm-card-float {
    min-width: 104px;
    padding: 10px 12px;
  }

  .crm-card-float strong {
    font-size: 20px;
  }
}

/* Global command search */
body.command-open {
  overflow: hidden;
}

.top-search,
.top-search input,
.top-search label {
  cursor: pointer;
}

.command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: 112px 18px 28px;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(9px);
}

.command-backdrop[hidden] {
  display: none;
}

.command-palette {
  width: min(820px, calc(100vw - 28px));
  max-height: min(670px, calc(100vh - 132px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 16px;
  background: #141516;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.command-search {
  min-height: 70px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.command-search svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.52);
}

.command-search input {
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-size: 16px;
}

.command-search input:focus {
  box-shadow: none;
}

.command-search input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.command-search button,
.command-footer kbd {
  min-width: 32px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.command-list {
  overflow-y: auto;
  padding: 16px 12px 18px;
}

.command-group {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.command-group[hidden],
.command-item[hidden] {
  display: none;
}

.command-group h3 {
  margin: 10px 8px 6px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.command-item {
  min-height: 56px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.command-item:hover,
.command-item.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.command-item.is-active {
  transform: translateX(2px);
}

[dir="rtl"] .command-item.is-active {
  transform: translateX(-2px);
}

.command-item > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(79, 110, 247, 0.11);
  color: var(--brand-lime);
}

.command-item:nth-of-type(2n) > span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.command-item svg {
  width: 19px;
  height: 19px;
}

.command-item b {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-item small {
  grid-column: 2 / 3;
  margin-top: -4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.command-item em {
  color: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-style: normal;
}

.command-item mark {
  padding: 4px 9px;
  border-radius: 7px;
  background: #E0E7FF;
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 900;
}

.command-empty {
  margin: 28px 10px;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.command-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.28);
  font-size: 12px;
}

.command-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.command-footer kbd {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  font-family: inherit;
}

.command-footer b {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.28);
  font-size: 11px;
}

[dir="rtl"] .command-footer b {
  margin-right: auto;
  margin-left: 0;
}

@media (max-width: 680px) {
  .command-backdrop {
    align-items: start;
    padding: 76px 10px 16px;
  }

  .command-palette {
    width: 100%;
    max-height: calc(100vh - 92px);
    border-radius: 14px;
  }

  .command-search {
    grid-template-columns: 22px 1fr auto;
    min-height: 62px;
    padding: 0 14px;
  }

  .command-footer {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
  }
}

/* Login polish and support modules */
.login-shell .login-form-logo {
  width: min(300px, 100%);
  height: 88px;
  object-fit: contain;
}

.login-shell .login-form .btn.primary:hover {
  background: var(--brand-ink);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(5, 40, 45, 0.2);
}

.login-shell .login-form .btn.subtle:hover,
.login-shell .login-topline a:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--brand-ink);
}

.login-credit {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  margin-top: 22px;
  padding: 0 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-b);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
}

.login-credit b {
  color: var(--brand-ink);
}

.support-grid,
.support-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.support-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.support-card > span,
.support-topic > i,
.support-topic > svg {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--brand-ink);
}

.support-card h2,
.support-topic h2,
.support-ticket h2,
.support-faq h2 {
  margin: 0;
  color: var(--text-h);
  font-size: 18px;
}

.support-card p,
.support-topic p,
.support-ticket p,
.support-faq p {
  margin: 0;
  color: var(--text-m);
}

.support-ticket {
  display: grid;
  grid-template-columns: minmax(220px, 0.58fr) minmax(320px, 1fr);
  gap: 22px;
  margin-top: 16px;
}

.support-form {
  display: grid;
  gap: 14px;
}

.support-search {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.support-search input {
  min-height: 46px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.support-topic {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.support-faq {
  margin-top: 16px;
}

.support-faq details {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.support-faq summary {
  cursor: pointer;
  color: var(--text-h);
  font-weight: 800;
}

@media (max-width: 900px) {
  .support-grid,
  .support-topics,
  .support-ticket {
    grid-template-columns: 1fr;
  }
}

/* V3.1 polish: restored scrollbars, compact login, and no visible lime accent */
:root {
  --brand-lime: #4f6ef7;
  --brand-lime-d: #3b57e8;
  --brand-lime-soft: #eef1fe;
  --primary: #4f6ef7;
  --primary-2: #3b57e8;
  --primary-soft: #eef1fe;
  --lime: #4f6ef7;
  --accent: #4f6ef7;
  --accent-d: #3b57e8;
  --accent-bg: #eef1fe;
  --accent-text: #3b57e8;
  --selection-bg: #c7d2fe;
  --selection-text: #1e1b4b;
}

.sidebar,
.nav-list {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(156, 163, 175, 0.6) transparent !important;
  -ms-overflow-style: auto !important;
}

.sidebar::-webkit-scrollbar,
.nav-list::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
  height: 6px !important;
}

.sidebar::-webkit-scrollbar-track,
.nav-list::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: transparent !important;
}

.sidebar::-webkit-scrollbar-thumb,
.nav-list::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background: rgba(156, 163, 175, 0.46) !important;
  background-clip: padding-box !important;
}

.sidebar:hover::-webkit-scrollbar-thumb,
.nav-list:hover::-webkit-scrollbar-thumb,
*:hover::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.68) !important;
  background-clip: padding-box !important;
}

@media (max-width: 900px) {
  body:not(.sidebar-open) .sidebar {
    transform: translateX(-100%) !important;
  }

  [dir="rtl"] body:not(.sidebar-open) .sidebar {
    transform: translateX(100%) !important;
  }

  body.sidebar-open .sidebar,
  [dir="rtl"] body.sidebar-open .sidebar {
    transform: translateX(0) !important;
  }
}

.login-shell {
  min-height: 100dvh !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
  overflow: auto !important;
  background: #ffffff !important;
}

.login-card {
  width: min(1080px, calc(100vw - 28px)) !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 28px);
  display: grid !important;
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1fr) !important;
  border: 1px solid rgba(229, 231, 235, 0.9) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.12) !important;
  overflow: hidden !important;
}

.login-form {
  width: 100% !important;
  max-width: 520px !important;
  align-content: center !important;
  gap: 12px !important;
  padding: 34px 48px !important;
  overflow: auto !important;
}

.login-brand {
  min-height: 620px !important;
  margin: 0 !important;
  padding: 32px !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 68% 24%, rgba(79, 110, 247, 0.18), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, #05282d 0%, #07343a 54%, #0b3a40 100%) !important;
}

.login-form-logo {
  width: min(220px, 82%) !important;
  height: 58px !important;
  margin-bottom: 10px !important;
}

.login-form h1 {
  margin-bottom: 8px !important;
  font-size: 32px !important;
  line-height: 1.12 !important;
}

.login-hint {
  min-height: 46px !important;
  padding: 10px 14px !important;
}

.login-form label {
  gap: 6px !important;
  font-size: 14px !important;
}

.login-form .field {
  min-height: 46px !important;
  border-radius: 8px !important;
  background: #f9fafb !important;
}

.login-form input {
  min-height: 44px !important;
}

.login-form .btn.primary,
.login-form .btn.subtle {
  min-height: 46px !important;
  border-radius: 8px !important;
}

.login-form .btn.primary,
.login-form .btn.primary:hover,
.login-form .btn.subtle:hover,
.login-topline a:hover {
  background-color: var(--brand-ink) !important;
  border-color: var(--brand-ink) !important;
  color: #ffffff !important;
}

.login-credit {
  min-height: 38px !important;
  margin-top: 8px !important;
  padding: 0 20px !important;
}

.login-brand-logo,
.login-brand .login-brand-logo {
  width: min(190px, 72%) !important;
  height: 58px !important;
}

.crm-login-animation {
  width: min(470px, 100%) !important;
  transform: scale(0.88);
  transform-origin: center;
}

@media (max-height: 760px) and (min-width: 761px) {
  .login-shell {
    padding: 12px !important;
  }

  .login-card {
    width: min(980px, calc(100vw - 24px)) !important;
    max-height: none;
  }

  .login-brand {
    min-height: 560px !important;
    padding: 24px !important;
  }

  .login-form {
    padding: 24px 34px !important;
  }

  .login-form h1 {
    font-size: 28px !important;
  }

  .crm-login-animation {
    transform: scale(0.72);
  }
}

@media (max-width: 900px) {
  .login-card {
    width: min(720px, calc(100vw - 22px)) !important;
    max-height: none;
    grid-template-columns: 1fr !important;
  }

  .login-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: 250px !important;
    padding: 22px !important;
  }

  .login-form {
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-width: none !important;
    padding: 24px !important;
  }

  .crm-login-animation {
    width: min(360px, 100%) !important;
    transform: scale(0.68);
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 8px !important;
  }

  .login-card {
    width: calc(100vw - 16px) !important;
    border-radius: 12px !important;
  }

  .login-brand {
    min-height: 190px !important;
    padding: 16px !important;
  }

  .login-form {
    padding: 18px !important;
  }

  .login-form-logo {
    width: min(190px, 84%) !important;
    height: 50px !important;
  }

  .login-form h1 {
    font-size: 24px !important;
  }

  .crm-login-animation {
    transform: scale(0.56);
  }
}


