:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #075985;
  --primary-2: #0ea5e9;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 12px 34px rgba(15, 23, 42, .08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  min-height: 46px;
  line-height: 1.25;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select {
  height: 46px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: .86rem;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #0f2537;
  color: #e5eef7;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #075985);
  color: #fff;
  font-weight: 900;
  letter-spacing: .04em;
}

.brand small,
.sidebar-user small,
.compact-list small,
.data-table small {
  display: block;
  color: #8ca3b8;
  margin-top: 3px;
}

.ui-icon,
.label-icon,
.group-icon,
.nav-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.minimal-icon {
  opacity: .78;
  filter: saturate(.45) contrast(.9);
}

.nav-icon.minimal-icon {
  opacity: .9;
}

.label-icon {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: -2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dce8f3;
  padding: 11px 12px;
  border-radius: var(--radius);
}

.nav-icon-wrap {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}

.nav-icon {
  width: 17px;
  height: 17px;
}

.nav-list a.active,
.nav-list a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.nav-list span {
  width: 24px;
  text-align: center;
}

.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.eyebrow,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 5px;
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.topbar-actions,
.toolbar-actions,
.form-actions,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.logout-form {
  margin: 0;
}

.check-row,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-row {
  min-height: 46px;
  align-self: end;
}

.check-row input,
.inline-check input {
  width: auto;
  min-height: auto;
}

.check-row span {
  margin: 0;
}

.user-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: #334155;
  font-size: .9rem;
  font-weight: 700;
}

.button,
.icon-button,
.segmented a,
.page-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--primary);
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  height: 46px;
  line-height: 1.25;
}

.button .ui-icon,
.icon-link .ui-icon {
  width: 16px;
  height: 16px;
  margin-right: 7px;
}

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

.button.ghost {
  background: #fff;
}

.mobile-only {
  display: none;
}

.alert {
  margin-bottom: 18px;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.alert.danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.panel,
.toolbar-panel,
.staff-card,
.id-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
}

.panel,
.toolbar-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.bar-list,
.compact-list,
.form-stack {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bar {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--primary-2);
}

.compact-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.avatar {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 900;
  overflow: hidden;
  text-transform: uppercase;
}

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

.avatar.small {
  width: 38px;
  height: 38px;
  font-size: .85rem;
}

.avatar.large {
  width: 62px;
  height: 62px;
  font-size: 1.08rem;
}

.avatar.tiny {
  width: 34px;
  height: 34px;
  font-size: .76rem;
  margin: 0 auto 4px;
}

.avatar.xl {
  width: 92px;
  height: 92px;
  font-size: 1.6rem;
}

.staff-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}

.staff-name-cell span:last-child {
  min-width: 0;
}

.toolbar-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(170px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.filters.compact {
  grid-template-columns: minmax(220px, 360px) auto;
}

.staff-filters {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.segmented a {
  border: 0;
  border-radius: 0;
}

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

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.staff-card {
  padding: 16px;
}

.staff-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.staff-card h2 {
  margin: 14px 0 4px;
  font-size: 1.05rem;
}

.staff-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.staff-card dl,
.id-details {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
}

.staff-card dl div,
.id-details div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
}

dt {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge-success {
  background: #dcfce7;
  color: var(--success);
}

.badge-warning {
  background: #fef3c7;
  color: var(--warning);
}

.badge-muted {
  background: #e2e8f0;
  color: #475569;
}

.badge-info {
  background: #e0f2fe;
  color: var(--primary);
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #334155;
  background: #f8fafc;
  font-size: .82rem;
  text-transform: uppercase;
}

.table-group-row td {
  padding: 0;
  background: #eef6ff;
  border-bottom: 1px solid #bfdbfe;
}

.table-unit-row td {
  padding: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.table-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: #0f2537;
}

.table-unit-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 46px;
  color: #334155;
}

.table-group-heading strong {
  display: block;
  font-size: .95rem;
}

.table-unit-heading strong {
  display: block;
  font-size: .88rem;
}

.table-group-heading small {
  color: #64748b;
}

.table-unit-heading small {
  color: #64748b;
}

.unit-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-2);
  box-shadow: 0 0 0 4px #e0f2fe;
  flex: 0 0 auto;
}

.group-icon {
  width: 24px;
  height: 24px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.actions {
  white-space: nowrap;
}

.actions a + a {
  margin-left: 10px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0;
}

.page-link.is-active {
  background: var(--primary);
  color: #fff;
}

.empty-state {
  padding: 30px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.inline-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  min-width: 540px;
}

.inline-edit-form .button {
  width: 100%;
}

.master-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.master-index-card {
  display: grid;
  gap: 18px;
}

.master-index-card h2 {
  margin: 0 0 8px;
}

.master-index-footer,
.master-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.master-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.master-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 100px 100px;
  gap: 8px;
  align-items: end;
}

.master-add-form {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.master-list {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.master-table {
  min-width: 700px;
}

.master-inline-form {
  margin: 0;
}

.drag-handle {
  width: 34px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: #334155;
  font-size: 1rem;
  font-weight: 900;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

tr.is-dragging {
  opacity: .55;
  background: #eef6ff;
}

.row-number-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 90px;
  white-space: nowrap;
}

.row-number {
  width: 64px;
  font-weight: 900;
  color: #334155;
}

.save-status {
  min-height: 22px;
  color: var(--muted);
  font-weight: 700;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: 1 / -1;
}

.ptj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.ptj-card {
  display: grid;
  gap: 12px;
}

.coordinator-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.org-chart {
  overflow: auto;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.org-toolbar {
  align-items: end;
}

.org-vertical {
  display: grid;
  gap: 36px;
  min-width: max-content;
}

.org-ptj-section {
  display: grid;
  gap: 28px;
  justify-items: stretch;
  min-width: max-content;
  position: relative;
}

.org-leader-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  position: relative;
}

.org-leader-wrap::before {
  content: "";
  width: 1px;
  height: 28px;
  background: var(--line);
}

.org-leader-wrap.has-branches::after {
  content: "";
  width: 1px;
  height: 30px;
  background: var(--line);
}

.org-branch-label {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 900;
}

.org-branch-list,
.org-unit-list,
.org-staff-stack {
  gap: 10px;
}

.org-branch-list {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 56px;
  margin-top: -4px;
  margin-inline: auto;
  padding-top: 36px;
  min-width: 100%;
  width: max-content;
  position: relative;
}

.org-branch-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  border-top: 2px solid var(--line);
}

.org-branch,
.org-unit-block {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  position: relative;
}

.org-branch {
  flex: 0 0 390px;
  width: 390px;
}

.org-branch::before,
.org-unit-block::before {
  content: "";
  position: absolute;
  top: -36px;
  left: 50%;
  height: 36px;
  border-left: 2px solid var(--line);
  transform: translateX(-50%);
}

.org-unit-list {
  display: grid;
  gap: 20px;
  margin-inline: 0;
  padding-top: 26px;
  min-width: 0;
  width: 100%;
  position: relative;
}

.org-unit-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 26px;
  border-left: 1px dashed var(--line);
  transform: translateX(-50%);
}

.org-unit-block::before {
  top: -20px;
  height: 20px;
  border-left-style: dashed;
}

.org-unit-block {
  width: 100%;
}

.org-staff-stack {
  display: grid;
  gap: 14px;
  padding-top: 20px;
  position: relative;
}

.org-staff-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 20px;
  border-left: 1px solid var(--line);
  transform: translateX(-50%);
}

.org-node {
  display: grid;
  gap: 7px;
  padding: 16px;
  min-width: 0;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 88px;
  align-content: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.org-node .avatar {
  justify-self: center;
}

.org-node span,
.org-node small {
  color: var(--muted);
}

.org-node strong,
.org-node span,
.org-node small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.org-ptj {
  width: min(100%, 560px);
  justify-self: center;
  background: #e0f2fe;
  border-color: #7dd3fc;
  text-align: center;
  position: relative;
}

.org-leader {
  width: min(100%, 520px);
  justify-self: center;
  background: #f0fdf4;
  border-color: #86efac;
  text-align: center;
}

.org-department {
  background: #eef6ff;
}

.org-unit {
  background: #f8fafc;
  border-style: dashed;
}

.org-person {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 13px;
  align-items: center;
  background: #fff;
}

.org-person .avatar {
  grid-row: span 3;
  justify-self: start;
}

.login-page,
.digital-card-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, .24), transparent 34%),
    linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.public-page {
  min-height: 100vh;
  background: var(--bg);
}

.public-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.public-brand {
  color: var(--text);
}

.public-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(255, 255, 255, .92)),
    #fff;
  box-shadow: var(--shadow);
}

.public-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.12;
}

.public-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.directory-stats {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.directory-stats span {
  min-width: 118px;
  padding: 11px 12px;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
}

.directory-stats strong,
.directory-stats small {
  display: block;
}

.directory-stats strong {
  color: #075985;
  font-size: 1.15rem;
}

.directory-stats small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.directory-toolbar-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.directory-toolbar-head strong,
.directory-toolbar-head small {
  display: block;
}

.directory-toolbar-head small {
  margin-top: 3px;
  color: var(--muted);
}

.filter-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-chips span {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 900;
}

.public-filters {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.public-count {
  justify-content: flex-start;
}

.public-page .avatar {
  border-radius: 10px;
}

.directory-card-list {
  display: grid;
  gap: 12px;
}

.directory-section-heading,
.directory-unit-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.directory-section-heading {
  margin-top: 4px;
  padding: 13px 14px;
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #0f2537;
}

.directory-unit-heading {
  width: fit-content;
  margin: 3px 0 0 18px;
  padding: 9px 13px;
  background: #fff;
  color: #334155;
}

.directory-section-heading strong,
.directory-unit-heading strong,
.directory-section-heading small,
.directory-unit-heading small {
  display: block;
}

.directory-section-heading small,
.directory-unit-heading small {
  margin-top: 2px;
  color: var(--muted);
}

.directory-card {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(340px, 1.1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  cursor: pointer;
  position: relative;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.directory-card::after {
  content: "Klik untuk kad digital";
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  padding: 7px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .74rem;
  font-weight: 900;
  transition: opacity .16s ease, transform .16s ease;
}

.directory-card:hover,
.directory-card:focus-visible {
  border-color: #7dd3fc;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
  outline: none;
}

.directory-card:hover::after,
.directory-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.directory-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.directory-card-name {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.directory-card-name strong {
  color: #0f2537;
  font-size: 1rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.directory-card-name span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 900;
}

.directory-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.directory-card-details div {
  min-width: 0;
}

.directory-card-details dt {
  font-size: .72rem;
  text-transform: uppercase;
}

.directory-card-details dd {
  margin-top: 3px;
  color: #0f2537;
  font-weight: 700;
}

.directory-chart-panel,
.directory-chart-prompt {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.directory-chart-panel {
  padding: 18px;
}

.directory-chart-prompt {
  display: grid;
  gap: 4px;
  padding: 15px 18px;
  color: #334155;
}

.directory-chart-prompt small {
  color: var(--muted);
}

.directory-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.directory-chart-head h2,
.directory-chart-head p {
  margin: 0;
}

.directory-chart-head p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
}

.directory-chart-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x proximity;
}

.directory-chart-ptj {
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: max-content;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  scroll-snap-align: start;
}

.directory-chart-ptj > header {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 520px;
  margin-inline: auto;
  padding: 12px 14px;
  border: 1px solid #7dd3fc;
  border-radius: var(--radius);
  background: #e0f2fe;
  text-align: center;
}

.directory-chart-ptj > header strong,
.directory-chart-ptj > header small {
  display: block;
}

.directory-chart-ptj > header strong {
  color: #0f2537;
}

.directory-chart-ptj > header small {
  color: var(--muted);
  font-weight: 800;
}

.directory-chart-leader {
  display: grid;
  justify-items: center;
  gap: 8px;
  position: relative;
}

.directory-chart-leader::before,
.directory-chart-leader::after {
  content: "";
  width: 2px;
  background: var(--line);
}

.directory-chart-leader::before {
  height: 22px;
}

.directory-chart-leader::after {
  height: 30px;
}

.directory-chart-leader > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .76rem;
  font-weight: 900;
}

.directory-chart-leader-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 320px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.directory-chart-leader-card small {
  color: var(--muted);
}

.directory-chart-branches {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  min-width: 100%;
  width: max-content;
  margin-inline: auto;
  padding-top: 30px;
  position: relative;
}

.directory-chart-branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  border-top: 2px solid var(--line);
}

.directory-chart-department {
  display: grid;
  gap: 14px;
  align-content: start;
  width: 320px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}

.directory-chart-department::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  height: 30px;
  border-left: 2px solid var(--line);
  transform: translateX(-50%);
}

.directory-chart-department h3 {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eef6ff;
  color: #0f2537;
  font-size: .98rem;
  text-align: center;
}

.directory-chart-department h3,
.directory-chart-unit h4 {
  margin: 0;
}

.directory-chart-units {
  display: grid;
  gap: 16px;
  padding-top: 20px;
  position: relative;
}

.directory-chart-units::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 20px;
  border-left: 1px dashed var(--line);
  transform: translateX(-50%);
}

.directory-chart-unit {
  display: grid;
  gap: 8px;
  position: relative;
}

.directory-chart-unit::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  height: 16px;
  border-left: 1px dashed var(--line);
  transform: translateX(-50%);
}

.directory-chart-unit h4 {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #334155;
  font-size: .9rem;
  text-align: center;
}

.directory-chart-unit ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 16px 0 0;
  position: relative;
  list-style: none;
}

.directory-chart-unit ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 16px;
  border-left: 1px solid var(--line);
  transform: translateX(-50%);
}

.directory-chart-person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.directory-chart-person-card strong,
.directory-chart-person-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-chart-person-card strong {
  color: #0f2537;
  font-size: .84rem;
  line-height: 1.2;
}

.directory-chart-person-card small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.25;
}

.login-wrap {
  width: min(100%, 440px);
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--text);
  margin-bottom: 18px;
}

.login-card h1 {
  margin: 0 0 8px;
}

.digital-card {
  width: min(100%, 440px);
}

.id-card {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

.card-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(9px);
}

.card-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(92vh, 760px);
  overflow: auto;
  outline: none;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #0f2537;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.id-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: #0f2537;
  color: #fff;
  font-weight: 800;
}

.id-card-head small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
}

.id-card-body {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 22px;
  text-align: center;
}

.id-card-body h1 {
  margin: 8px 0 0;
  font-size: 1.35rem;
}

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

.id-card-modern {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}

.id-card-modern .id-card-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #0f2537, #075985);
}

.id-card-modern .id-card-body {
  padding: 30px 22px 18px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.id-card-modern .photo-avatar.xl {
  width: 104px;
  height: 104px;
  border: 5px solid #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
}

.id-card-modern h1 {
  max-width: 100%;
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  line-height: 1.18;
}

.id-card-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.id-card-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 900;
}

.id-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 18px;
}

.id-details {
  padding: 0 22px 22px;
}

.id-card-modern .id-details {
  display: grid;
  gap: 10px;
}

.id-card-modern .id-details div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.id-card-modern .id-details dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.id-card-modern .id-details dd {
  margin: 4px 0 0;
  color: #0f2537;
  overflow-wrap: anywhere;
}

.id-card-foot {
  padding: 14px 18px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.id-card-foot a {
  font-weight: 900;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(82vw, 310px);
    transform: translateX(-105%);
    transition: transform .18s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-flex;
  }

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

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

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

  .public-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-stats {
    justify-content: flex-start;
  }

  .directory-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .directory-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 700px) {
  .main {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    display: none;
  }

  .filters,
  .filters.compact,
  .staff-filters,
  .public-filters,
  .content-grid,
  .master-grid,
  .stat-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .inline-edit-form {
    grid-template-columns: 1fr;
    min-width: 260px;
  }

  .master-add-form {
    grid-template-columns: 1fr;
  }

  .public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 14px;
  }

  .public-hero {
    padding: 16px;
  }

  .directory-toolbar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-chips {
    justify-content: flex-start;
  }

  .directory-table {
    min-width: 0;
  }

  .directory-table thead {
    display: none;
  }

  .directory-table,
  .directory-table tbody,
  .directory-table tr,
  .directory-table td {
    display: block;
    width: 100%;
  }

  .directory-table .table-group-row,
  .directory-table .table-unit-row {
    margin: 0;
  }

  .directory-table .table-group-row td,
  .directory-table .table-unit-row td {
    border-bottom: 0;
  }

  .directory-table .table-group-heading {
    padding: 13px 14px;
  }

  .directory-table .table-unit-heading {
    padding: 11px 14px 11px 28px;
  }

  .directory-staff-row {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

  .directory-staff-row td {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 0;
  }

  .directory-staff-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .directory-staff-row td[data-label="Nama"] {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 2px;
  }

  .directory-staff-row td[data-label="Nama"]::before {
    display: none;
  }

  .directory-staff-row .staff-name-cell {
    min-width: 0;
  }

  .directory-staff-row .icon-link {
    width: fit-content;
  }

  .directory-unit-heading {
    width: auto;
    margin-left: 0;
  }

  .directory-card {
    padding: 16px;
    gap: 14px;
  }

  .directory-card-main {
    align-items: flex-start;
  }

  .directory-card-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .directory-chart-panel {
    padding: 14px;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .staff-card dl div,
  .id-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .org-chart {
    padding: 14px;
  }

  .org-person {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .org-person .avatar {
    grid-row: auto;
  }

  .card-modal {
    align-items: end;
    padding: 12px;
  }

  .card-modal-panel {
    width: 100%;
    max-height: 92vh;
  }

  .id-card-modern {
    border-radius: 16px 16px 0 0;
  }

  .id-actions {
    grid-template-columns: 1fr;
  }
}

/* Direktori awam: tab senarai/carta dan carta organisasi berhierarki */
.print-only {
  display: none;
}

.directory-view-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.directory-view-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.directory-view-tabs button:hover,
.directory-view-tabs button:focus-visible {
  color: #075985;
  background: #f0f9ff;
  outline: none;
}

.directory-view-tabs button.is-active {
  color: #075985;
  border-color: #bae6fd;
  background: #e0f2fe;
  box-shadow: 0 8px 20px rgba(14, 165, 233, .12);
}

.directory-view-panel[hidden] {
  display: none !important;
}

/* Kad senarai: emel di bawah nama, foto lebih besar dan timbul */
.directory-card {
  grid-template-columns: minmax(350px, .95fr) minmax(420px, 1.05fr);
  min-height: 154px;
  margin-top: 18px;
  padding: 22px 24px 22px 26px;
  overflow: visible;
}

.directory-card-main {
  gap: 20px;
  align-self: stretch;
}

.directory-card-main .avatar.large {
  width: 112px;
  height: 132px;
  margin-top: -36px;
  border: 4px solid #fff;
  border-radius: 14px;
  background: #dbeafe;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .22);
  font-size: 1.35rem;
  transform: translateY(8px);
}

.directory-card-name {
  align-content: center;
  gap: 7px;
}

.directory-card-name strong {
  font-size: 1.08rem;
  line-height: 1.28;
}

.directory-card-name .directory-card-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0369a1;
  font-size: .86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.directory-card-name .directory-card-email:hover {
  text-decoration: underline;
}

.directory-card-name .directory-card-email.is-empty {
  color: var(--muted);
  font-weight: 700;
}

.directory-card-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.directory-card-details dd {
  line-height: 1.38;
}

/* Carta organisasi awam */
.directory-chart-panel-v2 {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.directory-chart-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.directory-chart-toolbar h2,
.directory-chart-toolbar p {
  margin: 0;
}

.directory-chart-toolbar p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
}

.directory-chart-actions,
.directory-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.directory-zoom-controls {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.directory-zoom-controls .button {
  min-width: 38px;
  min-height: 36px;
  padding: 7px 9px;
}

.directory-zoom-controls > span {
  min-width: 50px;
  color: #334155;
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
}

.directory-org-scroll {
  overflow: auto;
  min-height: 520px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  box-shadow: var(--shadow);
}

.org-tree-frame {
  position: relative;
}

.org-tree {
  transform-origin: top left;
}

.directory-org-tree {
  display: grid;
  gap: 70px;
  width: max-content;
  min-width: max-content;
}

.directory-org-ptj {
  display: grid;
  gap: 24px;
  justify-items: center;
  min-width: max-content;
  padding: 24px 28px 34px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: rgba(248, 250, 252, .96);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .07);
}

.directory-org-ptj-title {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 430px;
  max-width: 720px;
  padding: 12px 18px;
  border: 1px solid #7dd3fc;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0f2537;
  text-align: center;
}

.directory-org-ptj-title strong {
  font-size: 1.02rem;
}

.directory-org-ptj-title small {
  color: #0369a1;
  font-weight: 900;
}

.directory-org-root,
.directory-org-branch {
  display: grid;
  justify-items: center;
  align-content: start;
  position: relative;
}

.directory-org-root {
  min-width: max-content;
}

.directory-org-role-label {
  margin-bottom: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.directory-org-person {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 316px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .09);
  text-align: left;
}

.directory-org-person.is-root {
  width: 350px;
  min-height: 132px;
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 16px 34px rgba(22, 101, 52, .12);
}

.directory-org-person.is-head {
  width: 300px;
  border-color: #bfdbfe;
  background: #fff;
}

.directory-org-person.is-assistant {
  width: 290px;
  min-height: 100px;
  grid-template-columns: 62px minmax(0, 1fr);
  border-style: dashed;
  border-color: #fbbf24;
  background: #fffbeb;
}

.directory-org-person.is-vacant {
  border-style: dashed;
  opacity: .82;
}

.directory-org-person .avatar.large {
  width: 78px;
  height: 94px;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .15);
  font-size: 1rem;
}

.directory-org-person.is-root .avatar.large {
  width: 88px;
  height: 106px;
}

.directory-org-person.is-assistant .avatar.large {
  width: 62px;
  height: 76px;
}

.directory-org-person-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.directory-org-person-copy strong,
.directory-org-person-copy span,
.directory-org-person-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-org-person-copy strong {
  color: #0f2537;
  font-size: .83rem;
  line-height: 1.24;
}

.directory-org-person-copy span {
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.26;
}

.directory-org-email {
  color: #0369a1;
  font-size: .7rem;
  font-weight: 800;
}

.directory-org-grade {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .68rem;
  font-weight: 900;
}

.directory-org-assistant-branch {
  display: grid;
  justify-items: start;
  gap: 7px;
  width: 310px;
  margin: 24px 0 22px 360px;
  position: relative;
}

.directory-org-assistant-branch::before {
  content: "";
  position: absolute;
  top: -15px;
  right: 100%;
  width: 205px;
  height: 42px;
  border-top: 2px solid #94a3b8;
  border-left: 2px solid #94a3b8;
  border-radius: 10px 0 0 0;
}

.directory-org-assistant-label {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-org-assistant-stack {
  display: grid;
  gap: 9px;
}

.directory-org-children {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 38px;
  width: max-content;
  min-width: 100%;
  margin-top: 8px;
  padding-top: 34px;
  position: relative;
}

.directory-org-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  border-top: 2px solid #94a3b8;
}

.directory-org-root-children::after {
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  height: 34px;
  border-left: 2px solid #94a3b8;
  transform: translateX(-50%);
}

.directory-org-branch {
  flex: 0 0 auto;
  min-width: 320px;
  padding-top: 0;
}

.directory-org-branch::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 50%;
  height: 34px;
  border-left: 2px solid #94a3b8;
  transform: translateX(-50%);
}

.directory-org-branch-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: 320px;
}

.directory-org-branch-title {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title {
  border-color: #f0abfc;
  background: #fdf4ff;
  color: #86198f;
}

.org-type-office > .directory-org-branch-card .directory-org-branch-title {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.directory-org-branch > .directory-org-assistant-branch {
  margin-left: 310px;
}

.directory-org-unit-list {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  width: max-content;
  max-width: none;
  margin-top: 20px;
  padding-top: 24px;
  position: relative;
}

.directory-org-unit-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 24px;
  border-left: 1px dashed #94a3b8;
  transform: translateX(-50%);
}

.directory-org-unit {
  display: grid;
  align-content: start;
  gap: 10px;
  width: 296px;
  position: relative;
}

.directory-org-unit h4 {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin: 0;
  padding: 9px 11px;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: .77rem;
  line-height: 1.25;
  text-align: center;
}

.directory-org-staff-stack {
  display: grid;
  gap: 10px;
  padding-top: 15px;
  position: relative;
}

.directory-org-staff-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 15px;
  border-left: 1px solid #94a3b8;
  transform: translateX(-50%);
}

.directory-org-unit .directory-org-person {
  width: 296px;
}

.directory-org-branch > .directory-org-children {
  margin-top: 24px;
}

.directory-print-header {
  width: 100%;
}

@media (max-width: 1100px) {
  .directory-card {
    grid-template-columns: minmax(300px, 1fr) minmax(320px, 1fr);
  }

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

  .directory-chart-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .directory-view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .directory-view-tabs button {
    padding-inline: 8px;
    font-size: .82rem;
  }

  .directory-card {
    grid-template-columns: 1fr;
    margin-top: 32px;
    padding: 18px;
  }

  .directory-card-main {
    align-items: center;
  }

  .directory-card-main .avatar.large {
    width: 94px;
    height: 112px;
    margin-top: -40px;
  }

  .directory-card-details {
    grid-template-columns: 1fr;
  }

  .directory-chart-actions {
    width: 100%;
  }

  .directory-org-scroll {
    padding: 14px;
  }
}



/* Penambahbaikan 19 Jul: foto di tengah kad, gred carta jelas dan ranting tidak terputus */
.directory-card-main {
  align-items: center;
}

.directory-card-main .avatar.large {
  margin-top: -22px;
  transform: translateY(6px);
}

.photo-avatar img {
  object-position: center center;
}

.directory-org-person {
  align-items: center;
  justify-items: stretch;
}

.directory-org-person .avatar.large {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
}

.directory-org-person.is-root {
  grid-template-columns: 96px minmax(0, 1fr);
}

.directory-org-person.is-assistant {
  grid-template-columns: 70px minmax(0, 1fr);
}

.directory-org-person-copy {
  align-self: center;
  justify-content: center;
}

.directory-org-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: .74rem;
  font-weight: 950;
  line-height: 1;
}

.directory-org-children::before {
  left: 0;
  right: 0;
  z-index: 0;
}

.directory-org-branch::before,
.directory-org-root-children::after,
.directory-org-unit::before,
.directory-org-staff-stack::before,
.directory-org-unit-list::before,
.directory-org-assistant-branch::before {
  z-index: 0;
}

.directory-org-branch-card,
.directory-org-unit,
.directory-org-person,
.directory-org-assistant-branch {
  z-index: 1;
}

.directory-org-unit-list {
  padding-top: 30px;
}

.directory-org-unit-list::before {
  height: 30px;
}

.directory-org-unit-list::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 148px;
  right: 148px;
  border-top: 1.5px dashed #94a3b8;
  z-index: 0;
}

.directory-org-unit::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  height: 30px;
  border-left: 1.5px dashed #94a3b8;
  transform: translateX(-50%);
  z-index: 0;
}

.directory-org-root.has-assistants > .directory-org-assistant-branch {
  margin: 24px 0 22px 360px;
}

.directory-org-root.has-assistants > .directory-org-root-children::after {
  top: -210px;
  height: 210px;
}

.directory-org-root.has-assistants > .directory-org-root-children {
  margin-top: 32px;
}

.directory-org-root.has-branches > .directory-org-person.is-root::after,
.directory-org-branch.has-children > .directory-org-branch-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  height: 34px;
  border-left: 2px solid #94a3b8;
  transform: translateX(-50%);
}

.directory-org-person.is-root,
.directory-org-branch-card {
  position: relative;
}

.directory-org-root.has-assistants > .directory-org-person.is-root::after {
  bottom: -210px;
  height: 210px;
}

.directory-org-branch.has-assistants > .directory-org-unit-list,
.directory-org-branch.has-assistants > .directory-org-children {
  margin-top: 28px;
}

.directory-org-branch.has-assistants > .directory-org-branch-card::after {
  bottom: -190px;
  height: 190px;
}

.directory-org-assistant-branch::before {
  border-color: #94a3b8;
}

@media (max-width: 700px) {
  .directory-card-main .avatar.large {
    margin-top: -28px;
    transform: translateY(4px);
  }
}

