﻿:root {
  --bg: #f4f1ea;
  --surface: #fffdf9;
  --surface-strong: #f0e5d4;
  --ink: #20211f;
  --muted: #6d6a63;
  --line: rgba(32, 33, 31, 0.08);
  --brand: #0a6c74;
  --brand-dark: #08454a;
  --accent: #c96f3f;
  --draft: #8c6c1f;
  --posted: #236a45;
  --cancelled: #9b3d3d;
  --deleted: #6b7280;
  --money-positive: #067647;
  --money-negative: #b42318;
  --money-neutral: #344054;
  --row-hover: rgba(10, 108, 116, 0.045);
  --row-zebra: rgba(10, 108, 116, 0.025);
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(201, 111, 63, 0.18), transparent 28%),
    linear-gradient(180deg, #f8f5ef 0%, #f4f1ea 100%);
}

a {
  text-decoration: none;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control,
.form-select,
.form-check-input {
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* UX: Focus واضح بدون تغيير أي منطق */
.btn:focus-visible,
.btn:active:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.22);
  border-color: rgba(10, 108, 116, 0.75);
}

/* UX: تقليل "القفز" عند ظهور validation */
.field-validation-error,
.validation-summary-errors {
  min-height: 1.1rem;
}

.form-label {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.form-label .required::before {
  content: "*";
  color: #b42318;
  margin-inline-start: 0.25rem;
  font-weight: 800;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.15);
  border-color: var(--brand);
  outline: 0;
}

.form-control::placeholder {
  color: rgba(109, 106, 99, 0.6);
  font-style: italic;
}

.form-text {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.control-btn {
  min-height: 40px;
  border-radius: 14px;
  padding-inline: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.control-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 108, 116, 0.15);
}

.control-actions-wrap form {
  margin: 0;
}

.control-actions-wrap > .btn,
.control-actions-wrap > form > .btn {
  min-height: 40px;
  border-radius: 14px;
  padding-inline: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.control-actions-wrap > .btn:hover,
.control-actions-wrap > form > .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 108, 116, 0.15);
}

.table td .btn.btn-sm.btn-outline-primary,
.table td .btn.btn-sm.btn-outline-secondary,
.table td .btn.btn-sm.btn-outline-danger {
  border-radius: 12px;
  font-weight: 700;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.action-toggle-btn {
  border-radius: 10px;
  min-width: 36px;
  min-height: 32px;
}

.action-menu {
  display: inline-flex;
}

.action-dropdown-menu {
  min-width: 220px;
  border-radius: 14px;
  padding: 0.5rem;
  z-index: 2040;
  border: 1px solid rgba(32, 33, 31, 0.08);
  box-shadow: 0 10px 24px rgba(32, 33, 31, 0.12);
  animation: slideDown 0.15s ease;
}

.action-dropdown-menu[data-overlay-menu="true"] {
  position: fixed;
  margin: 0;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 24px));
  z-index: 2080;
}

.action-dropdown-menu.action-dropdown-menu-upward {
  transform-origin: bottom right;
}

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

.dropdown-menu.show {
  animation: slideDown 0.15s ease;
}

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

.action-dropdown-menu.action-dropdown-menu-upward {
  animation: slideUpOverlay 0.15s ease;
}

.action-dropdown-item {
  border-radius: 10px;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  transition: all 0.15s ease;
}

.action-dropdown-item:hover {
  background: rgba(10, 108, 116, 0.1);
  color: var(--brand-dark);
}

.dropdown-item.active,
.dropdown-item:active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
}

.app-content {
  flex: 1;
  min-width: 0;
  transition: margin-inline-start 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --sidebar-bg: #1a1c1e;
  --sidebar-color: #e2e2e2;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: var(--brand);
  --sidebar-active-color: #ffffff;
  --sidebar-transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28)
  ;
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  min-height: calc(100vh - 2rem);
  max-height: calc(100vh - 2rem);
  padding: 1rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #1c656b 0%, #394a5b 100%);
  color: var(--sidebar-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: fixed;
  top: 1rem;
  inset-inline-start: 1rem;
  z-index: 40;
  border-radius: 20px;
  box-shadow: -4px 4px 12px 3px rgba(19, 24, 28, 0.28);
  overflow-x: hidden;
  overflow-y: auto;
  transition: var(--sidebar-transition);
  box-sizing: border-box;
}

.app-sidebar-head,
.app-sidebar-foot {
  display: grid;
  gap: 0.85rem;
}

.app-sidebar-brand {
  justify-content: flex-start;
  gap: 0.7rem;
  color: #ffffff;
  padding: 0.35rem 0.4rem;
  border-radius: 12px;
  transition: var(--sidebar-transition);
  cursor: pointer;
}

.app-sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app-sidebar-brand .brand-mark {
  box-shadow: 0 8px 24px rgba(10, 108, 116, 0.28);
}

.sidebar-nav {
  display: grid;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 0.15rem;
}

.sidebar-nav::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-track,
.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav,
.app-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-section {
  display: grid;
  gap: 0.2rem;
}

.sidebar-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  color: #f3f4f6;
  cursor: pointer;
  transition: var(--sidebar-transition);
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  background: var(--sidebar-hover-bg);
  outline: none;
}

.sidebar-group-caret {
  color: #bfc7ce;
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 0.25s ease;
}

.sidebar-group[data-collapsed="true"] .sidebar-group-caret {
  transform: rotate(-90deg);
}

.sidebar-group-content {
  display: grid;
  gap: 0.25rem;
  padding-inline-start: 0.8rem;
  margin-inline-start: 0.9rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-group-content[hidden] {
  display: none !important;
}

.sidebar-section-title {
  color: #dfe4ea;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sidebar-link {
  color: var(--sidebar-color);
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  transition: var(--sidebar-transition);
}

.sidebar-link::after {
  content: "";
  display: none;
}

.sidebar-link:hover,
.sidebar-link:focus {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--sidebar-hover-bg);
}

.sidebar-link.active,
.sidebar-link[aria-current="page"] {
  color: var(--sidebar-active-color);
  background: var(--sidebar-active-bg);
  box-shadow: 0 4px 12px rgba(10, 108, 116, 0.35);
}

.sidebar-user-block {
  display: grid;
  gap: 0.55rem;
}

.sidebar-user-name {
  color: #f7f30a;
  font-size: 0.92rem;
  font-weight: 700;
}

.sidebar-backdrop {
  display: none;
}

#sidebarCloseButton {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.2);
  color: #f3f4f6;
}

.sidebar-desktop-toggle,
.sidebar-mobile-toggle {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
  color: #f4f4f5;
  border-radius: 12px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  transition: var(--sidebar-transition);
}

.sidebar-desktop-toggle:hover,
.sidebar-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-desktop-toggle span,
.sidebar-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: currentColor;
}

.sidebar-desktop-toggle {
  display: none;
  background-color:rgb(30 92 96);
}

.desktop-back-button {
  position: fixed;
  top: 1rem;
  inset-inline-end: 6.2rem;
  z-index: 42;
  border: 1px solid rgba(32, 33, 31, 0.15);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  border-radius: 12px;
  min-height: 40px;
  padding-inline: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.desktop-back-button:hover {
  background: #ffffff;
  color: #0a6c74;
  border-color: rgba(10, 108, 116, 0.38);
}

.sidebar-mobile-toggle {
  width: 42px;
  height: 42px;
  border-color: rgba(10, 108, 116, 0.55);
  background: linear-gradient(135deg, #0f9aa4 0%, #0a6c74 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 108, 116, 0.28);
}

.sidebar-mobile-toggle:hover,
.sidebar-mobile-toggle:focus-visible {
  background: linear-gradient(135deg, #11aab5 0%, #0b7880 100%);
  border-color: rgba(10, 108, 116, 0.7);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(10, 108, 116, 0.34);
}

.sidebar-mobile-toggle:focus-visible {
  outline: 3px solid rgba(15, 154, 164, 0.22);
  outline-offset: 2px;
}

body.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
  flex-basis: var(--sidebar-collapsed-width);
  padding: 0.9rem 0.35rem;
  opacity: 1;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar-nav {
  display: grid;
  grid-auto-rows: min-content;
  overflow-y: auto;
  overflow-x: hidden;
}

body.sidebar-collapsed .app-sidebar-head,
body.sidebar-collapsed .app-sidebar-foot,
body.sidebar-collapsed .sidebar-user-block {
  justify-items: center;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-user-name,
body.sidebar-collapsed .notification-trigger-label {
  display: none;
}

body.sidebar-collapsed .sidebar-group-toggle {
  display: none;
}

body.sidebar-collapsed .sidebar-group-content {
  display: grid !important;
  gap: 0.35rem;
  border-inline-start: 0;
  margin-inline-start: 0;
  padding-inline-start: 0;
}

body.sidebar-collapsed .sidebar-group-content[hidden] {
  display: grid !important;
}

body.sidebar-collapsed .app-sidebar-brand {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .notification-trigger,
body.sidebar-collapsed .sidebar-logout-button {
  font-size: 0;
  min-height: 42px;
  padding-inline: 0.25rem;
  justify-content: center;
  text-align: center;
  position: relative;
}

body.sidebar-collapsed .sidebar-link::after {
  content: attr(data-short-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  font-weight: 800;
  color: #f4f4f5;
}

/* UX Sidebar collapsed: Label tooltip-like on hover (CSS only) */
body.sidebar-collapsed .sidebar-link::before {
  content: attr(data-short-label);
  position: absolute;
  inset-inline-start: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-2px);
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  pointer-events: none;
}

body.sidebar-collapsed .sidebar-link:hover::before,
body.sidebar-collapsed .sidebar-link:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

body.sidebar-collapsed .notification-trigger.dropdown-toggle::after {
  display: none;
}

body.sidebar-collapsed .notification-trigger::before {
  content: attr(data-short-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  font-weight: 800;
  color: #f4f4f5;
}

body.sidebar-collapsed .sidebar-logout-button::after {
  content: attr(data-short-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  font-weight: 800;
  color: #f4f4f5;
}

body.sidebar-collapsed .notification-badge {
  position: absolute;
  top: 0.35rem;
  inset-inline-end: 0.3rem;
}

body.sidebar-collapsed .sidebar-section {
  gap: 0.45rem;
}

body.sidebar-collapsed .sidebar-nav {
  gap: 0.55rem;
}

body.sidebar-collapsed .notification-menu {
  inset-inline-end: 0 !important;
}

body.sidebar-collapsed .notification-menu.notification-menu-overlay {
  inset-inline-end: auto !important;
}

.app-sidebar-foot .notification-trigger,
.app-sidebar-foot .sidebar-logout-button {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  transition: all 0.2s ease;
}

.app-sidebar-foot .notification-trigger:hover,
.app-sidebar-foot .notification-trigger:focus-visible {
  color: #ffd75a !important;
  border-color: rgba(255, 215, 90, 0.6) !important;
  background: rgba(255, 215, 90, 0.08) !important;
}

.app-sidebar-foot .sidebar-logout-button:hover,
.app-sidebar-foot .sidebar-logout-button:focus-visible {
  color: #ff7a7a !important;
  border-color: rgba(255, 122, 122, 0.6) !important;
  background: rgba(255, 122, 122, 0.08) !important;
}

body.sidebar-collapsed .notification-trigger:hover::before,
body.sidebar-collapsed .notification-trigger:focus-visible::before {
  color: #ffd75a !important;
  border: 1px solid rgba(255, 215, 90, 0.55);
  background: rgba(255, 215, 90, 0.12);
}

body.sidebar-collapsed .sidebar-logout-button:hover::after,
body.sidebar-collapsed .sidebar-logout-button:focus-visible::after {
  color: #ff7a7a !important;
  border: 1px solid rgba(255, 122, 122, 0.55);
  background: rgba(255, 122, 122, 0.12);
}

@media (min-width: 992px) {
  .app-content {
    margin-inline-start: calc(280px + 3.35rem);
    padding-inline-start: 0.65rem;
  }

  body.sidebar-collapsed .app-content {
    margin-inline-start: calc(80px + 2.25rem);
    padding-inline-start: 0.35rem;
  }

  .sidebar-desktop-toggle {
    display: inline-grid;
    position: fixed;
    top: 1.2rem;
    inset-inline-start: calc(280px + 1.5rem);
    width: 40px;
    height: 40px;
    z-index: 46;
  }

  body.sidebar-collapsed .sidebar-desktop-toggle {
    inset-inline-start: calc(80px + 1.5rem);
  }
}

@media (min-width: 992px) {
  .app-main {
    padding-inline: 1.25rem;
  }
}

.app-mobile-header,
.app-public-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.mobile-quick-actions {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.mobile-quick-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-quick-link.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

body.assigned-user-shell .app-shell {
  display: block;
}

body.assigned-user-shell .app-content {
  margin-inline-start: 0 !important;
  padding-inline-start: 0 !important;
}

.assigned-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 24;
  padding: 0.85rem 1rem;
  background: rgba(244, 241, 234, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.assigned-user-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.assigned-user-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.assigned-user-notification-trigger,
.assigned-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.assigned-user-notification-trigger {
  position: relative;
  color: #0a6c74;
  padding: 0;
}

.assigned-user-notification-trigger::after {
  display: none !important;
}

.assigned-user-notification-trigger:hover,
.assigned-user-notification-trigger:focus-visible {
  color: #08575d;
  border-color: rgba(10, 108, 116, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

.assigned-user-top-icon {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
}

.assigned-user-avatar {
  border-radius: 50%;
  color: #0a7d80;
  font-size: 0.88rem;
  font-weight: 950;
}

.assigned-user-notification-badge {
  position: absolute;
  min-width: 1.15rem;
  min-height: 1.15rem;
  padding: 0.08rem 0.3rem;
  font-size: 0.68rem;
  line-height: 1.05;
}

#globalNotificationBadge.assigned-user-notification-badge {
  inset-inline-start: -0.2rem;
  inset-block-start: -0.2rem;
}

#receivingOrdersNotificationBadge.assigned-user-notification-badge {
  inset-inline-end: -0.2rem;
  inset-block-end: -0.15rem;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(244, 241, 234, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav-ltr {
  direction: ltr;
}

.nav-ltr .navbar-nav {
  direction: rtl;
  text-align: right;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--brand);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-size: 0.85rem;
}

.brand-text {
  letter-spacing: 0.01em;
}

.nav-link {
  color: var(--ink);
  font-weight: 700;
}

.app-main {
  padding: 2rem 1rem 3rem;
}

.content-card {
  border: 1px solid rgba(32, 33, 31, 0.055);
  box-shadow: 0 2px 8px rgba(32, 33, 31, 0.04);
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--surface);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.content-card:hover {
  box-shadow: 0 4px 12px rgba(32, 33, 31, 0.06);
  border-color: rgba(32, 33, 31, 0.1);
}

.hero-panel {
  display: grid;
  gap: 1.5rem;
  padding: 2.2rem;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(10, 108, 116, 0.95), rgba(8, 69, 74, 0.9)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.04), transparent);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(10, 108, 116, 0.2);
}

.hero-copy,
.page-copy {
  max-width: 62rem;
  color: rgba(255, 255, 255, 0.84);
}

.page-copy-dark {
  max-width: 62rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(10, 108, 116, 0.08);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.5rem 0 0;
  color: var(--ink);
}

.page-header p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-grid,
.details-grid {
  display: grid;
  gap: 1.25rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: stretch;
}

.summary-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.summary-card {
  border: 1px solid rgba(10, 108, 116, 0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 244, 235, 0.95));
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 110px;
  box-sizing: border-box;
}

.summary-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 108, 116, 0.22);
  box-shadow: 0 8px 20px rgba(10, 108, 116, 0.08);
}

.summary-card-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.summary-card-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.summary-card-unit {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  margin-inline-start: 0.35rem;
}

.summary-card.positive .summary-card-value {
  color: #067647;
}

.summary-card.negative .summary-card-value {
  color: #b42318;
}

.summary-card.neutral .summary-card-value {
  color: #344054;
}

@media (min-width: 1200px) {
  .summary-grid {
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .summary-card {
    min-height: 130px;
    padding: 1.5rem 1.6rem;
  }
}

@media (max-width: 575.98px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .summary-card {
    padding: 1rem;
    min-height: 90px;
  }
}

.dashboard-status-col {
  min-width: 0;
}

.stat-card,
.content-card,
.line-box {
  padding: 1.5rem;
  border-radius: 22px;
  background: var(--surface);
}

.stat-card,
.content-card {
  border: 1px solid rgba(32, 33, 31, 0.055);
  box-shadow: 0 2px 8px rgba(32, 33, 31, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(32, 33, 31, 0.06);
  border-color: rgba(32, 33, 31, 0.1);
}

.stat-card span {
  color: var(--muted);
  font-weight: 600;
  margin: auto;
  font-size: 0.95rem;
}

.stat-card strong {
  display: block;
  margin-top: 0.75rem;
  font-size: 2.2rem;
  color: var(--brand-dark);
  font-weight: 800;
}

.dashboard-status-row {
  --bs-gutter-x: 1.9rem;
  --bs-gutter-y: 1.55rem;
}

.dashboard-status-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 158px;
  overflow: hidden;
  padding: 1.15rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(10, 108, 116, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 248, 240, 0.96));
  border: 1px solid rgba(10, 108, 116, 0.09);
  box-shadow: 0 10px 24px rgba(32, 33, 31, 0.045);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(10, 108, 116, 0.09);
  border-color: rgba(10, 108, 116, 0.18);
}

.dashboard-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.dashboard-status-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.dashboard-status-copy > span {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
}

.dashboard-status-subtitle {
  width: max-content;
  color: var(--muted);
  background: rgba(10, 108, 116, 0.055);
  border: 1px solid rgba(10, 108, 116, 0.08);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-status-total {
  min-width: 82px;
  border: 1px solid rgba(10, 108, 116, 0.13);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.11), rgba(255, 255, 255, 0.78));
  color: inherit;
  display: grid;
  place-items: center;
  padding: 0.72rem 0.9rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.18s ease;
}

.dashboard-status-total:hover {
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.18), rgba(255, 255, 255, 0.86));
  border-color: rgba(10, 108, 116, 0.28);
  box-shadow: 0 8px 18px rgba(10, 108, 116, 0.12);
}

.dashboard-status-total strong {
  margin-top: 0;
  line-height: 1;
  font-size: 1.55rem;
  color: var(--brand-dark);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.dashboard-status-total small {
  color: var(--muted);
  font-weight: 900;
  margin-top: 0.28rem;
  font-size: 0.74rem;
}

.dashboard-status-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.5rem;
  margin-top: auto;
}

.dashboard-breakdown-link {
  border: 1px solid rgba(10, 108, 116, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.72rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.18s ease;
}

.dashboard-breakdown-link:hover {
  background: rgba(10, 108, 116, 0.075);
  border-color: rgba(10, 108, 116, 0.22);
  color: var(--brand-dark);
}

.dashboard-breakdown-link strong {
  margin-top: 0;
  color: var(--brand-dark);
  font-size: 0.98rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.dashboard-breakdown-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  padding: 0.75rem 0.85rem;
  border: 1px dashed rgba(10, 108, 116, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 575.98px) {
  .dashboard-status-card {
    min-height: auto;
    padding: 1rem;
  }

  .dashboard-status-header {
    align-items: center;
  }

  .dashboard-status-total {
    min-width: 74px;
    padding: 0.62rem 0.7rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .app-mobile-header,
  .app-public-header {
    padding-inline: 0.9rem;
    padding-block: 0.7rem 0.55rem;
  }

  .app-main {
    padding: 0.9rem 0.85rem 1.8rem;
  }

  .dashboard-status-row {
    --bs-gutter-x: 0.9rem;
    --bs-gutter-y: 0.9rem;
  }

  .stats-grid {
    gap: 0.9rem;
  }

  .stats-grid > .dashboard-status-row {
    margin-inline: 0;
  }

  .section-title {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .section-title h2,
  .section-title h3 {
    font-size: 1.12rem;
  }

  .notification-control-actions {
    width: 100%;
    gap: 0.55rem;
  }

  .notification-control-actions .btn {
    flex: 1 1 180px;
  }

  .content-card,
  .stat-card {
    padding: 1.05rem;
    border-radius: 18px;
  }

  .dashboard-status-card {
    min-height: auto;
    padding: 1rem;
    border-radius: 18px;
    gap: 0.8rem;
  }

  .dashboard-status-header {
    gap: 0.65rem;
  }

  .dashboard-status-copy > span {
    font-size: 0.94rem;
  }

  .dashboard-status-subtitle {
    width: auto;
    max-width: 100%;
    font-size: 0.72rem;
    padding: 0.18rem 0.45rem;
  }

  .dashboard-status-total {
    min-width: 72px;
    border-radius: 16px;
    padding: 0.62rem 0.72rem;
  }

  .dashboard-status-total strong {
    font-size: 1.35rem;
  }

  .dashboard-status-breakdown {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .dashboard-breakdown-link {
    padding: 0.5rem 0.65rem;
    gap: 0.5rem;
    font-size: 0.88rem;
  }

  .mobile-quick-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-inline: 0.85rem;
    overflow-x: visible;
    align-items: flex-start;
  }

  .mobile-quick-link {
    flex: 0 0 auto;
    padding: 0.42rem 0.78rem;
    font-size: 0.84rem;
  }
}

.dashboard-panel-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dashboard-panel-label {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 800;
}

.dashboard-panel-label.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
}

.dashboard-table-scroll {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.dashboard-table-scroll--5rows {
  max-height: 24rem;
}

.dashboard-table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dashboard-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(10, 108, 116, 0.28);
  border-radius: 999px;
}

.dashboard-table-scroll::-webkit-scrollbar-track {
  background: rgba(10, 108, 116, 0.06);
  border-radius: 999px;
}

.dashboard-fab {
  position: fixed;
  inset-inline-start: 1.25rem;
  inset-block-end: 1.25rem;
  z-index: 20;
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.dashboard-fab-button {
  width: 3.6rem;
  height: 3.6rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a9552e);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 18px 34px rgba(169, 85, 46, 0.32);
}

.dashboard-fab-menu {
  display: none;
  min-width: 180px;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 40px rgba(32, 33, 31, 0.16);
}

.dashboard-fab.is-open .dashboard-fab-menu {
  display: grid;
  gap: 0.45rem;
}

.dashboard-fab-link {
  color: var(--ink);
  font-weight: 700;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}

.dashboard-fab-link:hover,
.dashboard-fab-link:focus {
  background: rgba(10, 108, 116, 0.08);
  color: var(--brand-dark);
}

.app-desktop-fab {
  inset-inline-start: calc(280px + 1.5rem);
  inset-inline-end: auto;
  inset-block-end: 1.5rem;
  justify-items: start;
  z-index: 45;
}

.app-desktop-fab-menu {
  min-width: 220px;
  border-radius: 20px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(10, 108, 116, 0.12);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

.app-desktop-fab-button {
  width: 3.9rem;
  height: 3.9rem;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0a6c74 0%, #127a84 100%);
  box-shadow: 0 18px 38px rgba(10, 108, 116, 0.28);
}

.app-desktop-fab-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  text-decoration: none;
}

.app-desktop-fab-link i {
  font-size: 1rem;
  color: #0a6c74;
}

.app-desktop-fab-action {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: inherit;
}

.quick-payment-modal {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(10, 108, 116, 0.14);
  overflow: hidden;
}

.quick-payment-modal .modal-dialog {
  max-width: 640px;
}

.quick-payment-modal .modal-body {
  position: relative;
  padding: 1.35rem 1.35rem 1.1rem;
  overflow: hidden;
}

#desktopQuickPaymentModal .modal-content {
  max-height: calc(100dvh - 2rem);
}

#desktopQuickPaymentForm {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#desktopQuickPaymentModal .modal-header,
#desktopQuickPaymentModal .modal-footer {
  flex-shrink: 0;
}

#desktopQuickPaymentModal .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.quick-payment-modal__subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.quick-payment-floating-note {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(8, 20, 35, 0.24);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.quick-payment-floating-note.is-visible {
  opacity: 1;
}

.quick-payment-floating-note__content {
  width: min(100%, 380px);
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(15, 118, 110, 0.94);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 28px 56px rgba(15, 118, 110, 0.3);
  transform: scale(0.92);
  transition: transform 0.22s ease;
}

.quick-payment-floating-note.is-visible .quick-payment-floating-note__content {
  transform: scale(1);
}

.quick-payment-steps {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.quick-payment-step-chip {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.quick-payment-step-chip.is-active {
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.14), rgba(18, 122, 132, 0.18));
  color: var(--brand-dark);
}

.quick-payment-step-chip.is-complete {
  background: rgba(16, 185, 129, 0.14);
  color: #0f766e;
}

.quick-payment-section-title {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.quick-payment-section-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.8;
}

.quick-payment-type-grid,
.quick-payment-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.quick-payment-choice,
.quick-payment-choice-card {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
  text-align: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-payment-choice:hover,
.quick-payment-choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 108, 116, 0.24);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.quick-payment-choice strong,
.quick-payment-choice-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.quick-payment-choice span,
.quick-payment-choice-card span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.75;
}

.quick-payment-choice.is-selected,
.quick-payment-choice-card.is-selected {
  border-color: rgba(10, 108, 116, 0.28);
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.1), rgba(18, 122, 132, 0.14));
  box-shadow: 0 16px 28px rgba(10, 108, 116, 0.12);
}

