:root {
  --app-bg: #f7fcfc;
  --app-sidebar: #ffffff;
  --app-text: var(--riyali-text);
  --app-muted: var(--riyali-muted);
  --app-border: #e9eeee;
  --app-shadow: 0 16px 40px rgba(3, 176, 170, 0.08);
}

* { box-sizing: border-box; }
html {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
:root {
  --sidebar-expanded-width: 280px;
  --sidebar-collapsed-width: 88px;
  --sidebar-width: var(--sidebar-expanded-width);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
}
.num, .metric strong, .riyali-number {
  font-family: Arial, Tahoma, sans-serif;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.latin-num,
.donut-progress span.latin-num,
.bar-label strong.latin-num {
  font-family: Arial, "Segoe UI", sans-serif !important;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 470px) 1fr;
  background: var(--riyali-surface);
}
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 48px;
  border-left: 1px solid var(--app-border);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 96px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
}
.brand-mark img {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
}
.brand-lockup strong {
  display: block;
  font-family: var(--riyali-font-bold);
  color: var(--riyali-black);
}
.brand-lockup span { color: var(--app-muted); }
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 64px;
  color: white;
  background:
    linear-gradient(135deg, rgba(3,176,170,.94), rgba(161,196,64,.82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='760' viewBox='0 0 1000 760'%3E%3Crect width='1000' height='760' fill='%23f7fcfc'/%3E%3Cg fill='none' stroke='%2303B0AA' stroke-width='20' opacity='.2'%3E%3Cpath d='M80 540 C230 380 300 430 420 250 S650 170 800 80'/%3E%3Cpath d='M130 620 C300 510 390 540 550 350 S720 260 890 210'/%3E%3C/g%3E%3Cg fill='%23A1C440' opacity='.35'%3E%3Crect x='160' y='330' width='130' height='230' rx='18'/%3E%3Crect x='380' y='250' width='130' height='310' rx='18'/%3E%3Crect x='600' y='160' width='130' height='400' rx='18'/%3E%3C/g%3E%3C/svg%3E") center/cover;
}
.login-visual h1 {
  max-width: 720px;
  margin: 0;
  color: white;
  font-family: var(--riyali-font-bold);
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.18;
}
.login-visual p {
  max-width: 620px;
  margin: 14px 0 0;
  color: rgba(255,255,255,.86);
  font-size: 20px;
  line-height: 1.8;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background: var(--app-bg);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: var(--app-sidebar);
  border-left: 1px solid var(--app-border);
}
.side-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--app-border);
}
.side-brand strong {
  display: block;
  font-family: var(--riyali-font-bold);
}
.side-brand span { color: var(--app-muted); font-size: 14px; }
.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--riyali-radius-pill);
  background: transparent;
  color: var(--app-text);
  text-align: right;
}
.nav-btn:hover,
.nav-btn.active {
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  border-color: rgba(3, 176, 170, 0.14);
}
.main {
  min-width: 0;
  padding: 26px;
}
.topbar,
.page-head,
.section-title,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar { margin-bottom: 24px; }
.page-head { align-items: flex-start; margin-bottom: 20px; }
.page-head h1 {
  margin: 0;
  color: var(--riyali-black);
  font-family: var(--riyali-font-bold);
  font-size: 30px;
}
.page-head p { margin: 8px 0 0; color: var(--app-muted); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--riyali-radius-pill);
  background: white;
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--riyali-green-soft);
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.layout-2 { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.reports-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card,
.riyali-card.dashboard-card {
  width: 100%;
  min-width: 0;
  background: white;
  border: 1px solid var(--app-border);
  border-radius: var(--riyali-radius-md);
  box-shadow: var(--app-shadow);
  padding: 18px;
}
.metric {
  min-height: 112px;
  display: grid;
  align-content: space-between;
}
.metric span { color: var(--app-muted); }
.metric strong {
  color: var(--riyali-black);
  font-size: 34px;
}
.toolbar {
  display: grid;
  grid-template-columns: 1fr repeat(4, minmax(130px, 170px)) auto;
  gap: 10px;
  margin-bottom: 14px;
}
.field { display: grid; gap: 7px; }
.field label {
  color: var(--riyali-black);
  font-family: var(--riyali-font-medium);
}
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid var(--app-border);
  border-radius: var(--riyali-radius-md);
  background: white;
  color: var(--app-text);
  font-family: var(--riyali-font-regular);
}
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--riyali-teal);
  box-shadow: var(--riyali-focus);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--riyali-radius-pill);
  color: white;
  background: var(--riyali-teal);
  font-family: var(--riyali-font-medium);
}
.btn:hover { color: var(--riyali-teal); background: white; border-color: var(--riyali-teal); }
.btn.secondary { color: var(--riyali-teal); background: var(--riyali-teal-soft); }
.btn.secondary:hover { color: white; background: var(--riyali-teal); }
.btn.danger { color: white; background: var(--riyali-red); }
.btn.danger:hover { color: var(--riyali-red); background: white; border-color: var(--riyali-red); }
.btn.small { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.login-form-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 18px;
}
.remember-login {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  color: #36434a;
  cursor: pointer;
}
.remember-login input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--riyali-teal);
}
.remember-login span {
  display: grid;
  gap: 2px;
}
.remember-login strong {
  font-family: var(--riyali-font-medium);
}
.remember-login small {
  color: #7c858f;
  line-height: 1.5;
}
.link-btn {
  border: 0;
  padding: 0;
  color: var(--riyali-teal);
  background: transparent;
  font-family: var(--riyali-font-medium);
}
.link-btn:hover { text-decoration: underline; }
.reset-modal { max-width: 560px; }
.reset-result {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.reset-result .num {
  width: fit-content;
  padding: 8px 12px;
  border-radius: var(--riyali-radius-sm);
  color: var(--riyali-black);
  background: var(--riyali-surface-tint);
}
.error, .empty {
  border: 1px solid #f4d4d2;
  color: var(--riyali-deep-red);
  background: #fff7f6;
  border-radius: var(--riyali-radius-md);
  padding: 12px 14px;
}
.empty {
  color: var(--app-muted);
  border-color: var(--app-border);
  background: white;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--app-border);
  border-radius: var(--riyali-radius-md);
  background: white;
  box-shadow: var(--app-shadow);
}
table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}
th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--app-border);
  text-align: right;
  vertical-align: top;
}
th {
  color: var(--app-muted);
  background: var(--riyali-surface-tint);
  font-family: var(--riyali-font-medium);
  font-size: 14px;
}
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 5px 10px;
  border-radius: var(--riyali-radius-pill);
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.status.done { color: #42620b; background: var(--riyali-green-soft); }
.status.warn { color: #8a5b0c; background: rgba(246, 186, 72, .18); }
.status.bad { color: var(--riyali-deep-red); background: rgba(226,45,35,.1); }
.bars { display: grid; gap: 13px; }
.bar-row { display: grid; gap: 7px; }
.bar-label { display: flex; justify-content: space-between; color: var(--app-muted); }
.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: var(--riyali-radius-pill);
  background: #edf3f3;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--riyali-teal);
}
.bar-fill.good { background: var(--riyali-green); }
.bar-fill.warn { background: var(--riyali-yellow); }
.bar-fill.bad { background: var(--riyali-red); }
.chart-bars {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding-top: 18px;
}
.chart-col {
  flex: 1;
  min-width: 46px;
  height: 100%;
  display: grid;
  align-items: end;
  gap: 8px;
}
.chart-col div {
  min-height: 8px;
  border-radius: var(--riyali-radius-sm) var(--riyali-radius-sm) 0 0;
  background: var(--riyali-teal);
}
.chart-col span { text-align: center; color: var(--app-muted); font-size: 13px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid .wide { grid-column: 1 / -1; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(33, 33, 33, .46);
}
.modal {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border-radius: var(--riyali-radius-md);
  background: white;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
}
.modal-head { margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-family: var(--riyali-font-bold); }
.password-modal {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 26px;
  direction: rtl;
  text-align: right;
  box-shadow: 0 30px 90px rgba(25, 55, 64, 0.22);
}
.password-modal-head {
  position: relative;
  display: block;
  padding-left: 46px;
  margin-bottom: 22px;
}
.password-modal-head h2 {
  color: #111827;
  font-size: 24px;
}
.modal-close {
  position: absolute;
  top: -2px;
  left: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 92, 100, 0.11);
  border-radius: 50%;
  color: #6f7b85;
  background: #f8fcfc;
}
.modal-close:hover {
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.modal-close svg { width: 18px; height: 18px; }
.confirm-backdrop {
  z-index: 60;
}
.confirm-modal {
  width: min(460px, 100%);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 24px;
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(23, 48, 57, 0.2);
  text-align: right;
}
.confirm-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.confirm-icon.danger {
  color: #b3332f;
  background: rgba(217, 83, 79, 0.11);
}
.confirm-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.confirm-modal h2 {
  margin: 0;
  color: #111827;
  font-family: var(--riyali-font-bold);
  font-size: 24px;
}
.confirm-modal p {
  margin: 8px 0 0;
  color: #68737d;
  line-height: 1.8;
}
.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 6px;
}
.btn.danger {
  color: white;
  background: #b3332f;
}
.btn.danger:hover {
  background: #9d2925;
}
.password-form {
  display: grid;
  gap: 14px;
  direction: rtl;
  text-align: right;
}
.password-field > span {
  color: #1f2937;
  font-family: var(--riyali-font-medium);
}
.password-input-wrap {
  position: relative;
  display: grid;
}
.password-input-wrap .input {
  padding-right: 48px;
  padding-left: 48px;
  direction: rtl;
  text-align: right;
}
.field-icon,
.password-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #82909b;
}
.field-icon {
  right: 16px;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.password-toggle {
  left: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.password-toggle:hover {
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.password-toggle svg { width: 20px; height: 20px; }
.field-error {
  min-height: 18px;
  color: var(--riyali-deep-red);
  font-size: 12px;
}
.password-helper {
  margin: 0;
  color: #7c858f;
  font-size: 13px;
}
.form-error {
  min-height: 20px;
  color: var(--riyali-deep-red);
}
.password-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 4px;
}
.password-actions .btn {
  min-width: 150px;
}
.password-actions .btn:disabled {
  cursor: progress;
  opacity: 0.72;
}
.list { display: grid; gap: 10px; }
.list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--riyali-radius-md);
  background: white;
}
.muted { color: var(--app-muted); }
.role-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: var(--riyali-radius-pill);
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-size: 13px;
}