@media print {

  .directory-org-grade {
    font-size: 6pt !important;
    padding: 2px 5px !important;
  }

  .directory-card-main .avatar.large,
  .directory-org-person .avatar.large {
    transform: none !important;
  }
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    width: 100%;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .public-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .public-shell > *:not(#directory-chart-panel),
  .no-print,
  .card-modal {
    display: none !important;
  }

  #directory-chart-panel,
  #directory-chart-panel[hidden] {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .print-only {
    display: flex !important;
  }

  .directory-org-scroll {
    overflow: visible !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .org-tree-frame {
    overflow: visible !important;
  }

  .directory-org-tree {
    gap: 0 !important;
  }

  .directory-org-ptj {
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 !important;
    padding: 0 0 4mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .directory-org-ptj:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .directory-print-header {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-bottom: 7mm;
    padding-bottom: 3mm;
    border-bottom: 1.5px solid #0f2537;
  }

  .directory-print-logo {
    display: grid;
    place-items: center;
    width: 17mm;
    height: 17mm;
    border-radius: 4mm;
    background: #0f4c81 !important;
    color: #fff !important;
    font-size: 16pt;
    font-weight: 900;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .directory-print-heading {
    display: grid;
    flex: 1 1 auto;
    align-content: center;
    justify-items: center;
    gap: .35mm;
    line-height: 1.08;
    text-align: center;
  }

  .directory-print-heading strong {
    display: block;
    margin: 0;
    color: #0f2537;
    font-weight: 800;
    white-space: nowrap;
  }

  .directory-print-title {
    font-size: 14pt;
    letter-spacing: .045em;
  }

  .directory-print-agency {
    font-size: 9.5pt;
    letter-spacing: .012em;
  }

  .directory-print-office {
    font-size: 10.5pt;
    letter-spacing: .018em;
  }

  .directory-print-date {
    min-width: 34mm;
    font-size: 8pt;
    line-height: 1.4;
    text-align: right;
  }

  .directory-org-person,
  .directory-org-branch-title,
  .directory-org-unit h4,
  .directory-org-ptj {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Penambahbaikan 19 Jul v3: kad lebih kemas, label tema, ranting jelas, pagination kekal senarai */
.directory-card::after {
  content: "Kad digital";
  top: auto;
  right: 16px;
  bottom: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, .45);
  background: rgba(248, 250, 252, .9);
  color: #64748b;
  font-size: .62rem;
  font-weight: 800;
  opacity: 0;
  letter-spacing: .02em;
}

.directory-card:hover::after,
.directory-card:focus-visible::after {
  opacity: .62;
}

.directory-card-main {
  align-items: center;
}

.directory-card-main .avatar.large {
  align-self: center;
  margin-top: 0;
  margin-left: -10px;
  transform: translateY(0);
  width: 116px;
  height: 136px;
}

.directory-card-name {
  align-content: center;
}

.directory-card-details dt {
  letter-spacing: .04em;
}

/* Hanya kad pengurusan atasan diberi warna. Kad biasa dan setiausaha pejabat kekal neutral. */
.directory-org-person.is-root,
.directory-org-person.is-head,
.directory-org-person.is-assistant,
.directory-org-person {
  background: #fff;
  border-color: #cbd5e1;
}

.directory-org-person.is-assistant {
  width: 290px;
  min-height: 100px;
  grid-template-columns: 70px minmax(0, 1fr);
  border-style: solid;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .07);
}

.directory-org-assistant-label {
  border: 1px solid #dbeafe;
  background: #f8fafc;
  color: #475569;
  letter-spacing: .035em;
}

.directory-org-person.has-management-role.role-ketua-pengarah {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 16px 34px rgba(22, 101, 52, .12);
}

.directory-org-person.has-management-role.role-timbalan-ketua-pengarah {
  border-color: #ddd6fe;
  background: #f5f3ff;
  box-shadow: 0 14px 30px rgba(91, 33, 182, .10);
}

.directory-org-person.has-management-role.role-pengarah-kanan {
  border-color: #bfdbfe;
  background: #eff6ff;
  box-shadow: 0 14px 30px rgba(30, 64, 175, .10);
}

.directory-org-person.has-management-role.role-pengarah {
  border-color: #99f6e4;
  background: #f0fdfa;
  box-shadow: 0 14px 30px rgba(15, 118, 110, .10);
}

.directory-org-person.has-management-role.role-ketua-cawangan,
.directory-org-person.has-management-role.role-ketua-unit {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .09);
}

.directory-org-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 20px;
  margin-top: 3px;
  padding: 5px 9px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: .76rem;
  font-weight: 950;
  line-height: 1;
}

.directory-org-ptj-title,
.directory-org-branch-title {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #1e293b;
}

.directory-org-ptj-title small,
.directory-org-branch-title small {
  color: #475569;
}

.org-type-office > .directory-org-branch-card .directory-org-branch-title {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #334155;
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #fff 0%, #fff1f2 100%);
  color: #9f1239;
}

.directory-org-children::before,
.directory-org-root-children::after,
.directory-org-branch::before,
.directory-org-root.has-branches > .directory-org-person.is-root::after,
.directory-org-branch.has-children > .directory-org-branch-card::after,
.directory-org-assistant-branch::before {
  border-color: #64748b !important;
}

.directory-org-children::before {
  top: 0;
  left: 0;
  right: 0;
  border-top-width: 2px;
}

.directory-org-branch::before {
  top: -34px;
  height: 34px;
  border-left-width: 2px;
}

.directory-org-unit-list::before,
.directory-org-unit-list::after,
.directory-org-unit::before,
.directory-org-staff-stack::before {
  border-color: #94a3b8 !important;
}

.directory-org-assistant-branch::before {
  width: 176px;
  height: 34px;
  top: -11px;
  border-top-width: 2px;
  border-left-width: 2px;
}

@media (max-width: 700px) {
  .directory-card-main .avatar.large {
    margin-top: 0;
    margin-left: 0;
    width: 96px;
    height: 114px;
    transform: none;
  }
}

@media print {
  .directory-card::after {
    display: none !important;
  }

  .directory-org-person.has-management-role.role-ketua-pengarah,
  .directory-org-person.has-management-role.role-timbalan-ketua-pengarah,
  .directory-org-person.has-management-role.role-pengarah-kanan,
  .directory-org-person.has-management-role.role-pengarah,
  .directory-org-person.is-assistant {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* FIX 19 Jul petang: kemas semula ranting carta supaya tidak terputus.
   Unit Integriti dipaparkan sebagai ranting sokongan terus bawah Ketua Pengarah,
   berasingan daripada Pejabat Timbalan Ketua Pengarah. */
.directory-org-tree {
  --org-line: #64748b;
  --org-line-soft: #94a3b8;
}

.directory-org-root,
.directory-org-branch {
  isolation: isolate;
}

.directory-org-root > .directory-org-person.is-root,
.directory-org-branch > .directory-org-branch-card,
.directory-org-root-supports,
.directory-org-children,
.directory-org-unit-list {
  position: relative;
}

.directory-org-root-supports {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  width: max-content;
  min-width: 360px;
  margin-top: 30px;
  padding-top: 32px;
  z-index: 1;
}

.directory-org-root-supports::after {
  content: "";
  position: absolute;
  top: -32px;
  left: 50%;
  height: 32px;
  border-left: 2px solid var(--org-line);
  transform: translateX(-50%);
  z-index: 0;
}

.directory-org-root-supports::before {
  content: "";
  position: absolute;
  top: 0;
  left: 120px;
  right: 120px;
  border-top: 2px solid var(--org-line);
  z-index: 0;
}

.directory-org-root-supports > .directory-org-assistant-branch,
.directory-org-root-supports > .directory-org-branch {
  margin: 0 !important;
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.directory-org-root-supports > .directory-org-assistant-branch::before,
.directory-org-root-supports > .directory-org-branch::before {
  content: "";
  position: absolute;
  top: -32px;
  left: 50%;
  width: 0;
  height: 32px;
  border-top: 0 !important;
  border-left: 2px solid var(--org-line) !important;
  border-radius: 0;
  transform: translateX(-50%);
  z-index: 0;
}

.directory-org-root > .directory-org-root-children {
  margin-top: 42px !important;
  padding-top: 38px;
}

.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 44px !important;
  padding-top: 38px;
}

.directory-org-children::before {
  left: 160px !important;
  right: 160px !important;
  top: 0;
  border-top: 2px solid var(--org-line) !important;
  z-index: 0;
}

.directory-org-root-children::after {
  top: -42px !important;
  height: 42px !important;
  border-left: 2px solid var(--org-line) !important;
  z-index: 0;
}

.directory-org-root.has-supports > .directory-org-root-children::after {
  top: -44px !important;
  height: 44px !important;
}

.directory-org-branch::before {
  top: -38px !important;
  height: 38px !important;
  border-left: 2px solid var(--org-line) !important;
  z-index: 0;
}

.directory-org-root.has-branches > .directory-org-person.is-root::after,
.directory-org-root.has-supports > .directory-org-person.is-root::after,
.directory-org-branch.has-children > .directory-org-branch-card::after,
.directory-org-branch.has-assistants > .directory-org-branch-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px !important;
  height: 34px !important;
  border-left: 2px solid var(--org-line) !important;
  transform: translateX(-50%);
  z-index: 0;
}

.directory-org-root.has-supports > .directory-org-person.is-root::after {
  bottom: -30px !important;
  height: 30px !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  width: 300px;
  margin: 26px auto 20px !important;
  justify-items: center;
  z-index: 1;
}

.directory-org-branch > .directory-org-assistant-branch::before {
  top: -26px !important;
  left: 50% !important;
  right: auto !important;
  width: 0 !important;
  height: 26px !important;
  border-top: 0 !important;
  border-left: 2px solid var(--org-line-soft) !important;
  border-radius: 0 !important;
  transform: translateX(-50%);
}

.directory-org-assistant-label {
  justify-self: center;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.directory-org-person.is-assistant {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .07);
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title,
.org-type-office > .directory-org-branch-card .directory-org-branch-title,
.directory-org-branch-title,
.directory-org-ptj-title {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #1e293b;
}

.directory-org-branch-card,
.directory-org-person,
.directory-org-assistant-branch,
.directory-org-unit,
.directory-org-branch-title {
  z-index: 2;
}

.directory-org-unit-list {
  margin-top: 28px;
  padding-top: 30px;
}

.directory-org-branch.has-assistants > .directory-org-unit-list,
.directory-org-branch.has-assistants > .directory-org-children {
  margin-top: 28px !important;
}

.directory-org-unit-list::before {
  top: 0;
  height: 30px;
  border-left: 1.5px dashed var(--org-line-soft) !important;
}

.directory-org-unit-list::after {
  top: 30px;
  left: 148px;
  right: 148px;
  border-top: 1.5px dashed var(--org-line-soft) !important;
}

.directory-org-unit::before {
  top: -30px;
  height: 30px;
  border-left: 1.5px dashed var(--org-line-soft) !important;
}

.directory-org-staff-stack::before {
  border-left-color: var(--org-line-soft) !important;
}

.directory-org-branch.is-root-support {
  min-width: 320px;
}

.directory-org-branch.is-root-support > .directory-org-children {
  margin-top: 26px;
}

.directory-org-branch.is-root-support > .directory-org-branch-card::after {
  bottom: -30px !important;
  height: 30px !important;
}

@media print {
  .directory-org-root-supports::before,
  .directory-org-root-supports::after,
  .directory-org-root-supports > .directory-org-assistant-branch::before,
  .directory-org-root-supports > .directory-org-branch::before {
    border-color: #64748b !important;
  }
}

/* FIX 19 Jul v4: ranting carta dijana tepat menggunakan SVG supaya tiada garisan hilang atau terlebih hujung. */
.directory-org-tree {
  --org-line: #64748b;
  --org-line-soft: #94a3b8;
  position: relative;
}

.directory-org-connectors {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.org-connector {
  fill: none;
  stroke: var(--org-line);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.org-connector.is-soft {
  stroke: var(--org-line-soft);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

/* Matikan ranting CSS lama kerana ia menyebabkan line terputus dan line terlebih di hujung. */
.directory-org-root-supports::before,
.directory-org-root-supports::after,
.directory-org-root-supports > .directory-org-assistant-branch::before,
.directory-org-root-supports > .directory-org-branch::before,
.directory-org-children::before,
.directory-org-root-children::after,
.directory-org-branch::before,
.directory-org-root.has-branches > .directory-org-person.is-root::after,
.directory-org-root.has-supports > .directory-org-person.is-root::after,
.directory-org-branch.has-children > .directory-org-branch-card::after,
.directory-org-branch.has-assistants > .directory-org-branch-card::after,
.directory-org-branch > .directory-org-assistant-branch::before,
.directory-org-assistant-branch::before,
.directory-org-unit-list::before,
.directory-org-unit-list::after,
.directory-org-unit::before,
.directory-org-staff-stack::before {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

.directory-org-ptj,
.directory-org-root,
.directory-org-branch,
.directory-org-root-supports,
.directory-org-children,
.directory-org-unit-list,
.directory-org-assistant-branch,
.directory-org-unit,
.directory-org-staff-stack {
  position: relative;
}

.directory-org-person,
.directory-org-branch-card,
.directory-org-branch-title,
.directory-org-assistant-label,
.directory-org-unit h4 {
  position: relative;
  z-index: 4;
}

.directory-org-root-supports,
.directory-org-children,
.directory-org-unit-list,
.directory-org-assistant-stack,
.directory-org-staff-stack {
  z-index: 3;
}

.directory-org-root-supports {
  margin-top: 34px;
  padding-top: 0;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 54px !important;
  padding-top: 0 !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  margin-top: 34px !important;
  margin-bottom: 24px !important;
}

.directory-org-unit-list {
  margin-top: 36px !important;
  padding-top: 0 !important;
}

.directory-org-branch > .directory-org-children {
  margin-top: 42px !important;
  padding-top: 0 !important;
}

.directory-org-staff-stack {
  padding-top: 24px !important;
}

.directory-org-assistant-stack {
  padding-top: 14px;
}

.directory-org-branch.is-root-support {
  min-width: 320px;
}

.directory-org-branch.is-root-support > .directory-org-children,
.directory-org-branch.is-root-support > .directory-org-unit-list {
  margin-top: 36px !important;
}

@media print {
  .directory-org-connectors {
    overflow: visible !important;
  }

  .org-connector {
    stroke: #334155 !important;
  }

  .org-connector.is-soft {
    stroke: #64748b !important;
  }
}

/* FIX 19 Jul v5: gred + jawatan jelas, kad carta lebih kemas, label bahagian/cawangan/unit satu tema. */
.directory-org-tree {
  --org-card-w: 264px;
  --org-head-w: 264px;
  --org-root-w: 304px;
  --org-unit-w: 248px;
}

.directory-org-person {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 9px !important;
  width: var(--org-card-w) !important;
  min-height: 94px !important;
  padding: 9px !important;
  border-radius: 12px !important;
  box-sizing: border-box;
}

.directory-org-person.is-root {
  grid-template-columns: 68px minmax(0, 1fr) !important;
  width: var(--org-root-w) !important;
  min-height: 104px !important;
}

.directory-org-person.is-head {
  width: 100% !important;
  min-height: 94px !important;
}

.directory-org-person.is-assistant {
  grid-template-columns: 52px minmax(0, 1fr) !important;
  width: 236px !important;
  min-height: 86px !important;
  border-style: solid !important;
}

.directory-org-person .avatar.large {
  width: 58px !important;
  height: 70px !important;
  border-radius: 9px !important;
}

.directory-org-person.is-root .avatar.large {
  width: 68px !important;
  height: 82px !important;
}

.directory-org-person.is-assistant .avatar.large {
  width: 52px !important;
  height: 62px !important;
}

.directory-org-person-copy {
  gap: 3px !important;
}

.directory-org-person-copy strong {
  font-size: .74rem !important;
  line-height: 1.16 !important;
}

.directory-org-email {
  display: block !important;
  color: #0369a1 !important;
  font-size: .64rem !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
}

.directory-org-position {
  display: block !important;
  color: #334155 !important;
  font-size: .67rem !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}

.directory-org-position em,
.directory-org-grade em {
  margin-right: 4px;
  color: #64748b;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.directory-org-grade {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 1px !important;
  padding: 3px 7px !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 999px !important;
  background: #eef2ff !important;
  color: #3730a3 !important;
  font-size: .64rem !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow: visible !important;
}

.directory-org-branch {
  min-width: 284px !important;
}

.directory-org-branch-card {
  width: 284px !important;
  gap: 8px !important;
  padding: 9px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 16px !important;
  background: rgba(248, 250, 252, .96) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06) !important;
  box-sizing: border-box;
}

.directory-org-branch-title,
.directory-org-unit h4,
.directory-org-ptj-title {
  border-color: #c7d2fe !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #1e293b !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04) !important;
}

.directory-org-branch-title {
  display: grid !important;
  justify-items: center !important;
  align-items: center !important;
  gap: 2px !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 8px 10px !important;
  border-style: solid !important;
  border-radius: 12px !important;
  font-size: .73rem !important;
  line-height: 1.2 !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong {
  display: block;
  color: #1e293b;
  font-size: .73rem;
  font-weight: 950;
  line-height: 1.18;
  text-align: center;
}

.directory-org-branch-title small,
.directory-org-unit h4 small {
  display: block;
  color: #475569;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title {
  border-color: #fecaca !important;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%) !important;
  color: #991b1b !important;
}

.org-type-office > .directory-org-branch-card .directory-org-branch-title {
  border-color: #bbf7d0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
  color: #065f46 !important;
}

.directory-org-unit-list {
  gap: 14px !important;
}

.directory-org-unit {
  width: var(--org-unit-w) !important;
}

.directory-org-unit h4 {
  display: grid !important;
  place-items: center !important;
  gap: 2px !important;
  min-height: 42px !important;
  padding: 8px 9px !important;
  border-style: solid !important;
  border-radius: 12px !important;
}

.directory-org-unit .directory-org-person {
  width: var(--org-unit-w) !important;
}

.directory-org-staff-stack {
  gap: 8px !important;
}

.directory-org-children {
  gap: 30px !important;
}

.directory-org-root-supports {
  gap: 28px !important;
}

.directory-org-branch.is-root-support {
  min-width: 284px !important;
}

@media print {
  .directory-org-person,
  .directory-org-branch-card,
  .directory-org-branch-title,
  .directory-org-unit h4 {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* FIX 19 Jul v6: ranting solid, tidak lalu atas kad, gred biasa, emel dibuang dari kad carta. */
.directory-org-tree {
  --org-card-w: 236px;
  --org-head-w: 244px;
  --org-root-w: 280px;
  --org-unit-w: 224px;
  --org-line: #475569;
  --org-line-soft: #64748b;
  position: relative;
  isolation: isolate;
}

.directory-org-connectors {
  z-index: 1 !important;
}

.org-connector,
.org-connector.is-soft {
  stroke: var(--org-line) !important;
  stroke-width: 2 !important;
  stroke-dasharray: none !important;
  stroke-linecap: butt !important;
  stroke-linejoin: miter !important;
}

.directory-org-person,
.directory-org-branch-card,
.directory-org-branch-title,
.directory-org-assistant-label,
.directory-org-unit h4,
.directory-org-ptj-title {
  position: relative !important;
  z-index: 6 !important;
}

.directory-org-person {
  grid-template-columns: 52px minmax(0, 1fr) !important;
  width: var(--org-card-w) !important;
  min-height: 82px !important;
  padding: 8px !important;
  gap: 8px !important;
}

.directory-org-person.is-root {
  grid-template-columns: 62px minmax(0, 1fr) !important;
  width: var(--org-root-w) !important;
  min-height: 94px !important;
}

.directory-org-person.is-head {
  width: 100% !important;
  min-height: 84px !important;
}

.directory-org-person.is-assistant {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  width: 220px !important;
  min-height: 76px !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .07) !important;
}

.directory-org-person .avatar.large {
  width: 52px !important;
  height: 62px !important;
  align-self: center !important;
}

.directory-org-person.is-root .avatar.large {
  width: 62px !important;
  height: 74px !important;
}

.directory-org-person.is-assistant .avatar.large {
  width: 48px !important;
  height: 58px !important;
}

.directory-org-person-copy {
  gap: 2px !important;
  align-content: center !important;
}

.directory-org-person-copy strong {
  font-size: .7rem !important;
  line-height: 1.16 !important;
}

.directory-org-email {
  display: none !important;
}

.directory-org-position {
  display: block !important;
  color: #1f2937 !important;
  font-size: .64rem !important;
  font-weight: 750 !important;
  line-height: 1.18 !important;
}

.directory-org-position em,
.directory-org-grade em {
  margin-right: 4px !important;
  color: #64748b !important;
  font-style: normal !important;
  font-weight: 850 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.directory-org-grade {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: .64rem !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  white-space: normal !important;
}

.directory-org-root-assistants {
  display: grid !important;
  place-items: center !important;
  width: max-content !important;
  min-width: 240px !important;
  margin: 34px auto 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

.directory-org-root-assistants .directory-org-assistant-branch,
.directory-org-branch > .directory-org-assistant-branch {
  margin-left: auto !important;
  margin-right: auto !important;
  justify-items: center !important;
  position: relative !important;
  z-index: 5 !important;
}

.directory-org-root-assistants .directory-org-assistant-branch {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-assistants > .directory-org-root-children {
  margin-top: 54px !important;
  padding-top: 0 !important;
}

.directory-org-branch {
  min-width: 252px !important;
}

.directory-org-branch-card {
  width: 252px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 15px !important;
  padding: 8px !important;
  background: rgba(248, 250, 252, .98) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055) !important;
}

.directory-org-branch-title,
.directory-org-unit h4,
.directory-org-ptj-title {
  border: 1.5px solid #c7d2fe !important;
  border-radius: 14px !important;
  border-style: solid !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #1e293b !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

.directory-org-branch-title {
  min-height: 42px !important;
  padding: 7px 9px !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong {
  font-size: .69rem !important;
  line-height: 1.14 !important;
}

.directory-org-branch-title small,
.directory-org-unit h4 small {
  font-size: .55rem !important;
  color: #64748b !important;
  letter-spacing: .035em !important;
}

.directory-org-unit-list {
  margin-top: 36px !important;
  gap: 14px !important;
  padding-top: 0 !important;
  align-items: flex-start !important;
}

.directory-org-unit {
  width: var(--org-unit-w) !important;
}

.directory-org-unit h4 {
  min-height: 38px !important;
  padding: 7px 8px !important;
}

.directory-org-unit .directory-org-person {
  width: var(--org-unit-w) !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  margin-top: 30px !important;
  margin-bottom: 30px !important;
}

.directory-org-branch.has-assistants > .directory-org-unit-list,
.directory-org-branch.has-assistants > .directory-org-children {
  margin-top: 36px !important;
}

.directory-org-assistant-label {
  border: 1.5px solid #c7d2fe !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #475569 !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .04) !important;
}

.directory-org-assistant-stack {
  padding-top: 16px !important;
}

.directory-org-staff-stack {
  padding-top: 22px !important;
  gap: 8px !important;
}

.directory-org-children {
  gap: 26px !important;
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title,
.org-type-office > .directory-org-branch-card .directory-org-branch-title {
  border-color: #c7d2fe !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #1e293b !important;
}

/* FIX 19 Jul v7: gred dalam senarai, label Jawatan, subheader satu tema dan buang menu Carta Organisasi daripada sidebar. */
.directory-card-details {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
}

.directory-card-details dt {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #64748b !important;
  font-size: .68rem !important;
  font-weight: 900 !important;
  letter-spacing: .045em !important;
  line-height: 1.1 !important;
}

.directory-card-details dd {
  margin-top: 4px !important;
  color: #0f2537 !important;
  font-size: .86rem !important;
  font-weight: 760 !important;
  line-height: 1.32 !important;
}

.detail-icon.minimal-icon {
  width: 14px !important;
  height: 14px !important;
  opacity: .72 !important;
  object-fit: contain !important;
  flex: 0 0 14px !important;
}

.directory-card::after {
  content: "Kad digital" !important;
  top: 12px !important;
  right: 12px !important;
  padding: 4px 7px !important;
  background: rgba(255,255,255,.88) !important;
  border: 1px solid rgba(203,213,225,.75) !important;
  color: #64748b !important;
  font-size: .64rem !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 14px rgba(15,23,42,.05) !important;
}

/* Subheader senarai: bentuk sama seperti header, cuma warna berbeza. */
.directory-section-heading,
.directory-unit-heading {
  width: 100% !important;
  margin-left: 0 !important;
  border-radius: 16px !important;
  border-style: solid !important;
  border-width: 1.5px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

.directory-section-heading {
  padding: 13px 15px !important;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%) !important;
  border-color: #bfdbfe !important;
  color: #1e3a8a !important;
}

.directory-unit-heading {
  padding: 11px 15px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: #dbeafe !important;
  color: #334155 !important;
}

.directory-unit-heading .unit-dot {
  width: 20px !important;
  height: 20px !important;
  border-radius: 8px !important;
  background: url('https://cdn-icons-png.flaticon.com/512/7393/7393889.png') center / 13px 13px no-repeat #e0f2fe !important;
  border: 1px solid #bae6fd !important;
}

/* Label carta: sama keluarga reka bentuk dengan nama PTJ, tidak terapung. */
.directory-org-ptj-title,
.directory-org-branch-title,
.directory-org-unit h4 {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  border-radius: 16px !important;
  border-width: 1.5px !important;
  border-style: solid !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
  text-align: center !important;
}

.directory-org-ptj-title {
  border-color: #c7d2fe !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  color: #1e293b !important;
}

.directory-org-branch-title {
  border-color: #bfdbfe !important;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%) !important;
  color: #1e3a8a !important;
}

.directory-org-unit h4 {
  border-color: #dbeafe !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  color: #334155 !important;
  box-shadow: none !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong,
.directory-org-ptj-title strong {
  color: inherit !important;
  font-weight: 900 !important;
}

.directory-org-branch-title small,
.directory-org-unit h4 small,
.directory-org-ptj-title small {
  color: #64748b !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
}

.directory-org-branch-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.directory-org-branch-card > .directory-org-person.is-head {
  margin-top: 10px !important;
}

.directory-org-unit .directory-org-staff-stack {
  margin-top: 10px !important;
}

.directory-org-grade {
  color: #334155 !important;
  font-size: .64rem !important;
  font-weight: 760 !important;
}

@media (max-width: 1100px) {
  .directory-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .directory-card-details {
    grid-template-columns: 1fr !important;
  }
}

/* FIX 19 Jul v15: elak carta berlapis, Unit Integriti solo kiri KP, jawatan kosong kekal muncul. */
.directory-org-tree {
  --org-line: #475569;
  --org-line-soft: #64748b;
}

.org-connector {
  stroke: var(--org-line) !important;
  stroke-width: 2.35 !important;
}

.directory-org-root-stage {
  display: grid;
  grid-template-columns: minmax(260px, auto) auto minmax(260px, auto);
  align-items: start;
  column-gap: 34px;
  width: max-content;
  max-width: 100%;
  position: relative;
  z-index: 4;
}

.directory-org-root-stage:not(.has-supports) {
  grid-template-columns: 1fr auto 1fr;
}

.directory-org-root-supports {
  grid-column: 1;
  justify-self: end;
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 26px;
  min-width: 0;
  width: max-content;
  margin: 0 !important;
  padding: 0 !important;
}

.directory-org-root-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 4;
}

.directory-org-root-stage-spacer {
  grid-column: 3;
  min-width: 260px;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 58px !important;
}

.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch,
.directory-org-assistant-branch {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: max-content;
}

.directory-org-assistant-label,
.directory-org-role-label,
.directory-org-branch-title small,
.directory-org-unit h4 small {
  display: none !important;
}

.directory-org-assistant-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 0 !important;
}

.directory-org-person-copy strong {
  display: block;
}

.directory-org-position,
.directory-org-grade {
  display: block !important;
  font-style: normal !important;
}

.directory-org-position em,
.directory-org-grade em {
  display: none !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong,
.directory-org-ptj-title strong {
  text-transform: uppercase;
}

.directory-org-unit.no-title > h4 {
  display: none !important;
}

.directory-org-unit.no-title {
  padding-top: 0 !important;
}

.directory-org-unit.no-title .directory-org-staff-stack {
  padding-top: 0 !important;
}

.directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  margin-top: 34px !important;
}

.directory-org-person,
.directory-org-branch-card,
.directory-org-unit,
.directory-org-branch-title {
  border: 1.5px solid #cbd5e1 !important;
}

/* FIX 19 Jul v16: semakan URL carta HQ - elak overlap dan jadikan semua setiausaha cabang sisi. */
.directory-org-scroll {
  overflow: auto !important;
}

.directory-org-connectors {
  z-index: 3 !important;
}

.org-connector {
  stroke: #334155 !important;
  stroke-width: 2.6 !important;
  opacity: .92 !important;
}

.directory-org-person,
.directory-org-branch-card,
.directory-org-branch-title,
.directory-org-unit h4,
.directory-org-ptj-title {
  z-index: 8 !important;
}

.directory-org-root-stage {
  display: grid !important;
  grid-template-columns: minmax(280px, auto) auto minmax(280px, auto) !important;
  column-gap: 42px !important;
  align-items: start !important;
  justify-content: center !important;
  width: max-content !important;
  margin-inline: auto !important;
}

.directory-org-root-stage:not(.has-supports) {
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr) !important;
}

.directory-org-root-supports {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: start !important;
  display: grid !important;
  gap: 28px !important;
  width: max-content !important;
  max-width: 360px !important;
  margin: 42px 0 0 !important;
}

.directory-org-root-center {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  display: grid !important;
  grid-template-columns: auto auto !important;
  column-gap: 34px !important;
  row-gap: 18px !important;
  align-items: center !important;
  width: max-content !important;
}

.directory-org-root-center > .directory-org-person.is-root {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.directory-org-root-center > .directory-org-root-assistants {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
}

.directory-org-root-stage-spacer {
  grid-column: 3 !important;
  min-width: 280px !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 70px !important;
}

.directory-org-branch {
  display: grid !important;
  grid-template-columns: auto auto !important;
  column-gap: 24px !important;
  row-gap: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: max-content !important;
}

.directory-org-branch > .directory-org-branch-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: start !important;
  margin: 0 !important;
}

.directory-org-branch > .directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  margin-top: 6px !important;
}

.directory-org-unit-list {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 16px !important;
}

.directory-org-staff-stack {
  display: grid !important;
  gap: 12px !important;
  padding-top: 28px !important;
}

.directory-org-unit.no-title .directory-org-staff-stack {
  padding-top: 18px !important;
}

.directory-org-assistant-label,
.directory-org-role-label,
.directory-org-branch-title small,
.directory-org-unit h4 small {
  display: none !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong,
.directory-org-ptj-title strong {
  text-transform: uppercase !important;
}

.directory-org-position em,
.directory-org-grade em {
  display: none !important;
}

.directory-org-position,
.directory-org-grade {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: #334155 !important;
}

.directory-org-person.is-vacant {
  border-style: dashed !important;
  background: #f8fafc !important;
}

.directory-card-details dt img,
.directory-card-details .detail-icon {
  display: none !important;
}

.directory-card-details {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* FIX 19 Jul v17: semak semula carta HQ dan hover kad digital. */
.directory-org-root {
  display: grid !important;
  justify-items: center !important;
  align-items: start !important;
  row-gap: 0 !important;
  width: max-content !important;
  min-width: max-content !important;
}

.directory-org-root-stage {
  display: grid !important;
  grid-template-columns: 360px auto 360px !important;
  column-gap: 64px !important;
  align-items: start !important;
  justify-content: center !important;
  width: max-content !important;
  min-width: max-content !important;
  margin-inline: auto !important;
}

.directory-org-root-stage:not(.has-supports) {
  grid-template-columns: 360px auto 360px !important;
}

.directory-org-root-supports {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: start !important;
  display: grid !important;
  justify-items: end !important;
  align-content: start !important;
  gap: 30px !important;
  width: 360px !important;
  max-width: 360px !important;
  min-width: 360px !important;
  margin: 48px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.directory-org-root-center {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: start !important;
  display: grid !important;
  grid-template-columns: auto auto !important;
  column-gap: 42px !important;
  row-gap: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  min-width: max-content !important;
  overflow: visible !important;
}

.directory-org-root-center > .directory-org-person.is-root {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
}

.directory-org-root-center > .directory-org-root-assistants {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
}

.directory-org-root-stage-spacer {
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: 360px !important;
  min-width: 360px !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children,
.directory-org-root.has-branches > .directory-org-root-children {
  margin-top: 96px !important;
  padding-top: 0 !important;
  position: relative !important;
  clear: both !important;
}

.directory-org-root-supports .directory-org-branch {
  min-width: 300px !important;
  width: 300px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  row-gap: 18px !important;
  justify-content: stretch !important;
}

.directory-org-root-supports .directory-org-branch > .directory-org-branch-card,
.directory-org-root-supports .directory-org-unit,
.directory-org-root-supports .directory-org-unit .directory-org-person {
  width: 300px !important;
}

.directory-org-root-supports .directory-org-unit-list {
  display: grid !important;
  width: 300px !important;
  gap: 12px !important;
  margin-top: 26px !important;
}

.directory-org-root-supports .directory-org-staff-stack {
  padding-top: 20px !important;
}

.directory-org-branch > .directory-org-assistant-branch,
.directory-org-root-assistants {
  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;
}

.directory-org-person.is-assistant {
  width: 230px !important;
}

.directory-org-children {
  gap: 40px !important;
}

.org-connector {
  stroke: #1f2937 !important;
  stroke-width: 2.4 !important;
  opacity: .78 !important;
}

.directory-org-connectors {
  z-index: 2 !important;
}

.directory-org-person,
.directory-org-branch-card,
.directory-org-branch-title,
.directory-org-unit h4,
.directory-org-ptj-title {
  z-index: 10 !important;
}

.directory-card::after {
  content: "Kad digital" !important;
  top: auto !important;
  right: 14px !important;
  bottom: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  font-size: .65rem !important;
  font-weight: 700 !important;
  letter-spacing: .01em !important;
  opacity: 0 !important;
}

.directory-card:hover::after,
.directory-card:focus-visible::after {
  opacity: .55 !important;
}


/* FIX 19 Jul v18: Unit Integriti sebagai entiti bebas bawah pengawasan langsung KP/Ketua Jabatan. */
.directory-org-root-stage {
  grid-template-columns: 420px auto 420px !important;
  column-gap: 78px !important;
  margin-bottom: 76px !important;
}

.directory-org-root-supports {
  width: 420px !important;
  max-width: 420px !important;
  min-width: 420px !important;
  margin-top: 38px !important;
  justify-items: end !important;
}

.directory-org-root-supports .directory-org-branch {
  width: 318px !important;
  min-width: 318px !important;
  max-width: 318px !important;
}

.directory-org-root-supports .directory-org-branch > .directory-org-branch-card,
.directory-org-root-supports .directory-org-unit,
.directory-org-root-supports .directory-org-unit .directory-org-person {
  width: 318px !important;
}

.directory-org-root-supports .directory-org-unit-list {
  width: 318px !important;
}

.directory-org-root-stage-spacer {
  width: 420px !important;
  min-width: 420px !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children,
.directory-org-root.has-branches > .directory-org-root-children {
  margin-top: 44px !important;
}

.org-type-integrity > .directory-org-branch-card {
  border: 1.5px solid #bfdbfe !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .7) !important;
  padding: 0 !important;
}

.org-type-integrity > .directory-org-branch-card .directory-org-branch-title {
  border-color: #c7d2fe !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  color: #1e293b !important;
}

.org-connector {
  stroke: #0f172a !important;
  stroke-width: 2.5 !important;
  opacity: .72 !important;
}

/* Buang hover badge Kad digital supaya tiada bulatan/kotak muncul. */
.directory-card::after,
.directory-card:hover::after,
.directory-card:focus-visible::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


/* FIX 19 Jul v19: semakan carta HQ — Setiausaha KP kembali, jarak setiausaha dekat, buang border luar dan hover bulat. */
.directory-card::after,
.directory-card:hover::after,
.directory-card:focus-visible::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.directory-org-tree {
  --org-line: #1f2937 !important;
  --org-line-soft: #334155 !important;
}

.org-connector,
.org-connector.is-solid {
  stroke: var(--org-line) !important;
  stroke-width: 2.45 !important;
  opacity: .9 !important;
  fill: none !important;
}

.directory-org-connectors {
  z-index: 2 !important;
}

.directory-org-person,
.directory-org-branch-title,
.directory-org-unit h4,
.directory-org-ptj-title {
  position: relative !important;
  z-index: 8 !important;
}

/* Buang border/kotak luar yang menyebabkan Setiausaha, Unit dan Cawangan nampak berkotak besar. */
.directory-org-branch,
.directory-org-branch-card,
.directory-org-unit,
.directory-org-root-assistants,
.directory-org-assistant-branch,
.directory-org-root-supports,
.directory-org-root-center,
.directory-org-root-stage,
.directory-org-children,
.directory-org-unit-list,
.directory-org-staff-stack,
.directory-org-assistant-stack {
  border: 0 !important;
  outline: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.directory-org-branch-card {
  padding: 0 !important;
  background: transparent !important;
}

/* Susun blok atas supaya Unit Integriti kiri, KP tengah, Setiausaha KP rapat di kanan. */
.directory-org-root-stage {
  display: grid !important;
  grid-template-columns: minmax(260px, auto) auto minmax(180px, 220px) !important;
  column-gap: 22px !important;
  align-items: start !important;
  justify-content: center !important;
  width: max-content !important;
  margin-inline: auto !important;
}

.directory-org-root-supports {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: start !important;
  display: grid !important;
  gap: 22px !important;
  width: max-content !important;
  max-width: 300px !important;
  margin: 20px 0 0 !important;
  padding: 0 !important;
}

.directory-org-root-center {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: auto auto !important;
  column-gap: 14px !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
}

.directory-org-root-center > .directory-org-person.is-root {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.directory-org-root-center > .directory-org-root-assistants {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: start !important;
  margin: 0 !important;
}

.directory-org-root-stage-spacer {
  grid-column: 3 !important;
  display: block !important;
  min-width: 180px !important;
  width: 180px !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 64px !important;
}

/* Semua setiausaha duduk rapat di tepi kad bos. */
.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch {
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
}

.directory-org-branch {
  display: grid !important;
  grid-template-columns: auto auto !important;
  column-gap: 14px !important;
  row-gap: 30px !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: max-content !important;
}

.directory-org-branch > .directory-org-branch-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: start !important;
}

.directory-org-branch > .directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  justify-self: center !important;
  margin-top: 8px !important;
}

.directory-org-assistant-stack {
  display: grid !important;
  gap: 10px !important;
  padding: 0 !important;
}

.directory-org-person.is-assistant {
  width: 210px !important;
  min-height: 72px !important;
}

.directory-org-person.is-assistant .avatar.large {
  width: 44px !important;
  height: 54px !important;
}

/* Label kecil tidak diperlukan dalam carta. */
.directory-org-assistant-label,
.directory-org-role-label,
.directory-org-branch-title small,
.directory-org-unit h4 small {
  display: none !important;
}

.directory-org-branch-title strong,
.directory-org-unit h4 strong,
.directory-org-ptj-title strong {
  text-transform: uppercase !important;
}

.directory-org-position em,
.directory-org-grade em {
  display: none !important;
}

/* Biar Unit Integriti kelihatan sebagai entiti bebas tetapi bukan dalam kotak luar. */
.directory-org-branch.is-root-support {
  min-width: 260px !important;
}

.directory-org-branch.is-root-support .directory-org-unit-list {
  margin-top: 26px !important;
}

.directory-org-unit.no-title > h4 {
  display: none !important;
}

.directory-org-unit.no-title .directory-org-staff-stack {
  padding-top: 0 !important;
}

.directory-org-staff-stack {
  padding-top: 26px !important;
}

/* FIX 19 Jul v20: emel kosong tidak dipaparkan, telefon jawatan kosong dikekalkan, Unit Integriti tanpa border luar. */
.directory-card-name .directory-card-email.is-empty {
  display: none !important;
}

.directory-card::after,
.directory-card:hover::after,
.directory-card:focus-visible::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.org-type-integrity,
.org-type-integrity > .directory-org-branch-card,
.directory-org-root-supports .org-type-integrity > .directory-org-branch-card,
.directory-org-root-supports .org-type-integrity,
.directory-org-root-supports .directory-org-unit.no-title {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.org-type-integrity > .directory-org-branch-card {
  padding: 0 !important;
}

.directory-org-root-center {
  column-gap: 10px !important;
}

.directory-org-branch {
  column-gap: 10px !important;
}

.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch {
  transform: translateX(0) !important;
}

.org-connector,
.org-connector.is-solid {
  stroke: #111827 !important;
  stroke-width: 2.6 !important;
  opacity: .9 !important;
  fill: none !important;
}

.directory-org-unit.no-title .directory-org-staff-stack {
  margin-top: 20px !important;
  padding-top: 0 !important;
}

.directory-org-person.is-vacant strong {
  color: #0f172a !important;
}

/* FIX 19 Jul v21: pusatkan bos di atas ranting, sambung setiap kad, elak garisan tindih kad. */
.directory-org-tree {
  --org-line: #111827;
  --org-line-soft: #334155;
}

.org-connector,
.org-connector.is-solid {
  stroke: var(--org-line) !important;
  stroke-width: 2.4 !important;
  opacity: .92 !important;
  fill: none !important;
  vector-effect: non-scaling-stroke !important;
}

.directory-org-children,
.directory-org-unit-list {
  align-items: flex-start !important;
  justify-content: center !important;
}

/* Setiap bos/cabang diletakkan tepat di tengah kumpulan ranting anak. */
.directory-org-branch {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: relative !important;
  min-width: max-content !important;
  row-gap: 0 !important;
  column-gap: 0 !important;
}

.directory-org-branch > .directory-org-branch-card {
  align-self: center !important;
  margin-inline: auto !important;
  position: relative !important;
  z-index: 8 !important;
}

.directory-org-branch > .directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  align-self: center !important;
  margin-top: 46px !important;
  position: relative !important;
  z-index: 5 !important;
}

/* Setiausaha tidak mengubah pusat bos/ranting; ia hanya melekat di sisi kad bos. */
.directory-org-branch > .directory-org-assistant-branch {
  position: absolute !important;
  top: 18px !important;
  left: calc(50% + 142px) !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 7 !important;
}

.directory-org-root-center {
  position: relative !important;
  display: grid !important;
  justify-items: center !important;
  align-items: start !important;
  grid-template-columns: auto !important;
  column-gap: 0 !important;
}

.directory-org-root-assistants {
  position: absolute !important;
  top: 18px !important;
  left: calc(50% + 160px) !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 7 !important;
}

.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children {
  margin-top: 72px !important;
}

.directory-org-unit-list {
  gap: 18px !important;
}

.directory-org-unit {
  position: relative !important;
  z-index: 6 !important;
}

.directory-org-unit h4,
.directory-org-person,
.directory-org-branch-title,
.directory-org-ptj-title {
  position: relative !important;
  z-index: 9 !important;
}

.directory-org-staff-stack {
  display: grid !important;
  gap: 16px !important;
  padding-top: 28px !important;
  position: relative !important;
  z-index: 6 !important;
}

.directory-org-unit.no-title .directory-org-staff-stack {
  padding-top: 28px !important;
  margin-top: 0 !important;
}

/* Elakkan kotak luar/border Unit Integriti tetapi kekalkan kad ketua dan staf. */
.org-type-integrity,
.org-type-integrity > .directory-org-branch-card,
.directory-org-root-supports .org-type-integrity,
.directory-org-root-supports .org-type-integrity > .directory-org-branch-card {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.org-type-integrity > .directory-org-branch-card {
  padding: 0 !important;
}

.org-type-integrity > .directory-org-unit-list {
  margin-top: 40px !important;
}

.directory-card::after,
.directory-card:hover::after,
.directory-card:focus-visible::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* UI refresh v25: logo sebenar, latar lebih gelap, kad top management dan hak cipta */
.public-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .16), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 76, 129, .18), transparent 24%),
    linear-gradient(180deg, #d7e2ef 0%, #cdd8e6 32%, #c5d2e1 100%) !important;
}

.public-shell {
  width: min(1240px, calc(100% - 32px)) !important;
}

.public-header,
.public-hero,
.toolbar-panel,
.directory-view-tabs,
.directory-view-panel {
  position: relative;
  border-color: rgba(148, 163, 184, .42) !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .10) !important;
  backdrop-filter: blur(10px);
}

.public-hero,
.toolbar-panel,
.directory-view-panel {
  background: rgba(255, 255, 255, .90) !important;
}

.public-header {
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo,
.brand-mark.brand-logo {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}

.id-card-head .brand-logo {
  background: rgba(255, 255, 255, .96);
}

.directory-print-logo {
  width: 17mm !important;
  height: 17mm !important;
  display: block !important;
  object-fit: contain !important;
  border-radius: 4mm !important;
  background: #fff !important;
  padding: 1.5mm !important;
  box-shadow: none !important;
}

.public-header .button.ghost,
.directory-chart-actions .button.ghost,
.directory-zoom-controls .button.ghost,
.filters .button.ghost {
  background: rgba(241, 245, 249, .94);
  border-color: rgba(148, 163, 184, .42);
}

.directory-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  margin-bottom: 16px;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}

.directory-view-tabs button {
  border-radius: 12px;
}

.directory-view-tabs button.is-active {
  box-shadow: 0 10px 24px rgba(14, 165, 233, .18);
}

.directory-section-heading {
  background: linear-gradient(135deg, #e8f2fd, #f5f9ff) !important;
}

.directory-unit-heading {
  background: rgba(255, 255, 255, .92) !important;
}

.directory-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-color: rgba(191, 219, 254, .78) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08) !important;
}

.directory-card.is-top-management {
  background: linear-gradient(135deg, #0f4c81 0%, #0f2537 100%) !important;
  border-color: rgba(125, 211, 252, .92) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .20) !important;
}

.directory-card.is-top-management::before {
  content: "TOP MANAGEMENT";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #ecfeff;
  font-size: .70rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.directory-card.is-top-management .directory-card-name strong,
.directory-card.is-top-management .directory-card-email,
.directory-card.is-top-management .directory-card-details dt,
.directory-card.is-top-management .directory-card-details dd {
  color: #f8fbff !important;
}

.directory-card.is-top-management .directory-card-email {
  text-decoration-color: rgba(248, 250, 252, .72);
}

.directory-card.is-top-management .detail-icon {
  filter: brightness(0) invert(1) saturate(0);
  opacity: .9;
}

.directory-card.is-top-management:hover,
.directory-card.is-top-management:focus-visible {
  transform: translateY(-2px);
  border-color: #bae6fd !important;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .28) !important;
}

.directory-org-person.has-management-role.role-ketua-pengarah,
.directory-org-person.has-management-role.role-timbalan-ketua-pengarah,
.directory-org-person.has-management-role.role-pengarah-kanan,
.directory-org-person.has-management-role.role-pengarah {
  background: linear-gradient(135deg, #0f4c81 0%, #0f2537 100%) !important;
  border-color: rgba(125, 211, 252, .88) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .18) !important;
}

.directory-org-person.has-management-role.role-ketua-pengarah .directory-org-person-copy strong,
.directory-org-person.has-management-role.role-ketua-pengarah .directory-org-person-copy span,
.directory-org-person.has-management-role.role-ketua-pengarah .directory-org-person-copy small,
.directory-org-person.has-management-role.role-timbalan-ketua-pengarah .directory-org-person-copy strong,
.directory-org-person.has-management-role.role-timbalan-ketua-pengarah .directory-org-person-copy span,
.directory-org-person.has-management-role.role-timbalan-ketua-pengarah .directory-org-person-copy small,
.directory-org-person.has-management-role.role-pengarah-kanan .directory-org-person-copy strong,
.directory-org-person.has-management-role.role-pengarah-kanan .directory-org-person-copy span,
.directory-org-person.has-management-role.role-pengarah-kanan .directory-org-person-copy small,
.directory-org-person.has-management-role.role-pengarah .directory-org-person-copy strong,
.directory-org-person.has-management-role.role-pengarah .directory-org-person-copy span,
.directory-org-person.has-management-role.role-pengarah .directory-org-person-copy small {
  color: #f8fbff !important;
}

.public-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  color: #334155;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.public-footer strong,
.public-footer small {
  display: block;
}

.public-footer small {
  margin-top: 4px;
  color: #64748b;
}

@media (max-width: 820px) {
  .public-footer {
    flex-direction: column;
  }

  .directory-card.is-top-management::before {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
  }
}

/* FIX v26: jangan labelkan kad top management; warna hanya dikawal oleh PHP class is-top-management. */
.directory-card.is-top-management::before,
.directory-card.is-top-management:hover::before,
.directory-card.is-top-management:focus-visible::before {
  content: none !important;
  display: none !important;
}

/* FIX v28: panel list lebih kemas, carta bebas scroll mendatar tanpa terhimpit */
#directory-list-panel,
#directory-chart-panel {
  padding: 18px 18px 22px !important;
  border: 1px solid rgba(148, 163, 184, .38) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

#directory-list-panel .directory-card-list {
  gap: 18px !important;
}

#directory-list-panel .directory-section-heading,
#directory-list-panel .directory-unit-heading,
#directory-list-panel .directory-card,
#directory-list-panel .pagination,
#directory-list-panel .empty-state {
  margin-left: 2px !important;
  margin-right: 2px !important;
}

#directory-list-panel .directory-section-heading,
#directory-list-panel .directory-unit-heading {
  border-radius: 18px !important;
}

#directory-chart-panel {
  overflow: visible !important;
}

#directory-chart-panel .directory-chart-toolbar {
  margin-bottom: 14px !important;
  padding-inline: 2px !important;
}

.directory-org-scroll {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding: 30px 34px 40px !important;
}

.org-tree-frame {
  display: inline-block !important;
  min-width: max-content !important;
  width: max-content !important;
  padding-right: 42px !important;
}

.org-tree,
.directory-org-tree,
.directory-org-root,
.directory-org-root-children,
.directory-org-children,
.directory-org-unit-list {
  width: max-content !important;
  min-width: max-content !important;
}

.directory-org-root-children,
.directory-org-children,
.directory-org-unit-list {
  flex-wrap: nowrap !important;
}

.directory-org-ptj {
  justify-items: center !important;
  min-width: max-content !important;
  padding: 24px 32px 36px !important;
}

.directory-org-root,
.directory-org-root-stage,
.directory-org-root-center,
.directory-org-branch,
.directory-org-branch-card,
.directory-org-person,
.directory-org-assistant-branch,
.directory-org-assistant-stack,
.directory-org-staff-stack {
  flex-shrink: 0 !important;
}

@media (max-width: 768px) {
  #directory-list-panel,
  #directory-chart-panel {
    padding: 14px !important;
  }

  .directory-org-scroll {
    padding: 22px 22px 30px !important;
  }
}

@media print {
  #directory-list-panel,
  #directory-chart-panel {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .org-tree-frame {
    padding-right: 0 !important;
  }
}

/* FIX v33: tab senarai/carta sebagai pautan sebenar dan kekalkan paparan carta selepas tapis PTJ */
.directory-view-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.directory-view-tabs a:hover,
.directory-view-tabs a:focus-visible {
  color: #075985;
  background: #f0f9ff;
  outline: none;
}

.directory-view-tabs a.is-active {
  color: #075985;
  border-color: #bae6fd;
  background: #e0f2fe;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .18);
}

.directory-view-tabs a .ui-icon {
  width: 18px;
  height: 18px;
}


/* FIX v34: mod Muat tidak menghasilkan ruang kosong panjang dan toolbar/canvas carta lebih selesa */
#directory-chart-panel {
  padding: 22px !important;
}

#directory-chart-panel .directory-chart-toolbar {
  margin: 0 0 20px !important;
  padding: 20px 22px !important;
  border-radius: 18px !important;
}

#directory-chart-panel .directory-org-scroll {
  margin-top: 0 !important;
  border-radius: 18px !important;
}

.directory-org-scroll.is-fit-mode {
  min-height: 0 !important;
  overflow: hidden !important;
  cursor: default !important;
}

.directory-org-scroll.is-fit-mode .org-tree-frame {
  display: block !important;
  margin-inline: auto !important;
  padding-right: 0 !important;
}

.directory-org-scroll.is-fit-mode .org-tree {
  transform-origin: top center !important;
}

@media (max-width: 768px) {
  #directory-chart-panel {
    padding: 16px !important;
  }

  #directory-chart-panel .directory-chart-toolbar {
    padding: 16px !important;
    margin-bottom: 16px !important;
  }
}

