/* Partner Care local UI refresh
   A single, restrained layer for readable RTL layouts, predictable contrast,
   and consistent light/dark surfaces. This file intentionally changes no data
   or workflow behavior. */
.app-shell {
  --pc-bg: #f5f2ef;
  --pc-surface: #fffdf9;
  --pc-surface-2: #f1ece8;
  --pc-ink: #2a202c;
  --pc-muted: #766c79;
  --pc-line: #e6dcd4;
  --pc-brand: #f46b45;
  --pc-brand-strong: #d9512e;
  --pc-plum: #5b3b66;
  --pc-ok: #0e796d;
  --pc-warn: #a96c25;
  --pc-danger: #b6525f;
  --pc-shadow: 0 16px 36px rgba(37, 28, 40, 0.08);
  min-height: 100vh;
  background: var(--pc-bg) !important;
  color: var(--pc-ink) !important;
  isolation: isolate;
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.app-shell[data-theme="light"],
.app-shell.theme-light { color-scheme: light; }

.app-shell[data-theme="dark"],
.app-shell.theme-dark {
  --pc-bg: #121015;
  --pc-surface: #1e1821;
  --pc-surface-2: #271f2a;
  --pc-ink: #faf7f3;
  --pc-muted: #c9bbc9;
  --pc-line: #49364f;
  --pc-brand: #ff744b;
  --pc-brand-strong: #ff8a66;
  --pc-plum: #8c5b95;
  --pc-ok: #46c8a8;
  --pc-warn: #e4af4e;
  --pc-danger: #ee7782;
  --pc-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  color-scheme: dark;
}

.app-shell,
.app-shell * { box-sizing: border-box; }

.app-shell button,
.app-shell input,
.app-shell select,
.app-shell textarea { font: inherit; }

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

.app-shell button:focus-visible,
.app-shell a:focus-visible,
.app-shell input:focus-visible,
.app-shell select:focus-visible,
.app-shell textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pc-brand) 65%, transparent);
  outline-offset: 2px;
}

.app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 14px clamp(18px, 3vw, 42px);
  background: color-mix(in srgb, var(--pc-surface) 94%, transparent) !important;
  border-bottom: 1px solid var(--pc-line) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--pc-ink) 6%, transparent);
  backdrop-filter: blur(14px);
}

.app-shell .topbar-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.app-shell .topbar-title strong,
.app-shell .topbar-title h1 {
  color: var(--pc-ink) !important;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.app-shell .topbar-title small,
.app-shell .topbar-subtitle { color: var(--pc-muted) !important; }

.app-shell .sidebar {
  background: var(--pc-surface) !important;
  border-inline-end: 1px solid var(--pc-line) !important;
  box-shadow: 10px 0 28px color-mix(in srgb, var(--pc-ink) 5%, transparent);
}

.app-shell .sidebar-profile { border-bottom: 1px solid var(--pc-line) !important; }
.app-shell .nav-group { color: var(--pc-muted) !important; letter-spacing: 0.02em; }

.app-shell .sidebar nav button,
.app-shell .sidebar nav a {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--pc-muted) !important;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-shell .sidebar nav button:hover,
.app-shell .sidebar nav a:hover {
  background: var(--pc-surface-2) !important;
  border-color: var(--pc-line) !important;
  color: var(--pc-ink) !important;
  transform: translateX(-2px);
}

.app-shell .sidebar nav button.active,
.app-shell .sidebar nav a.active,
.app-shell .sidebar nav [aria-current="page"] {
  background: color-mix(in srgb, var(--pc-plum) 18%, var(--pc-surface)) !important;
  border-color: color-mix(in srgb, var(--pc-plum) 42%, var(--pc-line)) !important;
  box-shadow: inset 3px 0 0 var(--pc-brand);
  color: var(--pc-ink) !important;
}

.app-shell .content,
.app-shell .main-content,
.app-shell .app-content,
.app-shell > main {
  min-width: 0;
  background: var(--pc-bg) !important;
  color: var(--pc-ink) !important;
  padding: clamp(18px, 3vw, 38px) !important;
}

.app-shell .content > * + *,
.app-shell .main-content > * + *,
.app-shell .app-content > * + * { margin-block-start: 20px; }

.app-shell .page-heading,
.app-shell .page-header,
.app-shell .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding-block: 4px 10px;
}