.quick-payment-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quick-payment-switch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
}

.quick-payment-switch-copy {
  display: grid;
  gap: 0.3rem;
}

.quick-payment-switch-copy strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.quick-payment-switch-copy span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.7;
}

.quick-payment-switch {
  margin: 0;
  display: flex;
  align-items: center;
}

.quick-payment-switch .form-check-input {
  width: 3.25rem;
  height: 1.8rem;
  margin: 0;
  cursor: pointer;
}

.quick-payment-entity-results {
  display: grid;
  gap: 0.6rem;
  max-height: 240px;
  overflow-y: auto;
}

.quick-payment-entity-option {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 16px;
  background: #fff;
  text-align: start;
}

.quick-payment-entity-option strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
}

.quick-payment-entity-option span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.quick-payment-selected-entity {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 18px;
  background: rgba(10, 108, 116, 0.05);
}

.quick-payment-selected-entity__title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.quick-payment-selected-entity__name {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  margin-top: 0.2rem;
}

.quick-payment-selected-entity__meta {
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

.quick-payment-amount-shell .form-label {
  font-weight: 900;
  color: var(--ink);
}

.quick-payment-stage-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.08), rgba(18, 122, 132, 0.04));
}

.quick-payment-step-panel {
  display: grid;
  gap: 1rem;
}

.quick-payment-stage-header__mode,
.quick-payment-stage-header__balance {
  display: grid;
  gap: 0.2rem;
}

.quick-payment-stage-header__mode span,
.quick-payment-stage-header__balance span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.quick-payment-stage-header__mode strong,
.quick-payment-stage-header__balance strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
}

.quick-payment-stage-header__balance small {
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 800;
}

.quick-payment-amount-shell {
  display: grid;
  gap: 0.55rem;
}

.quick-payment-amount-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem 0.4rem 0.8rem;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,250,250,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.quick-payment-amount-field:focus-within {
  border-color: rgba(10, 108, 116, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 0 0 4px rgba(10, 108, 116, 0.08);
}

.quick-payment-amount-input {
  min-height: 4rem;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  padding-inline: 0.5rem;
  font-size: 1.3rem;
  font-weight: 900;
  border-radius: 20px;
}

.quick-payment-last-invoice-button {
  flex: 0 0 auto;
  width: 2.85rem;
  height: 2.85rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a6c74 0%, #127a84 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(10, 108, 116, 0.24);
}

.quick-payment-last-invoice-button:disabled {
  opacity: 0.45;
  box-shadow: none;
}

.quick-payment-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.quick-payment-snapshot__item,
.quick-payment-review {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 18px;
  background: rgba(248, 252, 252, 0.96);
}

.quick-payment-snapshot__item span,
.quick-payment-review__row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-payment-snapshot__item strong,
.quick-payment-review__row strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  margin-top: 0.22rem;
}

.quick-payment-snapshot__item small {
  display: block;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.18rem;
}

.quick-payment-review {
  display: grid;
  gap: 0.75rem;
}

.quick-payment-review__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.quick-payment-review__note {
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(10, 108, 116, 0.12);
  color: var(--muted);
  font-weight: 700;
  line-height: 1.8;
}

.quick-payment-modal__footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}

.quick-payment-modal__footer .btn {
  width: 100%;
  min-height: 3rem;
  font-weight: 800;
}

.mobile-quick-fab {
  position: fixed;
  left: 1rem;
  bottom: 5.2rem;
  z-index: 1085;
  display: grid;
  justify-items: start;
}

.mobile-quick-fab__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 35, 0.16);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mobile-quick-fab__menu {
  position: absolute;
  left: 0;
  bottom: 4.3rem;
  display: grid;
  gap: 0.65rem;
  width: max-content;
  max-width: min(82vw, 260px);
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mobile-quick-fab__action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.78rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.mobile-quick-fab__action i {
  color: #0a6c74;
  font-size: 1rem;
}

.mobile-quick-fab__action span {
  white-space: nowrap;
}

.mobile-quick-fab__button {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 108, 116, 0.22);
  color: #fff;
  box-shadow: 0 16px 32px rgba(10, 108, 116, 0.22);
  backdrop-filter: blur(12px);
}

.mobile-quick-fab__button span {
  display: inline-block;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 0.22s ease;
}

.mobile-quick-fab.is-open .mobile-quick-fab__backdrop {
  opacity: 1;
  pointer-events: auto;
}

.mobile-quick-fab.is-open .mobile-quick-fab__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mobile-quick-fab.is-open .mobile-quick-fab__button span {
  transform: rotate(45deg);
}

@media (max-width: 767.98px) {
  .quick-payment-modal .modal-dialog {
    max-width: min(100vw - 1rem, 520px);
    margin: 0.5rem auto;
  }

  .quick-payment-modal .modal-body {
    padding: 1rem;
  }

  .quick-payment-modal__footer {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .quick-payment-type-grid,
  .quick-payment-choice-grid,
  .quick-payment-snapshot {
    grid-template-columns: 1fr;
  }

  .quick-payment-stage-header,
  .quick-payment-switch-card {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-payment-step-panel {
    gap: 0.85rem;
  }

  .quick-payment-amount-field {
    padding: 0.35rem 0.4rem 0.35rem 0.65rem;
  }

  .quick-payment-amount-input {
    min-height: 3.55rem;
    font-size: 1.15rem;
  }

  .mobile-quick-fab {
    left: 0.75rem;
    bottom: 5rem;
  }

  .mobile-quick-fab__menu {
    max-width: min(86vw, 250px);
  }

  .quick-payment-last-invoice-button {
    width: 2.55rem;
    height: 2.55rem;
  }

  .quick-payment-modal__footer {
    gap: 0.55rem;
    padding: 0 1rem 1rem;
  }
}

@media (min-width: 992px) {
  body.sidebar-collapsed .app-desktop-fab {
    inset-inline-start: calc(80px + 1.5rem);
  }
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding: 1.25rem;
  background: rgba(10, 108, 116, 0.018);
  border-radius: 18px;
  border: 1px solid rgba(10, 108, 116, 0.08);
  align-items: end;
}

.filters-grid .form-control,
.filters-grid .form-select {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.65rem 0.85rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filters-grid .form-control:focus,
.filters-grid .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(10, 108, 116, 0.1);
}

.filters-grid .btn {
  border-radius: 12px;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  transition: all 0.2s ease;
}

.filters-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.invoice-form-grid {
  display: grid;
  gap: 1rem;
}

.summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.04), rgba(10, 108, 116, 0.02));
  transition: all 0.2s ease;
}

.summary-bar:hover {
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.06), rgba(10, 108, 116, 0.04));
  border-color: rgba(10, 108, 116, 0.2);
  box-shadow: 0 4px 12px rgba(10, 108, 116, 0.08);
}

.summary-bar strong {
  font-size: 1.25rem;
  color: var(--brand-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.summary-bar span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.form-section-title {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.stack-grid {
  display: grid;
  gap: 0.75rem;
}

.line-grid {
  display: grid;
  gap: 0.75rem;
}

.line-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.line-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.line-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.line-grid-7 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.amount-entry {
  min-height: 3.1rem;
  border: 1.5px solid rgba(10, 108, 116, 0.22);
  background: linear-gradient(180deg, rgba(10, 108, 116, 0.06), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 12px rgba(10, 108, 116, 0.05);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ink);
}

.amount-entry::placeholder {
  color: rgba(32, 33, 31, 0.38);
  font-weight: 800;
}

.amount-entry:focus {
  border-color: rgba(10, 108, 116, 0.58);
  background: #fff;
  box-shadow: 0 0 0 0.18rem rgba(10, 108, 116, 0.12), 0 4px 12px rgba(10, 108, 116, 0.08);
}

.machine-row,
.production-line-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1.35rem 1rem 0.9rem;
  position: relative;
}

.production-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(10, 108, 116, 0.04);
  font-weight: 700;
}

.production-bottom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.production-summary-strip-bottom {
  flex: 1;
  min-width: 240px;
}

.production-bale-badge {
  position: absolute;
  inset-block-start: 0.6rem;
  inset-inline-end: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(10, 108, 116, 0.12);
  color: var(--brand);
  border: 1px solid rgba(10, 108, 116, 0.2);
}

.production-line-card[data-next-line="true"] {
  border-style: dashed;
  border-color: rgba(10, 108, 116, 0.45);
  background: rgba(10, 108, 116, 0.06);
}

.production-timeline-card {
  min-height: 100%;
}

.production-timeline-list {
  display: grid;
  gap: 0.85rem;
  max-height: 520px;
  overflow-y: auto;
  padding-inline-end: 0.25rem;
}

.production-timeline-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.85rem 0.95rem;
}