/* FIX v35: Unit Integriti senarai tidak bercampur/collapse dan mod Muat tanpa scroll melintang */
#directory-list-panel .directory-section-heading,
#directory-list-panel .directory-unit-heading {
  flex: 0 0 auto !important;
  min-height: 58px !important;
  overflow: visible !important;
}

#directory-list-panel .directory-card {
  min-width: 0 !important;
  overflow: visible !important;
}

#directory-list-panel .directory-section-heading + .directory-unit-heading,
#directory-list-panel .directory-unit-heading + .directory-card {
  margin-top: 14px !important;
}

.directory-org-scroll.is-fit-mode {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  max-width: 100% !important;
  cursor: default !important;
}

.directory-org-scroll.is-fit-mode .org-tree-frame {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-right: 0 !important;
  overflow: hidden !important;
}

.directory-org-scroll.is-fit-mode .org-tree {
  transform-origin: top left !important;
}

.directory-org-scroll.is-fit-mode .directory-org-tree,
.directory-org-scroll.is-fit-mode .directory-org-root,
.directory-org-scroll.is-fit-mode .directory-org-root-children,
.directory-org-scroll.is-fit-mode .directory-org-children,
.directory-org-scroll.is-fit-mode .directory-org-unit-list {
  max-width: none !important;
}

/* FIX v36: apabila Carta Muat, kanvas fit dalam kotak dan tidak membenarkan scroll melintang kosong. */
.directory-org-scroll.is-fit-mode {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

.directory-org-scroll.is-fit-mode .org-tree-frame {
  max-width: 100% !important;
  overflow: hidden !important;
}


/* FIX v37: ikon Flaticon ikut fungsi dan lebih jelas. */
.minimal-icon {
  opacity: .92 !important;
  filter: none !important;
}

.button .minimal-icon,
.directory-view-tabs .minimal-icon,
.directory-zoom-controls .minimal-icon {
  width: 17px !important;
  height: 17px !important;
  object-fit: contain !important;
}

.label-icon.minimal-icon {
  width: 16px !important;
  height: 16px !important;
  vertical-align: -3px !important;
}

.group-icon.minimal-icon {
  width: 26px !important;
  height: 26px !important;
}

.directory-unit-heading .unit-dot {
  background: url('https://cdn-icons-png.flaticon.com/512/7393/7393889.png') center / 14px 14px no-repeat #e0f2fe !important;
}

.public-footer a {
  color: #075985;
  font-weight: 800;
}

/* FIX v38: ikon fungsi guna inline SVG, tidak bergantung kepada CDN/imej luar yang boleh gagal dimuat. */
.svg-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex: 0 0 18px !important;
  color: currentColor !important;
  opacity: .88 !important;
  filter: none !important;
  vertical-align: -3px !important;
  line-height: 1 !important;
}

.svg-icon svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  overflow: visible !important;
}

.button .svg-icon,
.icon-link .svg-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  flex-basis: 16px !important;
  margin-right: 7px !important;
}

.button .svg-icon:only-child,
.icon-button .svg-icon:only-child,
.directory-zoom-controls .button .svg-icon:only-child {
  margin-right: 0 !important;
}

.label-icon.svg-icon {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  flex-basis: 15px !important;
  margin-right: 5px !important;
  vertical-align: -2px !important;
}

.group-icon.svg-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  flex-basis: 24px !important;
}

.detail-icon.svg-icon,
.directory-card-details .detail-icon.svg-icon {
  display: inline-flex !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  flex-basis: 14px !important;
  margin-right: 5px !important;
  opacity: .76 !important;
}

.directory-view-tabs .svg-icon,
.directory-chart-actions .svg-icon,
.directory-zoom-controls .svg-icon,
.filters .button .svg-icon {
  opacity: .96 !important;
}

.directory-zoom-controls .button {
  gap: 6px !important;
}

.directory-zoom-controls .button .svg-icon {
  color: #075985 !important;
}

.directory-card.is-top-management .svg-icon {
  color: #f8fbff !important;
  opacity: .9 !important;
}