.app-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  --sidebar-width: var(--sidebar-expanded-width);
  background:
    radial-gradient(circle at 22% 12%, rgba(3, 176, 170, 0.08), transparent 30%),
    linear-gradient(135deg, #f8fcfd 0%, #f5fafb 44%, #fbfdfd 100%);
}
.app-shell.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}
.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 10;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  border-left: 1px solid rgba(30, 118, 120, 0.08);
  box-shadow: -14px 0 40px rgba(28, 86, 91, 0.04);
  overflow: hidden;
  transition: width 0.25s ease, padding 0.25s ease;
}
.side-brand {
  position: relative;
  display: grid;
  place-items: center;
  padding-bottom: 18px;
  margin-bottom: 4px;
}
.side-brand .brand-mark {
  width: 150px;
  height: 82px;
  display: grid;
  place-items: center;
  transition: width 0.25s ease, height 0.25s ease;
}
.side-brand .brand-mark img {
  max-width: 100%;
  max-height: 82px;
  object-fit: contain;
}
.sidebar-toggle {
  position: absolute;
  top: 0;
  left: -4px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 181, 176, 0.22);
  border-radius: 50%;
  color: var(--riyali-teal);
  background: rgba(238, 248, 247, 0.96);
  box-shadow: 0 12px 28px rgba(38, 75, 84, 0.1);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.sidebar-toggle:hover {
  background: #fff;
  border-color: rgba(3, 176, 170, 0.32);
  transform: translateY(-1px);
}
.sidebar-toggle:focus-visible {
  outline: 3px solid rgba(3, 176, 170, 0.2);
  outline-offset: 3px;
}
.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}
.side-nav {
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: 48px;
  align-content: start;
  justify-items: stretch;
  gap: 7px;
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  overflow: visible;
}
.nav-btn {
  height: 48px;
  max-height: 48px;
  flex: 0 0 48px;
  min-height: 48px;
  justify-content: flex-start;
  gap: 12px;
  padding: 9px 14px;
  color: #17202c;
  font-family: var(--riyali-font-medium);
  transition: justify-content 0.25s ease, padding 0.25s ease;
}
.nav-icon,
.summary-icon,
.active-icon,
.dashboard-footer span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.nav-icon {
  width: 26px;
  height: 26px;
  color: #7c8791;
}
.nav-label {
  min-width: 0;
  white-space: nowrap;
}
.nav-icon svg,
.summary-icon svg,
.active-icon svg,
.support-icon svg,
.dashboard-footer svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-btn:hover,
.nav-btn.active {
  color: var(--riyali-teal);
  background: linear-gradient(135deg, rgba(3, 176, 170, 0.12), rgba(3, 176, 170, 0.05));
  border-color: rgba(3, 176, 170, 0.1);
}
.nav-btn:hover .nav-icon,
.nav-btn.active .nav-icon { color: var(--riyali-teal); }
.logout-btn {
  color: #b3332f;
}
.logout-btn .nav-icon {
  color: #d6453d;
}
.logout-btn:hover {
  color: #b3332f;
  background: rgba(217, 83, 79, 0.08);
  border-color: rgba(217, 83, 79, 0.14);
}
.logout-btn:hover .nav-icon {
  color: #b3332f;
}
.sidebar-footer {
  margin-top: auto;
  padding: 22px 10px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}