.table-modern {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern th {
  color: var(--ink);
  font-weight: 800;
  background: linear-gradient(180deg, #e8f2f0 0%, #dff0ed 100%);
  padding: 0.95rem 1.1rem !important;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.table-modern td {
  padding: 1rem 1.1rem !important;
  background: transparent;
  border-color: var(--line);
  vertical-align: middle;
}

.table-modern th {
  background: transparent;
  border-color: var(--line);
  vertical-align: middle;
}

.table-modern thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #e8f2f0 0%, #dff0ed 100%);
  box-shadow: inset 0 -1px 0 var(--line);
}

.table-modern tbody tr:nth-child(even) td {
  background: var(--row-zebra);
}

.table-modern tbody tr:hover td {
  background: var(--row-hover);
  transition: background-color 0.15s ease;
}

.table-modern tbody tr.is-selected td,
.table-modern tbody tr.table-active td {
  background: rgba(10, 108, 116, 0.12);
}

.table-modern td:first-child,
.table-modern th:first-child {
  font-weight: 800;
}

.table-modern td {
  border-bottom: 1px solid var(--line);
}

.table-modern tbody tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.table-modern .money,
.table-modern .amount,
.money-value,
.amount-value {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

/* UX: تحسين مقبض تغيير عرض الأعمدة في الجداول (CSS فقط) */
.table-modern .table-resize-handle {
  display: inline-block;
  width: 10px;
  height: 24px;
  margin-inline-start: 6px;
  border-radius: 8px;
  background: rgba(10, 108, 116, 0.16);
  border: 1px solid rgba(10, 108, 116, 0.25);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
  cursor: col-resize;
  vertical-align: middle;
}

.table-modern th:hover .table-resize-handle,
.table-modern .table-resize-handle:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.table-modern .table-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 6px;
  width: 26px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(10, 108, 116, 0.20);
  background: rgba(10, 108, 116, 0.08);
  cursor: grab;
  opacity: 0.0;
  transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.table-modern th:hover .table-drag-handle {
  opacity: 1;
  transform: translateY(-1px);
}

.table-modern .table-draggable-header {
  user-select: none;
}

.money-positive,
.balance-state-positive {
  color: var(--money-positive) !important;
}

.money-negative,
.balance-state-negative {
  color: var(--money-negative) !important;
}

.money-neutral,
.balance-state-neutral {
  color: var(--money-neutral) !important;
}

.app-empty-state {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  background: rgba(10, 108, 116, 0.025);
  border: 2px dashed rgba(10, 108, 116, 0.12);
  border-radius: 20px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-empty-state strong {
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.app-empty-state p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.live-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(10, 108, 116, 0.15);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.06), rgba(10, 108, 116, 0.03));
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.live-summary-bar:hover {
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.08), rgba(10, 108, 116, 0.05));
  border-color: rgba(10, 108, 116, 0.25);
  box-shadow: 0 4px 12px rgba(10, 108, 116, 0.1);
}

.live-summary-bar .summary-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.live-summary-bar .summary-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.field-validation-error,
.validation-summary-errors {
  font-weight: 700;
  color: #b42318;
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

/* UX: توحيد شكل Validation + وضوح أكبر بدون تغيير لوجيك */
.field-validation-error,
.validation-summary-errors {
  padding-inline: 0.5rem;
  border-radius: 12px;
  background: rgba(180, 35, 24, 0.06);
  border: 1px solid rgba(180, 35, 24, 0.18);
}

input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
  border-color: rgba(180, 35, 24, 0.65) !important;
  box-shadow: 0 0 0 0.2rem rgba(180, 35, 24, 0.12) !important;
}

.validation-summary-errors {
  margin-bottom: 1rem;
}

.text-danger {
  font-weight: 700;
  color: #b42318;
}

.modal-content {
  border: 1px solid rgba(32, 33, 31, 0.08);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(32, 33, 31, 0.16);
  backdrop-filter: blur(8px);
}

.modal-header {
  border-bottom: 1px solid rgba(32, 33, 31, 0.08);
  padding: 1.5rem;
  background: rgba(10, 108, 116, 0.02);
}

.modal-header .modal-title {
  font-weight: 800;
  color: var(--ink);
  font-size: 1.2rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid rgba(32, 33, 31, 0.08);
  padding: 1.25rem 1.5rem;
  background: rgba(10, 108, 116, 0.01);
  gap: 0.75rem;
}

.btn-close {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 1;
}

.alert {
  border-radius: 16px;
  border: 1px solid rgba(32, 33, 31, 0.12);
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(6, 118, 71, 0.08);
  border-color: rgba(6, 118, 71, 0.2);
  color: #067647;
}

.alert-danger {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.2);
  color: #b42318;
}

.alert-warning {
  background: rgba(102, 45, 145, 0.08);
  border-color: rgba(102, 45, 145, 0.2);
  color: #662d91;
}

.alert-info {
  background: rgba(10, 108, 116, 0.08);
  border-color: rgba(10, 108, 116, 0.2);
  color: var(--brand);
}

.app-confirm-modal {
  border-radius: 20px;
  border: 1px solid rgba(180, 35, 24, 0.18);
}

/* UX: تحسين Confirm Modal (CSS فقط، بدون أي تغيير لوجيك) */
.app-confirm-modal .modal-header,
.app-confirm-modal .modal-footer {
  border-radius: 20px;
}

.app-confirm-modal-consequence:not(.d-none) {
  border: 1px dashed rgba(180, 35, 24, 0.28);
  border-radius: 14px;
  background: rgba(180, 35, 24, 0.08);
  color: #7a271a !important;
  padding: 1rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

/* UX: وضوح التركيز للـ Buttons داخل المودال */
#appConfirmConfirmButton:focus-visible,
#appConfirmCancelButton:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.18);
  border-radius: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--surface-strong);
  border: 1px solid rgba(32, 33, 31, 0.08);
  transition: all 0.2s ease;
}

.status-chip:hover {
  box-shadow: 0 2px 8px rgba(32, 33, 31, 0.1);
}

.status-draft {
  color: var(--draft);
}

.status-posted {
  color: var(--posted);
}

.status-cancelled {
  color: var(--cancelled);
}

.status-deleted {
  color: var(--deleted);
}

.detail-list {
  display: grid;
  gap: 1rem;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(10, 108, 116, 0.02);
  border: 1px solid rgba(10, 108, 116, 0.06);
  transition: all 0.2s ease;
}

.detail-list div:hover {
  background: rgba(10, 108, 116, 0.04);
  border-color: rgba(10, 108, 116, 0.12);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  flex: 0 0 auto;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: end;
  flex: 1;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(10, 108, 116, 0.12);
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.timeline-list {
  padding-right: 1rem;
  margin: 0;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
}

.timeline-list li + li {
  margin-top: 0.85rem;
}

.attachment-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.attachment-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: grid;
}

.attachment-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.attachment-card span {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.attachment-card-link {
  color: inherit;
}

.comment-list {
  display: grid;
  gap: 0.75rem;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline-end: 0.25rem;
  scrollbar-gutter: stable;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: #fff;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.comment-item p {
  margin: 0;
}

.comment-section-grid {
  align-items: start;
}

.comment-list::-webkit-scrollbar {
  width: 8px;
}

.comment-list::-webkit-scrollbar-track {
  background: rgba(32, 33, 31, 0.06);
  border-radius: 999px;
}

.comment-list::-webkit-scrollbar-thumb {
  background: rgba(10, 108, 116, 0.45);
  border-radius: 999px;
}

.comment-list::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 108, 116, 0.65);
}

.js-search-select {
  position: relative;
}

.operations-filter-search-select {
  z-index: 30;
}

.operations-filter-search-select:focus-within,
.operations-filter-search-select.is-open {
  z-index: 2600;
}

.search-select-inline {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.search-select-inline .js-search-select-display {
  flex: 1 1 auto;
}

.search-select-inline .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.weight-add-field {
  position: relative;
}

.weight-add-field__button {
  position: absolute;
  inset-inline-start: 0.42rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.42rem;
  height: 1.42rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 7px 14px rgba(15, 118, 110, 0.14);
  cursor: pointer;
  z-index: 2;
}

.weight-add-field__input {
  padding-inline-start: 2.15rem;
}

.js-search-select-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
}

.js-search-select-display::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.85rem;
}

.search-select-menu {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% + 0.35rem);
  z-index: 2600;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(32, 33, 31, 0.12);
  padding: 0.45rem;
}

.search-select-options {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.35rem;
}

.search-select-options .dropdown-item {
  border-radius: 8px;
}

.search-select-options .dropdown-item.is-selected {
  background: rgba(10, 108, 116, 0.08);
  color: var(--brand-dark);
  font-weight: 700;
}

.inactive-calc-input {
  border-color: #dc3545 !important;
  background: rgba(220, 53, 69, 0.08);
}

.notification-nav-item .dropdown-toggle::after {
  margin-inline-start: 0.45rem;
}

.notification-badge {
  margin-inline-start: 0.4rem;
}

.notification-badge-secondary {
  background: rgba(10, 108, 116, 0.12);
  color: var(--brand-dark);
  border: 1px solid rgba(10, 108, 116, 0.16);
}

.pwa-action-item {
  display: flex;
  align-items: center;
}

.pwa-action-btn {
  min-width: 132px;
}

.settings-card {
  margin-bottom: 1rem;
}

.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.notification-menu {
  width: min(92vw, 360px);
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(32, 33, 31, 0.16);
}

.notification-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--line);
  background: var(--bs-body-bg, #fff);
  position: sticky;
  top: 0;
  z-index: 1;
}
.notification-feed-item.is-unread { background: #edf8f7; }
.notification-feed-item.is-unread .notification-title::before {
  content: '';
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin-inline-end: .4rem;
  border-radius: 50%;
  background: #0b8585;
}
.notification-refresh-item { background: #fff5e5; border-bottom: 1px solid var(--line); }
.mobile-dashboard-notification { position: relative; }
.notification-mobile-count { position: absolute; top: -.25rem; inset-inline-end: -.35rem; font-size: .65rem; }
.notification-mobile-portal > [data-bs-toggle="dropdown"] { display: none; }

.notification-menu.notification-menu-overlay {
  position: fixed !important;
  z-index: 2090;
  margin: 0 !important;
  transform: none !important;
}

.notification-menu.notification-menu-mobile-overlay {
  width: auto !important;
  max-width: none;
  max-height: min(360px, calc(100dvh - 96px));
}

.notification-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  white-space: normal;
}

.notification-link-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.notification-link-icon,
.notification-toast-icon {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.9rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.notification-link-icon--receiving-order,
.notification-toast-icon--receiving-order {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.18);
}

.notification-link-icon--custody,
.notification-toast-icon--custody {
  color: #0c4a6e;
  background: rgba(14, 116, 144, 0.12);
  border: 1px solid rgba(14, 116, 144, 0.16);
}

.notification-link-icon--default,
.notification-toast-icon--default {
  color: var(--brand-dark);
  background: rgba(10, 108, 116, 0.1);
  border: 1px solid rgba(10, 108, 116, 0.14);
}

.notification-title {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.notification-body {
  color: var(--brand-dark);
  font-size: 0.84rem;
  line-height: 1.5;
}

.notification-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-toast-container {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  z-index: 1080;
  width: min(92vw, 360px);
  display: grid;
  gap: 0.55rem;
}

.notification-toast {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(32, 33, 31, 0.15);
  padding: 0.75rem 0.85rem;
  padding-inline-end: 2rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-toast-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.notification-feed-item--receiving-order .notification-link,
.notification-toast--receiving-order {
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 1));
}

.notification-feed-item--custody .notification-link,
.notification-toast--custody {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 1));
}

.notification-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.notification-toast strong {
  display: block;
  color: var(--brand-dark);
  margin-bottom: 0.15rem;
}

.notification-toast p {
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}

.notification-toast small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.notification-toast-close {
  position: absolute;
  inset-inline-end: 0.45rem;
  inset-block-start: 0.4rem;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.notification-toast-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

/* UX: تحسين Toast (CSS فقط) */
.notification-toast {
  /* خفف الانتقال اللمّاع عند دخول/خروج التوست */
  will-change: opacity, transform;
}

.notification-toast-close:active {
  transform: translateY(1px);
}

/* UX: تحسين وضوح التوست وتمييزه عند التركيز من داخل العنصر */
.notification-toast:focus-within {
  outline: 0;
  box-shadow: 0 14px 30px rgba(32, 33, 31, 0.15), 0 0 0 0.2rem rgba(10, 108, 116, 0.10);
}

/* UX: تحسين تمييز زر الإغلاق للتوست (بدون تغيير أي منطق) */
.notification-toast-close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.18);
  border-radius: 999px;
}

.access-entry-shell {
  --access-olive: #738c47;
  --access-olive-dark: #5a6f35;
  --access-panel: #eef2e8;
  --access-line: #a7b191;
  --access-black: #101512;
  --access-green-text: #00d36a;
  display: grid;
  gap: 0.85rem;
}

.access-entry-shell .line-box {
  border-radius: 8px;
  border-color: var(--access-line);
  box-shadow: none;
  background: var(--access-panel);
  padding: 0.8rem;
}

.access-entry-shell .form-section-title {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.access-entry-shell .form-control,
.access-entry-shell .form-select,
.access-entry-shell .js-search-select-display {
  border-radius: 2px;
  min-height: 35px;
  border-color: #aeb7a2;
  background-color: #fcfdfb;
}

.access-type-box {
  background: linear-gradient(180deg, var(--access-olive), var(--access-olive-dark)) !important;
  border-color: #5f7439 !important;
}

.access-type-box .form-section-title,
.access-type-box .form-label {
  color: #f4f8ef;
}

.access-type-grid {
  grid-template-columns: minmax(220px, 360px);
}

.access-entry-shell #invoiceTypeDependentFields {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2.1fr);
  grid-template-areas:
    "account meta"
    "pricing pricing"
    "lines lines"
    "free free"
    "summary summary"
    "actions actions";
}

.access-account-panel {
  grid-area: account;
  background: #161d17 !important;
  border-color: #2b3a2d !important;
  color: #edf7ea;
}

.access-account-panel .form-section-title {
  color: #e4f4e3;
}

.access-account-list {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.access-account-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed rgba(228, 244, 227, 0.22);
  padding-bottom: 0.4rem;
}

.access-account-list dt {
  margin: 0;
  color: #d5f2d0;
  font-weight: 700;
}

.access-account-list dd {
  margin: 0;
  color: var(--access-green-text);
  font-size: 1.15rem;
  font-weight: 800;
}

.access-meta-panel {
  grid-area: meta;
}

.access-pricing-panel {
  grid-area: pricing;
  display: grid;
  gap: 0.75rem;
}

.access-workflow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.access-workflow-tabs .btn.is-active {
  box-shadow: 0 10px 22px rgba(10, 108, 116, 0.14);
}

.access-pricing-title-row {
  margin-bottom: 0 !important;
}

.access-pricing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.access-pricing-body {
  display: grid;
  gap: 0.75rem;
}

.access-pricing-panel.is-collapsed .access-pricing-body {
  display: none;
}

.pricing-panel-scroll {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #c2c8b4;
  border-radius: 4px;
  background: #fff;
}

.pricing-panel-scroll .table-responsive {
  min-width: 100%;
}

.access-main-fields-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.access-main-fields-grid > div:last-child {
  grid-column: 1 / -1;
}

.access-attachment-panel {
  border: 1px dashed #63764a;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.6rem;
}

.access-lines-panel {
  grid-area: lines;
  background: #f3f4f0 !important;
}

#freeLinesSection.access-lines-panel {
  grid-area: free;
}

.access-lines-head {
  display: none;
}

.access-lines-body {
  gap: 0.55rem;
}

.access-standard-row,
.access-free-row {
  background: #fff;
  border: 1px solid #c2c8b4;
  border-radius: 4px;
  padding: 0.55rem;
}

.access-standard-head,
.access-standard-row {
  grid-template-columns:
    var(--std-col-1, minmax(220px, 2.1fr))
    var(--std-col-2, minmax(175px, 1.15fr))
    var(--std-col-3, minmax(120px, 0.9fr))
    var(--std-col-4, minmax(95px, 0.7fr))
    var(--std-col-5, minmax(95px, 0.7fr))
    var(--std-col-6, minmax(105px, 0.75fr))
    var(--std-col-7, minmax(140px, 0.95fr))
    var(--std-col-8, minmax(220px, 1.6fr));
}

.access-free-head,
.access-free-row {
  grid-template-columns:
    var(--free-col-1, minmax(175px, 1.15fr))
    var(--free-col-2, minmax(220px, 2fr))
    var(--free-col-3, minmax(120px, 0.8fr))
    var(--free-col-4, minmax(120px, 0.8fr))
    var(--free-col-5, minmax(230px, 1.8fr));
}