/* FIX v39: semua setiausaha di kanan bos, sedikit rendah, dengan ranting lurus melintang. */
.directory-org-root-center,
.directory-org-branch {
  overflow: visible !important;
}

.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch {
  position: absolute !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  z-index: 9 !important;
}

/* Setiausaha KP / Ketua PTJ: berada sebelah kanan kad bos dan top tidak lebih tinggi daripada bos. */
.directory-org-root-assistants {
  top: 28px !important;
  left: calc(50% + 150px) !important;
}

/* Setiausaha Cawangan/Unit: sama konsep, sedikit bawah daripada atas kad bos. */
.directory-org-branch > .directory-org-assistant-branch {
  top: 24px !important;
  left: calc(50% + 134px) !important;
}

.directory-org-root-assistants .directory-org-assistant-stack,
.directory-org-branch > .directory-org-assistant-branch .directory-org-assistant-stack {
  display: grid !important;
  gap: 10px !important;
  padding: 0 !important;
}

.directory-org-root-assistants .directory-org-person.is-assistant,
.directory-org-branch > .directory-org-assistant-branch .directory-org-person.is-assistant {
  width: 210px !important;
  min-height: 72px !important;
}

.directory-org-root-assistants .directory-org-person.is-assistant .avatar.large,
.directory-org-branch > .directory-org-assistant-branch .directory-org-person.is-assistant .avatar.large {
  width: 44px !important;
  height: 54px !important;
}

/* Ruang di bawah kad bos dikekalkan supaya setiausaha tidak bertindih dengan ranting anak. */
.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children,
.directory-org-root.has-branches > .directory-org-root-children {
  margin-top: 76px !important;
}

.directory-org-branch > .directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  margin-top: 58px !important;
}

/* Garisan setiausaha dikawal oleh SVG JavaScript v39. Elakkan pseudo-line lama muncul semula. */
.directory-org-root-assistants::before,
.directory-org-root-assistants::after,
.directory-org-branch > .directory-org-assistant-branch::before,
.directory-org-branch > .directory-org-assistant-branch::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

/* FIX v40: ikon direktori pakai function khas directory_icon(), bukan app_icon() global. */
.svg-icon,
.svg-icon svg {
  visibility: visible !important;
}

.svg-icon svg * {
  vector-effect: non-scaling-stroke;
}

.unit-heading-icon.svg-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  flex-basis: 22px !important;
  padding: 3px !important;
  border: 1px solid #bae6fd !important;
  border-radius: 8px !important;
  background: #e0f2fe !important;
  color: #075985 !important;
}

.directory-unit-heading .unit-dot {
  display: none !important;
}

.directory-view-tabs a .svg-icon,
.directory-chart-actions .button .svg-icon,
.directory-zoom-controls .button .svg-icon,
.filters .button .svg-icon,
.public-filters label .svg-icon {
  color: currentColor !important;
}


/* FIX v41: ranting Setiausaha keluar dari batang utama antara kad bos dan simpang bawah. */
.directory-org-root-center,
.directory-org-branch {
  overflow: visible !important;
}

.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch {
  position: absolute !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9 !important;
}

/* Kad Setiausaha duduk sedikit bawah di kanan bos, tidak melebihi tinggi kad bos. */
.directory-org-root-assistants {
  top: calc(100% + 18px) !important;
  left: calc(50% + 102px) !important;
}

.directory-org-branch > .directory-org-assistant-branch {
  top: calc(100% + 16px) !important;
  left: calc(50% + 92px) !important;
}

.directory-org-root-assistants .directory-org-person.is-assistant,
.directory-org-branch > .directory-org-assistant-branch .directory-org-person.is-assistant {
  width: 210px !important;
  min-height: 72px !important;
}

/* Beri ruang menegak untuk laluan lurus Setiausaha sebelum ranting anak bermula. */
.directory-org-root > .directory-org-root-children,
.directory-org-root.has-supports > .directory-org-root-children,
.directory-org-root.has-branches > .directory-org-root-children {
  margin-top: 132px !important;
}

.directory-org-branch > .directory-org-unit-list,
.directory-org-branch > .directory-org-children {
  margin-top: 124px !important;
}

.directory-org-root-assistants::before,
.directory-org-root-assistants::after,
.directory-org-branch > .directory-org-assistant-branch::before,
.directory-org-branch > .directory-org-assistant-branch::after {
  content: none !important;
  display: none !important;
}


/* FIX v46: susun Bahagian / Unit guna anak panah naik/turun yang lebih ringan daripada drag & drop. */
.department-order-cell {
  width: 128px !important;
}

.order-button-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.order-move-button {
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.order-move-button:hover:not(:disabled),
.order-move-button:focus-visible:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #075985;
}

.order-move-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

tr.is-order-updated {
  background: #ecfeff !important;
  transition: background .35s ease;
}


/* FIX v47: sambungan ranting carta tidak kelihatan terpecah pada carta besar/HQ. */
.directory-org-connectors {
  overflow: visible !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.org-connector,
.org-connector.is-solid,
.org-connector.is-fork {
  stroke-linecap: square !important;
  stroke-linejoin: miter !important;
  shape-rendering: geometricPrecision !important;
}

/* FIX v53: semua SU/Pembantu SU melekat pada sisi kad bos sebenar, termasuk SU di peringkat Unit/Aktiviti. */
.directory-org-unit,
.directory-org-unit.has-assistants {
  overflow: visible !important;
  position: relative !important;
}

.directory-org-unit.has-assistants {
  width: 526px !important;
  min-width: 526px !important;
  max-width: none !important;
}

.directory-org-unit.has-assistants > h4,
.directory-org-unit.has-assistants > .directory-org-staff-stack {
  width: 296px !important;
  max-width: 296px !important;
}

.directory-org-unit > .directory-org-assistant-branch {
  position: absolute !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 12 !important;
  transform: none !important;
}

.directory-org-unit > .directory-org-assistant-branch::before,
.directory-org-unit > .directory-org-assistant-branch::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

.directory-org-unit > .directory-org-assistant-branch .directory-org-person.is-assistant {
  width: 210px !important;
  min-height: 72px !important;
}

.directory-org-unit > .directory-org-assistant-branch .directory-org-person.is-assistant .avatar.large {
  width: 44px !important;
  height: 54px !important;
}


/* FIX v55: seragamkan paparan semua Setiausaha/SU supaya muncul rapat di kanan bos seperti contoh yang dipersetujui. */
.directory-org-assistant-branch .directory-org-person.is-assistant,
.directory-org-root-assistants .directory-org-person.is-assistant {
  width: 220px !important;
  min-height: 76px !important;
}

.directory-org-assistant-branch .directory-org-assistant-stack,
.directory-org-root-assistants .directory-org-assistant-stack {
  gap: 8px !important;
}


/* FIX v56: semua SU duduk pada aras ranting dan lebih rapat dengan kad bos. */
.directory-org-root-assistants,
.directory-org-branch > .directory-org-assistant-branch,
.directory-org-unit > .directory-org-assistant-branch {
  margin-left: 0 !important;
}

.directory-org-assistant-branch .directory-org-person.is-assistant,
.directory-org-root-assistants .directory-org-person.is-assistant {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08) !important;
}


/* FIX v57: rapatkan semua SU ke sisi bos, khususnya Ketua PTJ negeri dan HQ. */
.directory-org-root-assistants {
  display: block !important;
  place-items: initial !important;
  min-width: 0 !important;
  width: max-content !important;
  margin: 0 !important;
  padding: 0 !important;
}

.directory-org-root-assistants > .directory-org-assistant-branch,
.directory-org-branch > .directory-org-assistant-branch,
.directory-org-unit > .directory-org-assistant-branch {
  width: max-content !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-items: start !important;
}

.directory-org-root-assistants .directory-org-assistant-stack,
.directory-org-branch > .directory-org-assistant-branch .directory-org-assistant-stack,
.directory-org-unit > .directory-org-assistant-branch .directory-org-assistant-stack {
  margin: 0 !important;
  padding: 0 !important;
}


/* FIX v58: tab paparan di tengah, label satu baris tanpa ikon. */
.directory-view-tabs {
  display: flex !important;
  width: fit-content !important;
  max-width: calc(100% - 24px) !important;
  margin: 0 auto 18px !important;
  justify-content: center !important;
}

.directory-view-tabs a {
  flex: 0 0 auto !important;
  min-width: 205px !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.directory-view-tabs .directory-tab-label {
  display: block !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

/* Pastikan modal kad digital berada di atas backdrop dalam Safari. */
body > .card-modal {
  position: fixed !important;
  z-index: 99999 !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
}

body > .card-modal[hidden] {
  display: none !important;
}

body > .card-modal .card-modal-backdrop {
  z-index: 0 !important;
}

body > .card-modal .card-modal-panel {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

@media (max-width: 520px) {
  .directory-view-tabs {
    width: calc(100% - 16px) !important;
  }

  .directory-view-tabs a {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    padding-inline: 10px !important;
    font-size: .88rem !important;
  }
}


/* V60: cetakan carta satu halaman dengan pilihan saiz kertas dan header/footer rasmi */
.print-paper-control {
  display: inline-grid;
  gap: 6px;
  min-width: 120px;
  font-size: .82rem;
  color: #334155;
}

.print-paper-control span {
  font-weight: 800;
}

.print-paper-control select {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
}

.directory-print-branding {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.directory-print-logo-jata {
  background: #fff7db !important;
  color: #0f2537 !important;
}

.directory-emblem {
  width: 100%;
  height: 100%;
  display: block;
}

.directory-print-date-sub {
  display: inline-block;
  margin-top: 3px;
  font-size: 7pt;
  color: #475569;
}

.directory-print-footer {
  display: none;
}

@media print {
  @page chart-a4 {
    size: A4 landscape;
    margin: 8mm;
  }

  @page chart-a3 {
    size: A3 landscape;
    margin: 10mm;
  }

  @page chart-a0 {
    size: 1189mm 841mm;
    margin: 14mm;
  }

  body.printing-paper-a4 #directory-chart-panel {
    page: chart-a4;
  }

  body.printing-paper-a3 #directory-chart-panel {
    page: chart-a3;
  }

  body.printing-paper-a0 #directory-chart-panel {
    page: chart-a0;
  }

  .directory-chart-toolbar {
    gap: 10px;
  }

  .directory-print-header {
    gap: 14px;
    margin-bottom: 6mm;
  }

  .directory-print-logo {
    width: 16mm;
    height: 16mm;
    padding: 1.8mm !important;
    background: #fff !important;
    border: 1px solid rgba(15, 37, 55, .18);
  }

  .directory-print-title {
    font-size: 13.5pt;
  }

  .directory-print-agency {
    font-size: 9.25pt;
  }

  .directory-print-office {
    font-size: 10.25pt;
  }

  .directory-print-footer {
    display: flex !important;
    justify-content: space-between;
    gap: 8mm;
    margin-top: 5mm;
    padding-top: 2.5mm;
    border-top: 1px solid #94a3b8;
    font-size: 7.5pt;
    color: #334155;
  }

  .directory-org-ptj {
    break-after: auto;
    page-break-after: auto;
    min-height: 0 !important;
  }

  body.printing-org-chart .directory-org-scroll {
    overflow: hidden !important;
  }
}


/* FIX v63: ukur dan lukis semula ranting selepas header/footer cetakan dipaparkan. */
body.printing-org-chart .directory-print-header,
body.printing-org-chart .directory-print-footer {
  display: flex !important;
}

body.printing-org-chart .directory-org-tree {
  gap: 0 !important;
}

body.printing-org-chart .directory-org-ptj {
  margin: 0 !important;
  padding: 0 0 4mm !important;
}

body.printing-org-chart .directory-print-header {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 7mm;
  padding-bottom: 3mm;
  border-bottom: 1.5px solid #0f2537;
}

body.printing-org-chart .directory-print-footer {
  justify-content: space-between;
  gap: 8mm;
  margin-top: 5mm;
  padding-top: 2.5mm;
  border-top: 1px solid #94a3b8;
}

@media print {
  .directory-org-connectors {
    width: 100% !important;
    height: 100% !important;
  }

  .org-connector,
  .org-connector.is-solid,
  .org-connector.is-fork {
    stroke-width: 2.2 !important;
    stroke-linecap: square !important;
    stroke-linejoin: miter !important;
    shape-rendering: geometricPrecision !important;
  }
}


/* FIX v64: cetakan carta benar-benar fit satu muka surat untuk A4/A3/A0. */
.print-paper-control small {
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.1;
}

@media print {
  body.printing-org-chart,
  body.printing-org-chart .public-shell,
  body.printing-org-chart #directory-chart-panel,
  body.printing-org-chart .directory-org-scroll {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.printing-org-chart .org-tree-frame {
    display: block !important;
    width: var(--directory-print-frame-width) !important;
    min-width: var(--directory-print-frame-width) !important;
    max-width: var(--directory-print-frame-width) !important;
    height: var(--directory-print-frame-height) !important;
    min-height: var(--directory-print-frame-height) !important;
    max-height: var(--directory-print-frame-height) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.printing-org-chart .directory-org-tree {
    margin: 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.printing-org-chart .directory-org-ptj,
  body.printing-org-chart .directory-org-ptj:last-child {
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.printing-org-chart .directory-print-header,
  body.printing-org-chart .directory-print-footer {
    flex-shrink: 0 !important;
  }
}


/* FIX v65: kekalkan ketebalan dan sambungan ranting apabila carta dikecilkan untuk cetakan. */
.directory-org-connectors .org-connector,
.directory-org-connectors .org-connector.is-solid,
.directory-org-connectors .org-connector.is-fork {
  vector-effect: non-scaling-stroke !important;
}

@media print {
  body.printing-org-chart .directory-org-connectors .org-connector,
  body.printing-org-chart .directory-org-connectors .org-connector.is-solid,
  body.printing-org-chart .directory-org-connectors .org-connector.is-fork {
    stroke-width: 1.35px !important;
    vector-effect: non-scaling-stroke !important;
    stroke-linecap: square !important;
    stroke-linejoin: miter !important;
    shape-rendering: geometricPrecision !important;
  }
}


/* FIX v66: semua ranting mesti masuk sedikit ke dalam kad supaya sambungan kekal rapat pada skrin dan PDF. */
.directory-org-connectors {
  overflow: visible !important;
  pointer-events: none !important;
}

.directory-org-connectors .org-connector,
.directory-org-connectors .org-connector.is-solid,
.directory-org-connectors .org-connector.is-fork {
  stroke-linecap: square !important;
  stroke-linejoin: miter !important;
  vector-effect: non-scaling-stroke !important;
}

/* Kad kekal di hadapan SVG. Hujung garisan yang masuk ke dalam kad akan
   terlindung dan kelihatan tepat menyentuh sempadan kad tanpa jurang. */
.directory-org-person,
.directory-org-branch-title,
.directory-org-unit > h4,
.directory-org-ptj-title {
  position: relative !important;
  z-index: 10 !important;
}


/* FIX v67: kemasan kawalan carta, carian carta dinyahaktifkan dan ikon nipis. */
.public-filters input[type="search"]:disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.directory-chart-actions .button,
.directory-zoom-controls .button {
  font-weight: 400 !important;
}

.directory-chart-actions .button .svg-icon svg,
.directory-zoom-controls .button .svg-icon svg {
  stroke-width: 1.55 !important;
}

.directory-chart-actions .button.icon-only,
.directory-zoom-controls .button.icon-only {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 7px !important;
  gap: 0 !important;
}

.directory-chart-actions .button.icon-only .svg-icon,
.directory-zoom-controls .button.icon-only .svg-icon {
  margin-right: 0 !important;
}


/* FIX v68: lapisan SVG ranting sentiasa berada di belakang semua kad. */
/*
 * Urutan lapisan wajib:
 *   1. Latar carta/PTJ
 *   2. SVG ranting
 *   3. Keseluruhan struktur carta
 *   4. Kad, tajuk dan label
 *
 * .directory-org-root dijadikan satu stacking context di atas SVG. Oleh sebab
 * pembalutnya telus, garisan masih kelihatan di ruang kosong tetapi tidak boleh
 * melintas di atas mana-mana kad, termasuk semasa cetakan yang dikecilkan.
 */
.directory-org-tree {
  position: relative !important;
  isolation: isolate !important;
}

.directory-org-connectors {
  z-index: 1 !important;
  pointer-events: none !important;
}

.directory-org-root {
  position: relative !important;
  z-index: 2 !important;
  isolation: isolate !important;
}

.directory-org-ptj-title,
.directory-org-person,
.directory-org-branch-card,
.directory-org-branch-title,
.directory-org-unit > h4,
.directory-org-assistant-label {
  position: relative !important;
  z-index: 4 !important;
}

@media print {
  body.printing-org-chart .directory-org-connectors {
    z-index: 1 !important;
  }

  body.printing-org-chart .directory-org-root {
    z-index: 2 !important;
  }

  body.printing-org-chart .directory-org-ptj-title,
  body.printing-org-chart .directory-org-person,
  body.printing-org-chart .directory-org-branch-card,
  body.printing-org-chart .directory-org-branch-title,
  body.printing-org-chart .directory-org-unit > h4,
  body.printing-org-chart .directory-org-assistant-label {
    z-index: 4 !important;
  }
}


/* FIX v69: kawalan saiz kertas, zum dan cetak kekal sebaris. */
.directory-chart-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 3px;
  scrollbar-width: thin;
}

.print-paper-control {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  gap: 0 !important;
  margin: 0 !important;
}

.print-paper-control > span {
  display: none !important;
}

.print-paper-control select {
  width: auto !important;
  min-width: 138px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 8px 32px 8px 12px !important;
  border-radius: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.directory-zoom-controls {
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 4px !important;
}

.directory-chart-actions > .button.icon-only[data-print-org-chart] {
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
}

@media (max-width: 760px) {
  .directory-chart-toolbar {
    align-items: stretch !important;
  }

  .directory-chart-actions {
    justify-content: flex-start !important;
  }
}


/* KEMAS KINI v70: kepala cetakan tiga baris tanpa label penapis berulang. */
body.printing-org-chart .directory-print-heading {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: .35mm !important;
  line-height: 1.08 !important;
  text-align: center !important;
}

body.printing-org-chart .directory-print-heading > strong {
  display: block !important;
  margin: 0 !important;
  color: #0f2537 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

@media print {
  .directory-print-heading {
    gap: .35mm !important;
    line-height: 1.08 !important;
  }

  .directory-print-title {
    font-size: 13.5pt !important;
    letter-spacing: .045em !important;
  }

  .directory-print-agency {
    font-size: 9.25pt !important;
    letter-spacing: .012em !important;
  }

  .directory-print-office {
    font-size: 10.25pt !important;
    letter-spacing: .018em !important;
  }
}


/* FIX v71: kemasan header, reset, footer dan hero carian satu baris. */
.public-header {
  justify-content: flex-start !important;
}

.directory-reset-button {
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  justify-self: start !important;
  align-self: end !important;
  padding-inline: 12px !important;
}

.public-footer small {
  margin-top: 0 !important;
}

.directory-search-hero > div {
  width: 100%;
  min-width: 0;
}

.directory-search-hero h1,
.directory-search-hero p:not(.eyebrow) {
  max-width: none !important;
  white-space: nowrap;
}

.directory-search-hero h1 {
  font-size: clamp(1.15rem, 1.75vw, 1.72rem) !important;
  letter-spacing: -0.02em;
}

.directory-search-hero p:not(.eyebrow) {
  font-size: clamp(.78rem, 1.05vw, .96rem);
  line-height: 1.35;
}

@media (max-width: 920px) {
  .directory-search-hero h1,
  .directory-search-hero p:not(.eyebrow) {
    white-space: normal;
  }
}


/* FIX v72: tajuk carta cetakan dalam satu baris. */
.directory-print-heading {
  display: flex !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.1 !important;
}

.directory-print-title-line {
  display: block !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: #0f2537 !important;
  font-size: 11pt !important;
  font-weight: 800 !important;
  letter-spacing: .018em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

@media print {
  .directory-print-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
  }

  .directory-print-title-line {
    font-size: 11pt !important;
    font-weight: 800 !important;
    letter-spacing: .018em !important;
    white-space: nowrap !important;
  }
}


/* FIX v73: eksport carta ke imej PNG. */
.directory-chart-actions > .button.icon-only[data-export-org-chart] {
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
}

.button[aria-busy="true"] {
  opacity: .68 !important;
  cursor: progress !important;
}

body.exporting-org-chart-image .directory-print-header,
body.exporting-org-chart-image .directory-print-footer {
  display: flex !important;
}

body.exporting-org-chart-image .directory-org-tree {
  gap: 0 !important;
}

body.exporting-org-chart-image .directory-org-ptj {
  margin: 0 !important;
  padding: 0 0 18px !important;
}


/* FIX v75: buang garis antara tajuk PTJ dan kad ketua, serta kemas kini paparan tarikh cetakan. */
.directory-print-date {
  line-height: 1.2 !important;
}

.directory-print-date > strong {
  display: inline-block;
  margin-bottom: 2px;
}


/* FIX v77: buang ikon pada butiran setiap kad dan samakan hero carta dengan senarai. */
.directory-card-details .detail-icon {
  display: none !important;
}

.directory-card-details dt {
  gap: 0 !important;
}

.public-hero.directory-search-hero h1,
.public-hero.directory-search-hero p:not(.eyebrow) {
  max-width: none !important;
}


/* KEMAS KINI v79: halaman pengurusan Penyelaras PTJ. */
.users-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.users-stat-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.users-stat-card::after {
  content: '';
  position: absolute;
  width: 84px;
  height: 84px;
  right: -28px;
  bottom: -30px;
  border-radius: 999px;
  background: rgba(14, 116, 144, .08);
}

.users-stat-card strong {
  margin-top: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1;
}

.users-stat-card small {
  color: var(--muted);
  line-height: 1.35;
}

.users-stat-card.is-warning {
  border-color: #fbbf24;
  background: linear-gradient(145deg, #fff, #fffbeb);
}

.users-stat-card.is-warning strong {
  color: #b45309;
}

.users-stat-card.is-complete {
  border-color: #86efac;
  background: linear-gradient(145deg, #fff, #f0fdf4);
}

.users-stat-card.is-complete strong {
  color: #15803d;
}

.users-gap-panel {
  margin-bottom: 18px;
  border-color: #fcd34d;
  background: linear-gradient(145deg, #fff, #fffbeb);
}

.users-gap-panel .panel-head {
  align-items: flex-start;
}

.users-gap-panel .eyebrow,
.users-list-panel .eyebrow,
.users-form-panel .eyebrow {
  margin: 0 0 4px;
}

.users-ptj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.users-ptj-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  background: #fff;
  color: #92400e;
  font-size: .82rem;
  font-weight: 800;
}

.users-ptj-chips a:hover {
  background: #fef3c7;
}

.users-list-panel {
  margin-bottom: 18px;
}

.users-list-head {
  align-items: flex-start;
}

.users-page-actions,
.users-filter-actions,
.users-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.users-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(170px, .7fr) minmax(230px, 1fr) minmax(150px, .6fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.users-filter-grid label,
.users-form-grid label {
  min-width: 0;
}

.users-filter-grid input,
.users-filter-grid select,
.users-form-grid input,
.users-form-grid select {
  width: 100%;
}

.users-search-field input {
  min-width: 0;
}

.users-form-panel {
  margin-bottom: 18px;
  border-color: #93c5fd;
  background: linear-gradient(145deg, #fff, #f8fbff);
}

.users-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.users-form-grid label > small {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

.users-active-check {
  min-height: 46px;
  align-self: end;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.users-active-check input {
  width: auto;
}

.users-form-actions {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.users-table-wrap {
  margin-top: 0;
}

.users-table {
  min-width: 960px;
}

.users-table th,
.users-table td {
  vertical-align: middle;
}

.users-table tbody tr:hover {
  background: #f8fbff;
}

.users-number-column {
  width: 64px;
  text-align: center !important;
  color: var(--muted);
  font-weight: 800;
}

.users-action-column {
  width: 120px;
  text-align: right !important;
}

.user-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 250px;
}

.user-name-cell > span:last-child {
  min-width: 0;
}

.user-name-cell strong,
.user-ptj-cell strong {
  display: block;
  color: #0f2537;
}

.user-name-cell small,
.user-ptj-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.3;
}

.user-list-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
  font-weight: 900;
  font-size: .85rem;
}

.user-ptj-cell {
  min-width: 230px;
}

.users-edit-button {
  width: auto !important;
  min-width: 96px;
  justify-content: center;
}

[data-user-ptj-field].is-not-required {
  opacity: .72;
}

[data-user-ptj-field].is-not-required [data-user-ptj-help] {
  display: none;
}

@media (max-width: 1180px) {
  .users-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .users-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .users-list-head,
  .users-gap-panel .panel-head,
  .users-form-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .users-page-actions .button,
  .users-form-panel .panel-head > .button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .users-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .users-stat-grid,
  .users-filter-grid {
    grid-template-columns: 1fr;
  }

  .users-filter-actions {
    grid-column: auto;
  }

  .users-filter-actions .button,
  .users-form-actions .button {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* KEMAS KINI v80: identiti MyDigitalID, pemilihan rekod dan halaman PTJ selaras. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.users-schema-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.users-schema-alert strong,
.users-schema-alert span {
  display: block;
}

.users-schema-alert code {
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .8);
  font-size: .82rem;
}

.users-filter-grid-v80 {
  grid-template-columns: minmax(250px, 1.4fr) minmax(160px, .7fr) minmax(210px, 1fr) minmax(135px, .55fr) minmax(145px, .6fr) auto;
}

.users-nric-field {
  position: relative;
}

.identity-ready-text {
  color: #047857 !important;
  font-weight: 750;
}

.users-clear-identity {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 750;
}

.users-clear-identity input {
  width: auto !important;
  margin-top: 2px;
}

.identity-mask {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.record-selection-form {
  margin: 0;
}

.record-selection-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 37, 55, .05);
}

.record-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f2537;
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
}

.record-select-all-label input,
.record-check-column input {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0;
  accent-color: #0e7490;
  cursor: pointer;
}

.record-selection-count {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.record-selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.record-selection-actions select,
.record-row-action {
  min-height: 40px;
  padding: 8px 32px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
  color: #0f2537;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
}

.record-row-action {
  width: 108px;
}

.record-check-column {
  width: 48px;
  min-width: 48px;
  text-align: center !important;
}

.data-table tbody tr.is-selected {
  background: #ecfeff !important;
  box-shadow: inset 3px 0 0 #0891b2;
}

.users-table-v80 {
  min-width: 1160px;
}

.ptj-stat-grid {
  margin-bottom: 18px;
}

.ptj-list-panel {
  margin-bottom: 18px;
}

.ptj-filter-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, .65fr) minmax(145px, .6fr) minmax(175px, .75fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ptj-filter-grid label {
  min-width: 0;
}

.ptj-filter-grid input,
.ptj-filter-grid select {
  width: 100%;
}

.ptj-table-v80 {
  min-width: 1220px;
}

.ptj-table-v80 th,
.ptj-table-v80 td {
  vertical-align: middle;
}

.ptj-name-cell {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 280px;
}

.ptj-name-cell > span:last-child {
  min-width: 0;
}

.ptj-name-cell strong {
  display: block;
  color: #0f2537;
}

.ptj-name-cell small {
  display: block;
  max-width: 440px;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.ptj-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #e0f2fe;
  color: #075985;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.ptj-record-counts {
  display: grid;
  gap: 5px;
  min-width: 130px;
  color: var(--muted);
  font-size: .78rem;
}

.ptj-record-counts strong {
  color: #0f2537;
}

.ptj-form-panel {
  max-width: 1160px;
}

.ptj-active-check {
  align-self: end;
}

@media (max-width: 1280px) {
  .users-filter-grid-v80 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .users-filter-grid-v80 .users-filter-actions,
  .ptj-filter-grid .users-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .users-filter-grid-v80,
  .ptj-filter-grid {
    grid-template-columns: 1fr;
  }

  .users-filter-grid-v80 .users-filter-actions,
  .ptj-filter-grid .users-filter-actions {
    grid-column: auto;
  }

  .record-selection-toolbar {
    align-items: stretch;
  }

  .record-selection-actions {
    width: 100%;
    margin-left: 0;
  }

  .record-selection-actions select,
  .record-selection-actions .button {
    flex: 1 1 0;
  }
}

.users-form-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: .86rem;
  font-weight: 700;
}

.users-form-field > input {
  width: 100%;
}

.users-form-field > small {
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}


/* FIX v81: kemasan halaman senarai kakitangan. */
.staff-filters-ordered {
  display: grid !important;
  grid-template-columns: minmax(250px, 1.4fr) repeat(5, minmax(145px, 1fr)) auto !important;
  align-items: end !important;
  gap: 12px !important;
}

.staff-filters-ordered .staff-filter-search {
  min-width: 0;
}

.staff-reset-button {
  width: auto !important;
  min-width: 0 !important;
  padding-inline: 14px !important;
  white-space: nowrap;
}

.staff-add-button .ui-icon,
.staff-add-button .minimal-icon {
  color: #fff !important;
  filter: brightness(0) invert(1) !important;
  opacity: 1 !important;
}

.staff-add-button .ui-icon svg,
.staff-add-button .minimal-icon svg {
  color: #fff !important;
  stroke: #fff !important;
}

.staff-list-table .staff-name-cell .avatar,
.digital-card-page .id-card-modern .photo-avatar.xl {
  border-radius: 14px !important;
}

.staff-card-modal-panel {
  width: min(100%, 520px) !important;
  max-height: 94vh !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .3) !important;
}

.staff-card-modal-frame {
  display: block;
  width: 100%;
  height: min(84vh, 760px);
  min-height: 620px;
  border: 0;
  background: #f8fafc;
}

.staff-card-modal .modal-close {
  top: 12px;
  right: 12px;
}

@media (max-width: 1180px) {
  .staff-filters-ordered {
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .staff-filters-ordered {
    grid-template-columns: 1fr !important;
  }

  .staff-reset-button {
    justify-self: start;
  }

  .staff-card-modal {
    padding: 10px !important;
  }

  .staff-card-modal-frame {
    height: 88vh;
    min-height: 520px;
  }
}


/* FIX v82: susun semula UI/UX borang staf. */
.staff-form-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.staff-form-heading {
  min-width: 0;
}

.staff-form-heading h2 {
  margin: 2px 0 7px;
  color: #0f2537;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.2;
}

.staff-form-heading p,
.staff-form-heading small {
  margin: 0;
}

.staff-form-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: max-content;
}

.staff-vacancy-form {
  margin: 0;
}

.staff-vacant-indicator {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}

.staff-editor-form {
  display: grid;
  gap: 18px;
  max-width: 1320px;
}

.staff-form-section {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.staff-form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 10px;
}

.staff-form-section-head h3 {
  margin: 2px 0 6px;
  color: #0f2537;
  font-size: 1rem;
  line-height: 1.3;
}

.staff-form-section-head p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.45;
}

.staff-form-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #f8fafc;
  color: #0f2537;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.staff-form-fields {
  display: grid;
  align-items: start;
  gap: 16px;
  min-width: 0;
}

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

.staff-form-fields-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-form-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.staff-form-fields label > span {
  color: #334155;
  font-size: .84rem;
  font-weight: 750;
}

.staff-form-fields input,
.staff-form-fields select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
}

.staff-field-wide {
  grid-column: span 2;
}

.staff-form-actions-bar {
  position: sticky;
  bottom: 12px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-color: rgba(148, 163, 184, .55);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
  backdrop-filter: blur(12px);
}

.staff-form-actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 980px) {
  .staff-form-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .staff-form-section-head {
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .staff-form-topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .staff-form-top-actions,
  .staff-vacancy-form,
  .staff-vacancy-form .button {
    width: 100%;
  }

  .staff-form-fields-2,
  .staff-form-fields-3 {
    grid-template-columns: 1fr;
  }

  .staff-field-wide {
    grid-column: auto;
  }

  .staff-form-section {
    padding: 18px;
  }

  .staff-form-actions-bar,
  .staff-form-actions-right {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .staff-form-actions-bar .button,
  .staff-form-actions-right .button {
    width: 100%;
  }
}


/* FIX v83: pulihkan penapis Aktiviti / Unit dan pastikan ikon Tambah Staf berwarna putih. */
@media (max-width: 1480px) {
  .staff-filters-ordered {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .staff-filters-ordered .staff-filter-search {
    grid-column: span 2;
  }
}

/* v85: dashboard analitik dan penapis gred berantai. */
.dashboard-hero-v2 {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(7, 89, 133, .18);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, .14), transparent 38%),
    linear-gradient(135deg, #ffffff, #f0f8fc);
  box-shadow: var(--shadow);
}

.dashboard-hero-copy {
  min-width: 0;
  align-self: center;
}

.dashboard-hero-copy h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.2;
  color: #0f2537;
}

.dashboard-hero-copy p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-hero-side {
  width: min(440px, 42%);
  display: grid;
  align-content: center;
  gap: 12px;
}

.dashboard-scope-form label {
  display: block;
}

.dashboard-scope-form select {
  background-color: #fff;
}

.dashboard-quick-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-stat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.dashboard-stat-card-v2 {
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 9px 24px rgba(15, 23, 42, .055);
}

.dashboard-stat-card-v2::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(14, 165, 233, .08);
}

.dashboard-stat-card-v2:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 89, 133, .32);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .09);
}

.dashboard-stat-card-v2 span {
  position: relative;
  z-index: 1;
  color: #475569;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.3;
}

.dashboard-stat-card-v2 strong {
  position: relative;
  z-index: 1;
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  line-height: 1;
  color: #0f2537;
}

.dashboard-stat-card-v2 small {
  position: relative;
  z-index: 1;
  color: #7b8da1;
  font-size: .73rem;
  line-height: 1.35;
}

.dashboard-stat-card-v2.is-primary {
  border-color: rgba(7, 89, 133, .25);
  background: linear-gradient(145deg, #fff, #eef8fc);
}

.dashboard-stat-card-v2.is-warning {
  border-color: rgba(180, 83, 9, .22);
  background: linear-gradient(145deg, #fff, #fff8ed);
}

.dashboard-stat-card-v2.is-warning::after {
  background: rgba(245, 158, 11, .11);
}

.dashboard-stat-card-v2.is-muted {
  background: linear-gradient(145deg, #fff, #f5f7fa);
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 13px;
}

.dashboard-section-heading h2 {
  margin: 0;
  font-size: 1.22rem;
}

.dashboard-section-heading > small {
  color: var(--muted);
  text-align: right;
}

.dashboard-distribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.dashboard-panel-v2 {
  min-width: 0;
  padding: 18px;
  border-radius: 12px;
}

.dashboard-panel-v2 .panel-head {
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f6;
}

.dashboard-panel-v2 .panel-head > div {
  min-width: 0;
}

.dashboard-panel-v2 .panel-head h2,
.dashboard-recent-panel .panel-head h2 {
  line-height: 1.25;
}

.dashboard-panel-v2 .panel-head small,
.dashboard-recent-panel .panel-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .76rem;
}

.dashboard-bar-list {
  display: grid;
  gap: 13px;
  max-height: 460px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.dashboard-bar-row {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: inherit;
}

.dashboard-bar-row[href]:hover strong {
  color: var(--primary);
}

.dashboard-bar-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-bar-meta > span {
  min-width: 0;
}

.dashboard-bar-meta strong {
  display: block;
  overflow: hidden;
  color: #243247;
  font-size: .86rem;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-meta small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #7b8da1;
  font-size: .72rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-meta b {
  min-width: 30px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #edf6fb;
  color: #075985;
  font-size: .77rem;
  text-align: center;
}

.dashboard-bar-track,
.dashboard-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.dashboard-bar-track i,
.dashboard-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #075985, #0ea5e9);
}

.dashboard-status-list .is-vacant .dashboard-bar-track i {
  background: linear-gradient(90deg, #b45309, #f59e0b);
}

.dashboard-status-list .is-retired .dashboard-bar-track i {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

.dashboard-status-list .is-inactive .dashboard-bar-track i {
  background: linear-gradient(90deg, #991b1b, #ef4444);
}

.dashboard-completeness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.dashboard-completeness-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e7edf4;
  border-radius: 10px;
  background: #fbfdff;
}

.dashboard-completeness-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dashboard-completeness-item span {
  color: #334155;
  font-size: .8rem;
  font-weight: 800;
}

.dashboard-completeness-item strong {
  color: #075985;
  font-size: .88rem;
}

.dashboard-completeness-item small {
  display: block;
  margin-top: 7px;
  color: #7b8da1;
  font-size: .7rem;
}

.dashboard-recent-panel {
  padding: 18px;
  border-radius: 12px;
}

.dashboard-recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-recent-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid #e6edf4;
  border-radius: 10px;
  color: inherit;
  background: #fff;
}

.dashboard-recent-item:hover {
  border-color: rgba(7, 89, 133, .3);
  background: #fafdff;
}

.dashboard-recent-item > span {
  min-width: 0;
}

.dashboard-recent-item strong,
.dashboard-recent-item small,
.dashboard-recent-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-item strong {
  color: #243247;
  font-size: .85rem;
}

.dashboard-recent-item small {
  margin-top: 3px;
  color: #5f7186;
  font-size: .75rem;
}

.dashboard-recent-item em {
  margin-top: 4px;
  color: #8a9aab;
  font-size: .68rem;
  font-style: normal;
}

.dashboard-recent-item .badge {
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-empty-note {
  margin: 6px 0;
  color: var(--muted);
  font-size: .82rem;
}

.staff-filters select:disabled {
  color: #94a3b8;
  background-color: #f4f7fa;
  cursor: not-allowed;
}

@media (max-width: 1320px) {
  .dashboard-stat-grid-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-hero-v2 {
    flex-direction: column;
  }

  .dashboard-hero-side {
    width: 100%;
  }

  .dashboard-quick-actions {
    justify-content: flex-start;
  }

  .dashboard-distribution-grid,
  .dashboard-recent-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard-hero-v2 {
    padding: 17px;
  }

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

  .dashboard-stat-card-v2 {
    min-height: 120px;
    padding: 14px;
  }

  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-section-heading > small {
    text-align: left;
  }

  .dashboard-completeness-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-recent-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-recent-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* FIX v86: akses PTJ paparan sahaja untuk Penyelaras dan kemasan halaman butiran PTJ. */
.ptj-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 14px 38px rgba(15, 37, 55, .07);
}

.ptj-detail-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ptj-detail-identity > div {
  min-width: 0;
}

.ptj-detail-identity h2 {
  margin: 2px 0 8px;
  color: #0f2537;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.15;
}

.ptj-detail-code {
  min-width: 72px;
  min-height: 52px;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: .84rem;
}

.ptj-detail-badges,
.ptj-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ptj-view-only-notice {
  margin-bottom: 18px;
}

.ptj-detail-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.ptj-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr);
  gap: 18px;
  align-items: start;
}

.ptj-form-panel-v86,
.ptj-coordinator-panel-v86 {
  margin: 0;
}

.ptj-form-panel-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ptj-editor-form {
  display: grid;
  gap: 16px;
}

.ptj-form-section {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #dbe5ec;
  border-radius: 16px;
  background: #fbfdff;
}

.ptj-form-section legend {
  padding: 0 8px;
  color: #0f2537;
  font-size: .9rem;
  font-weight: 900;
}

.ptj-form-grid-v86 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ptj-form-grid-v86 label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: .84rem;
  font-weight: 800;
}

.ptj-form-grid-v86 input,
.ptj-form-grid-v86 select,
.ptj-form-grid-v86 textarea {
  width: 100%;
  min-height: 46px;
}

.ptj-form-grid-v86 textarea {
  resize: vertical;
}

.ptj-form-grid-v86 input[readonly],
.ptj-form-grid-v86 textarea[readonly],
.ptj-form-grid-v86 select:disabled {
  border-color: #dbe5ec;
  background: #f1f5f9;
  color: #334155;
  cursor: default;
  opacity: 1;
}

.ptj-active-toggle {
  display: flex !important;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe5ec;
  border-radius: 12px;
  background: #fff;
}

.ptj-active-toggle input {
  flex: 0 0 auto;
  width: 19px !important;
  height: 19px !important;
  min-height: 19px !important;
  margin: 0;
}

.ptj-active-toggle > span {
  display: grid !important;
  gap: 2px;
  margin: 0 !important;
}

.ptj-active-toggle strong {
  color: #0f2537;
  font-size: .84rem;
}

.ptj-active-toggle small {
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.3;
}

.ptj-active-toggle.is-readonly {
  background: #f1f5f9;
}

.ptj-form-actions-v86 {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  justify-content: flex-end;
  margin-top: 0;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(15, 37, 55, .09);
  backdrop-filter: blur(10px);
}

.ptj-coordinator-panel-v86 {
  position: sticky;
  top: 18px;
}

.ptj-coordinator-numbered-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ptj-coordinator;
}

.ptj-coordinator-numbered-list li {
  counter-increment: ptj-coordinator;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dbe5ec;
  border-radius: 12px;
  background: #fff;
}

.ptj-coordinator-numbered-list li::before {
  content: counter(ptj-coordinator) ".";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #e0f2fe;
  color: #075985;
  font-size: .75rem;
  font-weight: 900;
}

.ptj-coordinator-numbered-list li > div {
  min-width: 0;
}

.ptj-coordinator-numbered-list strong,
.ptj-coordinator-numbered-list small {
  display: block;
  overflow-wrap: anywhere;
}

.ptj-coordinator-numbered-list strong {
  color: #0f2537;
  font-size: .82rem;
  line-height: 1.3;
}

.ptj-coordinator-numbered-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.3;
}

.ptj-coordinator-numbered-list.is-compact {
  min-width: 225px;
  gap: 6px;
}

.ptj-coordinator-numbered-list.is-compact li {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 8px;
  border-radius: 10px;
}

.ptj-coordinator-numbered-list.is-compact li::before {
  min-width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: .68rem;
}

.ptj-coordinator-manage-button {
  width: 100%;
  margin-top: 14px;
}

.ptj-coordinator-empty {
  padding: 20px 14px;
}

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

  .ptj-detail-layout {
    grid-template-columns: 1fr;
  }

  .ptj-coordinator-panel-v86 {
    position: static;
  }
}