.comify-branding {
  display: flex;
  flex-direction: row;
  direction: rtl;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.comify-icon-logo {
  display: none;
}
.comify-branding span {
  color: #8a8f98;
  font-size: 12px;
  white-space: nowrap;
}
.comify-branding img {
  width: 110px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.comify-branding:hover img {
  opacity: 1;
  transform: translateY(-1px);
}
.app-version {
  margin-top: 6px;
  color: #697783;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}
.sidebar-collapsed .app-version-label {
  display: none;
}
.app-version-number {
  font-family: Arial, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.sidebar-collapsed .app-version {
  font-size: 11px;
}
.sidebar-collapsed .sidebar {
  padding: 22px 14px 20px;
}
.sidebar-collapsed .side-brand {
  padding-bottom: 18px;
}
.sidebar-collapsed .side-brand .brand-mark {
  width: 48px;
  height: 54px;
}
.sidebar-collapsed .side-brand .brand-mark img {
  max-height: 52px;
  object-position: center;
}
.sidebar-collapsed .sidebar-toggle {
  left: 50%;
  top: 56px;
  transform: translateX(-50%);
}
.sidebar-collapsed .sidebar-toggle:hover {
  transform: translateX(-50%) translateY(-1px);
}
.sidebar-collapsed .side-nav {
  align-items: center;
  justify-items: center;
  grid-auto-rows: 48px;
  align-content: start;
  gap: 7px;
  margin-top: 28px;
}
.sidebar-collapsed .nav-btn {
  width: 48px;
  height: 48px;
  max-height: 48px;
  flex-basis: 48px;
  min-height: 48px;
  justify-content: center;
  padding: 10px;
  border-radius: 16px;
}
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-footer-text {
  display: none;
}
.sidebar-collapsed .nav-icon {
  margin: 0;
}
.sidebar-collapsed .sidebar-footer {
  padding: 20px 0 0;
}
.sidebar-collapsed .comify-branding {
  gap: 0;
}
.sidebar-collapsed .comify-full-logo {
  display: none;
}
.sidebar-collapsed .comify-icon-logo {
  display: block;
  width: 54px;
  max-width: 54px;
  height: 54px;
  object-fit: contain;
  object-position: center;
}
.main {
  width: calc(100vw - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  min-height: 100vh;
  min-width: 0;
  margin-right: var(--sidebar-width);
  padding: 30px 34px 36px;
  overflow-x: hidden;
  transition: width 0.25s ease, max-width 0.25s ease, margin-right 0.25s ease;
}
.topbar {
  direction: ltr;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 16px;
}
.user-chip {
  direction: rtl;
  min-width: 190px;
  justify-content: space-between;
  padding: 8px 10px 8px 14px;
  border-color: rgba(34, 64, 73, 0.1);
  box-shadow: 0 10px 24px rgba(36, 78, 87, 0.05);
}
.profile-menu-wrap {
  position: relative;
  direction: rtl;
}
.profile-trigger {
  cursor: pointer;
  text-align: right;
}
.profile-trigger:focus-visible,
.menu-item:focus-visible,
.modal-close:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid rgba(3, 176, 170, 0.2);
  outline-offset: 3px;
}
.profile-text {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.profile-text strong,
.profile-text .muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 35;
  width: min(320px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(32, 92, 100, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 52px rgba(23, 48, 57, 0.14);
  direction: rtl;
  text-align: right;
  overflow: hidden;
}
.profile-menu-user {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.profile-menu-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-family: var(--riyali-font-bold);
  font-size: 20px;
}
.profile-menu-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.profile-menu-user > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.profile-menu-user strong,
.profile-menu-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-menu-user strong {
  color: #17202c;
  font-family: var(--riyali-font-bold);
  font-size: 16px;
}
.profile-menu-user small {
  color: var(--muted);
  font-size: 13px;
}
.menu-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  color: #17202c;
  background: transparent;
  font-family: var(--riyali-font-medium);
  text-align: right;
}
.menu-item:hover {
  color: var(--riyali-teal);
  background: linear-gradient(135deg, rgba(3, 176, 170, 0.11), rgba(3, 176, 170, 0.04));
}
.menu-item.danger {
  color: #bf3f3a;
}
.menu-item.danger:hover {
  color: #a92d28;
  background: rgba(217, 83, 79, 0.08);
}
.menu-item-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.menu-item-icon svg,
.modal-close svg,
.field-icon svg,
.password-toggle svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-badge {
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-size: 11px;
  white-space: nowrap;
}
.menu-divider {
  height: 1px;
  margin: 8px 6px;
  background: rgba(32, 92, 100, 0.1);
}
.chevron {
  color: #6f7b85;
  font-size: 20px;
  line-height: 1;
}
.avatar {
  background: var(--riyali-teal-soft);
  color: var(--riyali-teal);
}
.dashboard-head {
  margin: 10px 0 28px;
  text-align: right;
}
.dashboard-head .riyali-eyebrow {
  margin: 0 0 18px;
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
  font-size: 18px;
}
.dashboard-head h1 {
  margin: 0;
  color: #121826;
  font-family: var(--riyali-font-bold);
  font-size: clamp(34px, 3.5vw, 48px);
  line-height: 1.22;
}
.dashboard-head p {
  margin: 10px 0 0;
  color: #858b93;
  font-size: 18px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.summary-card,
.status-card,
.active-summary,
.status-table {
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 38px rgba(38, 75, 84, 0.07);
  backdrop-filter: blur(10px);
}
.summary-card {
  width: 100%;
  min-width: 0;
  min-height: 154px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: start;
  gap: 14px;
  padding: 20px;
}
.summary-card p {
  margin: 0 0 14px;
  color: #293241;
  font-family: var(--riyali-font-medium);
}
.summary-card strong {
  display: block;
  color: currentColor;
  font-size: 42px;
  line-height: 1;
}
.summary-card span:last-child {
  display: block;
  margin-top: 8px;
  color: #707980;
}
.summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: currentColor;
}
.summary-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}
.summary-card.teal { color: #299ca0; }
.summary-card.orange { color: #f59a23; }
.summary-card.green { color: #79b763; }
.summary-card.red { color: #d9534f; }
.summary-card.blue { color: #3498d8; }
.summary-card.purple { color: #7c62d6; }
.status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 28px;
  margin-top: 24px;
  padding: 28px;
}
.status-visual {
  display: grid;
  justify-items: center;
  align-content: start;
}
.status-title {
  width: 100%;
  text-align: right;
}
.status-title h2 {
  margin: 0;
  color: #111827;
  font-family: var(--riyali-font-bold);
  font-size: 30px;
}
.status-title p {
  margin: 10px 0 0;
  color: #858b93;
}
.donut-wrap {
  width: min(360px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 22px auto 14px;
}
.donut {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 18px 34px rgba(38, 75, 84, 0.12);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(40, 92, 98, 0.08);
}
.donut-center {
  position: absolute;
  inset: 31%;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.donut-center strong {
  color: #111827;
  font-size: 44px;
  line-height: 1;
}
.donut-center span {
  margin-top: 8px;
  color: #6f7780;
}
.donut-label {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  color: white;
  font-family: var(--riyali-font-bold);
  font-size: 20px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.donut-label.num {
  font-family: Arial, Tahoma, sans-serif;
}
.status-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  color: #17202c;
}
.status-legend span,
.status-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-legend i,
.status-name i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-details {
  display: grid;
  gap: 14px;
  align-content: start;
}
.active-summary {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(3, 176, 170, 0.06), rgba(255, 255, 255, 0.9));
}
.active-summary h3 {
  margin: 0 0 8px;
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
  font-size: 16px;
}
.active-summary strong {
  display: block;
  color: #4ea7a8;
  font-size: 40px;
  line-height: 1;
}
.active-summary p {
  margin: 8px 0 0;
  color: #7c858f;
  font-size: 13px;
}
.active-icon {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(3, 176, 170, 0.28);
  border-radius: 50%;
  color: var(--riyali-teal);
  background: white;
}
.active-icon svg { width: 30px; height: 30px; }
.status-table {
  overflow: hidden;
}
.status-table-head,
.status-row {
  display: grid;
  grid-template-columns: 1fr 74px 190px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(31, 65, 72, 0.08);
}
.status-table-head {
  color: #7a828b;
  background: rgba(247, 251, 252, 0.9);
  font-family: var(--riyali-font-medium);
}
.status-row:last-child { border-bottom: 0; }
.status-row strong {
  color: #111827;
  font-size: 22px;
}
.status-percent {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  color: #7a828b;
}
.status-percent i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f2;
}
.status-percent b {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.dashboard-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  color: #8a929a;
}
.dashboard-footer span {
  width: 22px;
  height: 22px;
}
.dashboard-footer strong {
  font-family: Arial, Tahoma, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.executive-summary {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(3, 176, 170, 0.18);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(3, 176, 170, 0.1), rgba(255, 255, 255, 0.86));
  box-shadow: 0 14px 34px rgba(38, 75, 84, 0.06);
}
.executive-summary.warning {
  border-color: rgba(245, 154, 35, 0.24);
  background: linear-gradient(135deg, rgba(245, 154, 35, 0.12), rgba(255, 255, 255, 0.9));
}
.executive-summary h2 {
  margin: 0;
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
  font-size: 22px;
}
.executive-summary.warning h2 { color: #b76b10; }
.executive-summary p {
  margin: 7px 0 0;
  color: #66717a;
}
.executive-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: var(--riyali-teal);
}
.executive-summary.warning .executive-icon { background: #f59a23; }
.executive-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  width: 100%;
  min-width: 0;
}
.dashboard-card {
  width: 100%;
  min-width: 0;
  grid-column: span 4;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 38px rgba(38, 75, 84, 0.07);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.department-card { grid-column: span 4; }
.status-card-home { grid-column: span 8; }
.attention-card,
.trend-card { grid-column: span 6; }
.priority-card { grid-column: 1 / -1; min-height: auto; }
.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.dashboard-card-head h2 {
  margin: 0;
  color: #111827;
  font-family: var(--riyali-font-bold);
  font-size: 20px;
}
.dashboard-card-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.dashboard-card-head svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.collapsible-card {
  min-height: auto;
}
.collapsible-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.collapsible-card.is-collapsed .collapsible-card-head {
  margin-bottom: 0;
}
.collapsible-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.collapsible-head-actions > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.collapsible-head-actions svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.collapse-toggle {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(97, 181, 176, 0.22);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: rgba(238, 248, 247, 0.86);
  font-family: Arial, Tahoma, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.collapse-toggle:hover {
  background: var(--riyali-teal-soft);
}
.collapsible-card.is-collapsed .collapsible-card-body {
  display: none;
}

.opportunities-filter-grid {
  flex: 1 1 auto;
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}

.opportunities-page,
.roles-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.opportunities-toolbar {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: space-between;
}

.opportunities-toolbar .toolbar-filter {
  flex: 1 1 180px;
  max-width: 260px;
}

.opportunities-add-btn {
  flex: 0 0 auto;
}

.opportunities-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}

.opportunities-card {
  width: 100%;
  min-width: 0;
}

.opportunities-page .opportunities-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opportunities-page .opportunities-analytics-grid > * {
  grid-column: auto;
  width: 100%;
  min-width: 0;
}

.opportunity-ranked-list,
.opportunities-table-body,
.opportunities-table,
.opportunity-progress-cell {
  min-width: 0;
}

.opportunity-ranked-list {
  display: grid;
  gap: 12px;
}

.opportunity-ranked-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(96, 128, 138, 0.12);
  border-radius: 18px;
  background: rgba(250, 253, 253, 0.8);
}

.opportunity-ranked-row > div {
  min-width: 0;
}

.opportunity-ranked-row strong,
.opportunity-ranked-row span {
  display: block;
}

.opportunity-ranked-row span {
  color: var(--muted);
  font-size: 13px;
}

.opportunities-table-card {
  margin-top: 18px;
}

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

.opportunities-table-head,
.opportunities-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(130px, 0.7fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(220px, 1.2fr) 132px;
  gap: 12px;
  align-items: center;
  min-width: 1120px;
}

.opportunities-table-head {
  padding: 16px 18px;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 250, 250, 0.85);
}

.opportunities-table-row {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.opportunities-table-row:last-child {
  border-bottom: 0;
}

.opportunities-table-row strong,
.opportunities-table-row span,
.opportunities-table-row small {
  display: block;
}

.opportunities-table-row span,
.opportunities-table-row small {
  color: var(--muted);
}

.opportunity-progress-cell {
  display: grid;
  gap: 6px;
}

.opportunity-progress-cell .mini-progress {
  max-width: 180px;
}

.opportunity-detail-list strong {
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .opportunities-analytics-grid,
  .opportunities-page .opportunities-analytics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .opportunities-filter-grid {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .opportunities-filter-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .opportunities-toolbar {
    align-items: stretch;
  }

  .opportunities-toolbar .toolbar-filter,
  .opportunities-add-btn {
    width: 100%;
    max-width: 100%;
  }

  .opportunity-ranked-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .opportunity-ranked-row .status-badge {
    grid-column: 2;
    justify-self: start;
  }
}
.card-subtitle {
  margin: -8px 0 12px;
  color: #858b93;
  font-size: 14px;
}
.status-compact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}
.dashboard-card .donut-wrap {
  width: min(230px, 100%);
  margin: 0 auto 12px;
}
.dashboard-card .donut-label { font-size: 15px; }
.dashboard-card .donut-center strong { font-size: 32px; }
.dashboard-card .donut-center span { font-size: 12px; }
.dashboard-card .active-summary {
  grid-template-columns: 44px 1fr;
  padding: 14px;
  border-radius: 18px;
}
.dashboard-card .active-icon {
  width: 42px;
  height: 42px;
}
.dashboard-card .active-icon svg {
  width: 24px;
  height: 24px;
}
.dashboard-card .active-summary h3 { font-size: 13px; }
.dashboard-card .active-summary strong { font-size: 28px; }
.dashboard-card .status-table-head,
.dashboard-card .status-row {
  grid-template-columns: 1fr 46px 82px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
}
.dashboard-card .status-row strong { font-size: 16px; }
.dashboard-card .status-percent {
  grid-template-columns: 38px 1fr;
  gap: 6px;
}
.compact-table {
  display: grid;
  gap: 8px;
}
.attention-list {
  display: grid;
  gap: 12px;
}
.attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(31, 65, 72, 0.07);
  border-radius: 18px;
  background: rgba(248, 252, 252, 0.74);
}
.attention-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.attention-copy strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #111827;
}
.attention-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #75808a;
  font-size: 13px;
}
.attention-value {
  color: var(--riyali-teal);
  font-size: 22px;
}
.compact-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 0.75fr 0.75fr 50px auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(31, 65, 72, 0.07);
  border-radius: 14px;
  background: rgba(248, 252, 252, 0.72);
  font-size: 13px;
}
.compact-row div {
  display: grid;
  gap: 3px;
}
.compact-row div span,
.compact-row > span {
  color: #75808a;
}
.status-badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--riyali-font-medium);
}
.status-badge.red { color: #b3332f; background: rgba(217, 83, 79, 0.12); }
.status-badge.orange { color: #af6410; background: rgba(245, 154, 35, 0.14); }
.status-badge.blue { color: #247ab0; background: rgba(52, 152, 216, 0.14); }
.status-badge.green { color: #4d843d; background: rgba(137, 189, 112, 0.18); }
.status-badge.gray { color: #6e747a; background: rgba(154, 160, 166, 0.15); }
.card-link {
  width: fit-content;
  margin-top: auto;
  border: 0;
  padding: 10px 0 0;
  color: var(--riyali-teal);
  background: transparent;
  font-family: var(--riyali-font-medium);
}
.ranking-list {
  display: grid;
  gap: 10px;
}
.ranking-row {
  display: grid;
  grid-template-columns: 34px 1fr 58px 28px;
  gap: 10px;
  align-items: center;
}
.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.mini-progress {
  height: 7px;
  display: block;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 999px;
  background: #edf1f2;
}
.mini-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--riyali-teal);
}
.trend {
  font-size: 22px;
  font-family: var(--riyali-font-bold);
}
.trend.up { color: #79b763; }
.trend.down { color: #d9534f; }
.line-chart svg {
  display: block;
  width: 100%;
  min-width: 0;
  height: 210px;
  overflow: visible;
}
.line-chart { width: 100%; min-width: 0; container-type: inline-size; }
.line-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); direction: rtl; gap: 0; color: #7c858f; font-size: 11px; text-align: center; margin-top: -18px; margin-bottom: 12px; }
.line-months span { min-width: 0; direction: rtl; }
@container (max-width: 480px) {
  .line-months { font-size: 10px; margin-top: -30px; }
  .line-months span { writing-mode: vertical-rl; justify-self: center; }
  .line-chart .line-value { font-size: 23px; }
}
.line-path {
  fill: none;
  stroke: var(--riyali-teal);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-area {
  fill: rgba(3, 176, 170, 0.08);
}
.line-chart circle {
  fill: white;
  stroke: var(--riyali-teal);
  stroke-width: 3;
}
.line-value {
  fill: #71808c;
  font-family: Arial, Tahoma, sans-serif;
  font-size: 16px;
}
.line-label {
  fill: #7c858f;
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.trend-badge {
  width: fit-content;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-family: Arial, Tahoma, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.trend-badge.up {
  color: #4d843d;
  background: rgba(137, 189, 112, 0.18);
}
.trend-badge.down {
  color: #b3332f;
  background: rgba(217, 83, 79, 0.12);
}
.trend-badge.neutral {
  color: #6e747a;
  background: rgba(154, 160, 166, 0.15);
}
.due-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.due-pills span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #52606b;
  background: #f2f7f8;
  font-size: 12px;
}
.due-list {
  display: grid;
  gap: 9px;
}
.due-list > div {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr 54px;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(31, 65, 72, 0.07);
  font-size: 13px;
}
.due-list > div:last-child { border-bottom: 0; }
.due-list span { color: #75808a; }
.due-list em {
  color: var(--riyali-teal);
  font-style: normal;
  font-family: var(--riyali-font-medium);
}
.due-empty {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  padding: 16px !important;
  border: 1px dashed rgba(32, 92, 100, 0.18) !important;
  border-radius: 16px;
  color: #75808a;
  background: rgba(248, 252, 252, 0.7);
}
.due-empty strong { color: #111827; }
.priority-items i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
i.green { background: #79b763; }
i.orange { background: #f59a23; }
i.red { background: #d9534f; }
.priority-stack {
  display: grid;
  gap: 16px;
}
.stack-bar {
  height: 24px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f2;
}
.stack-bar span.green { background: #79b763; }
.stack-bar span.orange { background: #f59a23; }
.stack-bar span.red { background: #d9534f; }
.priority-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.priority-items div {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f8fcfc;
}
.priority-items span {
  grid-column: 2;
  color: #75808a;
  font-size: 13px;
}

.departments-page {
  display: grid;
  gap: 20px;
  width: 100%;
  min-width: 0;
}
.departments-head {
  margin-bottom: 8px;
}
.departments-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(38, 75, 84, 0.055);
}
.department-add-btn {
  min-width: 170px;
}
.department-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.department-summary-card {
  min-width: 0;
  min-height: 142px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 38px rgba(38, 75, 84, 0.07);
}
.department-summary-card p {
  margin: 0 0 8px;
  color: #263241;
  font-family: var(--riyali-font-medium);
}
.department-summary-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}
.department-summary-card span:not(.department-summary-icon) {
  display: block;
  margin-top: 6px;
  color: #707980;
}
.department-summary-icon,
.department-card-icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
}
.department-summary-icon {
  width: 52px;
  height: 52px;
}
.department-summary-icon svg {
  width: 27px;
  height: 27px;
  color: white;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.department-summary-card.teal { color: var(--riyali-teal); }
.department-summary-card.green { color: #62a94b; }
.department-summary-card.blue { color: #3498d8; }
.department-summary-card.orange { color: #f59a23; }
.department-summary-card.purple { color: #7c62d6; }
.department-summary-card.red { color: #d9534f; }

.users-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.users-head {
  width: 100%;
  margin: 0;
}
.users-page .users-toolbar {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px 24px;
  border: 1px solid rgba(20, 120, 120, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  flex-wrap: wrap;
}
.users-page .user-add-btn {
  flex-shrink: 0;
  min-width: 170px;
}
.user-add-btn span,
.card-head span {
  display: inline-grid;
  place-items: center;
}
.user-add-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.users-page .users-filter-grid {
  flex: 1;
  flex: 1 1 620px;
  display: flex;
  direction: rtl;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.users-page .toolbar-search,
.users-page .toolbar-filter {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 260px;
  box-sizing: border-box;
}
.search-field,
.filter-field {
  min-width: 0;
  display: grid;
  align-items: center;
  border: 1px solid rgba(31, 65, 72, 0.09);
  border-radius: 16px;
  background: white;
}
.search-field {
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 0 12px;
}
.search-field span,
.filter-field > span:first-child {
  color: #8a949d;
}
.search-field svg,
.filter-field svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.search-field input {
  min-width: 0;
  height: 54px;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
  font: inherit;
}
.filter-field {
  gap: 2px;
  padding: 8px 12px;
}
.filter-field > span:first-child {
  font-size: 12px;
}
.filter-field .select {
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.toolbar-icon-select {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  direction: rtl;
  padding: 8px 12px;
  border: 1px solid rgba(31, 65, 72, 0.09);
  border-radius: 18px;
  background: #fff;
  box-sizing: border-box;
}
.select-side-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.select-side-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.toolbar-icon-select .select {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--riyali-font-bold);
  color: #1f2937;
}
.user-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}
.users-page .user-summary-grid > * {
  min-width: 0;
  box-sizing: border-box;
}
.users-table-card {
  width: 100%;
  min-width: 0;
}
.users-smart-table {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 20px;
  background: white;
}
.users-smart-head,
.users-smart-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) minmax(150px, 0.92fr) minmax(170px, 1fr) minmax(94px, 0.52fr) minmax(118px, 0.72fr) minmax(178px, 0.82fr);
  gap: 14px;
  align-items: center;
}
.users-smart-head {
  padding: 14px 18px;
  color: #7c858f;
  background: rgba(248, 252, 252, 0.94);
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.users-smart-body {
  display: grid;
}
.users-smart-row {
  padding: 16px 18px;
  border-top: 1px solid rgba(31, 65, 72, 0.07);
  transition: background 0.18s ease;
}
.users-smart-row:hover {
  background: rgba(248, 252, 252, 0.74);
}
.users-smart-row > div {
  min-width: 0;
}
.user-profile-cell,
.user-department-cell {
  display: grid;
  min-width: 0;
}
.user-profile-cell {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.user-profile-cell strong,
.user-department-cell strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--riyali-font-bold);
}
.user-profile-cell span:not(.user-avatar),
.user-department-cell span,
.last-login-cell {
  overflow: hidden;
  color: #75808a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.user-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: #eef8f7;
  font-family: var(--riyali-font-bold);
}
.user-avatar.large {
  width: 76px;
  height: 76px;
  font-size: 26px;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--riyali-font-medium);
}
.role-chip.teal { color: var(--riyali-teal); background: rgba(97, 181, 176, 0.14); }
.role-chip.blue { color: #247ab0; background: rgba(52, 152, 216, 0.14); }
.role-chip.purple { color: #7056c6; background: rgba(124, 98, 214, 0.13); }
.role-chip.orange { color: #af6410; background: rgba(245, 154, 35, 0.14); }
.user-action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
.user-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(97, 181, 176, 0.2);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: white;
}
.user-icon-btn.danger {
  color: #b3332f;
  background: rgba(217, 83, 79, 0.06);
  border-color: rgba(217, 83, 79, 0.16);
}
.user-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.users-table-footer {
  padding-top: 16px;
}
.user-drawer .drawer-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.user-avatar-upload {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 18px;
  background: rgba(248, 252, 252, 0.86);
}
.user-avatar-upload div {
  display: grid;
  gap: 6px;
}
.user-avatar-upload strong {
  color: #111827;
}
.user-avatar-upload span {
  color: #75808a;
  font-size: 13px;
}
.toggle-field {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 16px;
  background: white;
  color: #263241;
  font-family: var(--riyali-font-medium);
}
.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--riyali-teal);
}
.toggle-field span {
  display: grid;
  gap: 3px;
}
.toggle-field small {
  color: #7c858f;
  font-family: var(--riyali-font-regular);
  font-size: 12px;
}
.user-detail-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 20px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 20px;
  background: rgba(248, 252, 252, 0.84);
}
.user-detail-card strong {
  color: #111827;
  font-size: 22px;
  font-family: var(--riyali-font-bold);
}
.user-detail-card span:not(.user-avatar):not(.status-badge) {
  color: #75808a;
}
.user-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.user-detail-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 65, 72, 0.07);
}
.user-detail-list span {
  color: #7c858f;
}
.user-detail-list strong {
  min-width: 0;
  color: #111827;
}
.assessment-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.assessment-head {
  margin: 0;
}
.assessment-toolbar {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 20px 24px;
  border: 1px solid rgba(20, 120, 120, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  flex-wrap: wrap;
}
.assessment-filter-grid {
  flex: 1 1 620px;
  display: flex;
  direction: rtl;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.assessment-page .toolbar-search,
.assessment-page .toolbar-filter {
  flex: 1 1 190px;
  min-width: 180px;
  max-width: 320px;
}
.assessment-add-btn {
  flex-shrink: 0;
  min-width: 160px;
}
.assessment-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}
.assessment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.assessment-progress-section {
  width: 100%;
  min-width: 0;
}
.assessment-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.assessment-progress-head h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-family: var(--riyali-font-bold);
}
.assessment-progress-head p {
  margin: 4px 0 0;
  color: #7c858f;
}
.assessment-progress-head > span {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.assessment-progress-head svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.indicator-progress-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.indicator-progress-card {
  min-width: 0;
  min-height: 174px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(38, 75, 84, 0.045);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.indicator-progress-card:hover,
.indicator-progress-card:focus-visible {
  border-color: rgba(97, 181, 176, 0.28);
  box-shadow: 0 18px 38px rgba(38, 75, 84, 0.08);
  transform: translateY(-2px);
  outline: 0;
}
.indicator-progress-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: flex-start;
}
.indicator-progress-top h3 {
  min-width: 0;
  min-height: 42px;
  margin: 0 0 7px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  font-family: var(--riyali-font-bold);
}
.indicator-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.indicator-card-icon svg,
.indicator-edit-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
.indicator-progress-body {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.donut-progress {
  --progress: 0;
  --progress-color: var(--riyali-teal);
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 68%, transparent 69%),
    conic-gradient(var(--progress-color) calc(var(--progress) * 1%), #e8eef0 0);
  box-shadow: inset 0 0 0 1px rgba(31, 65, 72, 0.04);
}
.donut-progress span {
  color: #111827;
  font-size: 16px;
  font-family: var(--riyali-font-bold);
}
.indicator-values {
  min-width: 0;
  display: grid;
  gap: 10px;
}
.indicator-value-block {
  display: grid;
  gap: 2px;
}
.indicator-value-block span {
  color: #7c858f;
  font-size: 12.5px;
  font-family: var(--riyali-font-bold);
}
.indicator-value-block strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
  font-family: Arial, Tahoma, sans-serif;
}
.indicator-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.indicator-edit-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 181, 176, 0.18);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: white;
  cursor: pointer;
}
.indicator-edit-btn:hover {
  background: var(--riyali-teal-soft);
}
.assessment-chart-card {
  min-width: 0;
  grid-column: span 2;
}
.assessment-list-card {
  min-width: 0;
  grid-column: span 2;
}
.assessment-bars {
  display: grid;
  gap: 14px;
}
.assessment-bar-line {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: center;
}
.assessment-bar-line > div:first-child {
  display: grid;
  gap: 3px;
}
.assessment-bar-line strong {
  color: #111827;
}
.assessment-bar-line span {
  color: #7c858f;
  font-size: 12px;
}
.assessment-donut-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.8fr);
  gap: 14px;
  align-items: center;
}
.assessment-legend {
  display: grid;
  gap: 10px;
}
.assessment-legend span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6f7881;
  font-size: 13px;
}
.assessment-legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}
.assessment-list {
  display: grid;
  gap: 12px;
}
.assessment-list article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 65, 72, 0.07);
  border-radius: 16px;
  background: rgba(248, 252, 252, 0.74);
}
.assessment-list strong {
  min-width: 0;
  color: #111827;
}
.assessment-list small {
  color: #7c858f;
}
.assessment-list.compact article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.assessment-list.compact small {
  grid-column: 1 / -1;
}
.attention-compact-list article {
  border-color: rgba(245, 154, 35, 0.14);
}
.attention-compact-list b {
  color: #af6410;
}
.assessment-table-card {
  width: 100%;
  min-width: 0;
}
.assessment-table {
  overflow: hidden;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 20px;
  background: #fff;
}
.assessment-table-head,
.assessment-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(90px, 0.6fr) minmax(90px, 0.6fr) minmax(170px, 1fr) minmax(112px, 0.7fr) minmax(130px, 0.8fr) minmax(140px, 0.7fr);
  gap: 14px;
  align-items: center;
}
.assessment-table-head {
  padding: 14px 18px;
  color: #7c858f;
  background: rgba(248, 252, 252, 0.94);
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.assessment-table-body {
  display: grid;
}
.assessment-table-row {
  padding: 16px 18px;
  border-top: 1px solid rgba(31, 65, 72, 0.07);
}
.assessment-table-row > div {
  min-width: 0;
}
.assessment-table-row strong {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--riyali-font-bold);
}
.perspective-badge {
  width: fit-content;
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--badge-color);
  background: color-mix(in srgb, var(--badge-color) 12%, white);
  font-size: 12px;
  font-family: var(--riyali-font-medium);
}
.assessment-notes {
  overflow: hidden;
  color: #7c858f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assessment-table-footer {
  padding-top: 16px;
}
.assessment-drawer .drawer-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.financial-position-card {
  width: 100%;
  min-width: 0;
  border-color: rgba(97, 181, 176, 0.2);
}
.financial-position-head {
  align-items: center;
}
.financial-position-head h2,
.financial-subhead h3 {
  margin: 0;
}
.financial-position-head .riyali-eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
}
.financial-head-actions,
.financial-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.financial-head-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.financial-head-icon svg,
.financial-row-actions svg,
.financial-hidden-card svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.financial-position-body {
  display: grid;
  gap: 24px;
}
.financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.financial-summary-item {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(235, 249, 248, 0.9), #fff);
}
.financial-summary-item > span {
  color: #6f7881;
}
.financial-summary-item > strong {
  color: var(--riyali-teal);
  font-size: 24px;
}
.financial-summary-item.negative > strong,
.negative-value {
  color: #c44d43 !important;
}
.financial-row-actions button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 181, 176, 0.2);
  border-radius: 10px;
  color: var(--riyali-teal);
  background: #fff;
  cursor: pointer;
}
.financial-row-actions button.danger {
  color: #c44d43;
  border-color: rgba(196, 77, 67, 0.18);
}
.financial-table-block {
  min-width: 0;
  display: grid;
  gap: 10px;
}
.financial-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.financial-subhead span {
  color: #7c858f;
  font-size: 13px;
}
.financial-data-table {
  overflow-x: auto;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 16px;
}
.financial-table-row {
  min-width: 780px;
  display: grid;
  align-items: center;
  border-top: 1px solid rgba(31, 65, 72, 0.07);
}
.financial-table-row:first-child {
  border-top: 0;
}
.financial-table-row > * {
  min-width: 0;
  padding: 12px 14px;
}
.financial-contribution-value {
  display: grid;
  gap: 3px;
}
.financial-contribution-value b {
  color: inherit;
  font-weight: inherit;
}
.financial-contribution-value small {
  color: #7c858f;
  font-size: 11px;
}
.financial-contribution-value.not-deposited,
.financial-contribution-value.not-deposited small {
  color: var(--riyali-red, #c44d43);
}
.financial-table-row.head,
.financial-table-row.total {
  color: #164e52;
  background: rgba(97, 181, 176, 0.12);
  font-family: var(--riyali-font-bold);
}
.contribution-table .financial-table-row {
  grid-template-columns: minmax(150px, 1.25fr) repeat(5, minmax(90px, 0.75fr));
}
.contribution-table.has-actions .financial-table-row {
  grid-template-columns: minmax(150px, 1.25fr) repeat(5, minmax(90px, 0.75fr)) minmax(82px, 0.55fr);
}
.activities-financial-table .financial-table-row {
  min-width: 460px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.85fr);
}
.activities-financial-table.has-actions .financial-table-row {
  min-width: 560px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.85fr) minmax(82px, 0.55fr);
}
.financial-table-row.group {
  color: var(--riyali-teal);
  background: #fff;
  font-family: var(--riyali-font-bold);
}
.financial-table-row.net-assets {
  color: #fff;
  background: var(--riyali-teal);
}
.financial-table-row.net-assets.negative,
.financial-table-row.net-assets .negative-value {
  color: #fff !important;
}
.forecast-table .financial-table-row {
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(115px, 0.85fr));
}
.forecast-table.has-actions .financial-table-row {
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(115px, 0.85fr)) minmax(82px, 0.55fr);
}
.financial-hidden-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.financial-hidden-card > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.financial-hidden-card h2,
.financial-hidden-card p {
  margin: 0;
}
.financial-hidden-card p {
  margin-top: 4px;
  color: #7c858f;
}
.financial-form-group[hidden] {
  display: none;
}
.financial-year-fields,
.financial-forecast-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.financial-year-entry {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(31, 65, 72, 0.08);
  border-radius: 14px;
  background: rgba(248, 252, 252, 0.7);
}
.financial-deposit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #52616a;
  font-size: 13px;
  cursor: pointer;
}
.financial-deposit-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--riyali-teal);
}

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