.access-summary-bar {
  grid-area: summary;
  border: 1px solid #7b8f4d;
  border-radius: 6px;
  background: linear-gradient(180deg, #f9fbf5, #edf2e5);
}

.access-storage-cards {
  gap: 0.85rem;
}

.storage-distribution-empty,
.storage-allocation-empty {
  border: 1px dashed #b6c19f;
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  background: rgba(255, 255, 255, 0.72);
}

.storage-line-card {
  border: 1px solid #c2c8b4;
  border-radius: 8px;
  background: #fff;
  padding: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.storage-line-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.storage-line-card-title {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.storage-line-card-meta {
  margin: 0.3rem 0 0;
  color: #4e5b43;
  font-size: 0.9rem;
}

.storage-line-card-remaining {
  white-space: nowrap;
  font-weight: 700;
  color: var(--brand-dark);
  border: 1px solid #b8c39d;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(123, 143, 77, 0.08);
}

.storage-line-card-remaining.is-over {
  color: var(--danger);
  border-color: rgba(173, 63, 63, 0.35);
  background: rgba(173, 63, 63, 0.08);
}

.storage-allocation-list {
  display: grid;
  gap: 0.7rem;
}

.storage-allocation-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns:
    minmax(210px, 1.5fr)
    minmax(100px, 0.7fr)
    minmax(100px, 0.7fr)
    minmax(180px, 1.2fr)
    auto;
  align-items: end;
  border: 1px solid #d8ddcb;
  border-radius: 8px;
  background: #fafbf7;
  padding: 0.7rem;
}

.storage-allocation-actions,
.storage-line-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.storage-read-list {
  display: grid;
  gap: 0.45rem;
}

.storage-read-item {
  display: grid;
  gap: 0.2rem;
  border: 1px solid #d8ddcb;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: #fafbf7;
}

.inventory-metric-cell {
  display: grid;
  gap: 0.15rem;
}

.inventory-metric-cell strong {
  color: var(--ink);
}

.inventory-metric-cell span {
  color: var(--muted);
  font-size: 0.88rem;
}

.inventory-net-positive strong,
.inventory-net-positive {
  color: var(--posted);
  font-weight: 800;
}

.inventory-net-negative strong,
.inventory-net-negative {
  color: var(--cancelled);
  font-weight: 800;
}

.inventory-net-neutral strong,
.inventory-net-neutral {
  color: var(--muted);
  font-weight: 800;
}

.settings-field-span {
  grid-column: 1 / -1;
}

.settings-stack {
  display: grid;
  gap: 1rem;
}

.access-bottom-actions {
  grid-area: actions;
}

.access-entry-shell .text-muted {
  color: #4e5b43 !important;
}

.pricing-panel-table th,
.pricing-table th {
  white-space: nowrap;
}

.pricing-panel-table {
  min-width: 920px;
}

.pricing-panel-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dbe4c8;
}

.pricing-panel-table td {
  background: #fff;
  vertical-align: top;
}

.pricing-history-cell {
  display: grid;
  gap: 0.15rem;
  font-size: 0.82rem;
}

.pricing-history-cell strong {
  color: var(--brand-dark);
}

.pricing-inline-form {
  min-width: 160px;
}

.pricing-table td {
  vertical-align: top;
}

.access-entry-shell .btn-primary {
  background: linear-gradient(180deg, #87a956, #6a8440);
  border-color: #5e7438;
}

.access-entry-shell .btn-outline-primary {
  border-color: #657b3f;
  color: #4c612d;
}

@media (min-width: 1200px) {
  .access-lines-head {
    display: grid;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: #344225;
    background: #dbe4c8;
    border: 1px solid #a8b58e;
    border-radius: 4px;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.5rem;
  }

  .access-lines-head > span {
    position: relative;
    padding-inline-end: 0.55rem;
  }

  .access-standard-row .form-label,
  .access-free-row .form-label {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .access-entry-shell #invoiceTypeDependentFields {
    grid-template-columns: 1fr;
    grid-template-areas:
      "account"
      "meta"
      "pricing"
      "lines"
      "free"
      "summary"
      "actions";
  }

  .access-standard-row,
  .access-free-row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

.balance-filters {
  background: linear-gradient(180deg, #5f7330, #4f6028) !important;
  border-color: #475724 !important;
}

.balance-filters .form-control,
.balance-filters .form-select {
  border-radius: 2px;
  border-color: #6c7f3d;
  min-height: 36px;
}

.balance-filters .btn-primary {
  background: #1b1f15;
  border-color: #0f110b;
}

.balance-grid-card {
  border-radius: 8px;
}

.balance-table thead th {
  background: #e5ebd7;
  color: #2f3a1d;
  font-weight: 800;
}

.balance-table tbody td {
  background: #fafcf7;
}

.balance-state-positive {
  color: #109b42 !important;
}

.balance-state-negative {
  color: #c02121 !important;
}

.balance-state-neutral {
  color: #6e725f !important;
}

.financial-filters {
  border: 1px solid #d8dfcc;
}

.financial-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.financial-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.92rem;
  cursor: pointer;
}

.financial-type-chip input {
  margin: 0;
}

.financial-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.financial-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem 0.9rem;
}

.financial-summary h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--muted);
}

.financial-summary strong {
  font-size: 1.3rem;
}

.financial-summary.positive strong {
  color: #109b42;
}

.financial-summary.negative strong {
  color: #c02121;
}

.financial-summary.net strong {
  color: var(--brand-dark);
}

.financial-split-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.financial-column {
  border-radius: 10px;
}

.financial-column-positive .section-title h2 {
  color: #108840;
}

.financial-column-negative .section-title h2 {
  color: #b71d1d;
}

.financial-table thead th {
  background: #f2f6ea;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.financial-table td,
.financial-table th {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.financial-table {
  min-width: 840px;
}

.financial-table th:nth-child(1),
.financial-table td:nth-child(1) {
  min-width: 72px;
}

.financial-table th:nth-child(2),
.financial-table td:nth-child(2) {
  min-width: 150px;
}

.financial-table th:nth-child(3),
.financial-table td:nth-child(3) {
  min-width: 170px;
}

.financial-table th:nth-child(4),
.financial-table td:nth-child(4) {
  min-width: 160px;
}

.financial-table th:nth-child(5),
.financial-table td:nth-child(5) {
  min-width: 140px;
}

.financial-table th:nth-child(6),
.financial-table td:nth-child(6) {
  min-width: 110px;
}

@media (max-width: 768px) {
  .financial-table {
    table-layout: auto;
    min-width: 760px;
  }

  .financial-table td,
  .financial-table th {
    white-space: nowrap;
  }
}

.financial-amount-positive {
  color: #109b42 !important;
}

.financial-amount-negative {
  color: #c02121 !important;
}

.reports-center-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.reports-center-card h2 {
  margin-bottom: 0.55rem;
}

.reports-center-card p {
  min-height: 54px;
}

.reports-filter-card {
  border: 1px solid #d8dfcc;
}

.reports-table thead th {
  background: #eef3e3;
}

.entity-print-sheet {
  border: 1px solid #d8dfcc;
  box-shadow: none;
  background: #fff;
}

.entity-print-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.entity-print-head h2 {
  font-size: 1.4rem;
  color: #233826;
}

.entity-print-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 0.35rem 1rem;
  font-size: 0.94rem;
}

.entity-print-meta-grid span,
.entity-print-summary span {
  color: var(--muted);
}

.entity-print-summary {
  border: 1px dashed #cad3bb;
  border-radius: 12px;
  background: #fafcf7;
  display: grid;
  gap: 0.45rem;
  min-width: 240px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
}

.entity-print-summary strong {
  margin-inline-start: 0.35rem;
}

.entity-print-table thead th {
  background: #f3f6eb;
}

.entity-print-table tfoot td {
  background: #f3f6eb;
}

.entity-print-group-row td {
  background: #fbfcf8 !important;
  color: #304528;
  font-weight: 700;
}

.print-mode-header {
  margin-bottom: 0.75rem !important;
}

@page {
  size: A4;
  margin: 15mm;
  orphans: 3;
  widows: 3;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .app-header,
  .app-sidebar,
  .sidebar-backdrop,
  .app-mobile-header,
  .app-public-header,
  .no-print,
  .notification-toast-container,
  .desktop-back-button,
  .sidebar-desktop-toggle {
    display: none !important;
  }

  .app-shell {
    display: block !important;
  }

  .app-content {
    margin-inline-start: 0 !important;
    padding-inline-start: 0 !important;
  }

  .app-main {
    padding: 0 !important;
  }

  .content-card,
  .stat-card,
  .line-box {
    box-shadow: none !important;
    border: 1px solid #999 !important;
    page-break-inside: avoid;
  }

  .table-modern {
    page-break-inside: avoid;
  }

  .table-modern thead {
    display: table-header-group;
  }

  .table-modern tbody tr {
    page-break-inside: avoid;
  }

  .entity-print-sheet {
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .entity-print-head {
    margin-bottom: 1rem;
    page-break-after: avoid;
  }

  .print-mode-header {
    margin-bottom: 1rem !important;
    font-size: 1.3rem;
    font-weight: 800;
  }

  a {
    text-decoration: none !important;
    color: inherit !important;
  }

  .hero-panel {
    display: none !important;
  }
}

.grid-resize-handle,
.table-resize-handle {
  position: absolute;
  top: 0;
  inset-inline-end: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 6;
}

.grid-resize-handle::after,
.table-resize-handle::after {
  content: "";
  position: absolute;
  inset-inline-start: 3px;
  top: 20%;
  width: 2px;
  height: 60%;
  background: rgba(37, 49, 20, 0.35);
}

.table-modern.table-resizable,
.table-resizable {
  table-layout: fixed;
}

.table-modern.table-resizable thead th,
.table-resizable thead th {
  position: relative;
}

.table-draggable-header {
  cursor: move;
  user-select: none;
}

.table-drag-handle {
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: rgba(37, 49, 20, 0.55);
  line-height: 1;
  pointer-events: none;
}

.table-modern.table-resizable thead th.grid-drag-over,
.table-resizable thead th.grid-drag-over {
  background: rgba(10, 108, 116, 0.14);
}

.table-modern.table-resizable thead th.grid-dragging,
.table-resizable thead th.grid-dragging {
  opacity: 0.65;
}

.grid-tools {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
  position: relative;
}

.grid-settings-toggle {
  min-width: 128px;
}

.grid-settings-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-start: 0;
  z-index: 20;
  min-width: 240px;
  max-width: min(94vw, 340px);
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(32, 33, 31, 0.12);
  padding: 0.6rem;
}

.grid-settings-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.grid-settings-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  padding: 0.25rem 0;
}

.grid-filter-button {
  position: absolute;
  inset-inline-end: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  z-index: 8;
}

.grid-filter-button:hover,
.grid-filter-active .grid-filter-button {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.grid-filter-active::after {
  content: "";
  position: absolute;
  inset-inline-end: 2rem;
  top: 0.55rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--clay);
}

.grid-filter-menu {
  position: fixed;
  z-index: 2050;
  width: min(92vw, 320px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 36px rgba(32, 33, 31, 0.16);
  padding: 0.75rem;
  text-align: start;
}

.grid-filter-title {
  font-weight: 900;
  margin-bottom: 0.55rem;
}

.grid-filter-actions,
.grid-filter-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.grid-filter-search {
  margin: 0.65rem 0 0.5rem;
}

.grid-filter-values {
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid rgba(32, 33, 31, 0.08);
  border-radius: 12px;
  padding: 0.35rem;
  background: #fbfcf8;
}

.grid-filter-value {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.grid-filter-value:hover {
  color: var(--ink);
  background: rgba(10, 108, 116, 0.06);
  border-radius: 8px;
}

.grid-filter-footer {
  justify-content: flex-end;
  border-top: 1px dashed rgba(32, 33, 31, 0.12);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
}

.table-modern tbody tr.grid-filtered-out,
.table-resizable tbody tr.grid-filtered-out {
  display: none;
}

@media (min-width: 992px) {
  .hero-panel {
    grid-template-columns: 1.8fr auto;
    align-items: end;
  }

  .details-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

@media (max-width: 991.98px) {
  body {
    overflow-x: hidden;
  }

  body.sidebar-open .app-content {
    pointer-events: none;
    filter: blur(0.5px);
    user-select: none;
  }

  .app-shell {
    display: block;
  }

  .app-content {
    margin-inline-start: 0 !important;
    padding-inline-start: 0 !important;
  }

  .app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(88vw, 320px);
    max-width: calc(100vw - 10px);
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 14px 0 0 14px;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    box-shadow: 0 20px 45px rgba(32, 33, 31, 0.24);
    padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 0.9rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    opacity: 1;
    border-inline-end: 1px solid var(--line);
    z-index: 45;
    visibility: hidden;
    pointer-events: none;
  }

  body.sidebar-open .app-sidebar,
  .app-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(19, 23, 20, 0.5);
    backdrop-filter: blur(2px);
    z-index: 44;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
    display: block;
  }

  .app-mobile-header,
  .app-public-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 24;
    padding-block: 0.75rem 0.6rem;
    background: rgba(244, 241, 234, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }

  .mobile-quick-actions {
    display: flex;
    position: sticky;
    top: 62px;
    z-index: 23;
    background: rgba(244, 241, 234, 0.94);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.6rem;
  }

  .sidebar-desktop-toggle {
    display: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-link,
  .sidebar-group-toggle,
  .notification-trigger,
  .sidebar-logout-button {
    min-height: 44px;
  }

  #sidebarCloseButton {
    min-height: 40px;
  }

  .app-main {
    padding: 1rem 0.75rem 2rem;
  }

  .notification-menu {
    width: min(94vw, 420px);
  }

  .notification-toast-container {
    inset-inline-end: 0.5rem;
    inset-inline-start: 0.5rem;
    width: auto;
  }

  .line-grid-2,
  .line-grid-3,
  .line-grid-4,
  .line-grid-7 {
    grid-template-columns: 1fr;
  }

  .storage-line-card-head,
  .storage-allocation-row {
    grid-template-columns: 1fr;
  }

  .storage-line-card-remaining {
    white-space: normal;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .dashboard-status-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-status-total {
    width: 100%;
    min-width: 0;
  }

  .dashboard-status-breakdown {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .dashboard-status-card {
    min-height: 0;
  }

  .dashboard-status-total {
    min-height: 72px;
  }

  .table-responsive {
    border-radius: 8px;
    border: 1px solid var(--line);
  }
}

@media (max-width: 575.98px) {
  .app-mobile-header,
  .app-public-header {
    gap: 0.55rem;
    padding-inline: 0.65rem;
  }

  .app-mobile-header .brand-text,
  .app-public-header .brand-text {
    font-size: 0.94rem;
  }

  .mobile-quick-actions {
    top: 60px;
    padding-inline: 0.65rem;
  }

  .mobile-quick-link {
    font-size: 0.82rem;
    padding: 0.42rem 0.75rem;
  }

  .hero-panel {
    padding: 1.35rem 1rem;
    border-radius: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem;
  }

  .dashboard-status-header {
    gap: 0.65rem;
  }

  .dashboard-breakdown-link {
    padding-block: 0.5rem;
  }

  .dashboard-status-breakdown {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .filters-grid .btn {
    width: 100%;
  }

  .page-header {
    margin-bottom: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .app-main {
    padding: 1rem 0.75rem 2rem;
  }

  .table-responsive {
    font-size: 0.9rem;
  }

  .table-modern td,
  .table-modern th {
    padding: 0.75rem 0.85rem !important;
  }

  .control-btn,
  .control-actions-wrap > .btn,
  .control-actions-wrap > form > .btn {
    min-height: 36px;
    padding-inline: 0.9rem;
    font-size: 0.88rem;
  }

  .table td .btn.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }

  .content-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .stat-card strong {
    font-size: 1.8rem;
  }

  .dashboard-status-card {
    min-height: auto;
  }
}

@media (min-width: 992px) {
  .app-mobile-header,
  .app-public-header,
  #sidebarCloseButton {
    display: none !important;
  }

  body.assigned-user-shell .assigned-user-header {
    display: flex !important;
  }

  .app-sidebar {
    overflow: hidden;
  }
}

.login-shell {
  min-height: calc(100vh - 8rem);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.15rem;
  padding: 1rem 0.5rem 2rem;
}

body.login-page-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 10%, rgba(10, 108, 116, 0.18), transparent 30%),
    radial-gradient(circle at 15% 85%, rgba(201, 111, 63, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbf9 0%, #edf4f1 100%);
}

body.login-page-shell .app-shell,
body.login-page-shell .app-content {
  min-height: 100vh;
}

body.login-page-shell .app-content {
  margin-inline-start: 0 !important;
  padding: 0;
}

body.login-page-shell .app-public-header {
  display: none;
}

body.login-page-shell .app-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

body.login-page-shell .app-content-shell,
body.login-page-shell .app-main-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
}

body.login-page-shell .app-main-shell {
  align-items: center;
}

body.login-page-shell .login-shell {
  width: min(100%, 680px);
  min-height: auto;
  padding: 0;
  margin-inline: auto;
}

.login-header {
  max-width: 700px;
}

.login-header h1 {
  margin-bottom: 0.35rem;
}

.login-header .page-copy-dark {
  margin-bottom: 0;
}

.login-card {
  width: min(100%, 600px);
  margin: 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(10, 108, 116, 0.14);
  box-shadow: 0 28px 60px rgba(25, 35, 42, 0.16);
  backdrop-filter: blur(8px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 235, 0.9));
}

.login-form {
  gap: 0.95rem;
}

.login-form .form-control {
  border-radius: 14px;
}

.login-form .btn {
  border-radius: 14px;
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .login-shell {
    min-height: calc(100vh - 5.2rem);
    padding-top: 0.2rem;
  }

  .login-card {
    width: min(100%, 540px);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(25, 35, 42, 0.14);
  }
}

/* Hide number input spinner controls when we only need direct typing */
input.no-spinner[type="number"] {
  -moz-appearance: textfield;
}

input.no-spinner[type="number"]::-webkit-outer-spin-button,
input.no-spinner[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.js-pricing-search-select {
  position: relative;
}

.js-pricing-search-select-display {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.js-pricing-search-select-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 4px);
  z-index: 1060;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.app-confirm-modal {
  border-radius: 16px;
  border: 1px solid rgba(32, 33, 31, 0.08);
}

.app-confirm-modal .modal-header {
  border-bottom-color: var(--line);
}

.app-confirm-modal .modal-footer {
  border-top-color: var(--line);
}

.app-confirm-modal-consequence {
  border: 1px dashed rgba(32, 33, 31, 0.2);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: rgba(32, 33, 31, 0.03);
}

/* ========== Skeleton Loading States ========== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(32, 33, 31, 0.06) 0%,
    rgba(32, 33, 31, 0.12) 50%,
    rgba(32, 33, 31, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-line {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 1.4rem;
  width: 60%;
  margin-bottom: 0.75rem;
}

.skeleton-card {
  padding: 1.25rem;
  border-radius: 16px;
}

.skeleton-card .skeleton-line:last-child {
  margin-bottom: 0;
}

/* ========== Loading Spinners ========== */
.spinner-border {
  border-width: 0.25rem;
  border-color: rgba(10, 108, 116, 0.25);
  border-inline-end-color: var(--brand);
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.spinner-small {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
}

.spinner-medium {
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
}

.spinner-large {
  width: 3rem;
  height: 3rem;
  font-size: 1.25rem;
}

.loading-text::after {
  content: ".";
  animation: loading-dots 0.6s steps(1) infinite;
}

@keyframes loading-dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60% {
    content: "...";
  }
}

/* ========== Breadcrumbs ========== */
.breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(10, 108, 116, 0.08);
}

.breadcrumb-item {
  font-size: 0.95rem;
  font-weight: 700;
}

.breadcrumb-item::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--muted);
}