.app-shell .page-heading h1,
.app-shell .page-header h1,
.app-shell .section-heading h2,
.app-shell .section-heading h3 {
  margin: 0;
  color: var(--pc-ink) !important;
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.app-shell .page-heading p,
.app-shell .page-header p,
.app-shell .section-heading p {
  margin: 6px 0 0;
  color: var(--pc-muted) !important;
  line-height: 1.7;
}

.app-shell .card,
.app-shell .panel,
.app-shell .surface,
.app-shell .empty-state,
.app-shell .table-shell,
.app-shell .log-table-wrap,
.app-shell .settings-section,
.app-shell [data-card="true"] {
  background: var(--pc-surface) !important;
  border: 1px solid var(--pc-line) !important;
  border-radius: 20px;
  box-shadow: var(--pc-shadow);
  color: var(--pc-ink) !important;
}

.app-shell .card-header,
.app-shell .panel-header,
.app-shell .section-header {
  border-bottom: 1px solid var(--pc-line) !important;
  color: var(--pc-ink) !important;
}

.app-shell .card h2,
.app-shell .card h3,
.app-shell .panel h2,
.app-shell .panel h3,
.app-shell .surface h2,
.app-shell .surface h3 { color: var(--pc-ink) !important; }

.app-shell .card p,
.app-shell .panel p,
.app-shell .surface p,
.app-shell .empty-state p { color: var(--pc-muted) !important; }

.app-shell .button-primary,
.app-shell .primary-action,
.app-shell .approve,
.app-shell .publish-action,
.app-shell .save-action,
.app-shell button[data-variant="primary"],
.app-shell button[type="submit"] {
  border: 1px solid var(--pc-brand) !important;
  border-radius: 12px;
  background: var(--pc-brand) !important;
  color: #fff !important;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--pc-brand) 25%, transparent);
  font-weight: 700;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.app-shell .button-primary:hover,
.app-shell .primary-action:hover,
.app-shell .approve:hover,
.app-shell .publish-action:hover,
.app-shell .save-action:hover,
.app-shell button[data-variant="primary"]:hover,
.app-shell button[type="submit"]:hover {
  background: var(--pc-brand-strong) !important;
  box-shadow: 0 14px 24px color-mix(in srgb, var(--pc-brand) 32%, transparent);
  transform: translateY(-1px);
}

.app-shell .button-secondary,
.app-shell .secondary-action,
.app-shell button[data-variant="secondary"] {
  border: 1px solid var(--pc-line) !important;
  border-radius: 12px;
  background: var(--pc-surface-2) !important;
  color: var(--pc-ink) !important;
}

.app-shell input,
.app-shell select,
.app-shell textarea {
  min-height: 42px;
  border: 1px solid var(--pc-line) !important;
  border-radius: 12px;
  background: var(--pc-surface-2) !important;
  color: var(--pc-ink) !important;
}

.app-shell input::placeholder,
.app-shell textarea::placeholder { color: color-mix(in srgb, var(--pc-muted) 78%, transparent) !important; }

.app-shell table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--pc-ink) !important;
}

.app-shell th {
  background: var(--pc-surface-2) !important;
  color: var(--pc-muted) !important;
  border-bottom: 1px solid var(--pc-line) !important;
  font-weight: 700;
  white-space: nowrap;
}

.app-shell td {
  color: var(--pc-ink) !important;
  border-bottom: 1px solid var(--pc-line) !important;
  vertical-align: middle;
}

.app-shell tbody tr:hover td { background: color-mix(in srgb, var(--pc-plum) 7%, var(--pc-surface)) !important; }

.app-shell [role="alert"],
.app-shell [role="status"],
.app-shell .toast,
.app-shell .notification {
  border: 1px solid var(--pc-line) !important;
  border-radius: 14px;
  background: var(--pc-surface) !important;
  color: var(--pc-ink) !important;
  box-shadow: var(--pc-shadow);
}

.app-shell .status-success,
.app-shell [data-status="success"] { color: var(--pc-ok) !important; }
.app-shell .status-warning,
.app-shell [data-status="warning"] { color: var(--pc-warn) !important; }
.app-shell .status-danger,
.app-shell [data-status="error"] { color: var(--pc-danger) !important; }

@media (max-width: 1100px) {
  .app-shell .page-heading,
  .app-shell .page-header,
  .app-shell .section-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .app-shell .topbar { min-height: 60px; padding: 11px 16px; }
  .app-shell .content,
  .app-shell .main-content,
  .app-shell .app-content,
  .app-shell > main { padding: 16px !important; }
  .app-shell .card,
  .app-shell .panel,
  .app-shell .surface,
  .app-shell .empty-state,
  .app-shell .table-shell,
  .app-shell .settings-section { border-radius: 16px; }
  .app-shell table { min-width: 680px; }
  .app-shell .table-shell,
  .app-shell .log-table-wrap { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell *,
  .app-shell *::before,
  .app-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Focused operational polish: employee record, audit trail, and profile. */
.app-shell .employee-positive-record {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--pc-ok) 34%, var(--pc-line)) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pc-ok) 8%, var(--pc-surface)) 0%, var(--pc-surface) 58%) !important;
}