@media (max-width: 760px) {
  .ptj-detail-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .ptj-detail-identity {
    align-items: flex-start;
  }

  .ptj-detail-actions {
    width: 100%;
  }

  .ptj-detail-actions .button {
    flex: 1 1 auto;
  }

  .ptj-detail-stat-grid,
  .ptj-form-grid-v86 {
    grid-template-columns: 1fr;
  }

  .ptj-form-grid-v86 .span-2,
  .ptj-form-grid-v86 .span-3 {
    grid-column: auto;
  }

  .ptj-form-section {
    padding: 14px;
  }

  .ptj-form-actions-v86 {
    position: static;
  }
}

/* v89: log masuk MyDigitalID dan tetapan autentikasi. */
.login-page-v89 {
  padding: 28px 18px;
}

.login-wrap-v89 {
  width: min(100%, 500px);
}

.login-card-v89 {
  padding: clamp(24px, 4vw, 34px);
  border-radius: 24px;
}

.login-heading-v89 {
  margin-bottom: 20px;
}

.login-heading-v89 h1 {
  margin: 3px 0 7px;
  font-size: clamp(1.65rem, 4vw, 2.1rem);
}

.login-heading-v89 > p:last-child {
  margin: 0;
}

.mydigitalid-login-button-v89 {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 70px;
  padding: 11px 14px;
  border: 1px solid #111827;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
  transition: transform .18s ease, box-shadow .18s ease;
}

.mydigitalid-login-button-v89:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, .2);
}

.mydigitalid-login-button-v89 strong,
.mydigitalid-login-button-v89 small {
  display: block;
}

.mydigitalid-login-button-v89 strong {
  font-size: .98rem;
  line-height: 1.25;
}

.mydigitalid-login-button-v89 small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: .76rem;
  line-height: 1.3;
}

.mydigitalid-shield-v89 {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 14px 14px 18px 18px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.login-divider-v89 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 19px 0;
  color: #94a3b8;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.login-divider-v89::before,
.login-divider-v89::after {
  content: "";
  height: 1px;
  background: #e2e8f0;
}

.login-form-v89 {
  gap: 14px;
}

.login-submit-v89 {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}

.login-help-v89 {
  display: grid;
  gap: 7px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.login-help-v89 a {
  font-weight: 800;
}

.login-help-v89 small {
  color: #64748b;
  line-height: 1.4;
}

.settings-hero-v89 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 37, 55, .12);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.settings-hero-v89 h2 {
  margin: 3px 0 6px;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
}

.settings-hero-v89 p:last-child {
  margin: 0;
  color: #64748b;
}

.settings-admin-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.settings-layout-v89 {
  display: grid;
  gap: 18px;
}

.settings-card-v89 {
  padding: 22px;
}

.auth-method-grid-v89 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-method-option-v89 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

.auth-method-option-v89:has(input:checked) {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: inset 0 0 0 1px #0f766e;
}

.auth-method-option-v89 input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: #0f766e;
}

.auth-method-option-v89 strong,
.auth-method-option-v89 small {
  display: block;
}

.auth-method-option-v89 strong {
  color: #0f172a;
  font-size: .98rem;
}

.auth-method-option-v89 small {
  margin-top: 5px;
  color: #64748b;
  line-height: 1.4;
}

.settings-safety-note-v89 {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: .84rem;
  line-height: 1.45;
}

.settings-form-grid-v89 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-form-grid-v89 label {
  min-width: 0;
}

.settings-form-grid-v89 label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: .8rem;
  font-weight: 900;
}

.settings-form-grid-v89 label > small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.35;
}

.settings-form-grid-v89 input,
.settings-form-grid-v89 select {
  width: 100%;
}

.settings-form-grid-v89 input[readonly] {
  background: #f8fafc;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .79rem;
}

.settings-actions-v89 {
  position: sticky;
  bottom: 12px;
  z-index: 12;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .1);
  backdrop-filter: blur(12px);
}

.settings-test-result-v89 {
  margin-bottom: 18px;
  border-color: #86efac;
  background: #f0fdf4;
}

.settings-definition-list-v89 {
  display: grid;
  gap: 9px;
  margin: 0;
}

.settings-definition-list-v89 > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 101, 52, .12);
}

.settings-definition-list-v89 dt {
  color: #166534;
  font-weight: 900;
}

.settings-definition-list-v89 dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #14532d;
}

.settings-flow-v89 {
  margin-top: 18px;
}

.settings-flow-v89 ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 23px;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .settings-hero-v89 {
    display: grid;
  }

  .settings-admin-badge {
    justify-self: start;
  }

  .auth-method-grid-v89,
  .settings-form-grid-v89 {
    grid-template-columns: 1fr;
  }

  .settings-form-grid-v89 .span-2 {
    grid-column: auto;
  }

  .settings-actions-v89 {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .settings-actions-v89 .button {
    width: 100%;
    justify-content: center;
  }

  .settings-definition-list-v89 > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}


/* FIX v90: halaman Tetapan MyDigitalID diselaraskan dengan ePelawat. */
.mydigitalid-settings-v90 {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}

.mydigitalid-settings-section-v90 {
  padding: 24px 26px;
}

.mydigitalid-settings-section-v90 + .mydigitalid-settings-section-v90 {
  border-top: 1px solid #dbe4ec;
}

.mydigitalid-settings-heading-v90 {
  margin-bottom: 20px;
}

.mydigitalid-settings-heading-v90 h2 {
  margin: 0 0 5px;
  color: #10233d;
  font-size: 1.2rem;
  line-height: 1.25;
}

.mydigitalid-settings-heading-v90 p {
  margin: 0;
  color: #5e718a;
  line-height: 1.45;
}

.mydigitalid-login-options-v90 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.mydigitalid-check-option-v90 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  cursor: pointer;
}

.mydigitalid-check-option-v90 input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #096b9f;
}

.mydigitalid-check-option-v90 strong,
.mydigitalid-check-option-v90 small {
  display: block;
}

.mydigitalid-check-option-v90 strong {
  color: #10233d;
  font-size: .95rem;
  line-height: 1.35;
}

.mydigitalid-check-option-v90 small {
  margin-top: 6px;
  color: #60738d;
  font-size: .83rem;
  line-height: 1.45;
}

.mydigitalid-redirect-uri-v90 {
  display: block;
  margin-top: 3px;
  color: #365f92;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.mydigitalid-form-grid-v90 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.mydigitalid-form-grid-v90 label {
  min-width: 0;
}

.mydigitalid-form-grid-v90 label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #10233d;
  font-size: .82rem;
  font-weight: 800;
}

.mydigitalid-form-grid-v90 input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
}

.mydigitalid-form-grid-v90 label > small {
  display: block;
  margin-top: 6px;
  color: #60738d;
  font-size: .76rem;
}

.mydigitalid-form-grid-v90 .span-2 {
  grid-column: span 2;
}

.mydigitalid-settings-actions-v90 {
  display: flex;
  justify-content: flex-start;
  margin-top: 18px;
}

.mydigitalid-settings-actions-v90 .button {
  min-height: 44px;
  padding-inline: 18px;
}

@media (max-width: 760px) {
  .mydigitalid-settings-section-v90 {
    padding: 20px 18px;
  }

  .mydigitalid-login-options-v90,
  .mydigitalid-form-grid-v90 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-form-grid-v90 .span-2 {
    grid-column: auto;
  }
}


/* v91: halaman log masuk dengan logo MyDigitalID, logo JMG tanpa kotak dan latar Neat. */
.login-page-v91 {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow-x: hidden;
  background: #003fff;
}

.login-neat-canvas-v91,
.login-neat-overlay-v91 {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-neat-canvas-v91 {
  z-index: -3;
  display: block;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 83, 115, .92), transparent 34%),
    radial-gradient(circle at 80% 25%, rgba(255, 200, 88, .8), transparent 36%),
    radial-gradient(circle at 70% 80%, rgba(23, 231, 255, .78), transparent 38%),
    linear-gradient(135deg, #6d3bff, #003fff 54%, #0f172a);
}

.login-neat-overlay-v91 {
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 15, 45, .08), rgba(3, 15, 45, .3)),
    radial-gradient(circle at center, transparent 20%, rgba(2, 6, 23, .18) 100%);
}

.login-wrap-v91 {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
}

.login-card-v91 {
  border: 1px solid rgba(255, 255, 255, .66);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}

.login-brand-v91 {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  color: var(--text);
}

.login-brand-v91 > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.login-brand-v91 strong {
  color: #0f172a;
  font-size: 1.02rem;
  line-height: 1.2;
}

.login-brand-v91 small {
  color: #64748b;
  font-size: .76rem;
  line-height: 1.3;
}