.breadcrumb-item a {
  color: var(--brand);
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--brand-dark);
}

.breadcrumb-item.active {
  color: var(--muted);
}

/* ========== Progress Indicators ========== */
.progress {
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(10, 108, 116, 0.1);
  overflow: hidden;
  border: 1px solid rgba(10, 108, 116, 0.1);
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ========== Tooltips ========== */
.tooltip-inner {
  background: rgba(32, 33, 31, 0.96);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  max-width: 200px;
}

.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: rgba(32, 33, 31, 0.96);
}

.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: rgba(32, 33, 31, 0.96);
}

/* ========== Tags والعلامات ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.35rem;
}

.badge-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.badge-success {
  background: rgba(6, 118, 71, 0.15);
  color: #067647;
}

.badge-danger {
  background: rgba(180, 35, 24, 0.15);
  color: #b42318;
}

.badge-warning {
  background: rgba(102, 45, 145, 0.15);
  color: #662d91;
}

/* ========== Collapse/Accordion ========== */
.accordion-button {
  padding: 1rem 1.25rem;
  font-weight: 700;
  background: transparent;
  border: 1px solid rgba(10, 108, 116, 0.1);
  border-radius: 14px;
  color: var(--ink);
  transition: all 0.2s ease;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, rgba(10, 108, 116, 0.08), rgba(10, 108, 116, 0.04));
  border-color: rgba(10, 108, 116, 0.2);
  color: var(--brand-dark);
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.1);
}

.accordion-button:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(10, 108, 116, 0.15);
}

.accordion-body {
  padding: 1.25rem;
  border-top: 1px solid rgba(10, 108, 116, 0.1);
}

/* ========== Divider ========== */
.divider {
  border: 0;
  border-top: 1px solid rgba(10, 108, 116, 0.1);
  margin: 1.5rem 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-weight: 700;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

/* ========== Button Groups والـ Split Buttons ========== */
.btn-group {
  gap: 0.5rem;
}

.btn-group > .btn,
.btn-group > .btn-group {
  border-radius: 12px;
}

.btn-group > .btn:not(:last-child) {
  border-inline-end-width: 1px;
}

.split-button {
  display: inline-grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}

.split-button .btn:first-child {
  border-inline-end-width: 0;
  border-inline-end-color: transparent;
}

.split-button .dropdown-toggle {
  border-inline-start-width: 0;
}



/* Production mobile: tighter composer layout for better one-hand usage */
.production-mobile-composer-row {
  gap: 0.35rem !important;
}

.production-mobile-line-field-inline .form-select,
.production-mobile-line-field-inline .form-control,
.production-mobile-line-field-weight .form-control {
  min-height: 40px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* ========== Entity Profile ========== */
.entity-profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(circle at top right, rgba(10, 108, 116, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 248, 0.92));
}

.entity-profile-hero h1 {
  margin: 0.25rem 0 0.75rem;
  font-weight: 900;
}

.entity-profile-tags,
.entity-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-profile-tags span {
  border: 1px solid rgba(10, 108, 116, 0.14);
  background: rgba(10, 108, 116, 0.08);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
}

.entity-profile-note {
  color: var(--muted);
  margin: 0.85rem 0 0;
  max-width: 760px;
}

.entity-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.entity-profile-metric {
  border-radius: 20px;
  border: 1px solid rgba(10, 108, 116, 0.12);
  background: #fff;
  padding: 1.15rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.entity-profile-metric span,
.entity-profile-metric small,
.entity-profile-footer span,
.entity-timeline-item span,
.entity-price-item span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.entity-profile-metric strong {
  display: block;
  margin: 0.35rem 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 900;
}

.entity-profile-metric.is-debit strong {
  color: #b42318;
}

.entity-profile-metric.is-credit strong {
  color: #067647;
}

.entity-profile-metric.is-settled strong {
  color: var(--brand-dark);
}

.entity-profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
}

.entity-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.entity-section-head h2 {
  margin: 0.2rem 0 0;
}

.entity-timeline,
.entity-price-list {
  display: grid;
  gap: 0.65rem;
}

.entity-timeline-item,
.entity-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(10, 108, 116, 0.1);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
  background: rgba(248, 252, 251, 0.82);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.entity-timeline-item:hover,
.entity-price-item:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 108, 116, 0.28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.entity-profile-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* ========== Desktop Dashboard Upgrade ========== */
.pc-dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.pc-status-card {
  --pc-status-icon-filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  min-height: 150px;
  padding: 1.05rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 20%, rgba(10, 108, 116, 0.07), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(252, 254, 253, 0.94));
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.075);
}

.pc-status-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #0a6c74;
  background: rgba(10, 108, 116, 0.1);
  font-size: 1.42rem;
  font-weight: 950;
}

.pc-status-svg {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: var(--pc-status-icon-filter);
}

.pc-status-body {
  display: grid;
  align-content: start;
  gap: 0.1rem;
  text-align: end;
}

.pc-status-label {
  color: #172033;
  font-size: 0.9rem;
  font-weight: 950;
}

.pc-status-body strong {
  color: #172033;
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1;
}

.pc-status-body small {
  color: #64748b;
  font-weight: 800;
}

.pc-status-card::after {
  content: "";
  position: absolute;
  inset-inline: 1rem;
  bottom: 0.65rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(10, 108, 116, 0.08);
}

.pc-status-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding: 0.62rem 0.75rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.pc-status-foot a {
  color: #0a6c74;
  font-weight: 950;
  text-decoration: none;
}

.pc-status-approved .pc-status-icon,
.pc-status-approved .pc-status-foot {
  color: #087042;
  background: rgba(16, 185, 129, 0.12);
}

.pc-status-approved {
  --pc-status-icon-filter: brightness(0) saturate(100%) invert(35%) sepia(94%) saturate(514%) hue-rotate(108deg) brightness(91%) contrast(92%);
}

.pc-status-approved::after {
  background: rgba(16, 185, 129, 0.18);
}

.pc-status-draft .pc-status-icon,
.pc-status-draft .pc-status-foot {
  color: #8a5a00;
  background: rgba(245, 158, 11, 0.12);
}

.pc-status-draft {
  --pc-status-icon-filter: brightness(0) saturate(100%) invert(42%) sepia(83%) saturate(619%) hue-rotate(5deg) brightness(92%) contrast(101%);
}

.pc-status-draft::after {
  background: rgba(245, 158, 11, 0.18);
}

.pc-status-cancelled .pc-status-icon,
.pc-status-cancelled .pc-status-foot {
  color: #b42318;
  background: rgba(239, 68, 68, 0.1);
}

.pc-status-cancelled {
  --pc-status-icon-filter: brightness(0) saturate(100%) invert(22%) sepia(89%) saturate(2164%) hue-rotate(348deg) brightness(91%) contrast(93%);
}

.pc-status-cancelled::after {
  background: rgba(239, 68, 68, 0.16);
}

.pc-status-deleted .pc-status-icon,
.pc-status-deleted .pc-status-foot {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.pc-status-deleted {
  --pc-status-icon-filter: brightness(0) saturate(100%) invert(36%) sepia(13%) saturate(1057%) hue-rotate(176deg) brightness(89%) contrast(85%);
}

.pc-status-deleted::after {
  background: rgba(100, 116, 139, 0.18);
}

.pc-workspace-panel {
  padding: 1.15rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 251, 0.94)),
    radial-gradient(circle at 18% 8%, rgba(182, 244, 32, 0.1), transparent 28%);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.pc-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pc-section-head h2 {
  margin: 0.1rem 0;
  color: #172033;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 950;
}

.pc-section-head p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.pc-section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.pc-view-switch {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.28rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.pc-card-limit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0a6c74;
  font-size: 0.78rem;
  font-weight: 950;
}

.pc-card-limit select {
  min-width: 72px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 0.55rem;
  color: #172033;
  background: rgba(248, 250, 252, 0.95);
  font-weight: 950;
}

.pc-view-toggle,
.pc-outline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 0;
  color: #0a6c74;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
}

.pc-view-toggle.active {
  color: #fff;
  background: linear-gradient(135deg, #0a6c74, #098f8f);
  box-shadow: 0 10px 24px rgba(10, 108, 116, 0.24);
}

.pc-work-scope-switch {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(10, 108, 116, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.pc-work-scope-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.45rem 1rem;
  border: 0;
  border-inline-start: 1px solid rgba(10, 108, 116, 0.16);
  color: #0a6c74;
  background: transparent;
  font-weight: 950;
  text-decoration: none;
}

.pc-work-scope-toggle:first-child {
  border-inline-start: 0;
}

.pc-work-scope-toggle.active {
  color: #fff;
  background: linear-gradient(135deg, #0a6c74, #098f8f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.pc-work-scope-toggle:hover,
.pc-work-scope-toggle:focus-visible {
  color: #075c62;
}

.pc-work-scope-toggle.active:hover,
.pc-work-scope-toggle.active:focus-visible {
  color: #fff;
}

.pc-workspace-panel.is-purchase-scope .pc-view-switch,
.pc-workspace-panel.is-purchase-scope .pc-card-limit {
  display: none;
}

[data-dashboard-scope-panel][hidden] {
  display: none !important;
}

.pc-outline-action {
  border: 1px solid rgba(10, 108, 116, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

.pc-work-filters {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.pc-work-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.pc-work-filter-row-status {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pc-work-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.1rem;
  border: 0;
  border-inline-start: 1px solid rgba(10, 108, 116, 0.1);
  color: #172033;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 950;
  transition: color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.pc-work-filter:first-child {
  border-inline-start: 0;
}

.pc-work-filter img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
}

.pc-work-filter.active {
  color: #fff;
  background: linear-gradient(135deg, #0a6c74, #098f8f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.pc-work-filter.active img {
  filter: brightness(0) invert(1);
}

.pc-kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
}

.pc-work-card {
  --pc-icon-filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
  position: relative;
  display: grid;
  gap: 0.82rem;
  min-height: 245px;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 6% 4%, rgba(10, 108, 116, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(252, 254, 253, 0.94));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
  cursor: pointer;
  direction: rtl;
  text-align: start;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pc-work-card--invoice {
  padding-bottom: 1.35rem;
}

.pc-work-card--invoice::after {
  content: "";
  position: absolute;
  inset-inline: 1rem;
  bottom: -11px;
  height: 22px;
  background: radial-gradient(circle at 11px 0, transparent 11px, #edf3fb 11.5px) repeat-x;
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.98;
}

.pc-work-card--invoice .pc-doc-amount {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 249, 0.92)) !important;
  border-style: dashed;
}

.pc-work-card--voucher {
  --pc-bank-accent: #0a6c74;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(246, 250, 255, 0.96)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.03) 0 1px, transparent 1px 28px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 18px 44px rgba(15, 23, 42, 0.09);
}

.pc-work-card--voucher::after {
  content: "";
  position: absolute;
  inset: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  pointer-events: none;
}

.pc-work-card--voucher::before {
  width: 6px;
  background: linear-gradient(180deg, var(--pc-bank-accent), color-mix(in srgb, var(--pc-bank-accent) 52%, white));
}

.pc-work-card--voucher .pc-work-card-top {
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.32);
}

.pc-work-card--voucher .pc-doc-type,
.pc-work-card--voucher .pc-doc-status {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.pc-work-card--voucher .pc-doc-code {
  letter-spacing: 0.025em;
}

.pc-work-card--voucher .pc-doc-amount {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96)) !important;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.pc-work-card--receipt {
  --pc-bank-accent: #16a34a;
}

.pc-work-card--payment {
  --pc-bank-accent: #dc2626;
}

.pc-work-card--receipt .pc-doc-amount strong {
  color: #15803d;
}

.pc-work-card--payment .pc-doc-amount strong {
  color: #dc2626;
}

.pc-work-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: #0a6c74;
}

.pc-work-card:hover,
.pc-work-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(10, 108, 116, 0.28);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
}

.pc-work-card-top,
.pc-doc-meta,
.pc-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.pc-doc-type,
.pc-doc-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  background: rgba(10, 108, 116, 0.08);
  color: #0a6c74;
  font-size: 0.76rem;
  font-weight: 950;
}

.pc-work-attachment-alert {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.72);
  border-radius: 999px;
  background: #fffaf0;
  color: #d97706;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.12);
}

.pc-work-attachment-alert:hover,
.pc-work-attachment-alert:focus-visible {
  background: #f59e0b;
  color: #fff;
  outline: 0;
}

.dashboard-attachment-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
}

.dashboard-attachment-preview-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px solid rgba(15, 66, 86, 0.12);
  border-radius: 1rem;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
}

.dashboard-attachment-preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #eef4f8;
}

.dashboard-attachment-preview-card span {
  font-size: 0.82rem;
  font-weight: 850;
}

.pc-doc-type i,
.pc-doc-status i,
.pc-doc-type-inline i,
.pc-doc-entity i,
.pc-doc-meta i,
.pc-svg-icon,
.pc-inline-icon,
.pc-button-icon {
  font-size: 0.95em;
  line-height: 1;
}

.pc-doc-type i,
.pc-doc-type-inline i,
.pc-svg-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 108, 116, 0.12);
}

.pc-svg-icon,
.pc-inline-icon,
.pc-button-icon {
  display: inline-block;
  object-fit: contain;
  flex: 0 0 auto;
  filter: var(--pc-icon-filter, none);
  transition: filter 0.14s ease, opacity 0.14s ease, transform 0.14s ease;
}

.pc-inline-icon {
  width: 16px;
  height: 16px;
  opacity: 0.82;
}

.pc-button-icon {
  width: 17px;
  height: 17px;
}

.pc-doc-status {
  color: #087042;
  background: rgba(16, 185, 129, 0.12);
}

.pc-doc-code {
  color: #0864c7;
  font-size: 1rem;
  font-weight: 950;
  text-decoration: none;
  direction: ltr;
  text-align: start;
}

.pc-doc-entity,
.pc-doc-amount {
  display: grid;
  gap: 0.2rem;
}

.pc-doc-entity span,
.pc-doc-amount span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 900;
}

.pc-doc-entity strong {
  color: #172033;
  font-size: 0.95rem;
  font-weight: 950;
}

.pc-entity-link {
  color: #172033;
  font-size: 0.95rem;
  font-weight: 950;
  text-decoration: none;
}

.pc-entity-link:hover {
  color: #0a6c74;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.pc-doc-amount strong {
  color: #0f766e;
  font-size: 1.08rem;
  font-weight: 950;
}

.pc-doc-amount {
  padding: 0.64rem 0.72rem;
  border: 1px solid rgba(10, 108, 116, 0.1);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.pc-doc-meta {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 850;
}

.pc-card-actions {
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.pc-card-actions a,
.pc-card-actions button {
  --pc-action-color: #0a6c74;
  --pc-action-border: rgba(10, 108, 116, 0.16);
  --pc-action-bg: rgba(255, 255, 255, 0.9);
  --pc-action-hover-color: #064f55;
  --pc-action-hover-border: rgba(10, 108, 116, 0.32);
  --pc-action-hover-bg: rgba(237, 249, 246, 0.96);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--pc-action-border);
  border-radius: 12px;
  color: var(--pc-action-color);
  background: var(--pc-action-bg);
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: none;
  gap: 0.32rem;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.pc-card-actions a:hover,
.pc-card-actions a:focus-visible,
.pc-card-actions button:hover,
.pc-card-actions button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--pc-action-hover-border);
  color: var(--pc-action-hover-color);
  background: var(--pc-action-hover-bg);
  box-shadow: 0 10px 22px rgba(10, 108, 116, 0.14);
}

.pc-card-actions a .pc-button-icon,
.pc-card-actions button .pc-button-icon {
  filter: var(--pc-action-icon-filter);
}

.pc-card-actions a:hover .pc-button-icon,
.pc-card-actions a:focus-visible .pc-button-icon,
.pc-card-actions button:hover .pc-button-icon,
.pc-card-actions button:focus-visible .pc-button-icon {
  transform: translateY(-1px) scale(1.04);
  opacity: 1;
}

.pc-card-actions form {
  margin: 0;
}