@media (max-width: 720px) {
  .financial-summary-grid,
  .financial-year-fields,
  .financial-forecast-fields {
    grid-template-columns: 1fr;
  }
  .financial-position-head,
  .financial-hidden-card {
    align-items: stretch;
    flex-direction: column;
  }
  .financial-head-actions {
    flex-wrap: wrap;
  }
}
.details-list {
  display: grid;
  gap: 10px;
}
.details-list article {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 65, 72, 0.07);
}
.details-list span {
  color: #7c858f;
}
.details-list strong {
  min-width: 0;
  color: #111827;
}
.details-list .wide {
  grid-template-columns: 1fr;
}
.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.department-management-card {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(32, 92, 100, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(38, 75, 84, 0.07);
}
.department-management-card.inactive {
  border-color: rgba(217, 83, 79, 0.18);
}
.department-card-head,
.department-card-actions {
  align-items: center;
  gap: 12px;
}
.department-actions-menu {
  position: relative;
  justify-self: end;
}
.department-actions-menu summary {
  list-style: none;
}
.department-actions-menu summary::-webkit-details-marker {
  display: none;
}
.department-actions-panel {
  position: absolute;
  z-index: 8;
  top: 42px;
  right: auto;
  left: 0;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(31, 65, 72, 0.1);
  border-radius: 14px;
  background: white;
  box-shadow: 0 18px 44px rgba(38, 75, 84, 0.16);
}
.department-actions-panel button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  color: #36424c;
  background: transparent;
  font-family: var(--riyali-font-medium);
}
.department-actions-panel button:hover {
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.department-actions-panel button.danger {
  color: #b3332f;
}
.department-actions-panel button.danger:hover {
  color: #b3332f;
  background: rgba(217, 83, 79, 0.1);
}
.department-actions-panel svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.department-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 42px;
  align-items: flex-start;
  direction: rtl;
}
.department-card-head > div {
  min-width: 0;
  text-align: right;
  justify-self: stretch;
}
.department-card-head h2 {
  margin: 0;
  color: #111827;
  font-family: var(--riyali-font-bold);
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: keep-all;
}
.department-card-head p {
  margin: 8px 0 0;
  overflow: hidden;
  color: #75808a;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.department-status-pill {
  width: fit-content;
}
.department-card-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.department-card-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.department-progress-block {
  display: grid;
  gap: 8px;
}
.department-progress-block span {
  color: #75808a;
  font-size: 13px;
}
.department-progress-block strong {
  color: var(--riyali-teal);
  font-size: 30px;
  line-height: 1;
}
.department-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f2;
}
.department-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.department-progress b.good { background: #79b763; }
.department-progress b.warn { background: #f59a23; }
.department-progress b.bad { background: #d9534f; }
.department-card-stats {
  display: grid;
  grid-template-columns: minmax(112px, 1.25fr) repeat(2, minmax(72px, 0.875fr));
  border-top: 1px solid rgba(31, 65, 72, 0.08);
  border-bottom: 1px solid rgba(31, 65, 72, 0.08);
}
.department-card-stats div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-left: 1px solid rgba(31, 65, 72, 0.08);
  text-align: center;
}
.department-card-stats div:last-child {
  border-left: 0;
}
.department-card-stats span {
  color: #75808a;
  font-size: 12px;
}
.department-card-stats strong {
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--riyali-font-bold);
  font-size: 17px;
}
.department-card-stats div:first-child strong {
  font-size: 16px;
  overflow: visible;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  line-height: 1.35;
}
.danger-text {
  color: #d9534f !important;
}
.department-card-actions {
  display: grid;
  grid-template-columns: 1fr;
}
.dept-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(3, 176, 170, 0.16);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: white;
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.dept-action.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #2f948d, var(--riyali-teal));
}
.dept-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.drawer-backdrop {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}
.side-drawer {
  width: min(520px, 100%);
  height: 100vh;
  overflow-y: auto;
  padding: 26px;
  border-left: 1px solid rgba(32, 92, 100, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -24px 0 60px rgba(38, 75, 84, 0.12);
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.drawer-head span {
  color: var(--riyali-teal);
  font-family: var(--riyali-font-medium);
}
.drawer-head h2,
.members-section h3 {
  margin: 4px 0 0;
  color: #111827;
  font-family: var(--riyali-font-bold);
}
.drawer-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.drawer-actions {
  margin-top: 10px;
}
.members-drawer {
  width: min(620px, 100%);
}
.members-section {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(32, 92, 100, 0.08);
  border-radius: 20px;
  background: rgba(248, 252, 252, 0.82);
}
.drawer-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.department-members-list {
  display: grid;
  gap: 10px;
}
.department-member-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(31, 65, 72, 0.07);
  border-radius: 16px;
  background: white;
}
.department-member-row div {
  min-width: 0;
}
.department-member-row strong,
.department-member-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.department-member-row span:not(.mini-avatar) {
  color: #75808a;
  font-size: 13px;
}

.my-page {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.my-dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}
.my-dashboard-head > div {
  min-width: 0;
}
.header-actions-toolbar {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  padding: 14px 18px;
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(38, 75, 84, 0.055);
  direction: rtl;
  margin-top: -8px;
}
.department-control {
  flex: 1 1 300px;
  min-width: min(300px, 100%);
  max-width: 520px;
}
.header-actions-toolbar .department-selector,
.header-actions-toolbar .department-badge {
  width: 100%;
  box-shadow: none;
}
.add-kpi-button {
  min-height: 52px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #2f948d, var(--riyali-teal));
  box-shadow: 0 14px 28px rgba(3, 176, 170, 0.18);
  font-family: var(--riyali-font-bold);
  font-size: 15px;
}
.add-kpi-button:hover {
  background: linear-gradient(135deg, #267f79, #249c98);
}
.add-kpi-button:active {
  transform: translateY(1px);
}
.add-kpi-button:focus-visible {
  outline: 3px solid rgba(3, 176, 170, 0.22);
  outline-offset: 3px;
}
.add-kpi-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.department-selector,
.department-badge {
  width: min(260px, 100%);
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(38, 75, 84, 0.06);
}
.department-selector {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}
.department-selector .select {
  min-height: 44px;
  padding-right: 10px;
}
.department-select-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
}
.department-select-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.department-selector span,
.department-badge span {
  color: #7c858f;
  font-size: 13px;
}
.department-badge strong {
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
}
.my-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  min-width: 0;
}
.my-card {
  grid-column: span 6;
  width: 100%;
  min-width: 0;
  min-height: 310px;
}
.performance-widget,
.my-status-widget,
.my-attention-card,
.near-due-card {
  grid-column: span 6;
}
.performance-card-body {
  display: grid;
  gap: 18px;
}
.performance-card-body h3 {
  margin: 0 0 12px;
  color: var(--riyali-teal);
  font-family: var(--riyali-font-bold);
  font-size: 22px;
}
.progress-ring {
  width: min(150px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  margin-inline: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 56%, transparent 57%),
    conic-gradient(var(--riyali-teal) calc(var(--progress) * 1%), #edf1f2 0);
}
.progress-ring strong {
  color: #116b73;
  font-size: 30px;
}
.progress-ring span {
  color: #6f7780;
  font-size: 12px;
}
.performance-lines {
  display: grid;
  gap: 10px;
}
.performance-lines p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: #6f7780;
  background: #f6fafb;
  text-align: center;
}
.performance-lines p.below { color: #b3332f; background: rgba(217, 83, 79, 0.08); }
.performance-lines p.above { color: #4d843d; background: rgba(137, 189, 112, 0.15); }
.mini-metric-line {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 8px;
  align-items: center;
}
.mini-metric-line span { color: #7c858f; }
.mini-metric-line strong { text-align: left; }
.mini-metric-line i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f2;
}
.mini-metric-line b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}
.mini-metric-line i.teal { color: var(--riyali-teal); }
.mini-metric-line i.gray { color: #9aa0a6; }
.my-status-card {
  display: grid;
  gap: 12px;
}
.status-mini-list {
  display: grid;
  gap: 8px;
}
.status-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #17202c;
}
.status-mini-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-mini-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.my-attention-list,
.near-due-list {
  display: grid;
  gap: 10px;
}
.my-attention-item,
.near-due-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(31, 65, 72, 0.07);
  border-radius: 16px;
  background: rgba(248, 252, 252, 0.76);
}
.my-attention-item div,
.near-due-list article div {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.my-attention-item strong,
.near-due-list strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.my-attention-item span,
.near-due-list span {
  color: #75808a;
  font-size: 12px;
}
.icon-action,
.row-actions button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(3, 176, 170, 0.14);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: white;
}
.icon-action svg,
.row-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.near-due-list article {
  grid-template-columns: minmax(0, 1fr) auto;
}
.my-table-card,
.my-priority-card {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  min-height: auto;
}
.my-filter-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}
.my-filter-toolbar > .input,
.my-filter-toolbar > .btn {
  min-height: 64px;
}
.my-filter-toolbar .toolbar-icon-select {
  width: 100%;
}
.department-control .toolbar-icon-select {
  width: 100%;
  box-shadow: none;
}
.my-table-wrap,
.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.my-table-wrap {
  overflow: visible;
  border-radius: 22px;
}
.kpi-smart-table {
  display: grid;
  gap: 0;
  border: 1px solid rgba(31, 65, 72, 0.08);
  background: white;
  box-shadow: 0 16px 40px rgba(38, 75, 84, 0.06);
}
.kpi-smart-head,
.kpi-smart-row {
  display: grid;
  grid-template-columns: minmax(0, 2.45fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.05fr) 84px 116px;
  gap: 14px;
  align-items: center;
}
.kpi-smart-head {
  padding: 14px 18px;
  color: #7c858f;
  background: rgba(248, 252, 252, 0.94);
  font-family: var(--riyali-font-medium);
  font-size: 13px;
}
.kpi-smart-body {
  display: grid;
}
.kpi-smart-row {
  position: relative;
  padding: 18px;
  border-top: 1px solid rgba(31, 65, 72, 0.07);
  transition: background 0.18s ease;
}
.kpi-smart-row:hover {
  background: rgba(248, 252, 252, 0.74);
}
.kpi-smart-row > div {
  min-width: 0;
}
.kpi-main-cell,
.kpi-owner-cell,
.kpi-progress-cell,
.kpi-classification-cell {
  display: grid;
  gap: 7px;
}
.kpi-main-cell strong {
  color: #111827;
  font-family: var(--riyali-font-bold);
  font-size: 15px;
}
.kpi-main-cell span,
.kpi-owner-cell span,
.kpi-date-line {
  color: #75808a;
  font-size: 13px;
}
.kpi-owner-cell {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}
.kpi-owner-cell div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.kpi-owner-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
  font-size: 14px;
}
.kpi-owner-cell > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi-owner-cell .mini-avatar {
  width: 30px;
  height: 30px;
}
.kpi-progress-values {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.kpi-progress-values strong {
  color: #111827;
  font-size: 15px;
}
.kpi-progress-values span {
  color: #6f7780;
  font-family: Arial, Tahoma, sans-serif;
  font-size: 13px;
}
.kpi-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f2;
}
.kpi-progress-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.kpi-progress-track b.good { background: #79b763; }
.kpi-progress-track b.active { background: #3498d8; }
.kpi-progress-track b.warn { background: #f59a23; }
.kpi-progress-track b.bad,
.kpi-progress-track b.delayed { background: #d9534f; }
.kpi-badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kpi-date-line {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
  color: #75808a;
  font-size: 12.5px;
}
.kpi-date-line span + span::before {
  content: "·";
  margin-left: 4px;
  color: #a0a8af;
}
.kpi-action-cell {
  display: flex;
  justify-content: center;
  gap: 7px;
  position: relative;
}
.kpi-history-cell { display: flex; align-items: center; justify-content: center; gap: 8px; }
.kpi-mobile-history-label { display: none; }
.kpi-achievement-modal .modal-head p { margin: 6px 0 0; }
.kpi-achievement-history { width: min(100%, 1000px); }
.achievement-notes { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 160px; }
.achievement-history-table { min-width: 680px; }
.status-legend button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
button.status-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf0f2;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
button.status-row:hover { background: #f0f8f8; }
button.status-row:focus-visible,
.status-legend button:focus-visible { outline: 2px solid #56b1b0; outline-offset: -2px; }
.status-kpis-modal { width: min(100%, 1100px); max-height: 85vh; overflow: auto; }
.status-kpis-table { min-width: 720px; }
.all-departments-performance { display: grid; gap: 16px; }
.institution-performance-ring { text-align: center; padding-bottom: 12px; }
.institution-performance-ring h3 { color: var(--riyali-teal); margin: 0 0 16px; }
.department-performance-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
}
.department-performance-line { display: grid; gap: 6px; }
@font-face {
  font-family: "BudgetLatinDigits";
  src: local("Arial");
  unicode-range: U+0030-0039;
}
.budget-page, .budget-edit-modal, body:has(.budget-page) .confirm-modal {
  --riyali-font-regular: "BudgetLatinDigits", "din_R", Tahoma, sans-serif;
  --riyali-font-medium: "BudgetLatinDigits", "din_M", Tahoma, sans-serif;
  --riyali-font-bold: "BudgetLatinDigits", "din_B", Tahoma, sans-serif;
  font-family: var(--riyali-font-medium);
}
.budget-unified-chart svg text { font-family: "BudgetLatinDigits", "din_M", Tahoma, sans-serif; }
.budget-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.budget-page > * { grid-column: 1 / -1; min-width: 0; }
.budget-page > .dashboard-head { margin-bottom: 0; }
.budget-difference-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.budget-difference-values > div { display: grid; gap: 10px; background: #f0f8f8; border-radius: 14px; padding: 18px; }
.budget-difference-values strong { font-size: 22px; color: #3b6e79; overflow-wrap: anywhere; }
@media (max-width: 700px) { .budget-difference-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.budget-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.3fr);
  gap: 20px;
  align-items: end;
  padding: 22px;
  background: white;
  border: 1px solid #e6eeee;
  border-radius: 22px;
}
.budget-total-summary { display: grid; gap: 8px; padding: 14px; background: #f0f8f8; border-radius: 16px; color: #3b6e79; }
.budget-total-summary strong { font-size: 24px; }
.budget-plan-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.budget-plan-head h2 { margin: 0 0 12px; }
.budget-plan-head .muted { margin-inline-start: 12px; }
.budget-table { min-width: 680px; }
.budget-unified-chart { width: 100%; overflow-x: auto; overflow-y: hidden; direction: ltr; }
.budget-unified-chart svg { display: block; min-width: 100%; max-width: none; flex-shrink: 0; }
.budget-comparison-backdrop { padding: 16px; z-index: 50; }
.budget-edit-modal.budget-comparison-modal { width: min(1600px, 98vw); height: 94vh; max-height: 94vh; display: flex; flex-direction: column; overflow: hidden; padding: 24px; }
.budget-comparison-modal .modal-head { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.budget-detail-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-bottom: 16px; flex-shrink: 0; }
.budget-detail-body { overflow: auto; min-height: 0; padding: 0 4px 12px; overscroll-behavior: contain; }
.budget-comparison-modal .budget-unified-chart { margin: 24px 0; padding-bottom: 16px; }
.budget-detail-table { max-height: 48vh; overflow: auto; }
.budget-detail-table thead th { position: sticky; top: 0; background: #f1f8f8; z-index: 1; white-space: nowrap; }
.budget-detail-table td.num { white-space: nowrap; }
.budget-item-drill { border: 0; background: transparent; color: #20656a; text-align: start; font: inherit; font-weight: bold; cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.budget-item-drill[aria-expanded="true"] { color: #8054a1; }
.budget-monthly-detail:not(:empty) { margin-top: 24px; padding: 20px; border: 1px solid #d6e2e4; border-radius: 16px; background: #f8fbfb; }
@media (max-width: 640px) {
  .budget-comparison-backdrop { padding: 6px; }
  .budget-edit-modal.budget-comparison-modal { width: 100%; height: 96dvh; max-height: 96dvh; padding: 14px; }
  .budget-detail-controls { grid-template-columns: 1fr; gap: 10px; }
  .budget-comparison-modal .modal-head h2 { font-size: 20px; }
}
.budget-comparison-legend { display: flex; flex-wrap: wrap; gap: 24px; margin: 20px 0; }
.budget-comparison-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 8px; }
.budget-comparison .budget-series-current { background: #398b89; }
.budget-comparison .budget-series-previous { background: #b97831; }
.budget-comparison-rows { max-height: 240px; overflow-y: auto; padding-inline-end: 8px; }
.budget-comparison-scale { display: flex; justify-content: space-between; color: #7c858f; font-size: 12px; }
.budget-comparison-row { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 7px 0; border-bottom: 1px solid #e6eeee; }
.budget-comparison-row > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.budget-comparison .budget-chart-head h2 { font-size: 18px; }
.budget-comparison .budget-chart-head p { margin: 4px 0; font-size: 14px; color: #52616a; }
.budget-comparison .budget-comparison-legend { margin: 12px 0; font-size: 15px; color: #33434d; }
.budget-comparison-series .budget-chart-track { height: 10px; }
@media (max-width: 700px) { .budget-comparison-row { grid-template-columns: 1fr; gap: 3px; } }
.budget-comparison-series { display: grid; grid-template-columns: 50px minmax(60px, 1fr) minmax(90px, auto); align-items: center; gap: 12px; margin: 8px 0; }
.budget-comparison-series .budget-chart-track { width: 100%; grid-column: auto; grid-row: auto; }
.budget-comparison-series .budget-chart-track span { display: block; height: 100%; }
.budget-sort-button { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 4px 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.budget-sort-button:hover { color: #3b6e79; }
.budget-sort-button:focus-visible { outline: 2px solid #3b6e79; outline-offset: 4px; border-radius: 4px; }
.budget-sort-arrow { opacity: 0.45; }
.budget-sort-arrow.active { opacity: 1; color: #3b6e79; }
.budget-item-name { display: block; }
.budget-item-description { margin: 6px 0 0; color: #7c858f; font-size: 0.9em; font-weight: normal; }
.budget-chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.budget-chart-head h2 { margin: 0 0 10px; }
.budget-chart-head > strong { color: #3b6e79; font-size: 26px; }
.budget-chart-bars { display: grid; gap: 12px; margin-top: 20px; }
.budget-chart-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(100px, 3fr) minmax(90px, auto);
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.budget-chart-row:hover, .budget-chart-row.selected { background: #f0f8f8; border-color: #d5e9e9; }
.budget-chart-row:focus-visible { outline: 2px solid #56b1b0; }
.budget-chart-label { display: grid; gap: 5px; }
.budget-chart-label small { color: #7c858f; }
.budget-chart-track { display: block; height: 18px; background: #edf1f2; border-radius: 9px; overflow: hidden; }
.budget-chart-track > span { display: block; height: 100%; background: var(--riyali-teal); border-radius: inherit; }
.budget-chart-row > .num { text-align: end; white-space: nowrap; }
.budget-chart-hint { margin-bottom: 0; font-size: 13px; }
@media (max-width: 700px) {
  .budget-chart-row { grid-template-columns: 1fr auto; gap: 10px; }
  .budget-chart-track { grid-column: 1 / -1; grid-row: 2; }
}
.budget-table td:not(.num), .budget-changes-table td { white-space: pre-wrap; overflow-wrap: anywhere; }
.budget-table tfoot { background: #f0f8f8; }
.budget-plan-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.budget-details { margin-top: 18px; border-top: 1px solid #e6eeee; padding-top: 14px; }
.budget-details summary { cursor: pointer; color: #3b6e79; padding: 8px 0; font-weight: bold; }
.budget-changes-table { min-width: 600px; }
.budget-changes-table p { margin: 6px 0; }
.budget-review-note { padding: 14px; background: #fff5e7; border-radius: 12px; white-space: pre-wrap; }
.budget-history-event { display: grid; gap: 8px; border-bottom: 1px solid #edf0f2; padding: 14px 0; }
.budget-history-event > span { color: #7c858f; font-size: 13px; }
.budget-edit-modal { width: min(100%, 720px); }
.indicator-filter-group { display: flex; align-items: center; gap: 12px; max-width: 740px; flex-wrap: wrap; }
.indicator-filter-group > .toolbar-icon-select:not(.indicator-year-select) { flex: 1 1 230px; width: auto; min-width: 0; }
.indicator-filter-group > .indicator-year-select,
.assessment-page .indicator-year-select,
.indicator-year-select { flex: 0 0 180px; width: 180px; min-width: 160px; max-width: 200px; }
.indicator-dashboard-filter { display: flex; margin: -8px 0 24px; }
.topbar > .indicator-year-select { direction: rtl; margin: 0; flex: 0 0 190px; background: white; border-radius: 24px; }
.topbar .indicator-year-select .select { direction: rtl; text-align: right; }
.system-years-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.system-year-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.system-year-form .field { margin: 0; max-width: 240px; }
@media (max-width: 600px) {
  .indicator-filter-group > .indicator-year-select,
  .assessment-page .indicator-year-select { flex: 1 1 160px; max-width: none; }
}
.budget-project-combo { position: relative; }
.budget-project-combo > .input { width: 100%; padding-inline-end: 48px; }
.budget-project-toggle { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #396c70; font-size: 24px; cursor: pointer; padding: 6px 10px; }
.budget-project-suggestions { position: absolute; top: calc(100% + 5px); inset-inline: 0; max-height: 220px; overflow-y: auto; background: white; border: 1px solid #d6e2e4; border-radius: 14px; box-shadow: 0 10px 28px #24484d22; z-index: 5; padding: 6px; }
.budget-project-suggestions[hidden] { display: none; }
.budget-project-suggestions > button { display: block; width: 100%; border: 0; background: transparent; text-align: start; padding: 12px; font: inherit; color: #24484d; border-radius: 8px; cursor: pointer; }
.budget-project-suggestions > button:hover, .budget-project-suggestions > button[aria-selected="true"] { background: #edf7f6; }
.budget-project-suggestions > p { padding: 8px 12px; margin: 0; }
.budget-project-heading { background: #dcefeb; }
.budget-table .budget-project-heading > th, .budget-table .budget-project-heading > td { background: #dcefeb; color: #245e63; border-top: 2px solid #b8d9d2; padding-top: 16px; padding-bottom: 16px; }
.budget-project-heading th:first-child { text-align: start; }
.budget-project-heading strong, .budget-project-heading small, .budget-project-eyebrow { display: block; }
.budget-project-heading strong { color: #245e63; font-size: 18px; margin: 4px 0; }
.budget-project-heading small, .budget-project-eyebrow { color: #667b80; font-size: 12px; font-weight: normal; }
.budget-project-heading ~ tr:not(.budget-project-heading) td:first-child { padding-inline-start: 26px; }
.budget-category-heading { background: #faf1e4; }
.budget-table .budget-category-heading > th, .budget-table .budget-category-heading > td { background: #faf1e4; color: #785b33; }
.budget-category-heading th:first-child { text-align: start; padding-inline-start: 26px; }
.budget-category-heading strong, .budget-category-heading small { display: block; }
.budget-category-heading strong { color: #785b33; margin: 4px 0; }
.budget-category-heading small { color: #667b80; font-size: 12px; font-weight: normal; }
.budget-project-heading ~ tr.budget-category-detail td:first-child { padding-inline-start: 44px; }
.budget-category-detail .budget-item-description { margin: 0; color: #52616a; }
.department-assignments { grid-column: 1 / -1; border: 1px solid #d6e2e4; border-radius: 16px; padding: 16px; min-width: 0; }
.department-assignments legend { font-weight: bold; padding: 0 8px; }
.department-assignment-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf1f2; }
.department-assignment-row .field { grid-column: 1 / -1; }
.department-assignment-row > label:not(.field) { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.assignment-history { margin-top: 12px; padding: 12px; border-radius: 10px; background: #f1f8f8; }
@media (max-width: 700px) { .budget-toolbar { grid-template-columns: 1fr; } }
.department-average-comparison { color: #7c858f; font-size: 13px; }
.department-average-comparison.above { color: #4d843d; }
.department-average-comparison.below { color: #b3332f; }
button.status-mini-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
button.status-mini-row:hover { background: #f0f8f8; }
button.status-mini-row:focus-visible { outline: 2px solid #56b1b0; outline-offset: 2px; }
.achievement-month-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}
.achievement-month-actions .kpi-icon-btn { flex: 0 0 auto; }
@media (max-width: 960px) {
  .kpi-history-cell { justify-content: flex-start; }
  .kpi-mobile-history-label { display: inline; color: #7c858f; }
}
.kpi-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(3, 176, 170, 0.14);
  border-radius: 12px;
  color: var(--riyali-teal);
  background: white;
  cursor: pointer;
}
.kpi-icon-btn:hover {
  background: var(--riyali-teal-soft);
}
.kpi-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.kpi-details {
  position: relative;
}
.kpi-details summary {
  list-style: none;
}
.kpi-details summary::-webkit-details-marker {
  display: none;
}
.kpi-details-panel {
  position: absolute;
  z-index: 6;
  top: 42px;
  left: 0;
  width: min(720px, calc(100vw - var(--sidebar-width) - 70px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(31, 65, 72, 0.1);
  border-radius: 18px;
  background: white;
  box-shadow: 0 24px 70px rgba(38, 75, 84, 0.18);
}
.kpi-details-panel div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(248, 252, 252, 0.82);
}
.kpi-details-panel span {
  color: #7c858f;
  font-size: 12px;
}
.kpi-details-panel strong {
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
}
.clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.priority-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--riyali-font-medium);
}
.priority-badge.red { color: #b3332f; background: rgba(217, 83, 79, 0.12); }
.priority-badge.orange { color: #af6410; background: rgba(245, 154, 35, 0.14); }
.priority-badge.green { color: #4d843d; background: rgba(137, 189, 112, 0.18); }
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.mini-avatar {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-size: 12px;
}
.mini-avatar-fallback {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: inherit;
}
.mini-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.overdue-date { color: #b3332f; }
.row-actions {
  display: flex;
  gap: 6px;
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #75808a;
}
.table-footer label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.table-footer select {
  width: 92px;
  text-align: center;
  font-family: Arial, Tahoma, sans-serif;
}
.pagination {
  display: inline-flex;
  gap: 6px;
  direction: rtl;
}
.pagination button,
.page-ellipsis {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  font-family: Arial, Tahoma, sans-serif;
}
.pagination button {
  border: 1px solid rgba(32, 92, 100, 0.1);
  border-radius: 10px;
  color: #66717a;
  background: white;
}
.pagination button.active {
  color: white;
  background: var(--riyali-teal);
}
.pagination button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.pagination .page-nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}
.page-ellipsis {
  color: #8a949d;
}
.my-priority-stack .priority-items {
  align-items: stretch;
}

@media (max-width: 1199px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    --sidebar-width: 0px;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-collapsed .sidebar {
    padding: 28px 22px;
  }
  .sidebar-collapsed .side-brand .brand-mark {
    width: 150px;
    height: 92px;
  }
  .sidebar-collapsed .side-nav {
    align-items: stretch;
    margin-top: 10px;
  }
  .sidebar-collapsed .nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: var(--riyali-radius-pill);
  }
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-footer-text {
    display: inline;
  }
  .main {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
  }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-summary-grid,
  .user-summary-grid,
  .assessment-summary-grid,
  .assessment-grid,
  .indicator-progress-grid,
  .departments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-card,
  .department-card,
  .status-card-home,
  .attention-card,
  .trend-card,
  .priority-card { grid-column: auto; }
  .status-card, .layout-2, .reports-grid { grid-template-columns: 1fr; }
  .status-compact { grid-template-columns: 1fr; }
  .toolbar, .my-filter-toolbar, .users-filter-grid, .assessment-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-toolbar { grid-template-columns: 1fr; }
  .my-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .my-card,
  .performance-widget,
  .my-status-widget,
  .my-attention-card,
  .near-due-card { grid-column: span 6; }
  .sidebar-footer { display: none; }
}

@media (max-width: 960px) {
  .kpi-smart-head,
  .assessment-table-head,
  .users-smart-head {
    display: none;
  }
  .kpi-smart-table,
  .assessment-table,
  .users-smart-table {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .kpi-smart-body,
  .assessment-table-body,
  .users-smart-body {
    gap: 12px;
  }
  .kpi-smart-row,
  .assessment-table-row,
  .users-smart-row {
    grid-template-columns: 1fr;
    gap: 14px;
    border: 1px solid rgba(31, 65, 72, 0.08);
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 30px rgba(38, 75, 84, 0.05);
  }
  .assessment-table-row {
    min-width: 0;
  }
  .kpi-owner-cell {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .kpi-action-cell {
    justify-content: flex-start;
    padding-top: 4px;
  }
  .user-action-cell {
    justify-content: flex-start;
  }
  .kpi-details-panel {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
    box-shadow: none;
  }
}

@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-panel { padding: 28px; }
  .login-visual { min-height: 280px; padding: 28px; }
  .main {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }
  .topbar, .page-head { align-items: stretch; flex-direction: column; }
  .cards, .summary-grid, .dashboard-grid, .toolbar, .form-grid, .my-filter-toolbar { grid-template-columns: 1fr; }
  .departments-toolbar,
  .users-toolbar,
  .assessment-toolbar,
  .users-filter-grid,
  .assessment-filter-grid,
  .department-summary-grid,
  .user-summary-grid,
  .assessment-summary-grid,
  .assessment-grid,
  .indicator-progress-grid,
  .departments-grid,
  .department-card-stats,
  .department-card-actions,
  .drawer-inline-form {
    grid-template-columns: 1fr;
  }
  .departments-toolbar {
    display: grid;
  }
  .user-drawer .drawer-form,
  .assessment-drawer .drawer-form,
  .user-detail-list > div {
    grid-template-columns: 1fr;
  }
  .assessment-donut-layout,
  .assessment-bar-line,
  .details-list article {
    grid-template-columns: 1fr;
  }
  .department-card-stats div {
    border-left: 0;
    border-bottom: 1px solid rgba(31, 65, 72, 0.08);
  }
  .department-card-stats div:last-child {
    border-bottom: 0;
  }
  .side-drawer {
    width: 100%;
  }
  .my-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .dashboard-card,
  .department-card,
  .status-card-home,
  .attention-card,
  .trend-card,
  .priority-card { grid-column: auto; }
  .status-card { padding: 18px; }
  .status-table-head,
  .status-row {
    grid-template-columns: 1fr 52px 112px;
    padding: 0 12px;
  }
  .donut-wrap { width: min(300px, 100%); }
  .compact-row,
  .attention-item,
  .due-list > div,
  .priority-items {
    grid-template-columns: 1fr;
  }
  .executive-summary { grid-template-columns: 1fr; }
  .my-dashboard-head,
  .table-footer {
    display: grid;
  }
  .department-selector,
  .department-badge {
    min-width: 0;
  }
  .my-card,
  .performance-widget,
  .my-status-widget,
  .my-attention-card,
  .near-due-card,
  .my-table-card,
  .my-priority-card {
    grid-column: 1 / -1;
  }
  .header-actions-toolbar {
    align-items: stretch;
    padding: 16px;
  }
  .department-control,
  .add-kpi-button {
    width: 100%;
    max-width: 100%;
  }
  .kpi-details-panel {
    grid-template-columns: 1fr;
  }
  .kpi-action-cell {
    width: 100%;
  }
  .kpi-icon-btn {
    width: 38px;
    height: 38px;
  }
  .btn { width: 100%; }
}

@media (max-width: 768px) {
  .assessment-page .assessment-toolbar,
  .users-page .users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .assessment-page .assessment-filter-grid,
  .users-page .users-filter-grid {
    flex-direction: column;
    align-items: stretch;
    flex-basis: auto;
  }
  .assessment-page .toolbar-search,
  .assessment-page .toolbar-filter,
  .assessment-page .assessment-add-btn,
  .users-page .toolbar-search,
  .users-page .toolbar-filter,
  .users-page .add-user-button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
.marketing-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.marketing-head,
.marketing-insights-grid,
.marketing-table-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

.marketing-head {
  margin-bottom: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.marketing-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.marketing-head-actions label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.marketing-head-actions .select {
  min-width: 120px;
}

.marketing-head-actions .btn {
  white-space: nowrap;
}

.marketing-insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  min-width: 0;
  clear: both;
}

.marketing-insights-grid > .marketing-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  align-self: start;
}

.marketing-card,
.marketing-table-card {
  min-width: 0;
}

.marketing-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}

.marketing-result-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(21, 97, 93, 0.1);
  border-radius: 22px;
  background: linear-gradient(160deg, #fff 0%, rgba(248, 252, 251, 0.9) 100%);
  box-shadow: 0 10px 24px rgba(31, 65, 72, 0.045);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.marketing-result-card.interactive {
  cursor: pointer;
}

.marketing-result-card.interactive:hover,
.marketing-result-card.interactive:focus-visible {
  outline: none;
  transform: translateY(-3px);
  border-color: rgba(42, 167, 155, 0.3);
  box-shadow: 0 16px 34px rgba(31, 65, 72, 0.09);
}

.marketing-result-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.marketing-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--riyali-teal);
  background: rgba(42, 167, 155, 0.09);
}

.marketing-card-icon svg {
  width: 21px;
  height: 21px;
}

.marketing-result-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.marketing-category-pill {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #447b76;
  background: rgba(95, 181, 173, 0.11);
  font-size: 12px;
  font-weight: 900;
}

.marketing-result-card-body {
  display: grid;
  place-items: center;
  padding: 4px 0;
}

.marketing-result-donut {
  --progress: 0;
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-content: center;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: conic-gradient(var(--riyali-teal) calc(var(--progress) * 1%), #e8eef0 0);
}

.marketing-result-donut::before {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: #fff;
}

.marketing-donut-value {
  position: relative;
  z-index: 1;
  max-width: 96px;
  display: flex;
  direction: rtl;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.marketing-donut-value strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.marketing-donut-value em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.marketing-distribution {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.75fr);
  align-items: center;
  gap: 20px;
}

.marketing-category-list {
  display: grid;
  gap: 12px;
}

.marketing-category-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(21, 97, 93, 0.08);
}

.marketing-category-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.marketing-category-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.marketing-category-list strong {
  color: var(--ink);
  font-weight: 900;
}

.marketing-category-list small {
  color: var(--muted);
  font-weight: 900;
}

.marketing-table {
  overflow: hidden;
  border: 1px solid rgba(21, 97, 93, 0.08);
  border-radius: 22px;
}

.marketing-table-head,
.marketing-table-row {
  display: grid;
  grid-template-columns: minmax(135px, 0.75fr) minmax(245px, 1.45fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(135px, 0.75fr) minmax(145px, 0.85fr) 132px;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
}

.marketing-table-head {
  background: rgba(248, 252, 251, 0.86);
  color: var(--muted);
  font-weight: 900;
}

.marketing-table-row {
  border-top: 1px solid rgba(21, 97, 93, 0.08);
  color: var(--muted);
  font-weight: 800;
}

.marketing-table-row > .marketing-item-name {
  color: var(--ink);
  font-size: 18px;
}

.marketing-target {
  color: #447b76;
  font-size: 17px;
  font-weight: 900;
}

.marketing-target-empty {
  color: #a0a8ae;
  font-size: 20px;
  font-weight: 900;
}

.aggregation-badge {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #236f69;
  background: rgba(95, 181, 173, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.aggregation-badge.average {
  color: #9a5d10;
  background: rgba(240, 163, 58, 0.16);
}

.marketing-month-coverage {
  display: grid;
  gap: 7px;
}

.marketing-month-coverage > i {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 140, 151, 0.13);
}

.marketing-month-coverage > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--riyali-teal);
}

.marketing-result {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.marketing-compact-number,
.marketing-year-heading {
  display: inline-flex;
  direction: rtl;
  align-items: baseline;
  justify-content: flex-start;
  gap: 5px;
  white-space: nowrap;
}

.marketing-compact-number strong,
.marketing-year-heading b {
  color: inherit;
  font: inherit;
}

.marketing-compact-number em {
  font-style: normal;
  font-weight: 900;
}

.marketing-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
}

.marketing-empty-row {
  padding: 34px 22px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.marketing-item-modal {
  width: min(720px, 100%);
}

.marketing-monthly-modal {
  width: min(980px, 100%);
}

.marketing-monthly-modal .modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.marketing-monthly-modal .modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.marketing-calculation-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(21, 97, 93, 0.1);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(248, 252, 251, 0.8);
  font-weight: 900;
}

.marketing-calculation-note strong {
  color: var(--riyali-teal);
  font-size: 24px;
}

.marketing-month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.marketing-month-grid .field span {
  font-size: 13px;
}

.marketing-month-actions {
  margin-top: 20px;
}

.roles-permissions-card {
  min-width: 0;
}

.roles-toolbar {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  border: 1px solid rgba(20, 120, 120, 0.12);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  flex-wrap: wrap;
}

.roles-toolbar-filters {
  flex: 1 1 620px;
  display: flex;
  direction: rtl;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.roles-toolbar .roles-search,
.roles-toolbar .toolbar-icon-select {
  flex: 1 1 220px;
  min-width: 190px;
  max-width: 320px;
}

.roles-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(21, 97, 93, 0.08);
  border-radius: 22px;
}

.roles-table-head,
.roles-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
}

.roles-table-head {
  background: rgba(248, 252, 251, 0.78);
  color: var(--muted);
  font-weight: 900;
}

.roles-table-row {
  border-top: 1px solid rgba(21, 97, 93, 0.08);
  color: var(--ink);
  font-weight: 800;
}

.roles-table-row strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.roles-table-row span {
  color: var(--muted);
}

.role-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.role-actions button.danger {
  color: #b3332f;
  border-color: rgba(179, 51, 47, 0.16);
  background: rgba(179, 51, 47, 0.04);
}

.role-drawer {
  width: min(640px, 100%);
}

.field-help {
  display: block;
  margin-top: -6px;
  color: var(--muted);
  font-weight: 800;
}

.permissions-drawer {
  width: min(860px, 100%);
}

.role-summary-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(21, 97, 93, 0.1);
  border-radius: 20px;
  background: rgba(248, 252, 251, 0.78);
}

.role-summary-panel > div {
  min-width: 180px;
  margin-inline-end: auto;
}

.role-summary-panel strong,
.role-summary-panel span {
  display: block;
}

.role-summary-panel strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.role-count-pill {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-weight: 900;
}

.permissions-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.permissions-groups {
  display: grid;
  gap: 14px;
}

.permission-group {
  border: 1px solid rgba(21, 97, 93, 0.1);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.permission-group-head,
.permission-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.permission-group-head {
  padding: 14px 16px;
  background: rgba(248, 252, 251, 0.9);
  cursor: pointer;
}

.permission-group-head span,
.permission-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-group-head strong,
.permission-row strong {
  color: var(--ink);
  font-weight: 900;
}

.permission-group-head small,
.permission-row small {
  color: var(--muted);
  font-weight: 800;
}

.permission-list {
  display: grid;
}

.permission-subgroup {
  border-top: 1px solid rgba(21, 97, 93, 0.08);
  background: rgba(248, 252, 251, 0.55);
}

.permission-subgroup-title {
  display: grid;
  gap: 4px;
  padding: 14px 16px 10px;
}

.permission-subgroup-title strong {
  color: var(--riyali-teal);
  font-weight: 900;
}

.permission-subgroup-title small {
  color: var(--muted);
  font-weight: 800;
}

.permission-subgroup .permission-row:first-child {
  border-top: 0;
}

.permission-row {
  padding: 14px 16px;
  border-top: 1px solid rgba(21, 97, 93, 0.08);
}

.permission-row code {
  direction: ltr;
  text-align: left;
  color: var(--riyali-teal);
  font-family: Arial, sans-serif;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .marketing-distribution {
    grid-template-columns: 1fr;
  }

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

  .marketing-table-head,
  .marketing-table-row,
  .roles-table-head,
  .roles-table-row {
    min-width: 820px;
  }

  .marketing-table-head,
  .marketing-table-row {
    min-width: 1220px;
  }

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

@media (max-width: 720px) {
  .marketing-head {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-head-actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
  }

  .marketing-head-actions label {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .marketing-head-actions .select {
    width: 100%;
    min-width: 0;
  }

  .marketing-head-actions .btn {
    width: auto;
    flex: 0 0 auto;
  }

  .marketing-insights-grid {
    grid-template-columns: 1fr;
  }

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

  .marketing-result-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-icon-btn.danger {
  color: #c95b54;
  border-color: rgba(201, 91, 84, 0.2);
}

.kpi-icon-btn.danger:hover {
  background: rgba(201, 91, 84, 0.08);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.settings-tabs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; border: 1px solid rgba(21,97,93,.1); border-radius: 22px; background: #fff; }
.settings-tabs [role="tab"] { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1 0 auto; padding: 14px 24px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font: inherit; font-family: var(--riyali-font-bold); cursor: pointer; white-space: nowrap; }
.settings-tabs [role="tab"][aria-selected="true"] { background: var(--riyali-teal-soft); color: var(--riyali-teal); }
.settings-tabs [role="tab"]:focus-visible { outline: 2px solid var(--riyali-teal); outline-offset: -2px; }
.settings-tabs svg, .sidebar-order-preview svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.settings-tabs [role="tab"] > span { display: flex; }
.settings-tab-panel, .settings-general { display: grid; gap: 24px; min-width: 0; }
.settings-tab-panel > .users-page, .settings-tab-panel > .roles-page { margin: 0; }
.settings-info-grid { margin: 0; }
.settings-info-grid .card { margin: 0; }
.settings-years-card .system-years-settings > h3 { margin-top: 0; font-size: 22px; }
.sidebar-order-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sidebar-order-preview-head h2 { margin: 0; }
.sidebar-order-preview .sidebar-order-edit { display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.sidebar-order-preview:hover .sidebar-order-edit, .sidebar-order-preview:focus-within .sidebar-order-edit { opacity: 1; pointer-events: auto; }
.sidebar-order-preview-list { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.sidebar-order-preview-list li { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid rgba(21,97,93,.1); border-radius: 14px; color: var(--ink); background: #f7fbfb; }
.sidebar-order-preview-list li > span { display: flex; color: var(--riyali-teal); }
.sidebar-order-backdrop { z-index: 70; }
.sidebar-order-modal { position: relative; display: flex; flex-direction: column; width: min(680px, 100%); max-height: calc(100dvh - 40px); overflow: hidden; }
.sidebar-order-modal .modal-head { flex-shrink: 0; padding-inline-end: 44px; }
.sidebar-order-modal .sidebar-sort-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 3px; }
.sidebar-order-modal .sidebar-sort-item { grid-template-columns: 34px 42px minmax(0,1fr) auto 28px; min-height: 64px; }
.sidebar-sort-buttons { display: flex; gap: 4px; }
.sidebar-sort-buttons button { width: 32px; height: 34px; border: 1px solid rgba(21,97,93,.14); border-radius: 10px; background: var(--riyali-teal-soft); color: var(--riyali-teal); font-size: 20px; cursor: pointer; }
.sidebar-sort-buttons button:disabled { opacity: .3; cursor: default; }
.sidebar-order-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; flex-shrink: 0; }
.sidebar-order-actions > div { display: flex; gap: 8px; }
.sidebar-order-modal .sidebar-order-note { margin-top: 16px; }
.sidebar-order-note { color: var(--muted); font-size: 14px; margin: 0; }
@media (hover: none) { .sidebar-order-preview .sidebar-order-edit { opacity: 1; pointer-events: auto; } }
@media (max-width: 600px) {
  .settings-tabs [role="tab"] { padding: 12px 16px; }
  .sidebar-order-modal .sidebar-sort-item { grid-template-columns: 24px minmax(0,1fr) auto 20px; gap: 8px; padding-inline: 10px; }
  .sidebar-order-modal .sidebar-sort-icon { display: none; }
  .sidebar-order-actions, .sidebar-order-actions > div { width: 100%; }
  .sidebar-order-actions .btn { flex: 1; }
}

.sidebar-sort-list {
  display: grid;
  gap: 10px;
}

.sidebar-sort-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: 34px 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(21, 97, 93, 0.1);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(38, 75, 84, 0.05);
  cursor: grab;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.sidebar-sort-item:hover {
  border-color: rgba(3, 176, 170, 0.28);
  box-shadow: 0 10px 24px rgba(38, 75, 84, 0.09);
}

.sidebar-sort-item.dragging {
  opacity: 0.5;
  border-color: var(--riyali-teal);
  cursor: grabbing;
}

.sidebar-sort-position,
.sidebar-sort-icon,
.sidebar-drag-handle {
  display: grid;
  place-items: center;
}

.sidebar-sort-position {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--riyali-teal);
  background: var(--riyali-teal-soft);
  font-weight: 800;
}

.sidebar-sort-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--riyali-teal);
  background: rgba(3, 176, 170, 0.07);
}

.sidebar-sort-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.sidebar-drag-handle {
  color: #8a949d;
  font-size: 23px;
  line-height: 1;
  cursor: grab;
}