.app-shell .employee-positive-record::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--pc-ok);
  content: "";
}

.app-shell .employee-positive-record .card-head {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.app-shell .employee-positive-record .card-head h2 { margin: 0 0 5px; }
.app-shell .employee-positive-record .card-head small { color: var(--pc-muted) !important; }

.app-shell .positive-record-list {
  display: grid;
  gap: 10px;
}

.app-shell .positive-record-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--pc-ok) 24%, var(--pc-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--pc-ok) 4%, var(--pc-surface-2));
}

.app-shell .positive-record-list article > div { min-width: 0; }
.app-shell .positive-record-list strong { color: var(--pc-ink); font-size: 14px; }
.app-shell .positive-record-list p {
  margin: 7px 0;
  color: var(--pc-ink);
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.app-shell .positive-record-list small { color: var(--pc-muted); }

.app-shell .audit-table .audit-details {
  min-width: 210px;
  max-width: 360px;
  color: var(--pc-ink) !important;
  font-size: 12px;
  line-height: 1.75;
  white-space: normal;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}

.app-shell .audit-table td small {
  display: block;
  margin-top: 3px;
  color: var(--pc-muted) !important;
}

.app-shell .employee-profile-page {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin-inline: auto;
}

.app-shell .employee-profile-page-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px !important;
  border: 1px solid var(--pc-line) !important;
  border-radius: 18px !important;
  background: var(--pc-surface) !important;
  color: var(--pc-ink) !important;
  box-shadow: var(--pc-shadow);
}

.app-shell .employee-profile-page-head::before { display: none !important; }
.app-shell .employee-profile-page-head > div { min-width: 0; flex: 1; }
.app-shell .employee-profile-page-head h1 {
  margin: 4px 0 5px !important;
  color: var(--pc-ink) !important;
  font-size: clamp(25px, 3vw, 36px) !important;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.app-shell .employee-profile-page-head p,
.app-shell .employee-profile-page-head small { color: var(--pc-muted) !important; }
.app-shell .employee-profile-page-head .eyebrow { color: var(--pc-brand) !important; }

.app-shell .employee-profile-page .profile-overview {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid var(--pc-line) !important;
  border-radius: 18px !important;
  background: var(--pc-surface) !important;
  box-shadow: none !important;
}

.app-shell .employee-profile-page .profile-overview > .avatar.large {
  width: 64px !important;
  height: 64px !important;
  border-radius: 18px !important;
  background: var(--pc-plum) !important;
  color: #fff !important;
  font-size: 18px !important;
}

.app-shell .employee-profile-page .profile-contact {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.app-shell .employee-profile-page .profile-contact strong {
  color: var(--pc-ink);
  overflow-wrap: anywhere;
}
.app-shell .employee-profile-page .profile-contact small,
.app-shell .employee-profile-page .profile-contact span { color: var(--pc-muted); }
.app-shell .employee-profile-page .profile-overview > .status {
  justify-self: end !important;
  min-width: 94px;
  text-align: center;
}

.app-shell .employee-profile-page .profile-tabs {
  position: sticky;
  top: 8px;
  z-index: 4;
  padding: 5px;
  border: 1px solid var(--pc-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
  backdrop-filter: blur(12px);
}

.app-shell .empty-inline {
  padding: 18px;
  border: 1px dashed var(--pc-line);
  border-radius: 14px;
  color: var(--pc-muted);
  text-align: center;
  background: var(--pc-surface-2);
}

@media (max-width: 760px) {
  .app-shell .positive-record-list article { flex-direction: column; gap: 10px; }
  .app-shell .employee-profile-page-head {
    align-items: stretch !important;
    flex-direction: column-reverse !important;
    padding: 18px !important;
  }
  .app-shell .employee-profile-page-head .secondary { align-self: flex-start; }
  .app-shell .employee-profile-page .profile-overview {
    grid-template-columns: 52px minmax(0, 1fr) !important;
    padding: 15px !important;
  }
  .app-shell .employee-profile-page .profile-overview > .avatar.large {
    width: 52px !important;
    height: 52px !important;
    border-radius: 15px !important;
  }
  .app-shell .employee-profile-page .profile-overview > .status {
    grid-column: 1 / -1;
    justify-self: stretch !important;
  }
  .app-shell .audit-table .audit-details { min-width: 180px; max-width: none; }
}