.pc-card-pager button img {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.pc-card-actions .pc-action-print {
  --pc-action-color: #2563eb;
  --pc-action-border: rgba(37, 99, 235, 0.18);
  --pc-action-bg: rgba(239, 246, 255, 0.82);
  --pc-action-hover-color: #1d4ed8;
  --pc-action-hover-border: rgba(37, 99, 235, 0.32);
  --pc-action-hover-bg: rgba(219, 234, 254, 0.92);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(33%) sepia(89%) saturate(1952%) hue-rotate(211deg) brightness(94%) contrast(94%);
}

.pc-card-actions .pc-action-edit {
  --pc-action-color: #b45309;
  --pc-action-border: rgba(245, 158, 11, 0.28);
  --pc-action-bg: rgba(255, 251, 235, 0.86);
  --pc-action-hover-color: #92400e;
  --pc-action-hover-border: rgba(245, 158, 11, 0.42);
  --pc-action-hover-bg: rgba(254, 243, 199, 0.94);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(42%) sepia(83%) saturate(619%) hue-rotate(5deg) brightness(92%) contrast(101%);
}

.pc-card-actions .pc-action-approve {
  --pc-action-color: #087042;
  --pc-action-border: rgba(16, 185, 129, 0.22);
  --pc-action-bg: rgba(236, 253, 245, 0.86);
  --pc-action-hover-color: #065f46;
  --pc-action-hover-border: rgba(16, 185, 129, 0.38);
  --pc-action-hover-bg: rgba(209, 250, 229, 0.94);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(35%) sepia(94%) saturate(514%) hue-rotate(108deg) brightness(91%) contrast(92%);
}

.pc-card-actions .pc-action-pay {
  --pc-action-color: #0a6c74;
  --pc-action-border: rgba(10, 108, 116, 0.24);
  --pc-action-bg: rgba(237, 249, 246, 0.9);
  --pc-action-hover-color: #064f55;
  --pc-action-hover-border: rgba(10, 108, 116, 0.4);
  --pc-action-hover-bg: rgba(204, 251, 241, 0.88);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
}

.pc-card-actions .pc-action-paid,
.pc-card-actions .pc-action-paid:disabled {
  --pc-action-color: #64748b;
  --pc-action-border: rgba(100, 116, 139, 0.16);
  --pc-action-bg: rgba(241, 245, 249, 0.9);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(45%) sepia(10%) saturate(702%) hue-rotate(175deg) brightness(92%) contrast(88%);
  cursor: not-allowed;
  opacity: 0.78;
}

.pc-card-actions .pc-action-pay,
.pc-card-actions .pc-action-paid {
  direction: rtl;
}

.pc-card-actions .pc-action-danger {
  --pc-action-color: #dc2626;
  --pc-action-border: rgba(220, 38, 38, 0.18);
  --pc-action-bg: rgba(255, 255, 255, 0.9);
  --pc-action-hover-color: #b91c1c;
  --pc-action-hover-border: rgba(220, 38, 38, 0.3);
  --pc-action-hover-bg: rgba(254, 242, 242, 0.96);
  --pc-action-icon-filter: brightness(0) saturate(100%) invert(22%) sepia(89%) saturate(2164%) hue-rotate(348deg) brightness(91%) contrast(93%);
}

.pc-documents-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
  padding: 0;
  background: transparent;
}

.pc-document-card {
  min-height: 245px;
  align-content: start;
}

.pc-documents-kanban .pc-work-card-top {
  min-height: 32px;
}

.pc-card-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #0a6c74;
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
}

.pc-doc-type-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pc-card-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #0a6c74;
}

.pc-card-actions .pc-card-check-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(10, 108, 116, 0.16);
  border-radius: 12px;
  color: #0a6c74;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 950;
  gap: 0.32rem;
}

.pc-document-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.pc-document-money > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.68rem 0.74rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.055);
}

.pc-document-money span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
}

.pc-document-money strong {
  color: #172033;
  font-size: 0.96rem;
  font-weight: 950;
}

.pc-card-draft::before {
  background: linear-gradient(180deg, #f59e0b, #efda83);
}

.pc-card-approved {
  --pc-icon-filter: brightness(0) saturate(100%) invert(35%) sepia(94%) saturate(514%) hue-rotate(108deg) brightness(91%) contrast(92%);
}

.pc-card-approved .pc-doc-type,
.pc-card-approved .pc-doc-type-inline {
  color: #087042;
  background: rgba(16, 185, 129, 0.12);
}

.pc-card-approved .pc-svg-icon {
  background: rgba(16, 185, 129, 0.16);
}

.pc-card-cancelled::before {
  background: linear-gradient(180deg, #f97316, #ef4444);
}

.pc-card-deleted::before {
  background: linear-gradient(180deg, #64748b, #334155);
}

.pc-card-draft {
  --pc-icon-filter: brightness(0) saturate(100%) invert(42%) sepia(83%) saturate(619%) hue-rotate(5deg) brightness(92%) contrast(101%);
}

.pc-card-draft .pc-doc-status {
  color: #8a5a00;
  background: rgba(245, 158, 11, 0.13);
}

.pc-card-draft .pc-doc-type,
.pc-card-draft .pc-doc-type-inline {
  color: #8a5a00;
  background: rgba(245, 158, 11, 0.13);
}

.pc-card-draft .pc-svg-icon {
  background: rgba(245, 158, 11, 0.18);
}

.pc-card-cancelled .pc-doc-status {
  color: #b42318;
  background: rgba(239, 68, 68, 0.1);
}

.pc-card-cancelled {
  --pc-icon-filter: brightness(0) saturate(100%) invert(22%) sepia(89%) saturate(2164%) hue-rotate(348deg) brightness(91%) contrast(93%);
}

.pc-card-cancelled .pc-doc-type,
.pc-card-cancelled .pc-doc-type-inline {
  color: #b42318;
  background: rgba(239, 68, 68, 0.1);
}

.pc-card-cancelled .pc-svg-icon {
  background: rgba(239, 68, 68, 0.14);
}

.pc-card-deleted .pc-doc-status {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.pc-card-deleted {
  --pc-icon-filter: brightness(0) saturate(100%) invert(36%) sepia(13%) saturate(1057%) hue-rotate(176deg) brightness(89%) contrast(85%);
}

.pc-card-deleted .pc-doc-type,
.pc-card-deleted .pc-doc-type-inline {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.pc-card-deleted .pc-svg-icon {
  background: rgba(100, 116, 139, 0.16);
}

.pc-empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 0.3rem;
  min-height: 170px;
  border: 1px dashed rgba(10, 108, 116, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  text-align: center;
}

.pc-empty-state strong {
  color: #172033;
  font-weight: 950;
}

.pc-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 1rem auto 0;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 999px;
  color: #0a6c74;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.pc-card-pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 1rem;
}

.pc-card-pager button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 50%;
  color: #0a6c74;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.pc-card-pager button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pc-card-pager span {
  min-width: 74px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #172033;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.document-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 1rem;
}

.document-summary-modal[hidden] {
  display: none;
}

.document-summary-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.document-summary-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.4rem 1.4rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.document-summary-close {
  position: absolute;
  top: 0.85rem;
  inset-inline-start: 0.85rem;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  color: #172033;
  background: rgba(241, 245, 249, 0.95);
  font-size: 1.45rem;
  line-height: 1;
}

.document-summary-kicker {
  display: inline-flex;
  margin-bottom: 0.25rem;
  color: #0a7d80;
  font-size: 0.82rem;
  font-weight: 950;
}

.document-summary-action-wrap {
  position: static;
  display: flex;
  justify-content: flex-start;
  margin: 0.35rem 0 0.8rem;
}

.document-summary-action-wrap[hidden] {
  display: none !important;
}

.document-summary-action-wrap form {
  margin: 0;
}

.document-summary-main-action {
  min-width: 128px;
  min-height: 46px;
  border: 2px solid rgba(10, 108, 116, 0.3);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0a7d80, #07948f);
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(10, 108, 116, 0.2);
}

.document-summary-action-wrap.is-highlighted .document-summary-main-action {
  animation: summaryActionPulse 1.15s ease 2;
}

.document-summary-action-wrap.is-paid .document-summary-main-action,
.document-summary-main-action:disabled {
  border-color: rgba(100, 116, 139, 0.22);
  color: #64748b;
  background: rgba(241, 245, 249, 0.95);
  box-shadow: none;
  cursor: not-allowed;
}

@keyframes summaryActionPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 16px 34px rgba(10, 108, 116, 0.2);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 5px rgba(10, 108, 116, 0.12), 0 18px 40px rgba(10, 108, 116, 0.26);
  }
}

.document-summary-sheet h2 {
  margin: 0 0 0.5rem;
  color: #172033;
  font-size: 1.45rem;
  font-weight: 950;
}

.document-summary-code {
  margin-bottom: 0.85rem;
  color: #0864c7;
  font-size: 1rem;
  font-weight: 950;
  direction: ltr;
  text-align: start;
}

.document-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.document-summary-grid > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.88);
}

.document-summary-grid span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.document-summary-grid strong {
  color: #172033;
  font-size: 0.98rem;
  font-weight: 950;
}

.document-summary-total-field {
  border-color: rgba(10, 108, 116, 0.13) !important;
  background:
    radial-gradient(circle at 12% 18%, rgba(10, 108, 116, 0.08), transparent 44%),
    rgba(250, 253, 252, 0.94) !important;
}

.document-summary-total-field strong {
  color: #0a6c74;
  font-size: 1.08rem;
}

.document-summary-wide {
  grid-column: 1 / -1;
  position: relative;
}

.document-summary-items-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(10, 108, 116, 0.14);
  border-radius: 999px;
  padding: 0.52rem 0.72rem;
  color: #0a6c74;
  background: rgba(237, 249, 246, 0.86);
  text-align: start;
  font-size: 1rem;
  font-weight: 950;
}

.document-summary-items-pill strong {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0a6c74;
}

.document-summary-items-pill small {
  flex: 0 0 auto;
  max-width: 5.5rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: #fff;
  background: #0a7d80;
  font-size: 0.82rem;
  font-weight: 950;
}

.document-summary-lines-popout {
  position: absolute;
  inset-inline: 0;
  bottom: calc(100% + 0.25rem);
  z-index: 12;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.5rem;
  max-height: min(330px, 48vh);
  overflow: hidden;
  padding: 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

.document-summary-lines-popout[hidden] {
  display: none;
}

.document-summary-lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.document-summary-lines-head strong {
  color: #172033;
  font-weight: 950;
}

.document-summary-lines-head button {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 50%;
  color: #172033;
  background: rgba(241, 245, 249, 0.95);
  font-size: 1.15rem;
}

.document-summary-lines-list {
  display: grid;
  gap: 0.55rem;
  min-height: 0;
  max-height: 15.8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 0.2rem;
}

.document-summary-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.8rem;
  background: rgba(248, 250, 252, 0.92);
}

.document-summary-line-row strong {
  color: #172033;
  font-size: 1rem;
  font-weight: 950;
}

.document-summary-line-row span {
  grid-column: 1;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 900;
}

.document-summary-line-edit-value {
  border: 0;
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  color: #087568;
  background: rgba(15, 118, 110, 0.1);
  font: inherit;
  font-weight: 950;
  line-height: 1.5;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.document-summary-line-edit-value.is-price {
  color: #0b5ed7;
  background: rgba(37, 99, 235, 0.1);
}

.document-summary-line-edit-value:hover,
.document-summary-line-edit-value:focus {
  transform: translateY(-1px);
  background: rgba(15, 118, 110, 0.18);
}

.document-summary-line-edit-value.is-price:hover,
.document-summary-line-edit-value.is-price:focus {
  background: rgba(37, 99, 235, 0.18);
}

.document-summary-line-row b {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: #07825f;
  font-size: 1rem;
  font-weight: 950;
}

.document-summary-line-empty {
  padding: 0.75rem;
  border-radius: 0.8rem;
  color: #64748b;
  background: rgba(248, 250, 252, 0.92);
  text-align: center;
  font-weight: 850;
}

.document-summary-line-editor {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(239, 246, 255, 0.95));
}

.document-summary-line-editor[hidden] {
  display: none;
}

.document-summary-line-editor > div:first-of-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.document-summary-line-editor span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.document-summary-line-editor strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 950;
}

.document-summary-line-editor label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.document-summary-line-editor input {
  min-height: 2.45rem;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 0.75rem;
  padding: 0.45rem 0.7rem;
  color: #0f172a;
  background: #fff;
  font-weight: 950;
  text-align: center;
}

.document-summary-line-editor__error {
  margin: 0;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 850;
}

.document-summary-line-editor__actions {
  display: flex;
  gap: 0.45rem;
}

.document-summary-line-editor__actions button {
  flex: 1;
  min-height: 2.25rem;
  border-radius: 0.7rem;
  font-weight: 950;
}

.document-summary-line-editor__actions button[type="submit"] {
  border: 0;
  color: #fff;
  background: #0a7d80;
}

.document-summary-line-editor__actions button[type="button"] {
  border: 1px solid rgba(15, 23, 42, 0.16);
  color: #334155;
  background: #fff;
}

.document-summary-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.document-summary-actions > * {
  flex: 1;
  min-height: 2.65rem;
  border-radius: 0.85rem;
  font-weight: 900;
}

body.document-summary-open {
  overflow: hidden;
}

.mobile-dashboard-topbar,
.mobile-dashboard-hero,
.mobile-dashboard-bottom-nav,
.mobile-work-scroll-top {
  display: none;
}

.mobile-filter-toast {
    display: none;
}

/* Shared mobile action bars */
.dr-mobile-action-bar {
  z-index: 40;
}

.dr-mobile-action-bar--fixed {
  position: fixed;
  inset-inline: 0;
  bottom: 1rem;
  padding-inline: 1rem;
}

.dr-mobile-action-bar--sticky {
  position: sticky;
  inset-block-end: 0.75rem;
}

.dr-mobile-action-bar--above-nav {
  bottom: 5.5rem;
}