.login-jmg-logo-v91 {
  display: block;
  width: 72px;
  max-height: 70px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mydigitalid-login-button-v91 {
  grid-template-columns: minmax(148px, 190px) minmax(0, 1fr);
  min-height: 82px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(15, 23, 42, .16);
  background: rgba(255, 255, 255, .98);
  color: #0f172a;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}

.mydigitalid-login-button-v91:hover {
  border-color: rgba(18, 47, 204, .45);
  box-shadow: 0 17px 34px rgba(15, 23, 42, .18);
}

.mydigitalid-logo-window-v91 {
  position: relative;
  display: block;
  width: 100%;
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.mydigitalid-logo-window-v91 img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.mydigitalid-login-copy-v91 {
  min-width: 0;
}

.mydigitalid-login-button-v91 strong {
  color: #0f172a;
}

.mydigitalid-login-button-v91 small {
  color: #64748b;
}

.login-card-v91 .login-divider-v89::before,
.login-card-v91 .login-divider-v89::after {
  background: rgba(148, 163, 184, .38);
}

@media (max-width: 560px) {
  .login-page-v91 {
    padding: 16px 12px;
  }

  .login-card-v91 {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .login-brand-v91 {
    align-items: flex-start;
  }

  .login-jmg-logo-v91 {
    width: 60px;
    max-height: 58px;
  }

  .mydigitalid-login-button-v91 {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .mydigitalid-logo-window-v91 {
    width: min(100%, 230px);
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-neat-canvas-v91 {
    animation: none !important;
  }
}


/* FIX v92: Neat Gradient dimuat secara tempatan dan bergerak pada Safari. */
.login-neat-canvas-v91 {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

html.neat-gradient-ready .login-neat-canvas-v91 {
  background: #003fff;
}

html.neat-gradient-fallback .login-neat-canvas-v91 {
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 83, 115, .95), transparent 34%),
    radial-gradient(circle at 82% 23%, rgba(255, 200, 88, .88), transparent 36%),
    radial-gradient(circle at 72% 82%, rgba(23, 231, 255, .82), transparent 39%),
    linear-gradient(135deg, #6d3bff, #003fff 54%, #0f172a);
  background-size: 150% 150%, 145% 145%, 155% 155%, 130% 130%;
  animation: login-neat-fallback-motion-v92 14s ease-in-out infinite alternate;
}

@keyframes login-neat-fallback-motion-v92 {
  0% {
    background-position: 0% 0%, 100% 0%, 60% 100%, 0% 50%;
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  50% {
    background-position: 22% 12%, 78% 22%, 40% 76%, 50% 50%;
    transform: scale(1.09) translate3d(-1.2%, .8%, 0);
  }
  100% {
    background-position: 36% 24%, 62% 42%, 24% 58%, 100% 50%;
    transform: scale(1.05) translate3d(1.1%, -1%, 0);
  }
}


/* FIX v105: kad digital baharu dengan QR dan simpan vCard. */
.digital-card-page-v105 {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #eef3f8 0%, #dfe8f2 100%);
}

.digital-card-v105 {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 22px 12px 28px;
}

.id-card-v105 {
  position: relative;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
  padding: 18px 22px 24px;
  overflow: visible;
}

.id-card-toolbar-v105 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.id-card-toolbar-left-v105 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.id-card-icon-button-v105 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #0b3b73;
  cursor: pointer;
  text-decoration: none;
}

.id-card-icon-button-v105:hover {
  background: rgba(11, 59, 115, .08);
}

.id-card-icon-button-v105 .dc-icon,
.id-card-contact-pill-v105 .dc-icon,
.id-card-primary-action-v105 .dc-icon,
.id-card-whatsapp-action-v105 .dc-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
}

.dc-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dc-icon-qr svg path,
.dc-icon-qr svg rect {
  fill: currentColor;
  stroke: none;
}

.id-card-qr-link-v105 {
  display: inline-flex;
  width: 78px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d8e3f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  background: #fff;
}

.id-card-qr-link-v105 img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.id-card-info-popover-v105 {
  position: absolute;
  top: 58px;
  left: 24px;
  z-index: 3;
  width: min(260px, calc(100% - 48px));
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(11, 59, 115, .96);
  color: #fff;
  font-size: .92rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
}

.id-card-photo-wrap-v105 {
  display: flex;
  justify-content: center;
  margin-top: -2px;
}

.id-card-v105 .photo-avatar.xl {
  width: 124px !important;
  height: 156px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 4px solid #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
  background: #f8fafc;
}

.id-card-v105 .photo-avatar.xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-card-body-v105 {
  text-align: center;
  padding: 18px 8px 8px;
}

.id-card-body-v105 h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  line-height: 1.2;
  color: #1f2937;
}

.id-card-role-v105,
.id-card-location-v105 {
  margin: 10px auto 0;
  max-width: 420px;
  color: #374151;
}

.id-card-role-v105 {
  font-size: 1.02rem;
  font-weight: 500;
}

.id-card-location-v105 {
  font-size: 1.02rem;
  line-height: 1.5;
}

.id-card-contact-list-v105 {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.id-card-contact-pill-v105 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 18px;
  border: 2px solid #30343b;
  border-radius: 12px;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
  font-size: 1rem;
  word-break: break-word;
}

.id-card-contact-pill-v105 .dc-icon {
  color: #374151;
}

.id-card-actions-v105 {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.id-card-primary-action-v105,
.id-card-whatsapp-action-v105 {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.id-card-primary-action-v105 {
  background: #0c3d78;
  border-color: #0c3d78;
  color: #fff;
}

.id-card-primary-action-v105:hover {
  background: #0a3569;
  border-color: #0a3569;
}

.id-card-primary-action-v105 .dc-icon,
.id-card-primary-action-v105 .dc-icon svg {
  color: #fff;
}

.id-card-whatsapp-action-v105 {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.id-card-whatsapp-action-v105:hover {
  background: #20b85a;
  border-color: #20b85a;
}

.id-card-whatsapp-action-v105 .dc-icon,
.id-card-whatsapp-action-v105 .dc-icon svg {
  color: #fff;
}

@media (max-width: 640px) {
  .digital-card-v105 {
    width: 100%;
    padding: 10px 8px 18px;
  }

  .id-card-v105 {
    border-radius: 18px;
    padding: 14px 14px 18px;
  }

  .id-card-qr-link-v105 {
    width: 68px;
    height: 68px;
  }

  .id-card-v105 .photo-avatar.xl {
    width: 114px !important;
    height: 146px !important;
  }

  .id-card-contact-pill-v105,
  .id-card-primary-action-v105,
  .id-card-whatsapp-action-v105 {
    font-size: 0.98rem;
  }
}

/* FIX v106: modal kad digital sama seperti halaman kad, QR popup berlogo JMG dan ikon sosial. */
body > .staff-card-modal.staff-card-modal-v106,
.staff-card-modal {
  padding: 18px !important;
}

.staff-card-modal-panel {
  width: min(100%, 640px) !important;
  max-height: 96vh !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #e9eff6 !important;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .35) !important;
}

.staff-card-modal-frame {
  display: block !important;
  width: 100% !important;
  height: min(92vh, 900px) !important;
  min-height: 760px !important;
  border: 0 !important;
  background: #e9eff6 !important;
}

.digital-card-page-v106 {
  min-height: 100vh !important;
  background: linear-gradient(180deg, #edf3f8 0%, #e7eef6 100%) !important;
}

.digital-card-v106 {
  width: min(100%, 560px) !important;
  padding: 20px 12px 28px !important;
}

.id-card-v106 {
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .14) !important;
  padding: 18px 22px 24px !important;
  overflow: visible !important;
}

.id-card-toolbar-v106 {
  margin-bottom: 0 !important;
}

.id-card-qr-button-v106 {
  color: #0b4a86 !important;
  background: transparent !important;
}

.id-card-qr-button-v106 .dc-icon {
  width: 28px !important;
  height: 28px !important;
}

.id-card-qr-button-v106 svg rect,
.id-card-qr-button-v106 svg path,
.dc-icon-qr svg rect,
.dc-icon-qr svg path,
.dc-icon-facebook svg path {
  fill: currentColor !important;
  stroke: none !important;
}

.id-card-v106 .photo-avatar.xl {
  width: 124px !important;
  height: 156px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  border: 4px solid #fff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18) !important;
}

.id-card-v106 .photo-avatar.xl img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.id-card-v106 .id-card-body-v105 h1 {
  color: #1f2937 !important;
}

.id-card-whatsapp-action-v105,
.id-card-v106 .id-card-whatsapp-action-v105,
a.id-card-whatsapp-action-v105.button {
  background: #25d366 !important;
  border-color: #25d366 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.id-card-whatsapp-action-v105:hover,
.id-card-v106 .id-card-whatsapp-action-v105:hover,
a.id-card-whatsapp-action-v105.button:hover {
  background: #1fbd5c !important;
  border-color: #1fbd5c !important;
  color: #fff !important;
}

.id-card-whatsapp-action-v105 .dc-icon,
.id-card-whatsapp-action-v105 .dc-icon svg,
.id-card-whatsapp-action-v105 span {
  color: #fff !important;
  stroke: currentColor !important;
}

.id-card-social-v106 {
  margin-top: 22px;
  text-align: center;
}

.id-card-social-v106 p {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}

.id-card-social-icons-v106 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.id-card-social-icons-v106 a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0b4a86;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}

.id-card-social-icons-v106 a:hover {
  background: rgba(11, 74, 134, .08);
  transform: translateY(-1px);
}

.id-card-social-icons-v106 .dc-icon {
  width: 28px;
  height: 28px;
}

.id-card-social-icons-v106 svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.id-card-social-icons-v106 .dc-icon-facebook svg {
  fill: currentColor;
  stroke: none;
}

.id-card-social-icons-v106 .dc-icon-youtube svg path:last-child {
  fill: currentColor;
  stroke: none;
}

body.qr-modal-open-v106 {
  overflow: hidden;
}

.id-card-qr-modal-v106[hidden] {
  display: none !important;
}

.id-card-qr-modal-v106 {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.id-card-qr-backdrop-v106 {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(7px);
}

.id-card-qr-panel-v106 {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  border-radius: 22px;
  background: #fff;
  padding: 24px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.id-card-qr-panel-v106 h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: #102338;
}

.id-card-qr-panel-v106 p {
  margin: 0 0 18px;
  color: #5b6778;
}

.id-card-qr-close-v106 {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #eef3f8;
  color: #102338;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.id-card-qr-large-v106 {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: #fff;
  padding: 12px;
  box-shadow: inset 0 0 0 1px #e2e8f0, 0 12px 30px rgba(15, 23, 42, .12);
}

.id-card-qr-img-v106 {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.id-card-qr-logo-v106 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.id-card-qr-logo-v106 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 720px) {
  .staff-card-modal {
    padding: 8px !important;
  }

  .staff-card-modal-panel {
    width: 100% !important;
    border-radius: 16px !important;
  }

  .staff-card-modal-frame {
    height: 92vh !important;
    min-height: 660px !important;
  }

  .digital-card-v106 {
    padding: 10px 8px 18px !important;
  }

  .id-card-v106 {
    border-radius: 18px !important;
    padding: 14px 14px 18px !important;
  }

  .id-card-v106 .photo-avatar.xl {
    width: 114px !important;
    height: 146px !important;
  }

  .id-card-qr-large-v106 {
    width: 220px;
    height: 220px;
  }

  .id-card-social-icons-v106 {
    gap: 12px;
  }
}

/* FIX v107: staff_card tidak blank, modal guna kad digital baharu dan QR popup boleh jalan tanpa inline script. */
.staff-card-modal,
body > .staff-card-modal {
  padding: 18px !important;
  align-items: center !important;
  justify-items: center !important;
}

.staff-card-modal-panel,
body > .staff-card-modal .staff-card-modal-panel {
  width: min(100%, 690px) !important;
  max-height: 96vh !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #e9eff6 !important;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .35) !important;
}

.staff-card-modal-frame,
body > .staff-card-modal .staff-card-modal-frame {
  display: block !important;
  width: 100% !important;
  height: min(92vh, 920px) !important;
  min-height: 780px !important;
  border: 0 !important;
  background: #e9eff6 !important;
}

.digital-card-page-v107 {
  min-height: 100vh !important;
  background: linear-gradient(180deg, #edf3f8 0%, #e7eef6 100%) !important;
}

.digital-card-modal-body-v107 {
  overflow: auto !important;
}

.digital-card-v107 {
  width: min(100%, 560px) !important;
  padding: 20px 12px 28px !important;
}

.digital-card-modal-body-v107 .digital-card-v107 {
  padding-top: 18px !important;
}

.id-card-v107 {
  border-radius: 24px !important;
  background: #fff !important;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .14) !important;
  padding: 18px 22px 24px !important;
  overflow: visible !important;
}

.id-card-v107 .id-card-whatsapp-action-v105,
.id-card-whatsapp-action-v105,
a.id-card-whatsapp-action-v105.button,
a.id-card-whatsapp-action-v105.button:visited,
a.id-card-whatsapp-action-v105.button:active,
a.id-card-whatsapp-action-v105.button:focus {
  background: #25d366 !important;
  border-color: #25d366 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

.id-card-v107 .id-card-whatsapp-action-v105:hover,
a.id-card-whatsapp-action-v105.button:hover {
  background: #1fbd5c !important;
  border-color: #1fbd5c !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.id-card-whatsapp-action-v105 *,
.id-card-whatsapp-action-v105 .dc-icon,
.id-card-whatsapp-action-v105 .dc-icon svg,
.id-card-whatsapp-action-v105 span {
  color: #fff !important;
  stroke: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.id-card-whatsapp-action-v105 .dc-icon-whatsapp svg path {
  fill: none !important;
  stroke: #fff !important;
}

.id-card-qr-button-v106 {
  width: 42px !important;
  height: 42px !important;
}

.id-card-qr-button-v106 .dc-icon {
  width: 30px !important;
  height: 30px !important;
}

.id-card-qr-button-v106 svg rect,
.id-card-qr-button-v106 svg path,
.dc-icon-qr svg rect,
.dc-icon-qr svg path,
.dc-icon-facebook svg path {
  fill: currentColor !important;
  stroke: none !important;
}

.id-card-social-icons-v106 .dc-icon-facebook svg {
  fill: currentColor !important;
  stroke: none !important;
}

.id-card-qr-modal-v106 {
  z-index: 999 !important;
}

.id-card-qr-panel-v106 .id-card-primary-action-v105,
.id-card-qr-panel-v106 .id-card-primary-action-v105:visited {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

@media (max-width: 720px) {
  .staff-card-modal,
  body > .staff-card-modal {
    padding: 8px !important;
  }

  .staff-card-modal-panel,
  body > .staff-card-modal .staff-card-modal-panel {
    width: 100% !important;
    border-radius: 16px !important;
  }

  .staff-card-modal-frame,
  body > .staff-card-modal .staff-card-modal-frame {
    height: 92vh !important;
    min-height: 660px !important;
  }

  .digital-card-v107 {
    padding: 10px 8px 18px !important;
  }

  .id-card-v107 {
    border-radius: 18px !important;
    padding: 14px 14px 18px !important;
  }
}


/* FIX v108: Kad Digital dibuka sebagai halaman penuh dan ikon info dipadam. */
.id-card-v108-note { display: none; }
.id-card-toolbar-left-v105:empty { display: none; }
.staff-list-actions-v102 a[href*="staff_card.php"] { white-space: nowrap; }


/* FIX v109: direktori kad dibuka terus sebagai halaman kad digital. */
.directory-card[data-card-url] {
  cursor: pointer;
}

.directory-card[data-card-url]:focus-visible {
  outline: 3px solid rgba(14, 116, 144, .45);
  outline-offset: 4px;
}

/* FIX v110: buka staff_card.php dalam modal iframe dan pastikan QR kelihatan. */
body > .staff-card-modal.staff-card-modal-v110,
.staff-card-modal-v110 {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
}

body > .staff-card-modal.staff-card-modal-v110[hidden],
.staff-card-modal-v110[hidden] {
  display: none !important;
}

.staff-card-modal-v110 .card-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, .56) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.staff-card-modal-panel-v110 {
  position: relative !important;
  z-index: 2 !important;
  width: min(96vw, 620px) !important;
  height: min(94vh, 920px) !important;
  max-height: 94vh !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: #e9eff6 !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .38) !important;
}

.staff-card-modal-frame-v110 {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #e9eff6 !important;
}

.staff-card-modal-close-v110 {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 5 !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: #102338 !important;
  font-size: 1.5rem !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .16) !important;
}

.id-card-qr-large-v106 {
  overflow: hidden !important;
}

.id-card-qr-img-v106 {
  position: relative !important;
  z-index: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.id-card-qr-logo-v106 {
  z-index: 2 !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  .staff-card-modal-v110 {
    padding: 8px !important;
  }

  .staff-card-modal-panel-v110 {
    width: 100% !important;
    height: 94vh !important;
    border-radius: 18px !important;
  }
}


/* FIX v111: modal iframe untuk kad digital pada halaman awam dan admin. */
body > .staff-card-modal.staff-card-modal-v111,
.staff-card-modal-v111 {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
}

body > .staff-card-modal.staff-card-modal-v111[hidden],
.staff-card-modal-v111[hidden] {
  display: none !important;
}

.staff-card-modal-v111 .card-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, .56) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.staff-card-modal-panel-v111 {
  width: min(96vw, 620px) !important;
  height: min(94vh, 920px) !important;
  max-height: 94vh !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: #e9eff6 !important;
}

.staff-card-modal-frame-v111 {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #e9eff6 !important;
}

.staff-card-modal-close-v111 {
  top: 14px !important;
  right: 14px !important;
  z-index: 8 !important;
}

@media (max-width: 720px) {
  .staff-card-modal-v111 {
    padding: 8px !important;
  }

  .staff-card-modal-panel-v111 {
    width: 100% !important;
    height: 94vh !important;
    border-radius: 18px !important;
  }
}

/* AI v1: carian bahasa semula jadi pada Direktori Kakitangan JMG. */
.directory-ai-search-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, .12), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.directory-ai-search-panel.is-disabled {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.directory-ai-search-copy {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.directory-ai-search-copy h2 {
  margin: 2px 0 5px;
  color: #0f2537;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
}

.directory-ai-search-copy p:last-child {
  max-width: 850px;
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.directory-ai-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 13px;
  background: linear-gradient(135deg, #075985, #0f766e);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 89, 133, .2);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .06em;
}

.directory-ai-form {
  display: grid;
  gap: 10px;
}

.directory-ai-input-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

.directory-ai-input-wrap input[type="search"] {
  min-height: 54px;
  padding-left: 48px;
  border: 1px solid #93c5fd;
  border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
  font-size: 1rem;
}

.directory-ai-input-wrap input[type="search"]:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .14);
  outline: 0;
}

.directory-ai-input-wrap input[type="search"]:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

.directory-ai-input-icon {
  position: absolute;
  top: 50%;
  left: 17px;
  z-index: 2;
  width: 21px;
  height: 21px;
  color: #0369a1;
  transform: translateY(-50%);
  pointer-events: none;
}

.directory-ai-submit {
  min-width: 158px;
  min-height: 54px;
  justify-content: center;
  border-radius: 15px;
}

.directory-ai-form.is-loading .directory-ai-submit {
  cursor: progress;
}

.directory-ai-examples {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: .78rem;
}

.directory-ai-examples > span {
  font-weight: 800;
}

.directory-ai-examples button {
  padding: 5px 9px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #075985;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.directory-ai-examples button:hover:not(:disabled),
.directory-ai-examples button:focus-visible:not(:disabled) {
  border-color: #38bdf8;
  background: #e0f2fe;
}

.directory-ai-examples button:disabled {
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.directory-ai-status {
  min-height: 1.25em;
  margin: 0;
  color: #64748b;
  font-size: .78rem;
  line-height: 1.45;
}

.directory-ai-status.is-error {
  color: #b91c1c;
  font-weight: 800;
}

.directory-ai-status.is-success {
  color: #166534;
  font-weight: 800;
}

.directory-ai-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 16px;
  background: #f0fdf4;
}

.directory-ai-result-summary.is-empty {
  border-color: #fde68a;
  background: #fffbeb;
}

.directory-ai-result-summary > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.directory-ai-result-summary .directory-ai-badge {
  min-width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: .68rem;
}

.directory-ai-result-summary strong,
.directory-ai-result-summary small {
  display: block;
}

.directory-ai-result-summary strong {
  color: #14532d;
}

.directory-ai-result-summary.is-empty strong {
  color: #92400e;
}

.directory-ai-result-summary small {
  margin-top: 3px;
  color: #64748b;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .directory-ai-search-panel {
    padding: 17px;
  }

  .directory-ai-input-wrap {
    grid-template-columns: 1fr;
  }

  .directory-ai-submit {
    width: 100%;
  }

  .directory-ai-result-summary {
    display: grid;
  }

  .directory-ai-result-summary .button {
    width: 100%;
    justify-content: center;
  }
}


/* FIX v113: Pulihkan semula CSS UI/UX halaman admin selepas gabungan fail. */
/* v97: Audit Log UI/UX */
.audit-hero-v97 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px 30px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 15%, rgba(59, 130, 246, .18), transparent 31%),
    radial-gradient(circle at 72% 95%, rgba(14, 165, 233, .11), transparent 35%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eef6ff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.audit-hero-v97::after {
  position: absolute;
  right: -52px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border: 24px solid rgba(37, 99, 235, .06);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.audit-hero-copy-v97 {
  position: relative;
  z-index: 1;
  max-width: 790px;
}

.audit-hero-meta-v97 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 750;
}

.audit-secure-pill-v97 {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: rgba(219, 234, 254, .72);
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.audit-hero-v97 h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.08;
}

.audit-hero-v97 p {
  max-width: 760px;
  margin: 0;
  color: #52627a;
  font-size: .96rem;
  line-height: 1.65;
}

.audit-hero-actions-v97 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.audit-summary-grid-v97 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.audit-summary-card-v97 {
  --audit-accent: #2563eb;
  --audit-soft: rgba(37, 99, 235, .10);
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 150px;
  overflow: hidden;
  padding: 20px 20px 18px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.audit-summary-card-v97::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--audit-accent);
  content: '';
}

.audit-summary-card-v97::after {
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--audit-soft);
  content: '';
}

.audit-summary-card-v97.is-success { --audit-accent: #059669; --audit-soft: rgba(5, 150, 105, .11); }
.audit-summary-card-v97.is-danger { --audit-accent: #dc2626; --audit-soft: rgba(220, 38, 38, .10); }
.audit-summary-card-v97.is-update { --audit-accent: #d97706; --audit-soft: rgba(217, 119, 6, .12); }

.audit-summary-card-v97 > div,
.audit-summary-card-v97 > small {
  position: relative;
  z-index: 1;
}

.audit-summary-card-v97 span {
  display: block;
  color: #64748b;
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.audit-summary-card-v97 strong {
  display: block;
  margin-top: 9px;
  color: #0f172a;
  font-size: clamp(2rem, 3.5vw, 2.65rem);
  line-height: 1;
}

.audit-summary-card-v97 > small {
  align-self: end;
  color: #64748b;
  font-size: .78rem;
  line-height: 1.45;
}

.audit-filter-card-v97,
.audit-list-card-v97 {
  margin-bottom: 18px;
  border-color: rgba(148, 163, 184, .24);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}

.audit-quick-filter-v97 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8eef5;
}

.audit-quick-filter-v97 > span {
  margin-right: 2px;
  color: #64748b;
  font-size: .79rem;
  font-weight: 800;
}

.audit-quick-filter-v97 a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.audit-quick-filter-v97 a:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  color: #1d4ed8;
}

.audit-quick-filter-v97 a.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22);
}

.audit-filter-panel-v97 {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fbfdff;
}

.audit-filter-panel-v97 > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.audit-filter-panel-v97 > summary::-webkit-details-marker { display: none; }

.audit-filter-panel-v97 > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.audit-filter-panel-v97 > summary strong {
  color: #0f172a;
  font-size: .9rem;
}

.audit-filter-panel-v97 > summary small {
  color: #64748b;
  font-size: .76rem;
}

.audit-filter-toggle-v97 {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4fb;
  color: #475569;
  font-size: .72rem;
  font-weight: 800;
}

.audit-filter-panel-v97[open] .audit-filter-toggle-v97 {
  background: #dbeafe;
  color: #1d4ed8;
}

.audit-filter-grid-v97 {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) repeat(3, minmax(155px, 1fr));
  gap: 14px;
  padding: 17px 16px 16px;
  border-top: 1px solid #e2e8f0;
}

.audit-filter-grid-v97 label {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.audit-filter-grid-v97 label > span {
  color: #334155;
  font-size: .78rem;
  font-weight: 820;
}

.audit-filter-grid-v97 input,
.audit-filter-grid-v97 select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-color: #d7e1ec;
  background: #fff;
}

.audit-filter-search-v97 {
  grid-column: span 2;
}

.audit-filter-actions-v97 {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  grid-column: span 2;
}

.audit-active-filters-v97 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.audit-active-filters-v97 > span {
  color: #64748b;
  font-size: .77rem;
  font-weight: 800;
}

.audit-active-filters-v97 a {
  display: inline-flex;
  align-items: center;
  max-width: 320px;
  min-height: 31px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-active-filters-v97 a:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.audit-list-heading-v97 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8eef5;
}

.audit-list-heading-v97 h2 {
  margin: 3px 0 4px;
  color: #0f172a;
  font-size: 1.35rem;
}

.audit-list-heading-v97 small {
  color: #64748b;
  font-size: .79rem;
}

.audit-list-status-v97 {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-list-status-v97 span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .73rem;
  font-weight: 800;
}

.audit-event-list-v97 {
  display: grid;
  gap: 12px;
}

.audit-event-v97 {
  --event-accent: #0284c7;
  --event-soft: #e0f2fe;
  display: grid;
  grid-template-columns: 82px 126px minmax(280px, 1.65fr) minmax(210px, .85fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #e1e8f0;
  border-left: 4px solid var(--event-accent);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.audit-event-v97:hover {
  transform: translateY(-1px);
  border-color: #cbd7e5;
  border-left-color: var(--event-accent);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.audit-event-v97.is-success { --event-accent: #059669; --event-soft: #dcfce7; }
.audit-event-v97.is-danger { --event-accent: #dc2626; --event-soft: #fee2e2; }
.audit-event-v97.is-create { --event-accent: #2563eb; --event-soft: #dbeafe; }
.audit-event-v97.is-update { --event-accent: #d97706; --event-soft: #fef3c7; }
.audit-event-v97.is-export { --event-accent: #7c3aed; --event-soft: #ede9fe; }
.audit-event-v97.is-muted { --event-accent: #64748b; --event-soft: #f1f5f9; }

.audit-event-marker-v97 {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 66px;
  padding: 9px 7px;
  border-radius: 13px;
  background: var(--event-soft);
  color: var(--event-accent);
  text-align: center;
}

.audit-event-marker-v97 span {
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.audit-event-marker-v97 small {
  color: #64748b;
  font-size: .69rem;
  font-weight: 800;
}

.audit-event-time-v97 time {
  display: grid;
  gap: 4px;
}

.audit-event-time-v97 strong {
  color: #0f172a;
  font-size: .91rem;
}

.audit-event-time-v97 span {
  color: #64748b;
  font-size: .77rem;
  font-weight: 720;
}

.audit-event-content-v97 {
  min-width: 0;
}

.audit-event-labels-v97 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.audit-action-badge-v97,
.audit-module-badge-v97 {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 27px;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-action-badge-v97 {
  background: var(--event-soft);
  color: var(--event-accent);
}

.audit-module-badge-v97 {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.audit-event-content-v97 h3 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: .95rem;
  line-height: 1.45;
}

.audit-user-line-v97 {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.audit-user-avatar-v97 {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #edf3f9;
  color: #334155;
  font-size: .72rem;
  font-weight: 900;
}

.audit-user-line-v97 > span:last-child {
  display: grid;
  min-width: 0;
}

.audit-user-line-v97 strong,
.audit-user-line-v97 small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-user-line-v97 strong {
  color: #334155;
  font-size: .79rem;
}

.audit-user-line-v97 small {
  margin-top: 2px;
  color: #64748b;
  font-size: .72rem;
}

.audit-event-meta-v97 {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.audit-event-meta-v97 > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.audit-event-meta-v97 span {
  color: #94a3b8;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.audit-event-meta-v97 strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #475569;
  font-size: .74rem;
  line-height: 1.35;
}

.audit-details-v97 {
  grid-column: 1 / -1;
  border-top: 1px solid #edf1f6;
}

.audit-details-v97 > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 2px 0;
  cursor: pointer;
  list-style: none;
}

.audit-details-v97 > summary::-webkit-details-marker { display: none; }

.audit-details-v97 > summary span {
  color: #2563eb;
  font-size: .78rem;
  font-weight: 850;
}

.audit-details-v97 > summary small {
  color: #94a3b8;
  font-size: .7rem;
  font-weight: 720;
}

.audit-details-v97[open] > summary span {
  color: #1d4ed8;
}

.audit-details-panel-v97 {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: #f8fbfe;
}

.audit-context-grid-v97 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.audit-context-grid-v97 > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
}

.audit-context-grid-v97 > div:last-child {
  grid-column: 1 / -1;
}

.audit-context-grid-v97 span {
  color: #94a3b8;
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.audit-context-grid-v97 strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: .75rem;
  line-height: 1.45;
}

.audit-change-table-v97 {
  overflow: hidden;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #fff;
}

.audit-change-head-v97,
.audit-change-row-v97 {
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr);
}

.audit-change-head-v97 {
  background: #eef4f9;
}

.audit-change-head-v97 span {
  padding: 10px 12px;
  color: #64748b;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.audit-change-row-v97 {
  border-top: 1px solid #e8eef5;
}

.audit-change-row-v97 > strong,
.audit-change-row-v97 > code {
  min-width: 0;
  padding: 11px 12px;
  overflow-wrap: anywhere;
  border-right: 1px solid #edf1f5;
  font-size: .76rem;
  line-height: 1.5;
}

.audit-change-row-v97 > strong {
  color: #334155;
}

.audit-change-row-v97 > code {
  background: #fff;
  color: #475569;
  font-family: inherit;
  white-space: pre-wrap;
}

.audit-change-row-v97 > code:last-child {
  border-right: 0;
  background: #f7fcf9;
  color: #166534;
}

.audit-value-grid-v97 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-value-grid-v97 article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
}

.audit-value-grid-v97 span {
  color: #64748b;
  font-size: .7rem;
  font-weight: 850;
}

.audit-value-grid-v97 code {
  overflow-wrap: anywhere;
  color: #334155;
  font-family: inherit;
  font-size: .77rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.audit-empty-v97 {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 56px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 17px;
  background: #fbfdff;
  text-align: center;
}

.audit-empty-v97 strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.audit-empty-v97 p {
  max-width: 520px;
  margin: 0 0 8px;
  color: #64748b;
  line-height: 1.55;
}

.audit-pagination-wrap-v97 {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 1240px) {
  .audit-filter-grid-v97 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .audit-filter-search-v97 { grid-column: span 2; }
  .audit-filter-actions-v97 { grid-column: span 1; }
  .audit-event-v97 {
    grid-template-columns: 76px 116px minmax(260px, 1.5fr) minmax(190px, .8fr);
    gap: 13px;
  }
}

@media (max-width: 980px) {
  .audit-summary-grid-v97 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .audit-filter-grid-v97 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .audit-filter-search-v97,
  .audit-filter-actions-v97 { grid-column: 1 / -1; }
  .audit-event-v97 {
    grid-template-columns: 72px 118px minmax(0, 1fr);
  }
  .audit-event-meta-v97 {
    grid-column: 2 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 2px;
  }
  .audit-event-meta-v97 > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 720px) {
  .audit-hero-v97 {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }
  .audit-hero-actions-v97 {
    justify-content: stretch;
  }
  .audit-hero-actions-v97 .button {
    flex: 1;
  }
  .audit-list-heading-v97 {
    align-items: flex-start;
    flex-direction: column;
  }
  .audit-list-status-v97 {
    justify-content: flex-start;
  }
  .audit-event-v97 {
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
  }
  .audit-event-marker-v97 {
    grid-row: span 2;
  }
  .audit-event-time-v97 {
    align-self: center;
  }
  .audit-event-content-v97,
  .audit-event-meta-v97 {
    grid-column: 1 / -1;
  }
  .audit-event-content-v97 {
    padding-top: 3px;
  }
  .audit-context-grid-v97,
  .audit-value-grid-v97 {
    grid-template-columns: 1fr;
  }
  .audit-context-grid-v97 > div:last-child {
    grid-column: auto;
  }
  .audit-change-head-v97 {
    display: none;
  }
  .audit-change-row-v97 {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .audit-change-row-v97 > strong,
  .audit-change-row-v97 > code {
    padding: 8px 9px;
    border: 0;
    border-radius: 8px;
  }
  .audit-change-row-v97 > strong {
    padding-bottom: 2px;
  }
  .audit-change-row-v97 > code {
    background: #f8fafc;
  }
  .audit-change-row-v97 > code::before {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
    content: 'Sebelum';
  }
  .audit-change-row-v97 > code:last-child::before {
    content: 'Selepas';
  }
}

@media (max-width: 560px) {
  .audit-summary-grid-v97,
  .audit-filter-grid-v97 {
    grid-template-columns: 1fr;
  }
  .audit-filter-search-v97,
  .audit-filter-actions-v97 {
    grid-column: auto;
  }
  .audit-filter-actions-v97 {
    align-items: stretch;
    flex-direction: column;
  }
  .audit-filter-actions-v97 > * {
    width: 100%;
  }
  .audit-summary-card-v97 {
    min-height: 132px;
  }
  .audit-event-v97 {
    padding: 13px;
    border-radius: 15px;
  }
  .audit-event-meta-v97 {
    grid-template-columns: 1fr;
  }
  .audit-details-panel-v97 {
    padding: 12px;
  }
  .audit-details-v97 > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .audit-active-filters-v97 a {
    max-width: 100%;
  }
}

/* v98: UI/UX baharu halaman Tetapan MyDigitalID. */
.mydigitalid-page-v98 {
  max-width: 1440px;
  margin: 0 auto;
}

.mydigitalid-ui-icon-v98 {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.mydigitalid-hero-v98 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(14, 116, 144, .22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 0%, rgba(56, 189, 248, .24), transparent 34%),
    linear-gradient(135deg, #f8fdff 0%, #edf8ff 48%, #eef4ff 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.mydigitalid-hero-v98::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(14, 165, 233, .045), 0 0 0 68px rgba(14, 165, 233, .025);
  pointer-events: none;
}

.mydigitalid-hero-main-v98 {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.mydigitalid-brand-mark-v98 {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(14, 116, 144, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 32px rgba(14, 116, 144, .14);
}

.mydigitalid-brand-mark-v98 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.mydigitalid-kicker-v98 {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(14, 116, 144, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: #0e7490;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.mydigitalid-hero-main-v98 h2 {
  margin: 10px 0 8px;
  color: #102a43;
  font-size: clamp(1.55rem, 2.3vw, 2.25rem);
  line-height: 1.12;
}

.mydigitalid-hero-main-v98 p {
  max-width: 760px;
  margin: 0;
  color: #526b82;
  font-size: .98rem;
  line-height: 1.65;
}

.mydigitalid-status-row-v98 {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.mydigitalid-status-pill-v98 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.mydigitalid-status-pill-v98 .mydigitalid-ui-icon-v98 {
  width: 16px;
  height: 16px;
}

.mydigitalid-status-pill-v98.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.mydigitalid-status-pill-v98.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.mydigitalid-status-pill-v98.is-neutral {
  border-color: #dbeafe;
  background: rgba(255, 255, 255, .84);
  color: #1d4ed8;
}

.mydigitalid-hero-summary-v98 {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  padding: 8px 20px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.mydigitalid-hero-summary-v98 > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  border-bottom: 1px solid #e7edf4;
}

.mydigitalid-hero-summary-v98 > div:last-child {
  border-bottom: 0;
}

.mydigitalid-hero-summary-v98 span {
  color: #60758a;
  font-size: .82rem;
  font-weight: 700;
}

.mydigitalid-hero-summary-v98 strong {
  position: relative;
  padding-left: 15px;
  color: #334155;
  font-size: .82rem;
}

.mydigitalid-hero-summary-v98 strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.mydigitalid-hero-summary-v98 strong.is-on {
  color: #166534;
}

.mydigitalid-hero-summary-v98 strong.is-on::before {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .13);
}

.mydigitalid-hero-summary-v98 strong.is-off {
  color: #9a3412;
}

.mydigitalid-hero-summary-v98 strong.is-off::before {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .13);
}

.mydigitalid-error-summary-v98 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  padding: 17px 18px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #fff7f7;
  color: #7f1d1d;
}

.mydigitalid-error-icon-v98 {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fee2e2;
}

.mydigitalid-error-summary-v98 strong {
  display: block;
  margin-bottom: 6px;
}

.mydigitalid-error-summary-v98 ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.mydigitalid-settings-layout-v98 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.mydigitalid-settings-main-v98,
.mydigitalid-settings-side-v98 {
  min-width: 0;
}

.mydigitalid-settings-main-v98 {
  display: grid;
  gap: 18px;
}

.mydigitalid-panel-v98,
.mydigitalid-side-card-v98 {
  border: 1px solid #dce5ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
}

.mydigitalid-panel-v98 {
  padding: 24px;
}

.mydigitalid-panel-header-v98 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.mydigitalid-panel-header-v98 h3,
.mydigitalid-side-card-v98 h3 {
  margin: 0;
  color: #16324a;
}

.mydigitalid-panel-header-v98 h3 {
  font-size: 1.08rem;
}

.mydigitalid-panel-header-v98 p {
  margin: 5px 0 0;
  color: #687b8e;
  font-size: .86rem;
  line-height: 1.55;
}

.mydigitalid-step-v98 {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #f0f9ff;
  color: #0369a1;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.mydigitalid-panel-header-actions-v98 {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mydigitalid-panel-header-copy-v98 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mydigitalid-default-button-v98,
.mydigitalid-copy-button-v98,
.mydigitalid-save-actions-v98 .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mydigitalid-default-button-v98 .mydigitalid-ui-icon-v98,
.mydigitalid-copy-button-v98 .mydigitalid-ui-icon-v98,
.mydigitalid-save-actions-v98 .mydigitalid-ui-icon-v98 {
  width: 17px;
  height: 17px;
}

.mydigitalid-auth-grid-v98 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mydigitalid-auth-card-v98 {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  min-height: 150px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dce5ef;
  border-radius: 17px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mydigitalid-auth-card-v98:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.mydigitalid-auth-card-v98.is-selected {
  border-color: #38bdf8;
  background: linear-gradient(145deg, #f8fdff, #eef9ff);
  box-shadow: 0 12px 30px rgba(14, 165, 233, .12);
}

.mydigitalid-auth-card-v98 > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mydigitalid-auth-card-v98:focus-within {
  outline: 3px solid rgba(14, 165, 233, .2);
  outline-offset: 2px;
}

.mydigitalid-auth-icon-v98 {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.mydigitalid-auth-icon-v98.is-mydigitalid {
  background: #e0f2fe;
  color: #0369a1;
}

.mydigitalid-auth-icon-v98.is-password {
  background: #ede9fe;
  color: #6d28d9;
}

.mydigitalid-auth-title-v98,
.mydigitalid-auth-description-v98,
.mydigitalid-auth-state-v98 {
  display: block;
}

.mydigitalid-auth-title-v98 {
  color: #172f46;
  font-size: .95rem;
  font-weight: 900;
}

.mydigitalid-auth-description-v98 {
  margin-top: 6px;
  color: #61758a;
  font-size: .81rem;
  line-height: 1.5;
}

.mydigitalid-auth-state-v98 {
  margin-top: 13px;
  color: #64748b;
  font-size: .73rem;
  font-weight: 800;
}

.mydigitalid-auth-card-v98.is-selected .mydigitalid-auth-state-v98 {
  color: #0369a1;
}

.mydigitalid-switch-v98 {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.mydigitalid-switch-v98 span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  margin: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.mydigitalid-auth-card-v98 input:checked ~ .mydigitalid-switch-v98 {
  background: #0ea5e9;
}

.mydigitalid-auth-card-v98 input:checked ~ .mydigitalid-switch-v98 span {
  transform: translateX(19px);
}

.mydigitalid-inline-warning-v98 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: .82rem;
  font-weight: 700;
}

.mydigitalid-inline-warning-v98[hidden] {
  display: none;
}

.mydigitalid-inline-warning-v98 .mydigitalid-ui-icon-v98 {
  width: 17px;
  height: 17px;
}

.mydigitalid-redirect-box-v98 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
}

.mydigitalid-redirect-icon-v98 {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #dbeafe;
  color: #1d4ed8;
}

.mydigitalid-redirect-content-v98 {
  min-width: 0;
}

.mydigitalid-redirect-content-v98 > span,
.mydigitalid-redirect-content-v98 > code,
.mydigitalid-redirect-content-v98 > small {
  display: block;
}

.mydigitalid-redirect-content-v98 > span {
  color: #1e3a5f;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.mydigitalid-redirect-content-v98 > code {
  margin-top: 5px;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .85rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mydigitalid-redirect-content-v98 > small {
  margin-top: 5px;
  color: #657a91;
  font-size: .72rem;
}

.mydigitalid-field-grid-v98 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.mydigitalid-field-stack-v98 {
  display: grid;
  gap: 15px;
}

.mydigitalid-field-v98 {
  display: block;
  min-width: 0;
}

.mydigitalid-field-v98 > span {
  display: block;
  margin-bottom: 7px;
  color: #263e55;
  font-size: .79rem;
  font-weight: 900;
}

.mydigitalid-field-v98 input {
  min-height: 49px;
  border-color: #d5e0eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.mydigitalid-field-v98 input:hover {
  border-color: #b6c7d8;
}

.mydigitalid-field-v98 input:focus {
  border-color: #38bdf8;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .13);
}

.mydigitalid-field-v98 > small {
  display: block;
  margin-top: 6px;
  color: #718398;
  font-size: .72rem;
  line-height: 1.45;
}

.mydigitalid-field-v98 > small code {
  color: #475569;
  font-weight: 700;
}

.mydigitalid-input-with-icon-v98 {
  position: relative;
}

.mydigitalid-input-with-icon-v98 > .mydigitalid-ui-icon-v98 {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: #64748b;
  transform: translateY(-50%);
  pointer-events: none;
}

.mydigitalid-input-with-icon-v98 input {
  padding-left: 42px;
}

.mydigitalid-secret-control-v98 {
  position: relative;
}

.mydigitalid-secret-control-v98 .mydigitalid-input-with-icon-v98 input {
  padding-right: 48px;
}

.mydigitalid-secret-toggle-v98 {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transform: translateY(-50%);
}

.mydigitalid-secret-toggle-v98:hover,
.mydigitalid-secret-toggle-v98:focus-visible {
  background: #eef4f8;
  color: #075985;
  outline: none;
}

.mydigitalid-savebar-v98 {
  position: sticky;
  bottom: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 44px rgba(15, 23, 42, .15);
  backdrop-filter: blur(14px);
}

.mydigitalid-save-state-v98 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: .79rem;
  font-weight: 700;
}

.mydigitalid-save-dot-v98 {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.mydigitalid-savebar-v98.is-dirty .mydigitalid-save-state-v98 {
  color: #9a3412;
}

.mydigitalid-savebar-v98.is-dirty .mydigitalid-save-dot-v98 {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .13);
}

.mydigitalid-save-actions-v98 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.mydigitalid-save-actions-v98 .button {
  min-height: 44px;
}

.mydigitalid-settings-side-v98 {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.mydigitalid-side-card-v98 {
  padding: 19px;
}

.mydigitalid-side-card-v98.is-security {
  border-color: #c7e8da;
  background: linear-gradient(145deg, #fbfffd, #f2fbf7);
}

.mydigitalid-side-card-v98.is-technical {
  background: #f8fafc;
}

.mydigitalid-side-card-heading-v98 {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-bottom: 15px;
}

.mydigitalid-side-card-heading-v98 > .mydigitalid-ui-icon-v98 {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0369a1;
}

.mydigitalid-side-card-v98.is-security .mydigitalid-side-card-heading-v98 > .mydigitalid-ui-icon-v98 {
  background: #dcfce7;
  color: #15803d;
}

.mydigitalid-side-card-v98 h3 {
  font-size: .95rem;
}

.mydigitalid-side-card-heading-v98 p {
  margin: 4px 0 0;
  color: #718398;
  font-size: .75rem;
  line-height: 1.45;
}

.mydigitalid-checklist-v98,
.mydigitalid-guidance-v98 {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mydigitalid-checklist-v98 {
  display: grid;
  gap: 11px;
}

.mydigitalid-checklist-v98 li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mydigitalid-checklist-v98 li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 9px;
}

.mydigitalid-checklist-v98 li > span .mydigitalid-ui-icon-v98 {
  width: 15px;
  height: 15px;
}

.mydigitalid-checklist-v98 li.is-complete > span {
  background: #dcfce7;
  color: #15803d;
}

.mydigitalid-checklist-v98 li.is-pending > span {
  background: #ffedd5;
  color: #c2410c;
}

.mydigitalid-checklist-v98 strong,
.mydigitalid-checklist-v98 small {
  display: block;
}

.mydigitalid-checklist-v98 strong {
  color: #334155;
  font-size: .78rem;
}

.mydigitalid-checklist-v98 small {
  margin-top: 2px;
  color: #7a8da1;
  font-size: .69rem;
}

.mydigitalid-guidance-v98 {
  display: grid;
  gap: 10px;
}

.mydigitalid-guidance-v98 li {
  position: relative;
  padding-left: 18px;
  color: #526b62;
  font-size: .76rem;
  line-height: 1.48;
}

.mydigitalid-guidance-v98 li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.mydigitalid-technical-row-v98 {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-bottom: 1px solid #e2e8f0;
}

.mydigitalid-technical-row-v98:first-child {
  padding-top: 0;
}

.mydigitalid-technical-row-v98:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mydigitalid-technical-row-v98 span {
  color: #7a8da1;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mydigitalid-technical-row-v98 code,
.mydigitalid-technical-row-v98 strong {
  color: #334155;
  font-size: .74rem;
  overflow-wrap: anywhere;
}

.mydigitalid-copy-button-v98.is-copied {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

@media (max-width: 1180px) {
  .mydigitalid-hero-v98 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-hero-summary-v98 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .mydigitalid-hero-summary-v98 > div {
    display: grid;
    justify-content: start;
    gap: 5px;
    padding: 4px 14px;
    border-right: 1px solid #e7edf4;
    border-bottom: 0;
  }

  .mydigitalid-hero-summary-v98 > div:last-child {
    border-right: 0;
  }

  .mydigitalid-settings-layout-v98 {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

@media (max-width: 980px) {
  .mydigitalid-settings-layout-v98 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-settings-side-v98 {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mydigitalid-side-card-v98.is-technical {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .mydigitalid-hero-v98,
  .mydigitalid-panel-v98 {
    padding: 19px;
    border-radius: 18px;
  }

  .mydigitalid-hero-main-v98 {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 15px;
  }

  .mydigitalid-brand-mark-v98 {
    width: 64px;
    height: 64px;
    padding: 8px;
    border-radius: 16px;
  }

  .mydigitalid-hero-main-v98 h2 {
    margin-top: 8px;
  }

  .mydigitalid-hero-summary-v98 {
    grid-template-columns: 1fr;
    padding: 5px 16px;
  }

  .mydigitalid-hero-summary-v98 > div {
    display: flex;
    justify-content: space-between;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid #e7edf4;
  }

  .mydigitalid-auth-grid-v98,
  .mydigitalid-field-grid-v98,
  .mydigitalid-settings-side-v98 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-panel-header-actions-v98 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-default-button-v98 {
    width: 100%;
  }

  .mydigitalid-redirect-box-v98 {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mydigitalid-copy-button-v98 {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mydigitalid-side-card-v98.is-technical {
    grid-column: auto;
  }

  .mydigitalid-savebar-v98 {
    position: static;
    display: grid;
  }

  .mydigitalid-save-actions-v98 {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mydigitalid-save-actions-v98 .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .mydigitalid-hero-main-v98 {
    grid-template-columns: 1fr;
  }

  .mydigitalid-brand-mark-v98 {
    width: 68px;
    height: 68px;
  }

  .mydigitalid-auth-card-v98 {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 15px;
  }

  .mydigitalid-auth-icon-v98 {
    width: 44px;
    height: 44px;
  }

  .mydigitalid-save-actions-v98 {
    grid-template-columns: 1fr;
  }
}


/* v99: Guna Flaticon UIcons icon font UI, bukan imej PNG ikon luaran. */
.flaticon-ui-icon-v99,
.fi.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  vertical-align: -0.14em;
}

.flaticon-ui-icon-v99::before,
.fi.flaticon-ui-icon-v99::before {
  display: block;
  line-height: 1;
}

.nav-icon-wrap .flaticon-ui-icon-v99,
.nav-icon.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  color: #ffffff;
  font-size: 18px;
  opacity: .96;
}

.label-icon.flaticon-ui-icon-v99 {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  color: #0f766e;
  font-size: 15px;
  vertical-align: -2px;
}

.group-icon.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  color: #0284c7;
  font-size: 18px;
}

.button .flaticon-ui-icon-v99,
.icon-link .flaticon-ui-icon-v99 {
  color: currentColor;
}

.staff-add-button .flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 19px;
  height: 19px;
  font-size: 19px;
}

.mydigitalid-status-pill-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.mydigitalid-default-button-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-copy-button-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-save-actions-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

.mydigitalid-auth-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.mydigitalid-error-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-redirect-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

/* v101: UI/UX halaman staff.php dan masters.php. */
.staff-hero-v101,
.masters-hero-v101 {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #cfe8f8;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 16%, rgba(14, 165, 233, .18), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f6fbff 52%, #e9f7ff 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.staff-hero-content-v101,
.masters-hero-main-v101 {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.staff-hero-icon-v101,
.masters-hero-icon-v101 {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #075985, #0ea5e9);
  color: #fff;
  box-shadow: 0 16px 34px rgba(14, 165, 233, .25);
}

.staff-hero-icon-v101 .flaticon-ui-icon-v99,
.masters-hero-icon-v101 .flaticon-ui-icon-v99 {
  width: 26px;
  height: 26px;
  font-size: 26px;
}

.staff-hero-v101 h2,
.masters-hero-v101 h2 {
  margin: 4px 0 8px;
  color: #102033;
  font-size: clamp(1.45rem, 2.1vw, 2.25rem);
  line-height: 1.08;
}

.staff-hero-v101 p,
.masters-hero-v101 p {
  max-width: 760px;
  margin: 0;
  color: #52677f;
  line-height: 1.55;
}

.staff-hero-actions-v101 {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 250px;
}

.staff-summary-grid-v101,
.masters-hero-stats-v101 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.staff-summary-card-v101,
.masters-hero-stats-v101 > div {
  position: relative;
  min-height: 116px;
  padding: 18px 18px 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.staff-summary-card-v101::after,
.masters-hero-stats-v101 > div::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(14, 165, 233, .12);
}

.staff-summary-card-v101.is-primary {
  border-color: #bae6fd;
  background: linear-gradient(135deg, #f0f9ff, #ffffff);
}

.staff-summary-card-v101 small,
.masters-hero-stats-v101 small {
  display: block;
  color: #52677f;
  font-weight: 850;
}

.staff-summary-card-v101 strong,
.masters-hero-stats-v101 strong {
  display: block;
  margin: 10px 0 8px;
  color: #0f2537;
  font-size: 2rem;
  line-height: 1;
}

.staff-summary-card-v101 span {
  display: block;
  max-width: 94%;
  color: #6b7f96;
  font-size: .88rem;
  line-height: 1.35;
}

.staff-filter-panel-v101 {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #d8e4ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.staff-filter-heading-v101 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.staff-filter-heading-v101 h3,
.staff-results-top-v101 h3,
.masters-guide-v101 h3 {
  margin: 2px 0 0;
  color: #102033;
  font-size: 1.1rem;
}

.staff-filters-v101 {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.35fr) repeat(5, minmax(155px, 1fr)) !important;
  align-items: end !important;
  gap: 12px !important;
}

.staff-filters-v101 label {
  min-width: 0;
}

.staff-results-shell-v101 {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.staff-results-top-v101 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dbe7f0;
  border-radius: 18px;
  background: #fff;
}

.staff-page-pill-v101 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
  color: #075985;
  font-weight: 850;
  white-space: nowrap;
}

.staff-group-v101 {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
}

.staff-group-heading-v101 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eef8;
}

.staff-group-icon-v101 {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #e0f2fe;
  color: #075985;
}

.staff-group-heading-v101 strong {
  display: block;
  color: #102033;
  font-size: 1.04rem;
}

.staff-group-heading-v101 small,
.staff-unit-heading-v101 small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-weight: 650;
}

.staff-unit-block-v101 {
  display: grid;
  gap: 12px;
}

.staff-unit-heading-v101 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #334155;
}

.staff-unit-heading-v101 > span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 0 5px rgba(14, 165, 233, .12);
}

.staff-unit-heading-v101 strong {
  color: #1e293b;
}

.staff-card-grid-v101 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.staff-card-v101 {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #dce8f4;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, .08), transparent 34%),
    #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .055);
}

.staff-card-head-v101 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.staff-card-head-v101 .avatar.large {
  width: 74px;
  height: 74px;
  border: 3px solid #fff;
  border-radius: 18px !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}

.staff-card-body-v101 h4 {
  margin: 0 0 7px;
  color: #0f2537;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: .015em;
}

.staff-card-body-v101 p {
  margin: 0;
  color: #334155;
  font-weight: 760;
  line-height: 1.35;
}

.staff-card-meta-v101 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.staff-card-meta-v101 span,
.masters-card-badge-v101 {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: #475569;
  font-size: .78rem;
  font-weight: 850;
}

.staff-card-contact-v101 {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: .86rem;
}

.staff-card-contact-v101 a,
.staff-card-contact-v101 span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.staff-card-actions-v101 {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}

.staff-card-actions-v101 .button {
  min-height: 40px;
  padding: 9px 12px;
}

.staff-empty-v101 {
  display: grid;
  gap: 6px;
  text-align: center;
}

.staff-empty-v101 strong {
  color: #102033;
  font-size: 1.05rem;
}

.masters-hero-v101 {
  align-items: center;
}

.masters-hero-stats-v101 {
  min-width: min(100%, 500px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.masters-hero-stats-v101 > div {
  min-height: 98px;
}

.masters-hero-stats-v101 strong {
  font-size: 1.35rem;
}

.masters-guide-v101 {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}

.masters-guide-v101 p {
  margin: 0;
  color: #52677f;
  line-height: 1.55;
}

.masters-grid-v101 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.masters-card-v101 {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 250px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.masters-card-v101.is-blue {
  border-color: #bae6fd;
  background: linear-gradient(145deg, #ffffff, #effaff);
}

.masters-card-v101.is-green {
  border-color: #bbf7d0;
  background: linear-gradient(145deg, #ffffff, #f0fdf4);
}

.masters-card-v101.is-warning {
  border-color: #fed7aa;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
}

.masters-card-top-v101,
.masters-card-footer-v101 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.masters-card-number-v101 {
  color: #94a3b8;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .12em;
}

.masters-card-icon-v101 {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #e0f2fe;
  color: #075985;
}

.masters-card-v101.is-green .masters-card-icon-v101 {
  background: #dcfce7;
  color: #166534;
}

.masters-card-v101.is-warning .masters-card-icon-v101 {
  background: #ffedd5;
  color: #9a3412;
}

.masters-card-body-v101 h3 {
  margin: 0 0 9px;
  color: #102033;
  font-size: 1.18rem;
}

.masters-card-body-v101 p {
  margin: 0;
  color: #52677f;
  line-height: 1.55;
}

.masters-card-badge-v101.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

@media (max-width: 1280px) {
  .staff-filters-v101 {
    grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  }

  .staff-filter-search-v101 {
    grid-column: 1 / -1;
  }

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

  .masters-hero-v101 {
    display: grid;
  }

  .masters-hero-stats-v101 {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .staff-hero-v101,
  .masters-hero-v101,
  .staff-filter-heading-v101,
  .staff-results-top-v101,
  .masters-guide-v101 {
    display: grid;
  }

  .staff-hero-actions-v101 {
    justify-content: stretch;
    min-width: 0;
  }

  .staff-hero-actions-v101 .button,
  .staff-card-actions-v101 .button,
  .masters-card-footer-v101 .button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .masters-guide-v101 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .staff-hero-v101,
  .masters-hero-v101,
  .staff-filter-panel-v101,
  .staff-group-v101,
  .masters-guide-v101,
  .masters-card-v101 {
    padding: 16px;
    border-radius: 18px;
  }

  .staff-hero-content-v101,
  .masters-hero-main-v101 {
    display: grid;
  }

  .staff-summary-grid-v101,
  .masters-hero-stats-v101,
  .staff-filters-v101 {
    grid-template-columns: 1fr !important;
  }

  .staff-card-grid-v101,
  .masters-grid-v101 {
    grid-template-columns: 1fr;
  }

  .staff-card-actions-v101,
  .masters-card-footer-v101 {
    display: grid;
  }

  .staff-page-pill-v101 {
    justify-self: start;
  }
}

/* v102: staff.php kembali kepada paparan senarai / jadual, bukan kad. */
.staff-results-shell-v102 {
  gap: 14px;
}

.staff-list-wrap-v102 {
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

.staff-list-table-v102 {
  min-width: 1120px;
}

.staff-list-table-v102 th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
  border-bottom: 1px solid #dbeafe;
  color: #334155;
  letter-spacing: .03em;
  white-space: nowrap;
}

.staff-list-table-v102 td {
  vertical-align: middle;
}

.staff-list-row-v102:hover td {
  background: #f8fbff;
}

.staff-list-number-v102 {
  color: #64748b;
  font-weight: 850;
  text-align: center !important;
  white-space: nowrap;
}

.staff-table-group-row-v102 td {
  background: #eef7ff !important;
}

.staff-table-unit-row-v102 td {
  background: #f8fafc !important;
}

.staff-table-group-heading-v102 {
  padding: 12px 16px;
}

.staff-table-unit-heading-v102 {
  padding: 10px 16px 10px 56px;
}

.staff-group-icon-v102 {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #dff3ff;
  color: #075985;
}

.staff-group-icon-v102 .flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.staff-list-person-v102 {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.staff-list-person-v102 .avatar.large {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px !important;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.staff-list-person-text-v102,
.staff-list-main-text-v102,
.staff-list-contact-v102 {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.staff-list-person-text-v102 strong {
  color: #0f2537;
  font-size: .95rem;
  line-height: 1.25;
  letter-spacing: .012em;
}

.staff-list-person-text-v102 a,
.staff-list-contact-v102 a,
.staff-list-contact-v102 span,
.staff-list-main-text-v102 small,
.muted-text-v102 {
  color: #64748b;
  font-size: .84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.staff-list-main-text-v102 strong {
  color: #1e293b;
  font-size: .92rem;
  line-height: 1.32;
}

.staff-list-contact-v102 a,
.staff-list-contact-v102 span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.staff-list-contact-v102 .flaticon-ui-icon-v99 {
  width: 15px;
  height: 15px;
  font-size: 15px;
  color: #075985;
}

.staff-list-actions-v102 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-list-actions-v102 .button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: .86rem;
}

@media (max-width: 860px) {
  .staff-list-wrap-v102 {
    border-radius: 16px;
  }

  .staff-list-table-v102 {
    min-width: 980px;
  }

  .staff-table-unit-heading-v102 {
    padding-left: 34px;
  }
}

/* v103 - Tetapan emel dan logo JMG sebenar tanpa kotak */
.brand-logo-real-v103 {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible;
}

.brand-logo-real-v103 img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.email-settings-page-v103 {
  display: grid;
  gap: 22px;
}

.email-settings-hero-v103 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, .20), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .92));
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.email-settings-kicker-v103 {
  display: inline-flex;
  margin-bottom: 8px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.email-settings-hero-v103 h2 {
  margin: 0;
  color: #0f2537;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  line-height: 1.08;
}

.email-settings-hero-v103 p {
  max-width: 780px;
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.65;
}

.email-settings-status-row-v103 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.email-settings-pill-v103 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbe7ef;
  background: #fff;
  color: #334155;
  font-weight: 800;
  font-size: .86rem;
}

.email-settings-pill-v103.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.email-settings-pill-v103.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.email-settings-pill-v103.is-muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.email-settings-pill-v103.is-neutral {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.email-settings-hero-card-v103 {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, .55);
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.email-settings-hero-card-v103 span,
.email-settings-hero-card-v103 small {
  color: #64748b;
}

.email-settings-hero-card-v103 strong {
  color: #0f2537;
  font-size: 1.15rem;
  line-height: 1.25;
}

.email-settings-layout-v103 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.email-settings-main-v103,
.email-settings-side-v103,
.email-settings-tools-v103 {
  display: grid;
  gap: 18px;
}

.email-settings-tools-v103 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.email-settings-tools-v103 .manual {
  grid-column: 1 / -1;
}

.email-settings-panel-v103 {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
}

.email-settings-panel-v103.compact {
  padding: 18px;
}

.email-settings-panel-v103 h3 {
  margin: 0;
  color: #0f2537;
  font-size: 1.08rem;
}

.email-settings-panel-v103 p.hint,
.email-settings-panel-v103 .hint {
  color: #64748b;
  font-size: .88rem;
  line-height: 1.55;
}

.email-settings-panel-head-v103 {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.email-settings-panel-head-v103 > span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border-radius: 14px;
  background: #e0f2fe;
  color: #075985;
  font-size: 20px;
}

.email-settings-panel-head-v103 p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.email-settings-switch-v103 {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #dbe7ef;
  background: #f8fafc;
  cursor: pointer;
}

.email-settings-switch-v103.slim {
  margin-bottom: 10px;
}

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

.email-settings-switch-v103 span {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .18s ease;
}

.email-settings-switch-v103 span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.22);
  transition: .18s ease;
}

.email-settings-switch-v103 input:checked + span {
  background: #0284c7;
}

.email-settings-switch-v103 input:checked + span::after {
  transform: translateX(20px);
}

.email-settings-switch-v103 strong {
  color: #1e293b;
  line-height: 1.35;
}

.email-cron-box-v103 {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #7dd3fc;
  border-radius: 16px;
  background: #f0f9ff;
}

.email-cron-box-v103 p {
  margin: 4px 0 0;
  color: #64748b;
  line-height: 1.5;
}

.email-cron-box-v103 code {
  display: block;
  overflow-x: auto;
  padding: 12px;
  border-radius: 12px;
  background: #0f2537;
  color: #e0f2fe;
  font-size: .82rem;
  line-height: 1.45;
}

.email-settings-summary-v103 {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.email-settings-summary-v103 div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.email-settings-summary-v103 div:last-child {
  border-bottom: 0;
}

.email-settings-summary-v103 dt {
  color: #64748b;
  font-weight: 700;
}

.email-settings-summary-v103 dd {
  margin: 0;
  color: #0f2537;
  font-weight: 900;
  text-align: right;
}

.email-settings-actions-v103 {
  position: sticky;
  bottom: 18px;
}

.email-settings-actions-v103 .button,
.email-settings-tools-v103 .button {
  width: 100%;
  justify-content: center;
}

.inline-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #64748b;
}

@media (max-width: 1080px) {
  .email-settings-hero-v103,
  .email-settings-layout-v103 {
    grid-template-columns: 1fr;
  }

  .email-settings-side-v103 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .email-settings-actions-v103 {
    position: static;
  }
}

@media (max-width: 760px) {
  .email-settings-hero-v103,
  .email-settings-panel-v103 {
    padding: 18px;
    border-radius: 18px;
  }

  .email-settings-tools-v103,
  .email-settings-side-v103 {
    grid-template-columns: 1fr;
  }

  .email-settings-status-row-v103 {
    display: grid;
  }
}

/* v102: staff.php kembali kepada paparan senarai / jadual, bukan kad. */
.staff-results-shell-v102 {
  gap: 14px;
}

.staff-list-wrap-v102 {
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

.staff-list-table-v102 {
  min-width: 1120px;
}

.staff-list-table-v102 th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f8fafc, #eef6ff);
  border-bottom: 1px solid #dbeafe;
  color: #334155;
  letter-spacing: .03em;
  white-space: nowrap;
}

.staff-list-table-v102 td {
  vertical-align: middle;
}

.staff-list-row-v102:hover td {
  background: #f8fbff;
}

.staff-list-number-v102 {
  color: #64748b;
  font-weight: 850;
  text-align: center !important;
  white-space: nowrap;
}

.staff-table-group-row-v102 td {
  background: #eef7ff !important;
}

.staff-table-unit-row-v102 td {
  background: #f8fafc !important;
}

.staff-table-group-heading-v102 {
  padding: 12px 16px;
}

.staff-table-unit-heading-v102 {
  padding: 10px 16px 10px 56px;
}

.staff-group-icon-v102 {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #dff3ff;
  color: #075985;
}

.staff-group-icon-v102 .flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.staff-list-person-v102 {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
}

.staff-list-person-v102 .avatar.large {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px !important;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.staff-list-person-text-v102,
.staff-list-main-text-v102,
.staff-list-contact-v102 {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.staff-list-person-text-v102 strong {
  color: #0f2537;
  font-size: .95rem;
  line-height: 1.25;
  letter-spacing: .012em;
}

.staff-list-person-text-v102 a,
.staff-list-contact-v102 a,
.staff-list-contact-v102 span,
.staff-list-main-text-v102 small,
.muted-text-v102 {
  color: #64748b;
  font-size: .84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.staff-list-main-text-v102 strong {
  color: #1e293b;
  font-size: .92rem;
  line-height: 1.32;
}

.staff-list-contact-v102 a,
.staff-list-contact-v102 span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.staff-list-contact-v102 .flaticon-ui-icon-v99 {
  width: 15px;
  height: 15px;
  font-size: 15px;
  color: #075985;
}

.staff-list-actions-v102 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-list-actions-v102 .button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: .86rem;
}

@media (max-width: 860px) {
  .staff-list-wrap-v102 {
    border-radius: 16px;
  }

  .staff-list-table-v102 {
    min-width: 980px;
  }

  .staff-table-unit-heading-v102 {
    padding-left: 34px;
  }
}

/* v99: Guna Flaticon UIcons icon font UI, bukan imej PNG ikon luaran. */
.flaticon-ui-icon-v99,
.fi.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  vertical-align: -0.14em;
}

.flaticon-ui-icon-v99::before,
.fi.flaticon-ui-icon-v99::before {
  display: block;
  line-height: 1;
}

.nav-icon-wrap .flaticon-ui-icon-v99,
.nav-icon.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  color: #ffffff;
  font-size: 18px;
  opacity: .96;
}

.label-icon.flaticon-ui-icon-v99 {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  color: #0f766e;
  font-size: 15px;
  vertical-align: -2px;
}

.group-icon.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  color: #0284c7;
  font-size: 18px;
}

.button .flaticon-ui-icon-v99,
.icon-link .flaticon-ui-icon-v99 {
  color: currentColor;
}

.staff-add-button .flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 19px;
  height: 19px;
  font-size: 19px;
}

.mydigitalid-status-pill-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.mydigitalid-default-button-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-copy-button-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-save-actions-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

.mydigitalid-auth-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.mydigitalid-error-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99,
.mydigitalid-redirect-icon-v98 .mydigitalid-ui-icon-v98.flaticon-ui-icon-v99 {
  width: 18px;
  height: 18px;
  font-size: 18px;
}


/* FIX v112: stabilkan semula ikon, susunan UI/UX dan modal kad digital selepas gabungan patch. */
.fi.flaticon-ui-icon-v99 {
  filter: none !important;
  opacity: 1 !important;
  object-fit: initial !important;
}

.button .fi.flaticon-ui-icon-v99,
.icon-link .fi.flaticon-ui-icon-v99 {
  margin-right: 7px;
}

.nav-list a .nav-icon-wrap {
  flex: 0 0 30px;
}

.card-modal.staff-card-modal-v112,
body > .card-modal.staff-card-modal-v112 {
  position: fixed !important;
  inset: 0 !important;
  z-index: 11000 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
}

.card-modal.staff-card-modal-v112[hidden],
body > .card-modal.staff-card-modal-v112[hidden] {
  display: none !important;
}

.staff-card-modal-v112 .card-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, .58) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.staff-card-modal-panel-v112 {
  position: relative !important;
  z-index: 2 !important;
  width: min(96vw, 620px) !important;
  height: min(94vh, 920px) !important;
  max-height: 94vh !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: #e9eff6 !important;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .38) !important;
}

.staff-card-modal-frame-v112 {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  background: #e9eff6 !important;
}

.staff-card-modal-close-v112 {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 8 !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .95) !important;
  color: #102338 !important;
}

.id-card-qr-large-v106 {
  position: relative !important;
  min-height: 240px !important;
  background: #fff !important;
}

.id-card-qr-img-v106 {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.id-card-qr-logo-v106 {
  background: #fff !important;
  border: 4px solid #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18) !important;
}

.qr-image-error-v112 .id-card-qr-logo-v106 {
  display: none !important;
}

@media (max-width: 720px) {
  .card-modal.staff-card-modal-v112,
  body > .card-modal.staff-card-modal-v112 {
    padding: 8px !important;
  }

  .staff-card-modal-panel-v112 {
    width: 100% !important;
    height: 94vh !important;
    border-radius: 18px !important;
  }
}


/* FIX v113: pelarasan akhir untuk halaman admin dan QR. */
.main {
  background:
    radial-gradient(circle at 92% 2%, rgba(14, 165, 233, .08), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

.fi.flaticon-ui-icon-v99 {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-style: normal;
  vertical-align: -0.16em;
}

.button .fi.flaticon-ui-icon-v99,
.icon-link .fi.flaticon-ui-icon-v99,
.email-settings-pill-v103 .fi.flaticon-ui-icon-v99 {
  margin-right: 7px;
}

.email-settings-panel-head-v103 > span,
.masters-hero-icon-v101,
.staff-hero-icon-v101,
.masters-card-icon-v101 {
  display: inline-grid;
  place-items: center;
}

.email-settings-panel-head-v103 > span .fi,
.masters-hero-icon-v101 .fi,
.staff-hero-icon-v101 .fi,
.masters-card-icon-v101 .fi {
  margin: 0 !important;
}

.staff-card-modal-v113,
body > .staff-card-modal-v113 {
  z-index: 12000 !important;
}

.staff-card-modal-panel-v113 {
  width: min(96vw, 650px) !important;
  height: min(94vh, 940px) !important;
  border-radius: 22px !important;
}

.staff-card-modal-frame-v113 {
  height: 100% !important;
  min-height: 0 !important;
}

.id-card-qr-large-v106 .id-card-qr-logo-v106 {
  opacity: 0;
  transition: opacity .18s ease;
}

.id-card-qr-large-v106.qr-image-loaded-v113 .id-card-qr-logo-v106 {
  opacity: 1;
}

.id-card-qr-large-v106.qr-image-error-v113::after {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  font-weight: 800;
  text-align: center;
  content: 'QR tidak dapat dijana. Sila cuba semula.';
  background: #fff;
  z-index: 3;
}

@media (max-width: 900px) {
  .main {
    padding: 18px;
  }
}


/* FIX v114: fallback paparan audit jika jadual audit belum tersedia. */
.audit-empty-state-v114 {
  padding: 32px;
}
.audit-install-error-v114 {
  margin-top: 16px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}
.audit-install-error-v114 code {
  display: block;
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #991b1b;
}


/* FIX v117: nota penafian hasil carian AI. */
.directory-ai-disclaimer {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: .82rem;
  line-height: 1.45;
  font-weight: 700;
}

.directory-ai-result-disclaimer {
  margin-top: 6px !important;
  color: #92400e !important;
  font-weight: 800;
}

.directory-ai-result-summary.is-empty .directory-ai-result-disclaimer {
  color: #92400e !important;
}


/* FIX v118: tambah pill contoh AI dan jadikan nota hasil carian kelabu. */
.directory-ai-disclaimer,
.directory-ai-result-disclaimer {
  margin: 0;
  color: #64748b !important;
  font-size: .78rem;
  line-height: 1.45;
  font-weight: 600;
}

.directory-ai-disclaimer {
  margin-top: -2px;
}

.directory-ai-result-disclaimer {
  margin-top: 6px !important;
  color: #64748b !important;
  font-weight: 600;
}

.directory-ai-result-summary.is-empty .directory-ai-result-disclaimer,
.directory-ai-result-summary strong + .directory-ai-result-disclaimer,
.directory-ai-result-summary small.directory-ai-result-disclaimer {
  color: #64748b !important;
}


/* FIX v119: nota Carian AI dipendekkan dan dikekalkan neutral kelabu. */
.directory-ai-status {
  color: #64748b !important;
  font-weight: 600;
}
.directory-ai-status:empty {
  display: none;
}


/* FIX v120: jarakkan ayat ringkasan Carian AI supaya lebih selesa dibaca. */
.directory-ai-result-copy-v120 {
  display: grid !important;
  gap: 9px !important;
  min-width: 0;
}

.directory-ai-result-copy-v120 strong {
  line-height: 1.55 !important;
  letter-spacing: -0.01em;
}

.directory-ai-result-copy-v120 small {
  margin-top: 0 !important;
  line-height: 1.6 !important;
}

.directory-ai-result-summary > div {
  align-items: flex-start;
}

.directory-ai-result-summary .directory-ai-badge {
  margin-top: 2px;
}


/* FIX v121: jelaskan butang Direktori, ikon Flaticon UIcons dan kemaskan Carian AI. */
.public-page .directory-uicon-v121 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  line-height: 1;
  font-size: 1rem;
  color: currentColor;
  flex: 0 0 auto;
}

.public-page .button .directory-uicon-v121,
.public-page .directory-view-tabs .directory-uicon-v121 {
  margin-right: 7px;
}

.public-page .button.icon-only .directory-uicon-v121,
.public-page .directory-ai-input-icon.directory-uicon-v121 {
  margin-right: 0;
}

.public-page .button,
.public-page .directory-chart-actions .button,
.public-page .directory-zoom-controls .button,
.public-page .filters .button {
  gap: 8px;
  min-height: 46px;
  height: auto;
  border: 1px solid #0b5cab;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b5cab, #0f766e);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 92, 171, .16);
  text-decoration: none;
  white-space: nowrap;
}

.public-page .button:hover:not(:disabled),
.public-page .button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(11, 92, 171, .2);
  outline: 0;
}

.public-page .button.ghost,
.public-page .directory-chart-actions .button.ghost,
.public-page .directory-zoom-controls .button.ghost,
.public-page .filters .button.ghost,
.public-page .directory-reset-button {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  color: #0b5cab;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.public-page .button.ghost:hover:not(:disabled),
.public-page .button.ghost:focus-visible:not(:disabled),
.public-page .directory-reset-button:hover,
.public-page .directory-reset-button:focus-visible {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #074a89;
}

.public-page .button:disabled,
.public-page .directory-ai-examples button:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.public-page .directory-view-tabs button {
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #334155;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .07);
  font-weight: 850;
}

.public-page .directory-view-tabs button:hover,
.public-page .directory-view-tabs button:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #0b5cab;
  outline: 0;
}

.public-page .directory-view-tabs button.is-active {
  border-color: #0b5cab;
  background: linear-gradient(135deg, #0b5cab, #0f766e);
  color: #fff;
  box-shadow: 0 12px 26px rgba(11, 92, 171, .2);
}

.public-page .directory-ai-search-copy p:last-child {
  max-width: none;
  white-space: nowrap;
  line-height: 1.55;
}

.public-page .directory-ai-submit {
  min-width: 170px;
  font-weight: 900;
}

.public-page .directory-ai-examples {
  gap: 9px;
}

.public-page .directory-ai-examples button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #7dd3fc;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e0f2fe);
  color: #075985;
  box-shadow: 0 6px 14px rgba(3, 105, 161, .08);
  font-weight: 850;
  white-space: nowrap;
}

.public-page .directory-ai-examples button:hover:not(:disabled),
.public-page .directory-ai-examples button:focus-visible:not(:disabled) {
  border-color: #0284c7;
  background: #bae6fd;
  color: #0c4a6e;
  outline: 0;
}

.public-page .directory-ai-status {
  display: block;
  margin-top: 2px;
  color: #64748b !important;
}

.public-page .directory-ai-result-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.public-page .directory-ai-result-summary > div {
  min-width: 0;
}

.public-page .directory-ai-clear-button-v121 {
  justify-self: end;
  flex: 0 0 auto;
  white-space: nowrap;
}

.public-page .directory-ai-input-icon.directory-uicon-v121 {
  font-size: 1.12rem;
  color: #0369a1;
}

.public-page .directory-zoom-controls .button {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 12px;
}

.public-page .directory-chart-actions .button.icon-only,
.public-page .directory-zoom-controls .button.icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

@media (max-width: 1180px) {
  .public-page .directory-ai-search-copy p:last-child {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .public-page .directory-ai-result-summary {
    grid-template-columns: 1fr;
  }

  .public-page .directory-ai-clear-button-v121 {
    justify-self: stretch;
    justify-content: center;
  }

  .public-page .directory-ai-input-wrap {
    grid-template-columns: 1fr;
  }

  .public-page .directory-ai-submit,
  .public-page .filters .button,
  .public-page .directory-reset-button {
    width: 100%;
  }
}


/* v122: logo JMG tanpa kotak putih dan autocomplete carian awam. */
.brand-logo-clean-v122,
.public-brand .brand-logo-clean-v122,
.brand-logo.brand-logo-clean-v122,
.brand-mark.brand-logo.brand-logo-clean-v122 {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  object-fit: contain !important;
}

.sidebar .brand-logo.brand-logo-clean-v122,
.public-header .brand-logo-clean-v122 {
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px;
}

.id-card-qr-logo-v106,
.id-card-qr-large-v106 .id-card-qr-logo-v106 {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.id-card-qr-logo-v106 img {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.directory-ai-helper-line-v122 {
  white-space: nowrap;
}

.directory-search-field-v122 {
  position: relative;
}

.directory-autocomplete-menu-v122 {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
  backdrop-filter: blur(10px);
}

.directory-autocomplete-menu-v122[hidden] {
  display: none !important;
}

.directory-autocomplete-item-v122 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.directory-autocomplete-item-v122:hover,
.directory-autocomplete-item-v122.is-active {
  border-color: rgba(37, 99, 235, .26);
  background: rgba(37, 99, 235, .08);
}

.directory-autocomplete-item-v122 span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.directory-autocomplete-item-v122 strong {
  font-size: .95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-autocomplete-item-v122 small {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-autocomplete-item-v122 em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 5px 8px;
  font-style: normal;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .directory-ai-helper-line-v122 {
    white-space: normal;
  }
}


/* v123: stabilkan logo tanpa kotak dan carian autocomplete tanpa auto-result. */
.brand img.brand-logo,
.brand-logo-clean-v122,
.brand-logo-clean-v123,
.public-brand .brand-logo-clean-v122,
.public-brand .brand-logo-clean-v123,
.sidebar .brand-logo-clean-v122,
.sidebar .brand-logo-clean-v123,
.brand-logo.brand-logo-clean-v122,
.brand-logo.brand-logo-clean-v123,
.brand-mark.brand-logo.brand-logo-clean-v122,
.brand-mark.brand-logo.brand-logo-clean-v123,
.public-header .brand-logo-clean-v122,
.public-header .brand-logo-clean-v123 {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  object-fit: contain !important;
  mix-blend-mode: normal !important;
}

.brand:has(.brand-logo-clean-v123),
.public-brand:has(.brand-logo-clean-v123) {
  background: transparent !important;
  box-shadow: none !important;
}

.directory-search-field-v122 input[list]::-webkit-calendar-picker-indicator,
.directory-search-field-v122 input[list]::-webkit-list-button {
  display: none !important;
  opacity: 0 !important;
}

.directory-search-field-v122 datalist {
  display: none !important;
}

.directory-autocomplete-menu-v123,
.directory-autocomplete-menu-v122 {
  z-index: 9999 !important;
}

.directory-autocomplete-item-v122 {
  font-family: inherit;
}

.public-filters input[data-manual-search-only="1"] {
  caret-color: #0b5f8d;
}

@media (max-width: 980px) {
  .directory-ai-helper-line-v122 {
    white-space: normal !important;
  }
}

/* FIX v124: tab Ketua-Ketua - papar kad ketua sahaja. */
.public-page .directory-view-tabs a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.public-page .directory-view-tabs .directory-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(11, 92, 171, .1);
  color: #0b5cab;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
}

.public-page .directory-view-tabs a.is-active .directory-tab-count {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.directory-chief-panel-v124 {
  display: block;
}

.directory-chief-panel-v124[hidden] {
  display: none !important;
}

.directory-chief-intro-v124 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 20px 22px;
  border: 1px solid rgba(147, 197, 253, .72);
  border-radius: 22px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 55%, #e0f2fe);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.directory-chief-intro-v124 h2 {
  margin: 3px 0 8px;
  color: #0f172a;
  font-size: clamp(1.22rem, 2vw, 1.62rem);
  line-height: 1.25;
}

.directory-chief-intro-v124 p:not(.eyebrow) {
  margin: 0;
  max-width: 760px;
  color: #64748b;
  line-height: 1.65;
}

.directory-chief-total-v124 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #0b5cab;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(11, 92, 171, .2);
  white-space: nowrap;
}

.directory-chief-card-list-v124 {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)) !important;
}

.directory-chief-card-v124 {
  min-height: 100%;
}

.directory-chief-card-v124 .directory-card-name {
  gap: 5px;
}

.directory-chief-role-v124 {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .94);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.directory-chief-card-v124 .directory-card-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-chief-card-v124 .directory-card-details div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .directory-chief-intro-v124 {
    flex-direction: column;
    padding: 18px;
  }

  .directory-chief-card-list-v124 {
    grid-template-columns: 1fr !important;
  }

  .directory-chief-card-v124 .directory-card-details {
    grid-template-columns: 1fr;
  }
}


/* FIX v128: tab Ketua-Ketua ikut tema Senarai Kakitangan dan Carta kekal dalam tab Direktori. */
#directory-chief-panel.directory-chief-panel-v128 {
  display: block;
}

#directory-chief-panel.directory-chief-panel-v128[hidden] {
  display: none !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card-list,
#directory-chief-panel .directory-chief-card-list-v128 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-section-heading,
#directory-chief-panel.directory-chief-panel-v128 .directory-unit-heading,
#directory-chief-panel.directory-chief-panel-v128 .directory-card,
#directory-chief-panel.directory-chief-panel-v128 .pagination,
#directory-chief-panel.directory-chief-panel-v128 .empty-state {
  margin-left: 2px !important;
  margin-right: 2px !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-section-heading,
#directory-chief-panel.directory-chief-panel-v128 .directory-unit-heading {
  border-radius: 18px !important;
  flex: 0 0 auto !important;
  min-height: 58px !important;
  overflow: visible !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-section-heading + .directory-unit-heading,
#directory-chief-panel.directory-chief-panel-v128 .directory-unit-heading + .directory-card {
  margin-top: 14px !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card {
  min-width: 0 !important;
  min-height: 154px !important;
  margin-top: 18px !important;
  padding: 22px 24px 22px 26px !important;
  overflow: visible !important;
  grid-template-columns: minmax(350px, .95fr) minmax(420px, 1.05fr) !important;
  gap: 24px !important;
  align-items: center !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card-main {
  gap: 20px !important;
  align-self: stretch !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card-name {
  align-content: center !important;
  gap: 7px !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card-details {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px 24px !important;
  align-items: start !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-card-details dd {
  line-height: 1.42 !important;
}

#directory-chief-panel.directory-chief-panel-v128 .directory-chief-card-v128 .directory-card-details div:last-child:nth-child(odd) {
  grid-column: auto !important;
}

@media (max-width: 980px) {
  #directory-chief-panel.directory-chief-panel-v128 .directory-card {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  #directory-chief-panel.directory-chief-panel-v128 .directory-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  #directory-chief-panel.directory-chief-panel-v128 .directory-card {
    padding: 18px !important;
  }

  #directory-chief-panel.directory-chief-panel-v128 .directory-card-details {
    grid-template-columns: 1fr !important;
  }
}


/* FIX v131: Tab Ketua-Ketua ikut node organisasi dan guna tema senarai kakitangan. */
.directory-chief-panel-v131 .directory-card-list {
  gap: 18px;
}

.directory-chief-panel-v131 .directory-card {
  margin-bottom: 0;
}

.directory-chief-panel-v131 .directory-section-heading,
.directory-chief-panel-v131 .directory-unit-heading {
  margin-top: 18px;
  margin-bottom: 10px;
}

.directory-chief-panel-v131 .directory-section-heading:first-child {
  margin-top: 0;
}


/* FIX v134 export Excel direktori. */
.directory-export-excel-button-v134 {
  border-color: rgba(21, 128, 61, .28) !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%) !important;
  color: #166534 !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 22px rgba(21, 128, 61, .12) !important;
  white-space: nowrap;
}
.directory-export-excel-button-v134:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 128, 61, .42) !important;
  box-shadow: 0 14px 28px rgba(21, 128, 61, .18) !important;
}
.directory-export-excel-button-v134 .fi,
.directory-export-excel-button-v134 .ui-icon {
  color: #166534 !important;
}
@media (max-width: 760px) {
  .directory-export-excel-button-v134 {
    width: 100%;
    justify-content: center;
  }
}


/* FIX v147: tindakan padam staf dan status jawatan kosong. */
.staff-form-top-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.staff-delete-form-v147 {
  margin: 0;
}

.staff-delete-button-v147 {
  border-color: #fecaca !important;
  background: #fff5f5 !important;
  color: #b91c1c !important;
}

.staff-delete-button-v147:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* v149 - penempatan tambahan staf */
.staff-secondary-units-v149 select[multiple] {
    min-height: 180px;
    padding: 10px;
}
.staff-secondary-units-v149 small {
    display: block;
    margin-top: 6px;
    color: var(--muted, #64748b);
}

/* FIX v167: Kad digital tanpa alamat penuh dan lebih padat supaya muat dalam kotak modal. */
.digital-card-page-v167 {
  min-height: 100vh !important;
  overflow-x: hidden !important;
}

.digital-card-modal-body-v167 {
  overflow: hidden !important;
}

.digital-card-v167 {
  width: min(100%, 560px) !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 12px 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.digital-card-modal-body-v167 .digital-card-v167 {
  padding: 8px !important;
}

.id-card-v167 {
  width: 100% !important;
  max-height: calc(100vh - 24px) !important;
  padding: 14px 22px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.id-card-v167 .id-card-toolbar-v105 {
  margin-bottom: 2px !important;
}

.id-card-v167 .id-card-photo-wrap-v105 {
  margin-top: -2px !important;
}

.id-card-v167 .photo-avatar.xl {
  width: 110px !important;
  height: 138px !important;
}

.id-card-v167 .id-card-body-v105 {
  padding: 10px 8px 4px !important;
}

.id-card-v167 .id-card-body-v105 h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important;
  line-height: 1.15 !important;
}

.id-card-v167 .id-card-role-v105 {
  margin-top: 7px !important;
  font-size: .95rem !important;
  line-height: 1.28 !important;
}

.id-card-v167 .id-card-location-v105 {
  margin-top: 6px !important;
  max-width: 430px !important;
  font-size: .9rem !important;
  line-height: 1.3 !important;
}

.id-card-v167 .id-card-contact-list-v105 {
  gap: 9px !important;
  margin-top: 14px !important;
}

.id-card-v167 .id-card-contact-pill-v105 {
  min-height: 46px !important;
  padding: 9px 16px !important;
  border-radius: 10px !important;
  font-size: .95rem !important;
}

.id-card-v167 .id-card-actions-v105 {
  gap: 10px !important;
  margin-top: 12px !important;
}

.id-card-v167 .id-card-primary-action-v105,
.id-card-v167 .id-card-whatsapp-action-v105 {
  min-height: 46px !important;
  border-radius: 10px !important;
  font-size: .98rem !important;
}

.id-card-v167 .id-card-social-v106 {
  margin-top: 12px !important;
}

.id-card-v167 .id-card-social-v106 p {
  margin-bottom: 8px !important;
  font-size: .9rem !important;
}

.id-card-v167 .id-card-social-icons-v106 {
  gap: 12px !important;
}

.id-card-v167 .id-card-social-icons-v106 a {
  width: 28px !important;
  height: 28px !important;
}

.id-card-v167 .id-card-social-icons-v106 .dc-icon {
  width: 22px !important;
  height: 22px !important;
}

@media (max-width: 720px) {
  .digital-card-v167 {
    padding: 8px !important;
  }

  .id-card-v167 {
    max-height: calc(100vh - 16px) !important;
    padding: 12px 14px 16px !important;
    border-radius: 18px !important;
  }

  .id-card-v167 .photo-avatar.xl {
    width: 96px !important;
    height: 120px !important;
  }

  .id-card-v167 .id-card-body-v105 h1 {
    font-size: 1.28rem !important;
  }

  .id-card-v167 .id-card-role-v105,
  .id-card-v167 .id-card-location-v105 {
    font-size: .86rem !important;
  }

  .id-card-v167 .id-card-contact-pill-v105,
  .id-card-v167 .id-card-primary-action-v105,
  .id-card-v167 .id-card-whatsapp-action-v105 {
    min-height: 42px !important;
    font-size: .88rem !important;
  }
}

/* FIX v171: master data disusun dengan anak panah dan disimpan melalui satu butang utama. */
.master-order-number-cell {
  width: 72px !important;
}

.master-order-actions-cell {
  width: 96px;
  white-space: nowrap;
}

.master-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  backdrop-filter: blur(10px);
}

.master-save-bar .save-status {
  min-height: 0;
  margin: 0;
}

.master-main-save-button {
  flex: 0 0 auto;
}

[data-master-bulk-form].has-unsaved-changes .master-save-bar {
  border-color: #f59e0b;
  box-shadow: 0 12px 30px rgba(245, 158, 11, .16);
}

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

  .master-main-save-button {
    width: 100%;
  }
}

/* FIX v172: simpanan pukal untuk Bahagian/Unit dan Aktiviti/Unit. */
[data-master-bulk-form] .master-table input[type="text"],
[data-master-bulk-form] .master-table input:not([type]) {
  min-width: 220px;
}

[data-master-bulk-form] .order-button-group {
  justify-content: center;
}