.dr-mobile-action-bar__inner {
  width: min(100%, 960px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(var(--dr-mobile-action-columns, 2), minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(18, 57, 91, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}

.dr-mobile-action {
  min-height: 3.3rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 900;
  font: inherit;
}

@media (max-width: 767.98px) {
  .dr-mobile-action-bar__inner {
    grid-template-columns: 1fr;
  }

  .dr-mobile-action-bar--sticky {
    inset-block-end: 0.5rem;
  }
}

@media (max-width: 1199.98px) {
  .pc-dashboard-status-grid,
  .pc-kanban-grid,
  .pc-documents-kanban {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  body.page-home-index {
    background:
      radial-gradient(circle at 50% 4%, rgba(10, 108, 116, 0.08), transparent 36%),
      linear-gradient(180deg, #f8fbff 0%, #eef4f8 58%, #f7f9fb 100%);
  }

  body.page-home-index .app-mobile-header,
  body.page-home-index .mobile-quick-actions {
    display: none;
  }

  body.page-home-index .app-main {
    width: min(100%, 460px);
    min-height: 100dvh;
    margin-inline: auto;
    padding: 0 1rem calc(7rem + env(safe-area-inset-bottom, 0px));
    background:
      radial-gradient(circle at 52% 12%, rgba(10, 108, 116, 0.08), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 250, 0.96));
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.03), 0 28px 80px rgba(15, 23, 42, 0.08);
  }

  .mobile-dashboard-shell {
    display: block;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  }

  .mobile-dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .mobile-dashboard-menu,
  .mobile-dashboard-notification,
  .mobile-dashboard-avatar {
    display: inline-grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 1.05rem;
    color: #0a6c74;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
  }

  .mobile-dashboard-menu {
    gap: 0.22rem;
  }

  .mobile-dashboard-menu span {
    width: 1.22rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-dashboard-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
  }

  .mobile-dashboard-notification {
    position: relative;
    border-radius: 1.1rem;
    font-size: 1.25rem;
  }

  .mobile-dashboard-top-icon {
    width: 1.55rem;
    height: 1.55rem;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
  }

  .mobile-dashboard-avatar {
    border-radius: 50%;
    color: #0a7d80;
    font-size: 0.9rem;
    font-weight: 950;
  }

  .mobile-dashboard-hero {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1.05rem;
    text-align: end;
  }

  .mobile-dashboard-greeting {
    margin: 0;
    color: #0a7d80;
    font-size: 0.88rem;
    font-weight: 900;
  }

  .mobile-dashboard-greeting span {
    color: #172033;
  }

  .mobile-dashboard-hero h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.72rem, 7vw, 2.32rem);
    font-weight: 950;
    line-height: 1.18;
    letter-spacing: -0.02em;
  }

  .mobile-dashboard-hero p:not(.mobile-dashboard-greeting) {
    margin: 0;
    color: #64748b;
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.75;
  }

  .mobile-dashboard-hero-actions {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0.75rem;
    margin-top: 0.6rem;
  }

  .mobile-dashboard-primary-action,
  .mobile-dashboard-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    border: 1px solid rgba(10, 108, 116, 0.16);
    border-radius: 0.85rem;
    font-size: 0.92rem;
    font-weight: 950;
    text-decoration: none;
  }

  .mobile-dashboard-primary-action {
    color: #fff;
    background: linear-gradient(135deg, #0a7d80, #059796);
    box-shadow: 0 16px 34px rgba(10, 108, 116, 0.22);
  }

  .mobile-dashboard-secondary-action {
    color: #172033;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  }

  body.page-home-index .dashboard-device-access-row {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-dashboard-status-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(142px, 1fr);
    grid-template-columns: none;
    gap: 0.75rem;
    margin-inline: -0.05rem;
    padding: 0.15rem 0.05rem 0.3rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-dashboard-status-grid::-webkit-scrollbar {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-card {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    min-height: 0;
    padding: 1rem;
    border-radius: 1.15rem;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-card::after {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-icon {
    width: 3.6rem;
    height: 3.6rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-svg {
    width: 2rem;
    height: 2rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-body {
    text-align: start;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-label {
    font-size: 0.88rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-body strong {
    font-size: 1.8rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-foot {
    padding: 0.65rem 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0.8rem;
    font-size: 0.78rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-status-foot a {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-workspace-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  }

  body.page-home-index .mobile-dashboard-shell .pc-section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 0.95rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-section-head .eyebrow {
    color: #0a7d80;
    font-size: 0.82rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-section-head h2 {
    font-size: 1.65rem;
    line-height: 1.1;
  }

  body.page-home-index .mobile-dashboard-shell .pc-section-head p,
  body.page-home-index .mobile-dashboard-shell .pc-card-limit {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filters {
    gap: 0.45rem;
    margin-bottom: 0.8rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter-row,
  body.page-home-index .mobile-dashboard-shell .pc-work-filter-row-status {
    grid-template-columns: repeat(var(--filter-count, 4), minmax(0, 1fr));
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter-row {
    --filter-count: 4;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter-row-status {
    --filter-count: 5;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter {
    min-height: 2.55rem;
    padding: 0;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-filter img {
    width: 1.28rem;
    height: 1.28rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-section-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: min-content;
    gap: 0.45rem 0.65rem;
    align-items: start;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-scope-switch {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    border-radius: 0.95rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-scope-toggle {
    flex: 1;
    min-height: 2.55rem;
    padding-inline: 0.45rem;
    font-size: 0.82rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-view-switch {
    grid-column: 1;
    grid-row: 2 / span 2;
    width: min(100%, 8.3rem);
    justify-self: end;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  }

  body.page-home-index .mobile-dashboard-shell .pc-outline-action {
    grid-column: 2;
    width: 100%;
    min-height: 2.55rem;
    border-radius: 0.9rem;
    color: #0a7d80;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  }

  body.page-home-index .mobile-dashboard-shell .pc-view-toggle {
    flex: 1;
    min-height: 2.65rem;
    padding-inline: 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.05;
  }

  body.page-home-index .mobile-dashboard-shell .pc-kanban-grid {
    grid-template-columns: 1fr;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-card {
    min-height: 0;
    gap: 0.35rem;
    padding: 0.75rem;
    padding-bottom: 2.4rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    direction: rtl;
    text-align: start;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-card::before {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-work-card-top {
    align-items: center;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-type {
    order: 2;
    padding: 0;
    background: transparent !important;
    color: #172033;
    font-size: 0.78rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-type .pc-svg-icon {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-status {
    order: 1;
    min-height: 1.6rem;
    padding: 0.15rem 0.65rem;
    font-size: 0.78rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-code {
    font-size: 1rem;
    text-align: start;
    overflow-wrap: anywhere;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-entity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: #172033;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-entity span {
    color: #172033;
    font-size: 0.82rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-entity-link,
  body.page-home-index .mobile-dashboard-shell .pc-doc-entity strong {
    font-size: 0.9rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.35rem 0.55rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-amount span {
    color: #0f766e;
    font-size: 0.86rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-amount strong {
    font-size: 1.08rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-meta {
    position: absolute;
    inset-inline-start: 0.75rem;
    bottom: 0.65rem;
    font-size: 0.78rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-doc-meta span:nth-child(2) {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr));
    gap: 0.35rem;
    margin-top: 0.15rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-card-actions a,
  body.page-home-index .mobile-dashboard-shell .pc-card-actions button {
    min-width: 0;
    width: 100%;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
    border-radius: 0.75rem;
    font-size: 0.82rem;
  }

  body.page-home-index .mobile-dashboard-shell .pc-card-actions form {
    min-width: 0;
  }

  body.page-home-index .mobile-dashboard-shell .pc-card-actions .pc-button-icon {
    display: none;
  }

  body.page-home-index .mobile-dashboard-shell .pc-card-pager {
    margin-top: 0.8rem;
  }

  .mobile-work-scroll-top {
    position: fixed;
    inset-inline-start: 1rem;
    inset-block-end: calc(6.4rem + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: inline-grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    border: 1px solid rgba(10, 108, 116, 0.18);
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #0a6c74, #098f8f);
    box-shadow: 0 18px 38px rgba(10, 108, 116, 0.26);
  }

  .mobile-work-scroll-top[hidden] {
    display: none;
  }

  .mobile-work-scroll-top img {
    width: 1.35rem;
    height: 1.35rem;
    filter: brightness(0) invert(1);
  }

  .mobile-filter-toast {
    position: fixed;
    inset-inline: max(1rem, calc((100vw - 460px) / 2 + 1rem));
    inset-block-start: calc(5.4rem + env(safe-area-inset-top, 0px));
    z-index: 95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.62rem 1rem;
    border: 1px solid rgba(10, 108, 116, 0.16);
    border-radius: 999px;
    color: #073f46;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
    font-size: 0.92rem;
    font-weight: 950;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-0.45rem) scale(0.98);
  }

  .mobile-filter-toast[hidden] {
    display: none;
  }

  .mobile-filter-toast.is-visible {
    animation: mobileFilterToastIn 0.24s ease forwards;
  }

  .mobile-filter-toast.is-leaving {
    animation: mobileFilterToastOut 0.26s ease forwards;
  }

  .document-summary-lines-popout {
    max-height: min(292px, 42vh);
    padding: 0.5rem;
    gap: 0.38rem;
  }

  .document-summary-lines-list {
    max-height: 14rem;
  }

  .document-summary-line-row {
    padding: 0.46rem 0.58rem;
  }

  .document-summary-lines-head {
    gap: 0.45rem;
  }

  .document-summary-lines-head strong {
    font-size: 0.9rem;
  }

  .document-summary-lines-head button {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1rem;
  }

  .document-summary-line-row strong,
  .document-summary-line-row b {
    font-size: 0.92rem;
  }

  .document-summary-line-row span {
    font-size: 0.82rem;
  }

  @keyframes mobileFilterToastIn {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes mobileFilterToastOut {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateY(-0.35rem) scale(0.98);
    }
  }

  .mobile-dashboard-bottom-nav {
    position: fixed;
    inset-inline: max(1rem, calc((100vw - 460px) / 2 + 1rem));
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 32;
    display: flex;
    direction: ltr;
    align-items: center;
    justify-content: space-evenly;
    gap: 0.25rem;
    min-height: 4.8rem;
    padding: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(16px);
  }

  .mobile-dashboard-nav-link {
    direction: rtl;
    display: inline-grid;
    place-items: center;
    gap: 0.25rem;
    flex: 1 1 0;
    min-width: 0;
    min-height: 3.75rem;
    padding: 0.38rem 0.35rem;
    border: 0;
    border-radius: 1rem;
    color: #172033;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 950;
    text-decoration: none;
  }

  .mobile-dashboard-nav-icon {
    width: 1.38rem;
    height: 1.38rem;
    object-fit: contain;
    color: #0a7d80;
    filter: brightness(0) saturate(100%) invert(31%) sepia(80%) saturate(826%) hue-rotate(143deg) brightness(87%) contrast(91%);
  }

  .mobile-dashboard-nav-link.active {
    flex: 1.35 1 0;
    min-width: 0;
    color: #fff;
    background: linear-gradient(135deg, #0a7d80, #059796);
    box-shadow: 0 14px 26px rgba(10, 108, 116, 0.24);
  }

  .mobile-dashboard-nav-link.active .mobile-dashboard-nav-icon {
    filter: brightness(0) invert(1);
  }
}

.sidebar-link[title="لوحة التحكم"] { --sidebar-icon: url("/icons/sidebar/لوحة التحكم.svg"); }
.sidebar-link[title="أعمال اليوم"] { --sidebar-icon: url("/icons/sidebar/أعمال اليوم.svg"); }
.sidebar-link[title="المستندات"] { --sidebar-icon: url("/icons/sidebar/المستندات.svg"); }
.sidebar-link[title="المدفوعات"] { --sidebar-icon: url("/icons/sidebar/المدفوعات.svg"); }
.sidebar-link[title="المصاريف"] { --sidebar-icon: url("/icons/sidebar/المصاريف.svg"); }
.sidebar-link[title="العهد"] { --sidebar-icon: url("/icons/sidebar/العهد.svg"); }
.sidebar-link[title="كشف الأرصدة"] { --sidebar-icon: url("/icons/sidebar/كشف الأرصدة.svg"); }
.sidebar-link[title="مركز التقارير"] { --sidebar-icon: url("/icons/sidebar/مركز التقارير.svg"); }
.sidebar-link[title="إعدادات التطبيق"] { --sidebar-icon: url("/icons/sidebar/إعدادات التطبيق.svg"); }
.sidebar-link[title="فاتورة جديدة"] { --sidebar-icon: url("/icons/sidebar/فاتورة جديدة.svg"); }
.sidebar-link[title="سند جديد"] { --sidebar-icon: url("/icons/sidebar/سند جديد.svg"); }
.sidebar-link[title="مصروف جديد"] { --sidebar-icon: url("/icons/sidebar/مصروف جديد.svg"); }
.sidebar-link[title="الأصناف"] { --sidebar-icon: url("/icons/sidebar/الأصناف.svg"); }
.sidebar-link[title="الكيانات"] { --sidebar-icon: url("/icons/sidebar/الكيانات.svg"); }
.sidebar-link[title="مركز التشغيل والمخازن"] { --sidebar-icon: url("/icons/sidebar/مركز التشغيل والمخازن.svg"); }
.sidebar-link[title="الكشف التشغيلي والمخزني"] { --sidebar-icon: url("/icons/sidebar/الكشف التشغيلي.svg"); }
.sidebar-link[title="يوميات الإنتاج"] { --sidebar-icon: url("/icons/sidebar/يوميات الإنتاج.svg"); }
.sidebar-link[title="النقل بين الأماكن"] { --sidebar-icon: url("/icons/sidebar/النقل بين الأماكن.svg"); }
.sidebar-link[title="التسويات الجردية"] { --sidebar-icon: url("/icons/sidebar/التسويات الجردية.svg"); }
.sidebar-link[title="الأماكن والماكينات"] { --sidebar-icon: url("/icons/sidebar/الأماكن والمخازن.svg"); }
.sidebar-link[title="إدارة الموظفين"] { --sidebar-icon: url("/icons/sidebar/إدارة الموظفين.svg"); }

@media (max-width: 991.98px) {
  .app-sidebar {
    width: 82px;
    max-width: 82px;
    min-height: calc(100dvh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    inset-block: 0.75rem;
    inset-inline-start: 0.75rem;
    inset-inline-end: auto;
    padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 0.48rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    align-items: center;
    background: linear-gradient(180deg, rgba(8, 120, 126, 0.98), rgba(33, 75, 84, 0.98));
    overflow: visible;
  }

  .app-sidebar-head,
  .app-sidebar-foot,
  .sidebar-user-block {
    justify-items: center;
    width: 100%;
  }

  .app-sidebar .brand-text,
  .app-sidebar .sidebar-section-title,
  .app-sidebar .sidebar-user-name,
  .app-sidebar .notification-trigger-label,
  .app-sidebar .sidebar-group-toggle,
  #sidebarCloseButton {
    display: none !important;
  }

  .app-sidebar-brand {
    justify-content: center;
    padding-inline: 0;
  }

  body.sidebar-labels-expanded .app-sidebar {
    width: min(78vw, 260px);
    max-width: min(78vw, 260px);
    align-items: stretch;
    padding-inline: 0.7rem;
    transition: width 0.24s ease, max-width 0.24s ease, transform 0.22s ease;
  }

  body.sidebar-labels-expanded .app-sidebar-head,
  body.sidebar-labels-expanded .app-sidebar-foot,
  body.sidebar-labels-expanded .sidebar-user-block {
    justify-items: stretch;
  }

  body.sidebar-labels-expanded .app-sidebar-brand {
    justify-content: flex-start;
    gap: 0.6rem;
    padding-inline: 0.25rem;
  }

  body.sidebar-labels-expanded .app-sidebar .brand-text,
  body.sidebar-labels-expanded .app-sidebar .notification-trigger-label,
  body.sidebar-labels-expanded .app-sidebar .sidebar-user-name {
    display: inline !important;
  }

  .sidebar-nav {
    width: 100%;
    gap: 0.48rem;
    padding-inline-end: 0;
    overflow-x: visible;
  }

  .sidebar-section {
    gap: 0.48rem;
  }

  .sidebar-group-content,
  .sidebar-group-content[hidden] {
    display: grid !important;
    gap: 0.4rem;
    margin-inline-start: 0;
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .sidebar-link {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    margin-inline: auto;
    padding: 0;
    border-radius: 15px;
    font-size: 0;
  }

  body.sidebar-labels-expanded .sidebar-link {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
    height: 48px;
    margin-inline: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 900;
    color: #eefafa;
    text-align: start;
  }

  .sidebar-link::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: #eaf7f7;
    -webkit-mask: var(--sidebar-icon, url("/icons/sidebar/المستندات.svg")) center / contain no-repeat;
    mask: var(--sidebar-icon, url("/icons/sidebar/المستندات.svg")) center / contain no-repeat;
  }

  .sidebar-link::before {
    content: attr(title);
    position: fixed;
    inset-inline-start: 6.2rem;
    inset-inline-end: auto;
    top: var(--sidebar-tooltip-top, 50%);
    transform: translateY(-50%) translateX(-8px);
    z-index: 47;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    padding: 0.48rem 0.72rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.85rem;
    color: #0a6c74;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    font-size: 0.82rem;
    font-weight: 950;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  }

  .sidebar-link:hover::before,
  .sidebar-link:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
  }

  body.sidebar-labels-expanded .sidebar-link::before {
    display: none;
  }

  .sidebar-link.active,
  .sidebar-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.14);
  }

  .sidebar-link:hover,
  .sidebar-link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
  }

  .app-sidebar-foot .notification-trigger,
  .app-sidebar-foot .sidebar-logout-button {
    width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 15px !important;
    font-size: 0 !important;
  }

  body.sidebar-labels-expanded .app-sidebar-foot .notification-trigger,
  body.sidebar-labels-expanded .app-sidebar-foot .sidebar-logout-button {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100% !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.88rem !important;
    font-weight: 900;
    text-align: start;
  }

  .app-sidebar-foot .notification-trigger::before,
  .app-sidebar-foot .sidebar-logout-button::after {
    width: 24px;
    height: 24px;
    background: #eaf7f7;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  .app-sidebar-foot .notification-trigger::before {
    content: "";
    display: inline-block;
    -webkit-mask-image: url("/icons/erp/dr-notifications.svg");
    mask-image: url("/icons/erp/dr-notifications.svg");
  }

  .app-sidebar-foot .sidebar-logout-button::after {
    content: "";
    display: inline-block;
    -webkit-mask-image: url("/icons/sidebar/تسجيل الخروج.svg");
    mask-image: url("/icons/sidebar/تسجيل الخروج.svg");
  }

  .sidebar-backdrop.is-visible {
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(7px);
  }
}

@media (max-width: 767.98px) {
  body.page-home-index .mobile-dashboard-shell .grid-tools,
  body[class*="page-documents-"] .grid-tools {
    display: none !important;
  }

  body[class*="page-documents-"] .pc-view-toggle[data-view-toggle="table"],
  body[class*="page-documents-"] [data-view-panel="table"],
  body[class*="page-documents-"] [data-card-pager="documents"] {
    display: none !important;
  }

  body[class*="page-documents-"] .pc-documents-kanban {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem;
    padding: 0.85rem;
  }

  body[class*="page-documents-"] .pc-document-card {
    width: 100%;
    min-width: 0;
    direction: rtl;
    text-align: start;
  }

  body[class*="page-documents-"] .pc-view-switch {
    width: auto;
  }

  body[class*="page-documents-"] .pc-view-toggle[data-view-toggle="cards"] {
    width: 100%;
  }

  body[class*="page-documents-"] .pc-doc-code {
    text-align: start;
    overflow-wrap: anywhere;
  }

  body[class*="page-documents-"] .pc-doc-entity,
  body[class*="page-documents-"] .pc-doc-amount {
    text-align: start;
  }
}

/* ========== Compound Record Rows ========== */
.purchase-ops-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 1rem;
}

.purchase-ops-hero {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(10, 108, 116, 0.1);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 18% 10%, rgba(10, 108, 116, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,250,249,0.94));
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.purchase-ops-hero-top {
  display: flex;
  justify-content: flex-start;
}

.purchase-ops-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  color: #0a6c74;
  text-decoration: none;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.purchase-ops-back-button:hover,
.purchase-ops-back-button:focus-visible {
  color: #08575d;
  border-color: rgba(10, 108, 116, 0.28);
  background: #fff;
  transform: translateY(-1px);
}

.purchase-ops-kicker {
  color: #0a7d80;
  font-size: 0.84rem;
  font-weight: 950;
}

.purchase-ops-hero h1,
.purchase-ops-sheet h2 {
  margin: 0.2rem 0;
  color: #172033;
  font-weight: 950;
}

.purchase-ops-hero p,
.purchase-ops-pay-copy {
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.purchase-ops-week-form,
.purchase-ops-side-actions {
  display: grid;
  gap: 0.35rem;
}

.purchase-ops-week-form label,
.purchase-ops-side-actions span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
}

.purchase-ops-week-form select,
.purchase-ops-pay-field input {
  min-height: 3rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 1rem;
  padding: 0.65rem 0.85rem;
  color: #172033;
  background: #fff;
  font-weight: 950;
}

.purchase-ops-history-button {
  min-height: 2.9rem;
  border: 1px solid rgba(10, 108, 116, 0.18);
  border-radius: 1rem;
  padding: 0.65rem 1rem;
  color: #0a6c74;
  background: rgba(237, 249, 246, 0.96);
  font-weight: 950;
}

.purchase-ops-side-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.purchase-ops-history-button.warning {
  color: #9a5b00;
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(255, 247, 237, 0.96);
}

.purchase-ops-filter-toggle {
  display: flex;
  gap: 0.45rem;
  margin: 0.9rem 0;
  padding: 0.35rem;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  overflow-x: auto;
}

.purchase-ops-scope-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 0.9rem 0;
  border: 1px solid rgba(10, 108, 116, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.purchase-ops-scope-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.55rem 0.9rem;
  color: #0a6c74;
  text-decoration: none;
  font-weight: 950;
  border-inline-start: 1px solid rgba(10, 108, 116, 0.12);
}

.purchase-ops-scope-switch a:first-child {
  border-inline-start: 0;
}

.purchase-ops-scope-switch a.active {
  color: #fff;
  background: linear-gradient(135deg, #0a6c74, #07948f);
}

.purchase-ops-embedded {
  display: grid;
  gap: 0.8rem;
}

.purchase-ops-hero-compact {
  margin-bottom: 0;
}

.purchase-ops-filter-toggle a,
.purchase-ops-filter-toggle button {
  flex: 1 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0.58rem 0.85rem;
  color: #64748b;
  text-align: center;
  text-decoration: none;
  background: transparent;
  font-weight: 950;
}

.purchase-ops-filter-toggle a.active,
.purchase-ops-filter-toggle button.active {
  color: #fff;
  background: linear-gradient(135deg, #0a6c74, #07948f);
  box-shadow: 0 10px 22px rgba(10, 108, 116, 0.18);
}

.purchase-ops-week-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.9rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(10, 108, 116, 0.12);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.86);
}

.purchase-ops-week-chip span {
  color: #64748b;
  font-weight: 850;
}

.purchase-ops-week-chip strong {
  color: #0a6c74;
  font-weight: 950;
}

.purchase-ops-list {
  display: grid;
  gap: 0.75rem;
}

.purchase-op-card {
  border-radius: 1.2rem;
}

.purchase-op-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  width: 100%;
  padding: 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.2rem;
  text-align: start;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.purchase-op-type,
.purchase-op-main small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 900;
}

.purchase-op-main strong {
  color: #172033;
  font-size: 1.04rem;
  font-weight: 950;
}

.purchase-op-total {
  grid-row: 1 / span 3;
  grid-column: 2;
  align-self: center;
  border-radius: 999px;
  padding: 0.48rem 0.7rem;
  color: #0a6c74;
  background: rgba(237, 249, 246, 0.96);
  font-weight: 950;
  white-space: nowrap;
}

.purchase-op-paid-by {
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  color: #0f766e;
  background: rgba(204, 251, 241, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
}

.purchase-ops-empty {
  display: grid;
  gap: 0.3rem;
  padding: 1.2rem;
  border: 1px dashed rgba(10, 108, 116, 0.22);
  border-radius: 1.2rem;
  color: #64748b;
  background: rgba(255,255,255,0.82);
  text-align: center;
}

.purchase-ops-empty.compact {
  margin-top: 0.8rem;
  padding: 0.9rem;
}

.purchase-ops-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.purchase-ops-modal[hidden] {
  display: none;
}

.purchase-ops-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(8px);
}

.purchase-ops-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 1.15rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.45rem;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.purchase-ops-lines-sheet {
  width: min(100%, 560px);
}

.purchase-ops-close {
  position: absolute;
  inset-block-start: 0.8rem;
  inset-inline-start: 0.8rem;
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(241,245,249,0.96);
  color: #172033;
  font-size: 1.25rem;
}

.purchase-ops-code {
  display: block;
  direction: ltr;
  margin-bottom: 0.8rem;
  color: #0864c7;
  font-weight: 950;
}

.purchase-ops-history-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.purchase-ops-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  background: rgba(248,250,252,0.94);
}

.purchase-ops-history-item div {
  display: grid;
  gap: 0.18rem;
}

.purchase-ops-history-item strong {
  color: #172033;
  font-weight: 950;
}

.purchase-ops-history-item span,
.purchase-ops-history-item small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.purchase-ops-history-item b {
  color: #0a6c74;
  font-weight: 950;
  white-space: nowrap;
}

.purchase-ops-history-item.pending {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(255, 251, 235, 0.74);
}

.purchase-ops-mini-action {
  min-height: 2.1rem;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #fff;
  background: #0a7d80;
  font-weight: 950;
}

.purchase-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.purchase-ops-grid > div,
.purchase-ops-lines-total {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  background: rgba(248,250,252,0.9);
}

.purchase-ops-grid span,
.purchase-ops-lines-total span,
.purchase-ops-pay-field span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 900;
}

.purchase-ops-grid strong,
.purchase-ops-lines-total strong {
  color: #172033;
  font-weight: 950;
}

.purchase-ops-items-pill {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid rgba(10,108,116,0.14);
  border-radius: 999px;
  padding: 0.62rem 0.75rem;
  color: #0a6c74;
  background: rgba(237,249,246,0.9);
  font-weight: 950;
}

.purchase-ops-items-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0a6c74;
}

.purchase-ops-items-pill small {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  color: #fff;
  background: #0a7d80;
}

.purchase-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.purchase-ops-action {
  flex: 1 1 7rem;
  min-height: 2.8rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.9rem;
  font-weight: 950;
}

.purchase-ops-action.approve,
.purchase-ops-action.pay {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0a6c74, #07948f);
}

.purchase-ops-action.ghost {
  color: #334155;
  background: #fff;
}

.purchase-ops-custody-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.purchase-ops-lines-list {
  display: grid;
  gap: 0.65rem;
  max-height: 52vh;
  overflow-y: auto;
  margin-top: 0.85rem;
}

.purchase-op-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  background: rgba(248,250,252,0.94);
}

.purchase-op-line strong {
  color: #172033;
  font-weight: 950;
}

.purchase-op-line span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 850;
}

.purchase-op-line b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #07825f;
  font-weight: 950;
}

.purchase-ops-pay-field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.purchase-ops-difference {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  color: #0a6c74;
  background: rgba(237,249,246,0.92);
  font-weight: 950;
}

body.purchase-ops-modal-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .purchase-ops-shell {
    padding: 0.75rem 0.75rem 6rem;
  }

  .purchase-ops-hero {
    border-radius: 1.35rem;
  }

  .purchase-ops-grid {
    gap: 0.55rem;
  }

  .purchase-ops-sheet {
    padding: 1rem;
  }
}

.document-record-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(10, 108, 116, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  cursor: pointer;
}

.document-record-select-all input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}

.document-record-table,
.dashboard-record-table {
  border-collapse: separate;
  border-spacing: 0 0.8rem;
}

.document-record-table thead,
.dashboard-record-table thead {
  display: none;
}

.document-record-table tbody,
.dashboard-record-table tbody {
  display: grid;
  gap: 0.9rem;
  padding: 0.95rem;
}

.document-record-row,
.dashboard-record-row {
  position: relative;
  display: grid;
  align-items: center;
  overflow: visible;
  isolation: isolate;
  direction: rtl;
  text-align: start;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 8%, rgba(10, 108, 116, 0.09), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 251, 0.96));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.document-record-row {
  grid-template-columns: 42px minmax(136px, 0.72fr) minmax(230px, 1.25fr) minmax(140px, 0.72fr) minmax(310px, 1.45fr) 54px;
  grid-template-areas:
    "select type code total meta actions"
    "select status entity impact meta actions";
}

.dashboard-record-row {
  grid-template-columns: minmax(136px, 0.7fr) minmax(230px, 1.25fr) minmax(140px, 0.72fr) minmax(260px, 1.28fr);
  grid-template-areas:
    "type code total meta"
    "status entity total meta";
}

.dashboard-record-row[data-record-url] {
  cursor: pointer;
}

.document-record-row > td,
.dashboard-record-row > td {
  display: grid;
  align-content: center;
  border: 0 !important;
  min-height: 54px;
  padding: 0.72rem 0.82rem !important;
  background: transparent !important;
}

.document-record-row::before,
.dashboard-record-row::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 5px;
  border-radius: 999px;
  background: rgba(10, 108, 116, 0.35);
}

.document-record-row.record-is-selected,
.document-record-row:has(.document-select-checkbox:checked) {
  border-color: rgba(10, 108, 116, 0.34);
  box-shadow: 0 22px 48px rgba(10, 108, 116, 0.16);
}

.record-select {
  grid-area: select;
  justify-items: center;
}

.record-code {
  grid-area: code;
  gap: 0.2rem;
  min-height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.055);
}

.record-code-link {
  color: #172033;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  font-weight: 950;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.record-code-link:hover,
.record-entity-link:hover {
  color: var(--brand);
}

.record-entity {
  grid-area: entity;
  gap: 0.2rem;
  color: #23313d;
  font-size: 1rem;
  font-weight: 900;
  min-height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.record-entity-link {
  color: #0b6b72;
  text-decoration: none;
}

.record-kicker {
  color: rgba(37, 71, 46, 0.72);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.record-type {
  grid-area: type;
  justify-items: stretch;
}

.record-type-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0.58rem 0.78rem;
  border-radius: 16px;
  background: rgba(10, 108, 116, 0.1);
  color: #073f43;
  font-size: 0.9rem;
  font-weight: 950;
}

.record-status {
  grid-area: status;
  justify-items: stretch;
}

.record-status-chip {
  min-width: 0;
  justify-content: center;
}

.record-total {
  grid-area: total;
  justify-items: stretch;
  gap: 0.2rem;
  color: var(--brand-dark);
  min-height: 68px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 185, 129, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.86)) !important;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.14);
  text-align: end;
}

.record-total strong,
.record-impact strong {
  font-size: 1.03rem;
  font-weight: 950;
}

.record-impact {
  grid-area: impact;
  justify-items: stretch;
  gap: 0.2rem;
  color: #334155;
  min-height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  text-align: end;
}

.record-meta {
  grid-area: meta;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: 0.45rem;
  color: rgba(15, 23, 42, 0.72);
}

.record-meta-field {
  display: grid;
  gap: 0.12rem;
  min-height: 56px;
  align-content: center;
  padding: 0.55rem 0.65rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.055);
}

.record-meta-field strong {
  overflow: hidden;
  color: #172033;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.record-notes-field {
  grid-column: 1 / -1;
  background: rgba(246, 250, 241, 0.86);
}

.record-actions {
  grid-area: actions;
  justify-items: center;
}

.document-record-posted::before,
.dashboard-record-posted::before {
  background: linear-gradient(180deg, #78d947, #0a6c74);
}

.document-record-posted .record-type-label,
.dashboard-record-posted .record-type-label {
  background: linear-gradient(135deg, rgba(182, 244, 32, 0.34), rgba(10, 108, 116, 0.12));
  color: #14532d;
}

.document-record-draft::before,
.dashboard-record-draft::before {
  background: linear-gradient(180deg, #efda83, #f59e0b);
}

.document-record-draft .record-type-label,
.dashboard-record-draft .record-type-label {
  background: linear-gradient(135deg, rgba(239, 218, 131, 0.4), rgba(255, 247, 214, 0.85));
  color: #7c4a03;
}

.document-record-cancelled::before,
.dashboard-record-cancelled::before {
  background: linear-gradient(180deg, #ffd21f, #ef4444);
}

.document-record-cancelled .record-type-label,
.dashboard-record-cancelled .record-type-label {
  background: linear-gradient(135deg, rgba(255, 210, 31, 0.38), rgba(255, 247, 166, 0.72));
  color: #713f12;
}

.document-record-deleted::before,
.dashboard-record-deleted::before {
  background: linear-gradient(180deg, #ef4444, #991b1b);
}

.document-record-deleted .record-type-label,
.dashboard-record-deleted .record-type-label {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(255, 228, 230, 0.8));
  color: #991b1b;
}

.document-record-row:hover,
.dashboard-record-row:hover {
  border-color: rgba(10, 108, 116, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

.dashboard-record-row[data-record-url]:focus-visible {
  outline: 3px solid rgba(10, 108, 116, 0.24);
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  .document-record-table,
  .dashboard-record-table {
    width: 100%;
    min-width: 0;
  }

  .document-record-table tbody,
  .dashboard-record-table tbody {
    width: 100%;
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .document-record-row,
  .dashboard-record-row {
    width: 100%;
    min-width: 0;
    padding: 0.9rem;
    direction: rtl;
    text-align: start;
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "type"
      "code"
      "entity"
      "total"
      "status"
      "meta"
      "actions";
  }

  .document-record-row {
    grid-template-areas:
      "select"
      "type"
      "code"
      "entity"
      "total"
      "status"
      "meta"
      "actions";
  }

  .document-record-row > td,
  .dashboard-record-row > td {
    min-height: 0;
    padding: 0.45rem 0 !important;
    justify-items: stretch;
    text-align: start;
  }

  .record-select {
    justify-items: start;
  }

  .record-code,
  .record-entity,
  .record-total,
  .record-impact,
  .record-meta-field {
    min-height: 0;
    text-align: start;
  }

  .record-total,
  .record-impact {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem !important;
  }

  .record-meta {
    grid-template-columns: 1fr;
  }

  .record-type-label,
  .record-status-chip {
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
  }

  .record-actions {
    justify-items: stretch;
  }
}

@media (min-width: 992px) {
  .document-record-table,
  .dashboard-record-table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  .document-record-table thead,
  .dashboard-record-table thead {
    display: table-header-group;
  }

  .document-record-table tbody,
  .dashboard-record-table tbody {
    display: table-row-group;
    padding: 0;
  }

  .document-record-row,
  .dashboard-record-row {
    display: table-row;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    isolation: auto;
  }

  .document-record-row::before,
  .dashboard-record-row::before {
    display: none;
  }

  .document-record-row > td,
  .dashboard-record-row > td {
    display: table-cell;
    min-height: 0;
    padding: 0.75rem 0.95rem !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    background: transparent !important;
    box-shadow: none;
    vertical-align: middle;
  }

  .document-record-row:hover,
  .dashboard-record-row:hover {
    transform: none;
    box-shadow: none;
    background: rgba(10, 108, 116, 0.035);
  }

  .record-kicker {
    display: none;
  }

  .record-code,
  .record-entity,
  .record-total,
  .record-impact {
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: inherit;
  }

  .record-code-link {
    color: var(--brand);
    font-size: inherit;
    font-weight: 900;
  }

  .record-type-label {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }

  .record-status-chip {
    min-width: auto;
  }

  .record-total strong,
  .record-impact strong {
    font-size: inherit;
    font-weight: 900;
  }

  .record-meta {
    color: var(--muted);
    font-size: 0.82rem;
  }

  .record-meta-field {
    display: inline;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .record-meta-field strong {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
    overflow: visible;
  }

  .record-meta-field:not(:last-child)::after {
    content: " · ";
    color: rgba(15, 23, 42, 0.35);
  }
}

@media (max-width: 991.98px) {
  .app-shell {
    transition: filter 0.18s ease, transform 0.18s ease;
  }

  .entity-profile-hero,
  .entity-section-head {
    display: grid;
  }

  .entity-profile-grid,
  .entity-profile-columns,
  .entity-profile-footer {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 991.98px) {
  .document-record-row,
  .dashboard-record-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "type"
      "code"
      "entity"
      "status"
      "total"
      "impact"
      "meta"
      "actions";
    border-radius: 22px;
  }

  .dashboard-record-row {
    grid-template-areas:
      "type"
      "code"
      "entity"
      "status"
      "total"
      "meta";
  }

  .document-record-row > td,
  .dashboard-record-row > td {
    justify-items: start !important;
    text-align: start !important;
    min-height: auto;
    padding: 0.52rem 1rem !important;
  }

  .document-record-row::before,
  .dashboard-record-row::before {
    inset-block: 0.8rem;
  }

  .record-select {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0 !important;
  }

  .record-type {
    padding-top: 1rem !important;
  }

  .record-type-label {
    width: 100%;
    min-width: 0;
  }

  .record-code-link {
    font-size: 1.08rem;
  }

  .record-code,
  .record-entity,
  .record-total,
  .record-impact {
    width: 100%;
    min-height: 58px;
  }

  .record-total,
  .record-impact {
    justify-items: start !important;
    text-align: start;
  }

  .record-meta {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.15rem;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.07) !important;
  }

  .record-actions {
    justify-items: stretch !important;
  }
}

@media (max-width: 575.98px) {
  .record-meta {
    grid-template-columns: 1fr;
  }

  .document-record-table tbody,
  .dashboard-record-table tbody {
    padding-inline: 0.65rem;
  }
}
