
:root {
    --bg-main: #f6f7f9;
    --bg-card: #ffffff;
    --bg-soft: #f3f4f6;

    --text-main: #1f2933;
    --text-muted: #7b8190;
    --text-soft: #9ca3af;

    --border-soft: #e5e7eb;
    --border-strong: #d1d5db;

    --primary: #ECA611;
    --primary-hover: #D89400;
    --primary-soft: #FFF4D1;

    --success: #16a34a;
    --success-soft: #dcfce7;

    --warning: #d97706;
    --warning-soft: #fef3c7;

    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --info: #0284c7;
    --info-soft: #e0f2fe;

    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --sidebar-width: 280px;
    --topbar-height: 76px;
  }

  * {
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
  }

  button,
  input,
  select,
  textarea {
    font-family: inherit;
  }

  .hidden {
    display: none !important;
  }

  .mobile-only {
    display: none;
  }

  .login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      radial-gradient(circle at top left, rgba(236, 166, 17, 0.12), transparent 30%),
      radial-gradient(circle at bottom right, rgba(2, 132, 199, 0.08), transparent 28%),
      var(--bg-main);
  }

  .login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
  }

  .login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 22px;
  }

  .brand-logo.small {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 15px;
  }

  .login-brand h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
  }

  .login-brand p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 13px;
  }

  .login-title h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.04em;
  }

  .login-title p {
    margin: 8px 0 24px;
    color: var(--text-muted);
    line-height: 1.5;
  }

  .login-form {
    display: grid;
    gap: 16px;
  }

  label {
    display: grid;
    gap: 7px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 13px;
  }

  input,
  select,
  textarea {
    width: 100%;
    border: 1px solid var(--border-soft);
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 13px;
    font-size: 14px;
    outline: none;
    color: var(--text-main);
    transition: 0.18s ease;
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
  }

  .btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-primary {
    background: var(--primary);
    color: #ffffff;
  }

  .btn-primary:hover {
    background: var(--primary-hover);
  }

  .btn-outline {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-soft);
  }

  .btn-outline:hover {
    border-color: var(--border-strong);
    background: var(--bg-soft);
  }

  .btn-soft {
    background: var(--bg-soft);
    color: var(--text-main);
  }

  .btn-full {
    width: 100%;
  }

  .form-message {
    min-height: 20px;
    font-size: 13px;
    color: var(--danger);
  }

  .login-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
  }

  .app-shell {
    min-height: 100vh;
    display: flex;
  }

  .sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
  }

  .sidebar-header {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-soft);
  }

  .sidebar-brand-text {
    display: grid;
    line-height: 1.2;
  }

  .sidebar-brand-text strong {
    font-size: 14px;
  }

  .sidebar-brand-text span {
    font-size: 11px;
    color: var(--text-muted);
  }

  .sidebar-menu {
    padding: 12px 12px;
    display: grid;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
  }

  .menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    min-height: 38px;
    transition: 0.18s ease;
  }

  .menu-item:hover {
    background: var(--bg-soft);
    color: var(--text-main);
  }

  .menu-item.active {
    background: var(--primary-soft);
    color: var(--primary);
  }

  .menu-icon {
    width: 18px;
    display: grid;
    place-items: center;
    font-size: 13px;
    opacity: 0.85;
  }

  .sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-soft);
    display: grid;
    gap: 10px;
  }

  .user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-soft);
    border-radius: 12px;
  }

  .user-chip strong {
    display: block;
    font-size: 12px;
  }

  .user-chip span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
  }

  .main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
  }

  .topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(246, 247, 249, 0.82);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border-soft);
  }

  .topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 3px;
  }

  .topbar h1 {
    margin: 0;
    font-size: 23px;
    letter-spacing: -0.04em;
  }

  .topbar-date {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
  }

  .content {
    padding: 24px 28px 34px;
  }

  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
  }

  .section-header h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.03em;
  }

  .section-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
  }

  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
  }

  .kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  }

  .kpi-card span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .kpi-card strong {
    display: block;
    font-size: 30px;
    letter-spacing: -0.05em;
    line-height: 1;
  }

  .kpi-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 12px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .panel {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    min-height: 260px;
    overflow: hidden;
  }

  .panel-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
  }

  .panel-header h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -0.02em;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
  }

  .badge-info {
    background: var(--info-soft);
    color: var(--info);
  }

  .badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
  }

  .badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
  }

  .badge-soft {
    background: var(--bg-soft);
    color: var(--text-muted);
  }

  .badge-ritel {
    background: #fef3c7;
    color: #a16207;
  }

  .badge-pusat {
    background: #ffe0d0;
    color: #c2410c;
  }

  .badge-cabang {
    background: #cbf3ec;
    color: #0f766e;
  }

  .list {
    padding: 8px;
    display: grid;
    gap: 4px;
  }

  .list-item {
    padding: 12px;
    border-radius: 13px;
    display: grid;
    gap: 5px;
  }

  .list-item:hover {
    background: var(--bg-soft);
  }

  .list-item strong {
    font-size: 13px;
  }

  .list-item span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
  }

  .empty-list {
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
  }

  .empty-state {
    min-height: 420px;
    display: grid;
    place-items: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 30px;
  }

  .empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    margin: 0 auto 16px;
    font-size: 26px;
  }

  .empty-state h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.04em;
  }

  .empty-state p {
    margin: 8px 0 0;
    color: var(--text-muted);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 25;
  }

  @media (max-width: 1100px) {
    .kpi-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 760px) {
    :root {
      --topbar-height: 68px;
    }

    .mobile-only {
      display: grid;
    }

    .sidebar {
      transform: translateX(-100%);
      transition: 0.22s ease;
      width: 86%;
      max-width: 320px;
    }

    .sidebar.open {
      transform: translateX(0);
    }

    .main {
      margin-left: 0;
      width: 100%;
    }

    .topbar {
      padding: 0 16px;
    }

    .topbar h1 {
      font-size: 19px;
    }

    .topbar-date {
      display: none;
    }

    .content {
      padding: 18px 14px 28px;
    }

    .section-header {
      align-items: flex-start;
      flex-direction: column;
    }

    .kpi-grid {
      grid-template-columns: 1fr;
    }

    .kpi-card {
      padding: 16px;
      border-radius: 16px;
    }

    .kpi-card strong {
      font-size: 28px;
    }

    .panel {
      border-radius: 16px;
      min-height: auto;
    }

    .login-card {
      padding: 24px;
      border-radius: 22px;
    }
  }

  /* ================================
     FOLDABLE / MOBILE STABILITY
  ================================ */

  body.is-mobile .mobile-only {
    display: grid;
  }

  body.is-mobile .sidebar {
    transform: translateX(-100%);
    transition: 0.22s ease;
    width: 86%;
    max-width: 320px;
  }

  body.is-mobile .sidebar.open {
    transform: translateX(0);
  }

  body.is-mobile .main {
    margin-left: 0;
    width: 100%;
  }

  body.is-mobile .topbar {
    padding: 0 16px;
  }

  body.is-mobile .content {
    padding: 18px 14px 28px;
  }

  body.is-mobile .kpi-grid {
    grid-template-columns: 1fr;
  }

  body.is-mobile .dashboard-grid {
    grid-template-columns: 1fr;
  }

  body.is-mobile .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.is-mobile .topbar-date {
    display: none;
  }

  body.is-mobile .topbar h1 {
    font-size: 19px;
  }

  body.is-desktop .sidebar {
    transform: none;
  }

  body.is-desktop .main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }

  body.is-desktop .sidebar-overlay {
    display: none !important;
  }

  /* ================================
     FINAL PATCH 02: DESKTOP/MOBILE CONTROL + COMPACT SIDEBAR
     Catatan: rule ini sengaja diletakkan paling bawah agar menang dari CSS sebelumnya.
  ================================ */

  :root {
    --sidebar-width: 252px;
    --topbar-height: 68px;
  }

  .mobile-only {
    display: none !important;
  }

  body.is-desktop .mobile-only {
    display: none !important;
  }

  body.is-mobile .mobile-only {
    display: grid !important;
  }

  .sidebar-menu {
    padding: 10px 12px !important;
    gap: 2px !important;
    align-content: start !important;
    grid-auto-rows: max-content !important;
  }

  .menu-item {
    min-height: 36px !important;
    padding: 8px 10px !important;
    gap: 9px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .menu-icon {
    width: 17px !important;
    min-width: 17px !important;
    font-size: 12px !important;
    opacity: 0.82;
  }

  .sidebar-header {
    height: 64px !important;
    padding: 0 16px !important;
  }

  .sidebar-footer {
    padding: 10px 12px 12px !important;
    gap: 9px !important;
  }

  .user-chip {
    padding: 8px !important;
    border-radius: 11px !important;
  }

  .btn.btn-soft.btn-full {
    min-height: 36px !important;
    padding: 9px 12px !important;
  }

  body.is-desktop .sidebar {
    width: var(--sidebar-width) !important;
    transform: none !important;
  }

  body.is-desktop .main {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
  }

  body.is-desktop .sidebar-overlay {
    display: none !important;
  }

  body.is-mobile .sidebar {
    transform: translateX(-100%) !important;
    width: 86% !important;
    max-width: 320px !important;
  }

  body.is-mobile .sidebar.open {
    transform: translateX(0) !important;
  }

  body.is-mobile .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  body.is-mobile .topbar {
    padding: 0 16px !important;
  }

  body.is-mobile .content {
    padding: 18px 14px 28px !important;
  }

  body.is-mobile .kpi-grid,
  body.is-mobile .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  body.is-mobile .topbar-date {
    display: none !important;
  }

  body.is-mobile .section-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

/* ================================
   CLIENT MODULE V2
================================ */

.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-stat-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 15px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.mini-stat-card span {
  display: block;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
}

.mini-stat-card strong {
  display: block;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.mini-stat-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.toolbar-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
}

@media (min-width: 769px) {
  .filter-grid > label:first-child {
    grid-column: span 2;
  }
}

body.is-mobile .filter-grid > label:first-child {
  grid-column: auto;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.data-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

.data-table th {
  padding: 12px 15px;
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fafafa;
  border-bottom: 1px solid var(--border-soft);
}

.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  font-size: 13px;
}

.data-table tr:hover td {
  background: #fafafa;
}

.client-name-cell {
  display: grid;
  gap: 4px;
}

.client-name-cell strong {
  font-size: 13px;
}

.client-name-cell span,
.muted-small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.visit-search-row {
    margin: 0;
    padding: 12px 10px 2px 10px;
}

.visit-search-row input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    font-size: 14px;
    background: #ffffff;
    box-sizing: border-box;
}

.visit-search-row input:focus {
    outline: none;
    border-color: #f0b429;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18);
}

.point-warn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    vertical-align: middle;
    cursor: default;
    outline: none;
}

.point-warn::before {
    content: "!";
}

.point-warn-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: #1f2937;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    pointer-events: none;
    z-index: 60;
}

.point-warn:hover .point-warn-tip,
.point-warn:focus .point-warn-tip {
    opacity: 1;
    visibility: visible;
}

.no-point-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff4e5;
    color: #b45309;
    border: 1px solid #fcd9a4;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.6;
}

.check-dot {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--warning-soft);
  color: var(--warning);
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
}

.badge-unverified {
  background: #fdecea;
  color: #b42318;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 34px !important;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
}

.pagination-info {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.pagination-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mobile-card-list {
  display: none;
  padding: 10px;
  gap: 10px;
}

.mobile-data-card {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 13px;
  display: grid;
  gap: 10px;
}

.mobile-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-card-top strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.mobile-card-top span,
.mobile-card-body {
  color: var(--text-muted);
  font-size: 12px;
}

.mobile-card-body {
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.mobile-card-body b {
  color: var(--text-main);
}

.mobile-check-note {
  border-radius: 12px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(92vh, 860px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.modal-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.form-block {
  display: grid;
  gap: 8px;
}

.form-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.required {
  color: var(--danger);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

body.is-mobile .client-stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-mobile .filter-grid {
  grid-template-columns: 1fr;
}

body.is-mobile .table-wrap {
  display: none;
}

body.is-mobile .mobile-card-list {
  display: grid;
}

body.is-mobile .pagination-bar {
  align-items: flex-start;
  flex-direction: column;
}

body.is-mobile .pagination-actions {
  width: 100%;
}

body.is-mobile .pagination-actions .btn {
  flex: 1;
}

body.is-mobile .modal-overlay {
  padding: 10px;
  align-items: end;
}

body.is-mobile .modal-card {
  border-radius: 22px 22px 0 0;
  max-height: 92vh;
}

body.is-mobile .form-grid.two {
  grid-template-columns: 1fr;
}

body.is-mobile .modal-actions {
  flex-direction: column-reverse;
}

body.is-mobile .modal-actions .btn {
  width: 100%;
}

@media (max-width: 1100px) {
  .client-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ================================
   PATCH 05 - CONTACTS, TOAST, GPS
================================ */

.form-section-title.with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-small {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  min-height: 32px;
}

.contacts-container {
  display: grid;
  gap: 12px;
}

.contact-row {
  border: 1px solid var(--border-soft);
  background: #fbfcfd;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.contact-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-row-header strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.readonly-field {
  background: #f8fafc;
  color: var(--text-muted);
  cursor: not-allowed;
}

.toast-container {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 10px 1fr 26px;
  gap: 10px;
  align-items: start;
  animation: toastIn 0.22s ease-out;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.2s ease;
}

.toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--info);
}

.toast-success .toast-dot { background: var(--success); }
.toast-error .toast-dot { background: var(--danger); }
.toast-warning .toast-dot { background: var(--warning); }

.toast-content {
  display: grid;
  gap: 3px;
}

.toast-content strong {
  font-size: 13px;
  line-height: 1.25;
}

.toast-content span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.is-mobile .toast-container {
  top: 12px;
  right: 12px;
  left: 12px;
  width: auto;
}

body.is-mobile .form-section-title.with-action {
  align-items: flex-start;
  flex-direction: column;
}

/* ================================
   PATCH 06 - CLIENT DETAIL + PAGING
================================ */
.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.table-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0 0 8px;
  padding-left: 2px;
}

.client-row {
  cursor: pointer;
}

.client-row:hover {
  background: #f8fafc;
}

.detail-modal-card {
  max-width: 920px;
}

.detail-meta-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.detail-meta-box > div {
  display: grid;
  gap: 5px;
}

.detail-meta-box b {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.detail-meta-box span {
  font-size: 12px;
  color: var(--text-main);
}

.assigned-sales-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
}

.assigned-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.split-actions {
  justify-content: space-between;
  gap: 12px;
}

.left-actions,
.right-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-danger-outline {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger-soft);
}

.btn-danger-outline:hover {
  background: var(--danger-soft);
}

.btn-warning-outline {
  background: #fff;
  color: var(--warning);
  border: 1px solid var(--warning-soft);
}

.btn-warning-outline:hover {
  background: var(--warning-soft);
}

.mobile-detail-btn {
  margin-top: 10px;
  width: 100%;
}

@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .detail-meta-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta-box {
    grid-template-columns: 1fr;
  }

  .split-actions,
  .left-actions,
  .right-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ================================
   PATCH 07 - CLEAN LABEL REQUIRED MARK
================================ */
label {
  display: block;
  font-weight: 600;
  color: var(--text-main);
  font-size: 13px;
}

label input,
label select,
label textarea {
  margin-top: 7px;
}

.required {
  display: inline;
  margin-left: 4px;
  color: var(--danger);
  line-height: 1;
}

/* ================================
   PATCH 07 - CUSTOM CONFIRM MODAL
================================ */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  padding: 22px;
  display: grid;
  gap: 14px;
  animation: confirmPop 0.16s ease-out;
}

.confirm-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: var(--primary-soft);
  color: var(--primary);
}

.confirm-content h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.confirm-content p {
  margin: 7px 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.confirm-danger .confirm-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-warning .confirm-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.confirm-success .confirm-icon {
  background: var(--success-soft);
  color: var(--success);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}

.btn-warning:hover {
  background: #b45309;
}

@keyframes confirmPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.is-mobile .confirm-actions {
  flex-direction: column-reverse;
}

body.is-mobile .confirm-actions .btn {
  width: 100%;
}

/* ================================
   PATCH 08 - VISIT MODULE
================================ */

.visit-active-panel {
  margin-bottom: 14px;
}

.visit-info-card,
.visit-active-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.visit-info-card {
  color: var(--text-muted);
}

.visit-info-card strong,
.visit-active-card h3 {
  display: block;
  margin: 0 0 4px;
  color: var(--text-main);
}

.visit-info-card span,
.visit-active-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.visit-active-card {
  border-color: rgba(22, 163, 74, 0.22);
  background: linear-gradient(180deg, #ffffff, rgba(220, 252, 231, 0.35));
}

.visit-active-card h3 {
  font-size: 18px;
  letter-spacing: -0.03em;
  margin-top: 8px;
}

.visit-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.visit-location-row strong {
  display: block;
  margin-bottom: 4px;
}

.visit-location-row p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-header.compact {
  min-height: auto;
  padding: 14px 16px;
}

.visit-candidate-list,
.visit-recent-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.visit-client-card,
.visit-recent-item {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.visit-client-card {
  cursor: pointer;
  transition: 0.18s ease;
}

.visit-client-card:hover:not(.disabled) {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.visit-client-card.disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: #fafafa;
}

.visit-client-card strong,
.visit-recent-item strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
  margin-bottom: 4px;
}

.visit-client-card span,
.visit-recent-item span,
.visit-client-card small,
.visit-recent-item small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.visit-client-side,
.visit-recent-item > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 118px;
}

.visit-recent-card {
  margin-top: 14px;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.confirm-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.confirm-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.confirm-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.compact-modal-card {
  max-width: 720px;
}

@media (max-width: 760px) {
  .visit-location-row,
  .visit-info-card,
  .visit-active-card,
  .visit-client-card,
  .visit-recent-item {
    align-items: stretch;
    flex-direction: column;
  }

  .visit-client-side,
  .visit-recent-item > div:last-child {
    justify-items: start;
    min-width: 0;
  }
}

/* ================================
   PATCH 19 - ACTIVITY SUBMENU
================================ */

.menu-group {
  position: relative;
  display: grid;
  gap: 3px;
}

.menu-parent {
  position: relative;
}

.menu-parent .menu-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-soft);
  transition: transform 0.18s ease;
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 3px;
  padding: 4px 0 6px 34px;
}

.submenu.hidden {
  display: none !important;
}

.submenu-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  font-weight: 650;
  font-size: 12.5px;
  transition: 0.18s ease;
}

.submenu-item:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

.submenu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.submenu-icon {
  width: 16px;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: 0.85;
}

body.is-desktop .activity-menu-group .submenu {
  padding-left: 28px;
}

body.is-mobile .activity-menu-group .submenu {
  padding-left: 28px;
}

/* ================================
   PATCH 20 - REMINDER MODULE + CHEVRON POLISH
================================ */

.menu-parent .menu-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  transform-origin: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.menu-parent:hover .menu-chevron,
.menu-parent.open .menu-chevron {
  background: rgba(236, 166, 17, 0.12);
  color: var(--primary);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.reminder-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px 130px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.reminder-row {
  cursor: pointer;
}

.table-subtext {
  display: inline-block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px !important;
}

.reminder-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-summary-grid span,
.detail-note-box span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.detail-summary-grid strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.detail-note-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.detail-note-box p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .reminder-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .reminder-filter-card {
    grid-template-columns: 1fr;
  }

  .reminder-table {
    display: none;
  }

  .reminder-action-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   PATCH 21 - MENU CHEVRON & REMINDER ACTION DROPDOWN
================================ */

.menu-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  position: relative;
  flex: 0 0 16px;
  opacity: 0.62;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-chevron::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

.floating-action-menu {
  position: fixed;
  z-index: 9999;
  min-width: 164px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.floating-action-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  transition: 0.16s ease;
}

.floating-action-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.reminder-detail-btn {
  min-width: 78px;
}

/* ================================
   REPORT MODULE
================================ */
.report-filter-card {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(240px, 1.5fr) minmax(140px, .8fr) minmax(150px, .8fr) minmax(120px, .6fr);
  align-items: end;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-table td:nth-child(7),
.report-table td:nth-child(8) {
  white-space: normal;
  min-width: 220px;
}

@media (max-width: 1200px) {
  .report-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section-actions {
    width: 100%;
  }
  .section-actions .btn {
    flex: 1;
  }
  .report-filter-card {
    grid-template-columns: 1fr;
  }
  .report-table {
    display: none;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* PATCH 38 - Map module */
.map-filter-card {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(115px, .8fr) minmax(150px, .9fr) minmax(110px, .7fr) minmax(135px, .8fr) minmax(120px, .8fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.map-sales-filter-card {
  grid-template-columns: minmax(135px, 0.8fr) minmax(135px, 0.8fr) minmax(165px, 1fr) minmax(220px, 1.4fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
}

.map-filter-card label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.map-filter-card input,
.map-filter-card select {
  min-height: 40px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: stretch;
}

.map-card,
.map-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.map-card .panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.map-canvas {
  width: 100%;
  height: calc(100vh - 315px);
  min-height: 480px;
  background: var(--bg-soft);
  z-index: 1;
}

.map-detail-panel {
  height: calc(100vh - 250px);
  min-height: 560px;
  overflow: auto;
  padding: 16px;
}

.map-detail-header {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.map-detail-header h3 {
  margin: 9px 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.map-detail-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.map-detail-section {
  margin-top: 16px;
}

.map-detail-section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}

.map-detail-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 10px;
  font-size: 13px;
}

.map-detail-dl dt {
  color: var(--text-muted);
  font-weight: 700;
}

.map-detail-dl dd {
  margin: 0;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.map-contact-box {
  display: grid;
  gap: 7px;
}

.map-contact-line {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 13px;
  line-height: 1.35;
}

.map-history-list {
  display: grid;
  gap: 9px;
}

.map-history-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.map-history-item.active {
  border-color: var(--primary);
  background: rgba(236, 166, 17, 0.06);
}

.map-history-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-history-item strong {
  font-size: 13px;
}

.map-history-item p {
  margin: 5px 0 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.map-history-item small {
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.35;
}

.leaflet-container {
  font-family: inherit;
}

/* PATCH 39 - Map polish */
.map-stakeholder-search-wrap {
  position: relative;
}

.map-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 280px;
  overflow: auto;
}

.map-search-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.map-search-dropdown button:hover {
  background: var(--bg-soft);
}

.map-search-dropdown strong {
  font-size: 13px;
  color: var(--text-main);
}

.map-search-dropdown span,
.map-search-empty {
  font-size: 12px;
  color: var(--text-muted);
}

.map-search-empty {
  padding: 10px;
}

.map-layout.detail-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.map-layout.detail-hidden .map-detail-panel {
  display: none !important;
}

.map-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.map-detail-actions .btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.jaku-map-pin-icon {
  background: transparent;
  border: 0;
}

.jaku-map-pin {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  position: relative;
}

.jaku-map-pin span {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 6px;
}

.jaku-map-pin-icon em {
  display: none;
}

.map-history-item small {
  display: block;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .map-filter-card,
  .map-sales-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-detail-panel {
    height: auto;
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .map-filter-card,
  .map-sales-filter-card {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 420px;
    min-height: 420px;
  }
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.kpi-card.compact strong {
  font-size: 24px;
}
.next-action-fields input:disabled,
.next-action-fields select:disabled {
  background: var(--bg-soft);
  color: var(--text-soft);
}
@media (max-width: 760px) {
  .header-actions {
    width: 100%;
  }
  .header-actions .btn {
    flex: 1;
  }
}

/* ================================
   PATCH 19 - ACTIVITY SUBMENU
================================ */

.menu-group {
  position: relative;
  display: grid;
  gap: 3px;
}

.menu-parent {
  position: relative;
}

.menu-parent .menu-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-soft);
  transition: transform 0.18s ease;
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 3px;
  padding: 4px 0 6px 34px;
}

.submenu.hidden {
  display: none !important;
}

.submenu-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  font-weight: 650;
  font-size: 12.5px;
  transition: 0.18s ease;
}

.submenu-item:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

.submenu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.submenu-icon {
  width: 16px;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: 0.85;
}

body.is-desktop .activity-menu-group .submenu {
  padding-left: 28px;
}

body.is-mobile .activity-menu-group .submenu {
  padding-left: 28px;
}

/* ================================
   PATCH 20 - REMINDER MODULE + CHEVRON POLISH
================================ */

.menu-parent .menu-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  transform-origin: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.menu-parent:hover .menu-chevron,
.menu-parent.open .menu-chevron {
  background: rgba(236, 166, 17, 0.12);
  color: var(--primary);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.reminder-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px 130px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.reminder-row {
  cursor: pointer;
}

.table-subtext {
  display: inline-block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px !important;
}

.reminder-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-summary-grid span,
.detail-note-box span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.detail-summary-grid strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.detail-note-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.detail-note-box p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .reminder-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .reminder-filter-card {
    grid-template-columns: 1fr;
  }

  .reminder-table {
    display: none;
  }

  .reminder-action-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   PATCH 21 - MENU CHEVRON & REMINDER ACTION DROPDOWN
================================ */

.menu-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  position: relative;
  flex: 0 0 16px;
  opacity: 0.62;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-chevron::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

.floating-action-menu {
  position: fixed;
  z-index: 9999;
  min-width: 164px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.floating-action-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  transition: 0.16s ease;
}

.floating-action-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.reminder-detail-btn {
  min-width: 78px;
}

/* ================================
   REPORT MODULE
================================ */
.report-filter-card {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(240px, 1.5fr) minmax(140px, .8fr) minmax(150px, .8fr) minmax(120px, .6fr);
  align-items: end;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-table td:nth-child(7),
.report-table td:nth-child(8) {
  white-space: normal;
  min-width: 220px;
}

@media (max-width: 1200px) {
  .report-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section-actions {
    width: 100%;
  }
  .section-actions .btn {
    flex: 1;
  }
  .report-filter-card {
    grid-template-columns: 1fr;
  }
  .report-table {
    display: none;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* Patch 15 - Activity edit/delete polish */
.activity-recent-item {
  cursor: pointer;
}

.activity-recent-item:hover {
  background: var(--bg-soft);
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.14);
}

.btn-danger-soft:hover {
  background: #fecaca;
}

.map-layer-toggles {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.map-layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.map-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.map-legend-dot.stakeholder {
  background: #2563eb;
}

.map-legend-dot.project {
  background: #f59e0b;
  border-radius: 2px;
}

.map-hidden-note {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 12px;
  color: #9a3412;
}

.jaku-map-project-icon {
  text-align: center;
}

.jaku-map-project {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
  margin: 0 auto;
}

.jaku-map-project-icon em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #334155;
  text-shadow: 0 1px 2px #fff, 0 -1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
  white-space: nowrap;
}

.modal-footer.split .modal-footer-actions {
  margin-left: auto;
}

.addpick-wrap {
  position: relative;
  display: inline-block;
}

.addpick-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  min-width: 168px;
  overflow: hidden;
  z-index: 60;
}

.addpick-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: #2f3640;
}

.addpick-item + .addpick-item {
  border-top: 1px solid #f1f3f5;
}

.addpick-item:hover {
  background: #f6f7f9;
}

.modal-footer.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .modal-footer.split {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================
   PATCH 19 - ACTIVITY SUBMENU
================================ */

.menu-group {
  position: relative;
  display: grid;
  gap: 3px;
}

.menu-parent {
  position: relative;
}

.menu-parent .menu-chevron {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-soft);
  transition: transform 0.18s ease;
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 3px;
  padding: 4px 0 6px 34px;
}

.submenu.hidden {
  display: none !important;
}

.submenu-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  font-weight: 650;
  font-size: 12.5px;
  transition: 0.18s ease;
}

.submenu-item:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

.submenu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.submenu-icon {
  width: 16px;
  display: grid;
  place-items: center;
  font-size: 12px;
  opacity: 0.85;
}

body.is-desktop .activity-menu-group .submenu {
  padding-left: 28px;
}

body.is-mobile .activity-menu-group .submenu {
  padding-left: 28px;
}

/* ================================
   PATCH 20 - REMINDER MODULE + CHEVRON POLISH
================================ */

.menu-parent .menu-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  transform-origin: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.menu-parent:hover .menu-chevron,
.menu-parent.open .menu-chevron {
  background: rgba(236, 166, 17, 0.12);
  color: var(--primary);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
}

.reminder-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px 130px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.reminder-row {
  cursor: pointer;
}

.table-subtext {
  display: inline-block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px !important;
}

.reminder-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-summary-grid span,
.detail-note-box span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.detail-summary-grid strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.detail-note-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.detail-note-box p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .reminder-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .reminder-filter-card {
    grid-template-columns: 1fr;
  }

  .reminder-table {
    display: none;
  }

  .reminder-action-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   PATCH 21 - MENU CHEVRON & REMINDER ACTION DROPDOWN
================================ */

.menu-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  position: relative;
  flex: 0 0 16px;
  opacity: 0.62;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-chevron::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.menu-parent.open .menu-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

.floating-action-menu {
  position: fixed;
  z-index: 9999;
  min-width: 164px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.floating-action-item {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  transition: 0.16s ease;
}

.floating-action-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.reminder-detail-btn {
  min-width: 78px;
}

/* PATCH 23 - Fix leaked CSS text + compact reminder action */
body:not(.app-mode-login) #loginPage {
  display: none !important;
}

body.app-mode-login #loginPage {
  display: grid !important;
}

body:not(.app-mode-app) #appShell {
  display: none !important;
}

body.app-mode-app #appShell {
  display: flex !important;
}

.reminder-action-menu {
  min-width: 104px !important;
  width: max-content !important;
  max-width: 128px !important;
  padding: 5px !important;
  border-radius: 12px !important;
}

.reminder-action-menu .floating-action-item {
  white-space: nowrap;
  padding: 8px 10px !important;
  font-size: 12.5px !important;
  line-height: 1.2;
}

/* ================================
   REPORT MODULE
================================ */
.report-filter-card {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(240px, 1.5fr) minmax(140px, .8fr) minmax(150px, .8fr) minmax(120px, .6fr);
  align-items: end;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-table td:nth-child(7),
.report-table td:nth-child(8) {
  white-space: normal;
  min-width: 220px;
}

@media (max-width: 1200px) {
  .report-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section-actions {
    width: 100%;
  }
  .section-actions .btn {
    flex: 1;
  }
  .report-filter-card {
    grid-template-columns: 1fr;
  }
  .report-table {
    display: none;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

.input-locked,
  select.input-locked:disabled {
    background: #f8fafc !important;
    color: #334155 !important;
    border-color: #dbe3ef !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
  }

  .visit-client-card.reminder-target {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #ffffff, #f8faff);
  }

/* ================================
   REPORT MODULE
================================ */
.report-filter-card {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(240px, 1.5fr) minmax(140px, .8fr) minmax(150px, .8fr) minmax(120px, .6fr);
  align-items: end;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-table th,
.report-table td {
  white-space: nowrap;
}

.report-table td:nth-child(7),
.report-table td:nth-child(8) {
  white-space: normal;
  min-width: 220px;
}

@media (max-width: 1200px) {
  .report-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section-actions {
    width: 100%;
  }
  .section-actions .btn {
    flex: 1;
  }
  .report-filter-card {
    grid-template-columns: 1fr;
  }
  .report-table {
    display: none;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* ================================
   PATCH 28 - REPORT CARD UX
================================ */
.report-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.report-choice-card {
  border: 1px solid var(--border-soft);
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.report-choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 166, 17, 0.30);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.report-choice-card.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
}

.report-choice-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  flex: 0 0 auto;
}

.report-choice-card h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.report-choice-card p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-filter-card {
  margin-bottom: 16px;
}

.report-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.eyebrow {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  margin-bottom: 4px;
}

.report-filter-header h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.report-output-card {
  overflow: hidden;
}

.report-output-actions.hidden,
.report-filter-card.hidden,
.report-output-card.hidden {
  display: none !important;
}

.report-print-header {
  display: none;
}

@media (max-width: 1100px) {
  .report-card-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-filter-actions {
    justify-content: stretch;
  }

  .report-filter-actions .btn {
    width: 100%;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #reportPrintArea,
  #reportPrintArea * {
    visibility: visible !important;
  }

  #reportPrintArea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    padding: 20px !important;
    background: #fff !important;
  }

  .report-print-header {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 12px;
  }

  .report-print-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
  }

  .report-print-header p,
  .report-print-brand {
    margin: 0;
    color: #555;
    font-size: 11px;
  }

  .report-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin-bottom: 14px !important;
  }

  .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10px !important;
  }

  .data-table th,
  .data-table td {
    border: 1px solid #ddd !important;
    padding: 6px !important;
  }

  .panel-header.compact {
    border: 0 !important;
    padding: 0 0 8px !important;
  }

  .badge,
  .pagination-bar,
  .mobile-card-list {
    display: none !important;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* ================================
   PATCH 29 - REPORT MODAL FILTER + EXPORT DROPDOWN
================================ */
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

.report-toolbar.hidden {
  display: none !important;
}

.report-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-toolbar-left strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.btn-sm {
  padding: 8px 10px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
}

.report-export-wrap {
  position: relative;
  flex: 0 0 auto;
}

.report-export-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 148px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  padding: 6px;
}

.report-export-dropdown.hidden {
  display: none !important;
}

.report-export-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
}

.report-export-dropdown button:hover {
  background: var(--bg-soft);
}

.report-filter-modal-card {
  max-width: 780px;
}

.modal-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.report-summary-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 13px 14px;
  min-height: 86px;
}

.report-summary-card span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.report-summary-card strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.report-summary-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.report-result-footer {
  display: flex;
  justify-content: flex-start;
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
}

.report-table-wrap {
  max-height: none;
}

.report-table th,
.report-table td {
  white-space: normal;
  vertical-align: top;
}

@media (max-width: 900px) {
  .report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-toolbar-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-export-wrap,
  #reportExportMenuBtn {
    width: 100%;
  }

  .report-export-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .report-summary-grid,
  .modal-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #reportPrintArea,
  #reportPrintArea * {
    visibility: visible !important;
  }

  #reportPrintArea {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    padding: 12px !important;
    background: #fff !important;
  }

  .report-print-header {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
  }

  .report-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 0 0 10px !important;
    border-bottom: 0 !important;
  }

  .report-summary-card {
    border: 1px solid #ddd !important;
    background: #fff !important;
    border-radius: 0 !important;
    padding: 6px !important;
    min-height: auto !important;
  }

  .report-summary-card strong {
    font-size: 14px !important;
  }

  .report-summary-card span,
  .report-summary-card p {
    font-size: 9px !important;
  }

  .report-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 8.5px !important;
  }

  .report-table th,
  .report-table td {
    border: 1px solid #ddd !important;
    padding: 4px !important;
    color: #111 !important;
  }

  .report-toolbar,
  .report-card-grid,
  .section-header,
  .modal-overlay,
  .mobile-card-list,
  .report-result-footer,
  .badge {
    display: none !important;
  }
}

/* ================================
   PATCH 30 - REPORT UX POLISH
================================ */
.report-filter-modal-card {
  max-width: 860px !important;
}
.report-filter-footer-left {
  justify-content: flex-start !important;
}
.report-filter-footer-left .btn {
  min-width: 132px;
}
.report-client-autocomplete-wrap {
  position: relative;
}
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 6px;
  max-height: 240px;
  overflow: auto;
}
.autocomplete-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 650;
  font-size: 13px;
}
.autocomplete-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.report-toolbar {
  margin-top: 12px;
  margin-bottom: 14px;
}
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.report-summary-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 82px;
}
.report-summary-card span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.report-summary-card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -.04em;
  line-height: 1;
}
.report-summary-card p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}
@media (max-width: 760px) {
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-filter-footer-left .btn {
    width: 100%;
  }
}
@media print {
  .report-toolbar,
  .report-card-grid,
  .section-header,
  .modal-overlay,
  .mobile-card-list,
  .report-result-footer,
  .badge,
  .sidebar,
  .topbar {
    display: none !important;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* ================================
   PATCH 31 - REPORT FILTER MODAL POLISH
   Fix client autocomplete clipping + proper footer button alignment
================================ */

/* Report filter modal must allow the client autocomplete dropdown to expand
   over the lower modal area instead of being clipped by internal scroll. */
.report-filter-modal-card {
  overflow: visible !important;
  max-height: none !important;
}

.report-filter-modal-card .modal-body {
  overflow: visible !important;
  padding-bottom: 14px !important;
}

.report-filter-modal-card .modal-footer,
.report-filter-footer-left {
  justify-content: flex-end !important;
  padding: 14px 20px 18px !important;
  border-top: 1px solid var(--border-soft) !important;
  background: #ffffff !important;
  border-radius: 0 0 24px 24px !important;
}

.report-filter-footer-left .btn {
  min-width: 132px !important;
  width: auto !important;
}

.report-client-autocomplete-wrap {
  position: relative !important;
  z-index: 95 !important;
}

.report-client-autocomplete-wrap:focus-within {
  z-index: 140 !important;
}

.report-client-autocomplete-wrap .autocomplete-dropdown,
#reportClientDropdown.autocomplete-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 14px !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18) !important;
  padding: 7px !important;
}

.report-client-autocomplete-wrap .autocomplete-item,
#reportClientDropdown .autocomplete-item {
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

@media (max-width: 760px) {
  .report-filter-modal-card {
    max-height: 92vh !important;
    overflow: hidden !important;
  }

  .report-filter-modal-card .modal-body {
    overflow-y: auto !important;
  }

  .report-client-autocomplete-wrap .autocomplete-dropdown,
  #reportClientDropdown.autocomplete-dropdown {
    max-height: 220px !important;
  }

  .report-filter-footer-left {
    justify-content: stretch !important;
  }

  .report-filter-footer-left .btn {
    width: 100% !important;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* ================================
   PATCH 32 - REPORT FILTER MODAL FINAL POLISH
   - Terapkan fixed to bottom-right
   - Client dropdown not clipped and shows more rows
================================ */
.report-filter-modal-card {
  overflow: visible !important;
  max-height: none !important;
}

.report-filter-modal-card .modal-body {
  overflow: visible !important;
  padding-bottom: 18px !important;
}

.report-filter-modal-card .modal-footer.report-filter-footer-right,
.report-filter-footer-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 20px 18px !important;
  border-top: 1px solid var(--border-soft) !important;
  background: #ffffff !important;
  border-radius: 0 0 24px 24px !important;
}

.report-filter-footer-right .btn,
.report-filter-modal-card .modal-footer.report-filter-footer-right .btn {
  min-width: 132px !important;
  width: auto !important;
}

.report-client-autocomplete-wrap {
  position: relative !important;
  z-index: 999 !important;
}

.report-client-autocomplete-wrap:focus-within {
  z-index: 10000 !important;
}

.report-client-autocomplete-wrap .autocomplete-dropdown,
#reportClientDropdown.autocomplete-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.20) !important;
  padding: 7px !important;
}

.report-client-autocomplete-wrap .autocomplete-item,
#reportClientDropdown .autocomplete-item,
#reportClientDropdown .autocomplete-empty {
  width: 100% !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: normal !important;
}

#reportClientDropdown .autocomplete-empty {
  color: var(--text-muted) !important;
  cursor: default !important;
}

@media (max-width: 760px) {
  .report-filter-modal-card {
    max-height: 92vh !important;
    overflow: hidden !important;
  }
  .report-filter-modal-card .modal-body {
    overflow-y: auto !important;
  }
  .report-client-autocomplete-wrap .autocomplete-dropdown,
  #reportClientDropdown.autocomplete-dropdown {
    max-height: 220px !important;
  }
  .report-filter-modal-card .modal-footer.report-filter-footer-right,
  .report-filter-footer-right {
    justify-content: stretch !important;
  }
  .report-filter-footer-right .btn {
    width: 100% !important;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* ================================
   PATCH 34 - ACTIVITY HISTORY FILTER POLISH
================================ */
.activity-history-filter-card {
  display: grid !important;
  grid-template-columns: 120px 120px minmax(150px, 1fr) 120px 130px 150px 130px 100px !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 14px !important;
  margin-bottom: 16px !important;
}

.activity-history-filter-card label {
  min-width: 0 !important;
  gap: 6px !important;
  font-size: 12px !important;
}

.activity-history-filter-card input,
.activity-history-filter-card select {
  height: 40px !important;
  padding: 9px 11px !important;
  font-size: 13px !important;
}

.activity-history-filter-card #activityHistorySearchInput {
  min-width: 0 !important;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.recent-table-wrap {
  padding: 0;
}

.recent-activity-table th,
.recent-activity-table td,
.recent-visit-table th,
.recent-visit-table td,
.activity-history-table th,
.activity-history-table td {
  font-size: 12.5px;
}

.recent-mobile-list {
  display: none;
}

.activity-recent-row {
  cursor: pointer;
}

.activity-recent-row:hover td {
  background: var(--bg-soft);
}

.activity-history-table .muted,
.recent-activity-table .muted,
.recent-visit-table .muted {
  color: var(--text-muted);
  font-size: 12px;
}

/* PATCH 39 - Map polish */
.map-stakeholder-search-wrap {
  position: relative;
}

.map-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 280px;
  overflow: auto;
}

.map-search-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.map-search-dropdown button:hover {
  background: var(--bg-soft);
}

.map-search-dropdown strong {
  font-size: 13px;
  color: var(--text-main);
}

.map-search-dropdown span,
.map-search-empty {
  font-size: 12px;
  color: var(--text-muted);
}

.map-search-empty {
  padding: 10px;
}

.map-layout.detail-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.map-layout.detail-hidden .map-detail-panel {
  display: none !important;
}

.map-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.map-detail-actions .btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.jaku-map-pin-icon {
  background: transparent;
  border: 0;
}

.jaku-map-pin {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  position: relative;
}

.jaku-map-pin span {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 6px;
}

.jaku-map-pin-icon em {
  display: none;
}

.map-history-item small {
  display: block;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .activity-history-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .activity-history-filter-card {
    grid-template-columns: 1fr !important;
  }
  .recent-table-wrap {
    display: none;
  }
  .recent-mobile-list {
    display: grid;
  }
}

/* PATCH 36 - Hide summary cards in Non Visit and Riwayat Aktivitas */
#activityStatsGrid,
#activityHistoryStatsGrid {
  display: none !important;
}

#activityView .section-header,
#activityHistoryView .section-header {
  margin-bottom: 16px;
}

/* PATCH 37 - Report multiline cells */
.report-table td.cell-multiline,
.data-table td.cell-multiline,
td.cell-multiline {
  white-space: normal !important;
  line-height: 1.45;
  min-width: 220px;
}

@media print {
  td.cell-multiline {
    white-space: normal !important;
    line-height: 1.35;
  }
}

/* PATCH 41 - MAP SALES DETAIL CLEANUP */
.jaku-map-pin {
  background: #2563eb !important;
}
.jaku-map-pin-icon.active .jaku-map-pin {
  background: #1d4ed8 !important;
}
.map-history-item.active {
  background: #f8fafc !important;
  border-color: #dbe3ef !important;
  box-shadow: inset 3px 0 0 #93c5fd;
}
.map-history-item.active .badge {
  background: #e0f2fe;
  color: #0369a1;
}

/* PATCH 42 - MAP HISTORY NEUTRAL LIST */
.map-history-item,
.map-history-item.active {
  background: #f8fafc !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
}
.map-history-item:hover,
.map-history-item.active:hover {
  background: #f3f4f6 !important;
  border-color: #d8dee8 !important;
}
.map-history-item.active .badge {
  background: #e0f2fe;
  color: #0369a1;
}

/* PATCH 43 - USER ACCESS FIXED ROLE */
.user-access-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.user-access-list-card,
.user-access-detail-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, .05));
  overflow: hidden;
}
.user-access-list-card .panel-header,
.user-access-detail-card .panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.user-access-list {
  padding: 10px;
  max-height: calc(100vh - 310px);
  overflow: auto;
}
.user-access-item {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.user-access-item:hover { background: #f8fafc; }
.user-access-item.active {
  background: #FFF4D1;
  border-color: #c7d2fe;
}
.user-access-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  background: #ECA611;
  flex: 0 0 auto;
}
.user-access-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.user-access-main strong { color: #0f172a; font-size: 13px; }
.user-access-main small,
.user-access-main em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-access-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}
.form-grid.four.access-grid {
  grid-template-columns: 1.1fr .9fr .8fr .8fr;
}
.access-rules-box {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
}
.access-rules-box strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}
.access-rules-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 5px 10px;
  font-size: 12px;
  color: #475569;
}
.access-rules-grid span { font-weight: 700; color: #334155; }
.access-rules-grid p { margin: 0; }
.empty-mini { padding: 14px; color: #64748b; font-size: 13px; }
@media (max-width: 980px) {
  .user-access-layout { grid-template-columns: 1fr; }
  .user-access-list { max-height: 280px; }
  .form-grid.four.access-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .form-grid.four.access-grid { grid-template-columns: 1fr; }
  .access-rules-grid { grid-template-columns: 1fr; }
}

/* PATCH 46 - User Access polish */
.user-access-list-header {
  align-items: center;
  gap: 12px;
}
.user-access-list-header h3 {
  margin: 0;
}
.user-add-btn {
  min-width: 78px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.user-access-search-wrap {
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.user-access-search-wrap input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  outline: none;
  background: #fff;
}
.user-access-search-wrap input:focus {
  border-color: rgba(236, 166, 17, .45);
  box-shadow: 0 0 0 4px rgba(236, 166, 17, .12);
}
.user-access-list-card .panel-header.compact {
  padding-bottom: 10px;
}
@media (max-width: 760px) {
  .user-access-list-header {
    flex-direction: row;
  }
  .user-add-btn {
    min-width: 72px;
  }
}

/* PATCH 47 - User Access overview-first layout */
.user-access-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.user-access-overview {
  padding: 16px;
  display: grid;
  gap: 14px;
}
.access-overview-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.access-overview-top > div,
.access-summary-card {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
}
.access-overview-top strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  color: #0f172a;
}
.access-overview-top span,
.access-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}
.access-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.access-summary-card small {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.access-summary-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
}
.access-role-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.access-role-section {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.access-role-section > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.access-role-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
}
.access-role-section > div span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}
.access-role-section ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
}
.access-role-section li {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f8fafc;
}
.access-role-section li strong {
  color: #0f172a;
  font-size: 13px;
}
.access-role-section li span,
.access-role-section li em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-role-section li.muted {
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
}
@media (max-width: 1180px) {
  .access-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .access-overview-top,
  .access-summary-grid,
  .access-role-list { grid-template-columns: 1fr; }
  .user-access-actions { width: 100%; justify-content: flex-start; }
}

/* PATCH 48 - User Access single table + modal */
.user-access-table-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, .05));
  overflow: hidden;
}
.user-access-table-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  align-items: center;
}
.user-access-table-header h3 { margin: 0; }
.user-access-table-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}
.user-access-filterbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, .8fr) minmax(140px, .7fr) minmax(140px, .7fr) minmax(140px, .7fr);
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  align-items: end;
}
.user-access-filterbar label {
  display: grid;
  gap: 6px;
  color: #0f172a;
  font-weight: 700;
  font-size: 12px;
}
.user-access-filterbar input,
.user-access-filterbar select {
  height: 42px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  outline: none;
  font-size: 13px;
}
.user-access-filterbar input:focus,
.user-access-filterbar select:focus {
  border-color: rgba(236, 166, 17, .45);
  box-shadow: 0 0 0 4px rgba(236, 166, 17, .12);
}
.user-access-table-wrap {
  border-top: 1px solid #eef2f7;
  max-height: calc(100vh - 455px);
  overflow: auto;
}
.user-access-table th,
.user-access-table td {
  white-space: nowrap;
}
.user-access-row {
  cursor: pointer;
}
.user-access-row:hover {
  background: #f8fafc;
}
.access-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: #FFF4D1;
  color: #D89400;
}
.access-role-pill.role-admin-master { background: #FFF4D1; color: #3730a3; }
.access-role-pill.role-admin-proyek { background: #f0f9ff; color: #0369a1; }
.access-role-pill.role-admin-ritel { background: #ecfdf5; color: #047857; }
.access-role-pill.role-sales { background: #fff7ed; color: #c2410c; }
.access-role-pill.role-viewer { background: #f8fafc; color: #475569; }
.text-success { color: #16a34a; font-weight: 800; }
.text-danger { color: #dc2626; font-weight: 800; }
.muted-cell { color: #64748b; text-align: center; padding: 18px !important; }
.user-access-modal-card {
  max-width: 980px;
  width: min(980px, calc(100vw - 32px));
}
.user-access-form {
  padding: 16px;
  display: grid;
  gap: 14px;
}
.user-access-save-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 2px;
}
.user-access-save-row .btn {
  min-width: 140px;
}
.access-overview-top.compact,
.access-summary-grid.compact {
  padding: 0;
}
.user-access-table-card .user-access-overview {
  padding: 14px 16px;
}
.user-access-table-card .access-overview-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.user-access-table-card .access-summary-grid {
  margin-top: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1180px) {
  .user-access-filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .user-access-table-card .access-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .user-access-filterbar,
  .user-access-table-card .access-overview-top,
  .user-access-table-card .access-summary-grid {
    grid-template-columns: 1fr;
  }
  .user-access-table-wrap {
    max-height: none;
  }
  .user-access-table-header {
    flex-direction: column;
    align-items: stretch;
  }
  .user-add-btn {
    width: 100%;
  }
}

/* Patch 49 - Settings > Assignment Customer */
.assignment-table-card,
.assignment-modal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.assignment-table-card {
  padding: 16px;
}

.assignment-table-header {
  align-items: flex-start;
  margin-bottom: 12px;
}

.assignment-table-header h3 {
  margin: 0;
}

.assignment-table-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.assignment-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.assignment-stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assignment-stat-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.assignment-stat-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.assignment-filterbar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(115px, .8fr) minmax(150px, .9fr) minmax(125px, .8fr) minmax(130px, .8fr) minmax(140px, .8fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.assignment-filterbar label,
.assignment-sales-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.assignment-filterbar input,
.assignment-filterbar select,
.assignment-sales-search-wrap input {
  min-height: 38px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  outline: none;
}

.assignment-filterbar input:focus,
.assignment-filterbar select:focus,
.assignment-sales-search-wrap input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .16);
}

.assignment-table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.assignment-table th,
.assignment-table td {
  vertical-align: top;
  font-size: 12px;
}

.assignment-table td strong {
  display: block;
  color: #0f172a;
}

.assignment-table td small {
  display: block;
  color: #94a3b8;
  margin-top: 3px;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-row {
  cursor: default;
}

.assignment-row:hover {
  background: #f8fafc;
}

.assignment-unassigned {
  color: #b45309;
  font-weight: 800;
}

.assignment-modal-card {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assignment-modal-body {
  overflow: auto;
}

.assignment-stakeholder-summary {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.assignment-stakeholder-summary strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
}

.assignment-stakeholder-summary span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.assignment-sales-checklist {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  max-height: 320px;
  overflow: auto;
  background: #ffffff;
}

.assignment-sales-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
}

.assignment-sales-option:last-child {
  border-bottom: none;
}

.assignment-sales-option:hover {
  background: #f8fafc;
}

.assignment-sales-option input {
  margin-top: 3px;
}

.assignment-sales-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assignment-sales-option strong {
  color: #0f172a;
  font-size: 13px;
}

.assignment-sales-option small {
  color: #64748b;
  font-size: 11px;
}

.assignment-empty {
  padding: 14px;
  color: #64748b;
  font-size: 13px;
}

.assignment-save-row {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .assignment-filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .assignment-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .assignment-filterbar,
  .assignment-stats-grid {
    grid-template-columns: 1fr;
  }
  .assignment-table-card {
    padding: 12px;
  }
  .assignment-table-wrap {
    max-height: none;
  }
}

/* PATCH 51 - ASSIGNMENT CHECKLIST + SALES MAP ACCESS POLISH */
.assignment-sales-checklist {
  padding: 8px;
  background: #f8fafc;
}

.assignment-sales-option {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center !important;
  gap: 10px;
  margin: 0 0 8px 0;
  padding: 11px 12px;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px;
  background: #ffffff;
}

.assignment-sales-option:last-child {
  margin-bottom: 0;
}

.assignment-sales-option input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 0 !important;
  accent-color: #ECA611;
}

.assignment-sales-option span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.assignment-sales-option strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.assignment-sales-option small {
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

/* PATCH 52 - Settings Konfigurasi */
.config-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.config-table-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-soft, #edf1f7);
}
.config-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 6px;
}
.config-stat-card {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 78px;
}
.config-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.config-stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}
.config-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.config-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 10px;
  align-items: end;
  padding: 12px 18px 16px;
  border-bottom: 1px solid var(--border-soft, #edf1f7);
}
.config-filterbar label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.config-filterbar input,
.config-filterbar select {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.config-table-wrap {
  max-height: calc(100vh - 430px);
  min-height: 240px;
  overflow: auto;
}
.config-table th,
.config-table td {
  vertical-align: top;
}
.config-table tbody tr {
  cursor: pointer;
}
.config-table tbody tr:hover {
  background: #f8fafc;
}
.config-category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ff;
  color: #2455c3;
  font-weight: 800;
  font-size: 11px;
  white-space: nowrap;
}
.config-value-cell {
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.config-modal-card {
  width: min(620px, calc(100vw - 32px));
}
.config-key-box {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.config-key-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.config-key-box strong {
  font-size: 15px;
  color: var(--text);
}
.config-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  min-height: 86px;
}
.config-save-row {
  justify-content: flex-end;
  margin-top: 14px;
}
@media (max-width: 1100px) {
  .config-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .config-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-filterbar { grid-template-columns: 1fr; }
  .config-table-wrap { max-height: none; }
}

/* PATCH 53 - Konfigurasi layout fix */
#settingsView.settings-config-view {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
#settingsView.settings-config-view.hidden {
  display: none !important;
}
#settingsView .settings-config-header {
  margin: 0 0 16px !important;
  padding: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
}
#settingsView .settings-config-header h2,
#settingsView .settings-config-header p {
  transform: none !important;
  position: static !important;
}
#settingsView .config-table-card {
  margin-top: 0 !important;
}
#settingsView .config-stats-grid:empty {
  display: none !important;
}
#settingsView .config-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 14px 14px 8px;
}
#settingsView .config-filterbar {
  grid-template-columns: minmax(280px, 1fr) 220px;
  padding: 12px 14px 14px;
}
#settingsView .config-table-wrap {
  max-height: calc(100vh - 360px);
  min-height: 220px;
}
@media (max-width: 1100px) {
  #settingsView .config-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #settingsView .settings-config-header { flex-direction: column !important; align-items: stretch !important; }
  #settingsView .config-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #settingsView .config-filterbar { grid-template-columns: 1fr; }
  #settingsView .config-table-wrap { max-height: none; }
}

/* PATCH 58 - Konfigurasi instant render + white table polish */
#settingsView .config-table-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06) !important;
  padding: 16px !important;
  overflow: hidden !important;
}

#settingsView .config-table-header {
  padding: 0 0 14px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

#settingsView .config-stats-grid {
  padding: 14px 0 10px !important;
  gap: 10px !important;
}

#settingsView .config-stat-card {
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
}

#settingsView .config-filterbar {
  padding: 10px 0 14px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff !important;
}

#settingsView .config-filterbar input,
#settingsView .config-filterbar select {
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
}

#settingsView .config-table-wrap {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  max-height: calc(100vh - 390px) !important;
  min-height: 220px !important;
  overflow: auto !important;
}

#settingsView .config-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
}

#settingsView .config-table thead th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
  border-bottom: 1px solid #e5e7eb !important;
}

#settingsView .config-table th,
#settingsView .config-table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff;
  font-size: 13px !important;
}

#settingsView .config-table tbody tr:hover td {
  background: #f8fafc !important;
}

#settingsView .config-category-pill {
  background: #eef4ff !important;
  color: #2455c3 !important;
}

/* PATCH 59 - Konfigurasi table card final polish */
#settingsView.settings-config-view {
  background: transparent !important;
}

#settingsView .config-table-card {
  background: #ffffff !important;
  border: 1px solid #dfe6f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07) !important;
  padding: 16px !important;
  margin-top: 16px !important;
  overflow: hidden !important;
}

#settingsView .config-table-header {
  background: #ffffff !important;
  padding: 2px 0 14px !important;
  border-bottom: 1px solid #e6ebf2 !important;
}

#settingsView .config-stats-grid {
  background: #ffffff !important;
  padding: 14px 0 12px !important;
  gap: 10px !important;
}

#settingsView .config-stat-card {
  background: #f8fafc !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 14px !important;
}

#settingsView .config-filterbar {
  background: #ffffff !important;
  padding: 10px 0 14px !important;
  border-bottom: 0 !important;
}

#settingsView .config-table-wrap {
  background: #ffffff !important;
  border: 1px solid #dfe6f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  overflow: auto !important;
}

#settingsView table.config-table,
#settingsView .config-table {
  width: 100% !important;
  background: #ffffff !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#settingsView .config-table thead th {
  background: #f8fafc !important;
  color: #64748b !important;
  border-bottom: 1px solid #dfe6f0 !important;
}

#settingsView .config-table tbody tr,
#settingsView .config-table tbody td {
  background: #ffffff !important;
}

#settingsView .config-table tbody tr:hover td {
  background: #f8fafc !important;
}

#settingsView .config-table th,
#settingsView .config-table td {
  padding: 13px 14px !important;
  border-bottom: 1px solid #e8edf3 !important;
}

#settingsView .config-category-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 4px 9px !important;
  min-height: 0 !important;
  border-radius: 999px !important;
  background: #eef4ff !important;
  color: #2455c3 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

/* PATCH 61 - Clean leaked CSS + Konfigurasi table compact */
#settingsView.settings-config-view { background: transparent !important; }
#settingsView .config-table-card {
  background: #ffffff !important; border: 1px solid #e5e7eb !important; border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.06) !important; padding: 16px !important; margin-top: 16px !important; overflow: hidden !important;
}
#settingsView .config-table-wrap {
  background: #ffffff !important; border: 1px solid #e5e7eb !important; border-radius: 14px !important; overflow: auto !important;
  max-height: calc(100vh - 430px) !important; min-height: 220px !important;
}
#settingsView .config-table { width: 100% !important; border-collapse: collapse !important; border-spacing: 0 !important; background: #ffffff !important; }
#settingsView .config-table thead th {
  background: #f8fafc !important; color: #64748b !important; font-size: 11px !important; font-weight: 800 !important;
  text-transform: uppercase !important; letter-spacing: .03em !important; padding: 11px 12px !important; border-bottom: 1px solid #e5e7eb !important;
}
#settingsView .config-table tbody tr, #settingsView .config-table tbody td { background: #ffffff !important; }
#settingsView .config-table tbody tr:hover td { background: #f8fafc !important; }
#settingsView .config-table td {
  color: #0f172a !important; font-size: 12px !important; font-weight: 400 !important; line-height: 1.35 !important;
  padding: 12px 12px !important; border-bottom: 1px solid #e8edf3 !important; vertical-align: top !important;
}
#settingsView .config-table td strong, #settingsView .config-table .config-setting-name, #settingsView .config-table .config-value {
  font-size: 12px !important; font-weight: 500 !important;
}
#settingsView .config-table .config-value { font-weight: 600 !important; }
#settingsView .config-category-pill {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; width: auto !important; min-width: 0 !important;
  padding: 3px 8px !important; min-height: 0 !important; border-radius: 999px !important; background: #eef4ff !important; color: #2455c3 !important;
  font-size: 10.5px !important; font-weight: 700 !important; white-space: nowrap !important;
}

/* PATCH 66 - Dashboard Monitoring Final */
.dashboard-grid-final {
  align-items: stretch;
}
.dashboard-wide-panel {
  min-height: 220px;
}
.dashboard-list .list-item {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
}
.dashboard-list .list-item:last-child {
  border-bottom: 0;
}
.dashboard-list .list-item strong {
  display: block;
  font-size: 13px;
  color: #111827;
  margin-bottom: 4px;
}
.dashboard-list .list-item span {
  display: block;
  font-size: 12px;
  color: #667085;
  line-height: 1.45;
}
.dashboard-performance-list {
  display: flex;
  flex-direction: column;
}
.dashboard-performance-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
}
.dashboard-performance-row:last-child {
  border-bottom: 0;
}
.dashboard-performance-main strong {
  display: block;
  font-size: 13px;
  color: #111827;
  margin-bottom: 3px;
}
.dashboard-performance-main span {
  display: block;
  font-size: 11.5px;
  color: #667085;
}
.dashboard-performance-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.dashboard-performance-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #475467;
  font-size: 11.5px;
  white-space: nowrap;
}
.dashboard-performance-metrics b {
  color: #111827;
}
@media (max-width: 900px) {
  .dashboard-performance-row {
    grid-template-columns: 1fr;
  }
  .dashboard-performance-metrics {
    justify-content: flex-start;
  }
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dashboard-period-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.dashboard-period-text {
  min-width: 230px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}
.btn-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
.dashboard-chart-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(340px, 1.15fr);
  gap: 16px;
  margin: 16px 0;
}
.dashboard-chart-panel {
  min-height: 180px;
}
.dashboard-comparison-chart,
.dashboard-sales-pipe {
  padding: 14px;
}
.dashboard-compare-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.dashboard-compare-total strong {
  font-size: 28px;
  line-height: 1;
  color: #111827;
}
.dashboard-compare-total span {
  font-size: 12.5px;
  color: #667085;
}
.dashboard-stacked-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}
.dashboard-stacked-segment {
  display: block;
  min-width: 0;
}
.dashboard-stacked-visit {
  background: #2563eb;
}
.dashboard-stacked-nonvisit {
  background: #d1d5db;
}
.dashboard-compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: #475467;
}
.dashboard-compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.legend-visit { background: #2563eb; }
.legend-nonvisit { background: #16a34a; }
.dashboard-pipe-row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f4;
}
.dashboard-pipe-row:last-child {
  border-bottom: 0;
}
.dashboard-pipe-label strong {
  display: block;
  font-size: 12.5px;
  color: #111827;
  margin-bottom: 3px;
}
.dashboard-pipe-label span {
  display: block;
  font-size: 11.5px;
  color: #667085;
  line-height: 1.35;
}
.dashboard-pipe-track {
  height: 12px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.dashboard-pipe-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #9ca3af;
}
@media (max-width: 980px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-header-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .dashboard-period-text {
    min-width: 170px;
    font-size: 12px;
  }
  .dashboard-pipe-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* PATCH 68 - Dashboard chart & period polish */
.dashboard-header-actions {
  gap: 12px;
}
.dashboard-period-control {
  border-radius: 14px;
}
.dashboard-period-text {
  min-width: 250px;
  font-weight: 800;
}
.dashboard-chart-grid {
  grid-template-columns: minmax(420px, 1.08fr) minmax(340px, .92fr) !important;
  gap: 16px !important;
  margin: 16px 0 !important;
  align-items: stretch !important;
}
.dashboard-chart-panel {
  min-height: 240px !important;
  overflow: hidden !important;
}
.dashboard-comparison-chart {
  padding: 10px 14px 12px !important;
}
.dashboard-sales-pipe {
  padding: 18px 16px !important;
}
.dashboard-line-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 8px;
}
.dashboard-line-summary strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: #111827;
}
.dashboard-line-summary span {
  font-size: 12px;
  color: #667085;
}
.dashboard-compare-legend.compact {
  margin-top: 0 !important;
  justify-content: flex-end;
}
.dashboard-line-chart {
  width: 100%;
  height: 236px;
  display: block;
  overflow: visible;
}
.chart-grid-line {
  stroke: #dfe5ee;
  stroke-width: 1;
}
.chart-y-label,
.chart-x-label {
  fill: #64748b;
  font-size: 10.5px;
  font-weight: 600;
}
.chart-x-label {
  text-anchor: middle;
}
.chart-area {
  opacity: .18;
}
.chart-area-visit { fill: #3b82f6; }
.chart-area-nonvisit { fill: #16a34a; }
.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-line-visit { stroke: #3b82f6; }
.chart-line-nonvisit { stroke: #16a34a; }
.chart-point {
  stroke: #ffffff;
  stroke-width: 2;
}
.chart-point-visit { fill: #3b82f6; }
.chart-point-nonvisit { fill: #16a34a; }
.dashboard-sales-bar-row {
  padding: 10px 0 14px;
}
.dashboard-sales-bar-row + .dashboard-sales-bar-row {
  border-top: 1px solid #edf0f4;
}
.dashboard-sales-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.dashboard-sales-bar-head span {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}
.dashboard-sales-bar-head strong {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}
.dashboard-sales-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e9edf3;
  overflow: hidden;
  border: 1px solid #e1e6ee;
}
.dashboard-sales-bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #3b82f6;
}
.kpi-grid .kpi-card {
  min-height: 96px;
}
.dashboard-grid-final {
  gap: 16px !important;
}
.dashboard-grid-final .panel {
  min-height: 230px;
}
@media (max-width: 1100px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  .dashboard-period-text {
    min-width: 170px;
    font-size: 12px;
  }
  .dashboard-line-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-line-chart {
    height: 210px;
  }
}

/* PATCH 69 - Dashboard graph smooth + equal cards */
.dashboard-chart-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  margin: 16px 0 !important;
}
.dashboard-chart-panel {
  min-height: 320px !important;
  height: 320px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.dashboard-chart-panel .panel-header {
  min-height: 54px !important;
  flex: 0 0 auto !important;
}
.dashboard-comparison-chart,
.dashboard-sales-pipe {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 12px 16px 14px !important;
  overflow: hidden !important;
}
.dashboard-line-summary {
  margin: 0 0 4px !important;
}
.dashboard-line-chart {
  height: 230px !important;
}
.chart-line {
  stroke-width: 3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.chart-area {
  opacity: .22 !important;
}
.dashboard-sales-pipe {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}
.dashboard-sales-bar-row {
  padding: 4px 0 10px !important;
}
.dashboard-sales-bar-row + .dashboard-sales-bar-row {
  border-top: 0 !important;
}
.dashboard-sales-bar-head {
  margin-bottom: 8px !important;
}
.dashboard-sales-bar-track {
  height: 14px !important;
  background: #e9edf3 !important;
  border: 1px solid #e1e6ee !important;
}
.dashboard-sales-bar-track span {
  background: #3b82f6 !important;
}
@media (max-width: 1100px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-chart-panel {
    height: auto !important;
    min-height: 300px !important;
  }
}

/* PATCH 71 - Dashboard smooth wave + equal cards */
.dashboard-period-text {
  min-width: 230px !important;
  text-align: center !important;
}
.dashboard-chart-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 16px !important;
}
.dashboard-chart-panel {
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
  display: flex !important;
  flex-direction: column !important;
}
.dashboard-chart-panel .panel-header {
  height: 52px !important;
  min-height: 52px !important;
}
.dashboard-comparison-chart,
.dashboard-sales-pipe {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.dashboard-line-summary {
  min-height: 38px !important;
  margin-bottom: 2px !important;
}
.dashboard-line-chart {
  height: 220px !important;
}
.chart-line {
  stroke-width: 3.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.chart-area {
  opacity: .16 !important;
}
.chart-point {
  display: block !important;
}
.dashboard-sales-pipe {
  padding-top: 22px !important;
}
@media (max-width: 1100px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-chart-panel {
    height: auto !important;
    min-height: 300px !important;
    max-height: none !important;
  }
}

/* PATCH 65 - Audit Log */
.audit-log-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}
.audit-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 14px 4px;
}
.audit-stat-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
}
.audit-stat-card span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.audit-stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
  color: #111827;
}
.audit-stat-card small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
}
.audit-filterbar {
  display: grid;
  grid-template-columns: 150px 150px minmax(260px, 1fr) 180px 180px 160px;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #edf2f7;
  align-items: end;
}
.audit-filterbar label {
  font-size: 11px;
  font-weight: 800;
  color: #111827;
}
.audit-filterbar input,
.audit-filterbar select {
  margin-top: 6px;
  width: 100%;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
}
.audit-table-wrap {
  margin: 0 14px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: auto;
  max-height: 520px;
}
.audit-table {
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.audit-table thead th {
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.audit-table tbody td {
  background: #fff;
  color: #111827;
  font-size: 12.5px;
  font-weight: 500;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
}
.audit-table tbody tr:hover td {
  background: #f8fafc;
}
.audit-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2455c3;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.audit-pagination-row {
  padding: 0 14px 14px;
}
@media (max-width: 1100px) {
  .audit-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filterbar .filter-wide { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .audit-stats-grid, .audit-filterbar { grid-template-columns: 1fr; }
}

/* PATCH 88 - Dashboard chart dots and stable lower card order */
.dashboard-line-chart .chart-point {
  display: block !important;
  opacity: 1 !important;
  stroke: #ffffff !important;
  stroke-width: 2px !important;
  cursor: pointer !important;
}
.dashboard-line-chart .chart-point-visit { fill: #3b82f6 !important; }
.dashboard-line-chart .chart-point-nonvisit { fill: #16a34a !important; }
.dashboard-line-chart .chart-hit-area {
  fill: transparent !important;
  stroke: transparent !important;
  cursor: pointer !important;
  pointer-events: all !important;
}
.dashboard-line-chart .chart-point-group:hover .chart-point {
  r: 4.8;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .18));
}
.dashboard-grid-final .dashboard-wide-panel {
  min-height: 230px;
}

/* PATCH 90 - UI Foundation: compact header, brand color, logo, Audit under Settings */
:root {
  --primary: #ECA611;
  --primary-hover: #D89400;
  --primary-soft: #FFF4D1;
  --brand-yellow: #FDC823;
  --brand-orange: #ECA611;
}

.brand-logo-img.small {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
  padding: 5px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  flex: 0 0 auto;
}

.sidebar-header {
  align-items: center;
}

.sidebar-brand-text strong {
  line-height: 1.05;
}

.topbar {
  height: 72px;
  align-items: center;
  background: rgba(246, 247, 249, 0.92);
}

.breadcrumb {
  display: none !important;
}

.page-headline h1,
.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.page-headline p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.content {
  padding-top: 22px;
}

/* Hilangkan pengulangan judul di dalam halaman; actions tetap terlihat. */
.page-view > .section-header > div:first-child {
  display: none !important;
}

.page-view > .section-header {
  justify-content: flex-end;
  margin-bottom: 14px;
  min-height: 0;
}

#dashboardView > .section-header,
#clientsView > .section-header,
#reportsView > .section-header,
#remindersView > .section-header,
#mapCustomerView > .section-header,
#mapSalesView > .section-header,
#userAccessView > .section-header,
#assignmentCustomerView > .section-header,
#configSettingsView > .section-header,
#auditLogView > .section-header {
  margin-top: -4px;
}

.menu-item.active,
.submenu-item.active,
.menu-parent.active {
  background: var(--primary-soft) !important;
  color: #7a5200 !important;
}

.menu-item.active .menu-icon,
.submenu-item.active .submenu-icon,
.menu-parent.active .menu-icon {
  color: var(--primary) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-yellow), var(--brand-orange)) !important;
  color: #1f2933 !important;
  border-color: transparent !important;
  box-shadow: 0 10px 20px rgba(236, 166, 17, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffd64a, #de9809) !important;
}

.user-avatar,
.brand-logo {
  background: linear-gradient(135deg, var(--brand-yellow), var(--brand-orange)) !important;
  color: #1f2933 !important;
}

.login-page {
  background:
    radial-gradient(circle at top left, rgba(253, 200, 35, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(236, 166, 17, 0.12), transparent 30%),
    var(--bg-main) !important;
}

.login-company-logo {
  display: block;
  width: min(320px, 86%);
  max-height: 58px;
  object-fit: contain;
  margin: 0 auto 22px;
}

.report-print-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  font-weight: 800;
}

.report-print-logo {
  width: 220px;
  max-height: 42px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .topbar { height: auto; min-height: 70px; }
  .page-headline h1, .topbar h1 { font-size: 21px; }
  .page-headline p { font-size: 12px; }
  .page-view > .section-header { align-items: flex-start; justify-content: flex-start; }
}

/* PATCH 93 - Exact embedded logo + date display fix */
.brand-logo-img.small {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 4px !important;
}
.login-company-logo {
  width: min(300px, 88%) !important;
  max-height: 72px !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto 20px !important;
}
.sidebar-header .sidebar-brand-text strong {
  line-height: 1.05 !important;
}
.report-print-logo {
  width: 260px !important;
  max-height: 52px !important;
  object-fit: contain !important;
}

/* PATCH 94 - Login UI polish + password wording */
body.app-mode-login .login-page {
  display: grid !important;
  place-items: center !important;
  padding: 28px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(253, 200, 35, 0.20), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(236, 166, 17, 0.14), transparent 30%),
    #f7f8fa !important;
}

body.app-mode-login .login-card {
  max-width: 420px !important;
  padding: 30px 30px 28px !important;
  border-radius: 26px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.10) !important;
}

body.app-mode-login .login-company-logo {
  display: block;
  width: min(300px, 90%) !important;
  height: auto !important;
  max-height: 64px !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto 22px !important;
}

body.app-mode-login .login-brand,
body.app-mode-login .login-footer,
body.app-mode-login .login-note {
  display: none !important;
}

body.app-mode-login .login-title {
  display: block !important;
  margin: 0 0 8px !important;
  font-size: 27px !important;
  line-height: 1.12 !important;
  font-weight: 850 !important;
  letter-spacing: -0.04em !important;
  color: #111827 !important;
}

body.app-mode-login .login-title h2 {
  margin: 0 !important;
  font-size: 27px !important;
  line-height: 1.12 !important;
  font-weight: 850 !important;
  letter-spacing: -0.04em !important;
}

body.app-mode-login .login-title p,
body.app-mode-login .login-desc,
body.app-mode-login .login-subtitle {
  margin: 0 0 24px !important;
  color: #667085 !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
}

body.app-mode-login .login-form {
  gap: 14px !important;
}

body.app-mode-login label {
  font-size: 12.5px !important;
  font-weight: 750 !important;
  color: #1f2937 !important;
}

body.app-mode-login input {
  min-height: 45px !important;
  border-radius: 12px !important;
  border-color: #e1e5ec !important;
  background: #ffffff !important;
}

body.app-mode-login input:focus {
  border-color: #ECA611 !important;
  box-shadow: 0 0 0 4px rgba(253, 200, 35, 0.20) !important;
}

body.app-mode-login #loginButton {
  margin-top: 4px !important;
  min-height: 46px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #FDC823, #ECA611) !important;
  color: #111827 !important;
  font-weight: 850 !important;
  box-shadow: 0 14px 26px rgba(236, 166, 17, 0.22) !important;
}

body.app-mode-login #loginButton:disabled {
  opacity: 0.72 !important;
  cursor: wait !important;
}

body.app-mode-login #loginMessage {
  margin-top: 2px !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

@media (max-width: 560px) {
  body.app-mode-login .login-card {
    max-width: 100% !important;
    padding: 26px 22px !important;
    border-radius: 22px !important;
  }
  body.app-mode-login .login-title,
  body.app-mode-login .login-title h2 {
    font-size: 24px !important;
  }
}

/* PATCH 96 - Login title center + no leaked CSS */
body.app-mode-login .login-card {
  max-width: 430px !important;
  padding: 32px 32px 30px !important;
}

body.app-mode-login .login-company-logo {
  display: block !important;
  width: min(310px, 92%) !important;
  max-height: 68px !important;
  object-fit: contain !important;
  margin: 0 auto 18px !important;
}

body.app-mode-login .login-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0 0 18px !important;
}

body.app-mode-login .login-title h2 {
  display: block !important;
  width: 100% !important;
  margin: 0 auto !important;
  text-align: center !important;
  font-size: 25px !important;
  line-height: 1.18 !important;
  font-weight: 720 !important;
  letter-spacing: -0.018em !important;
  color: #111827 !important;
}

body.app-mode-login .login-instruction {
  display: block !important;
  width: 100% !important;
  margin: 0 0 18px !important;
  text-align: left !important;
  color: #667085 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

body.app-mode-login .login-title p,
body.app-mode-login .login-desc:not(.login-instruction),
body.app-mode-login .login-subtitle:not(.login-instruction) {
  display: none !important;
}

body.app-mode-login .login-form {
  gap: 13px !important;
}

@media (max-width: 560px) {
  body.app-mode-login .login-title h2 {
    font-size: 23px !important;
  }
  body.app-mode-login .login-card {
    padding: 28px 22px !important;
  }
}

/* PATCH 100 - Dashboard legend Non Visit green */
.dashboard-compare-legend .legend-nonvisit { background: #16a34a !important; }

/* PATCH 101 - Global refresh in topbar + compact header */
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.topbar-date { display: none !important; }
.topbar-refresh-btn {
  min-width: 86px;
  height: 40px;
  padding: 0 18px;
  border-radius: 13px;
  background: #ffffff;
}
#refreshDashboardBtn,
#refreshActivitiesBtn,
#refreshVisitBtn,
#refreshActivityHistoryBtn,
#refreshRemindersBtn,
#refreshMapCustomerBtn,
#refreshMapSalesBtn,
#refreshReportsBtn,
#refreshUserAccessBtn,
#refreshAssignmentCustomerBtn,
#refreshConfigSettingsBtn,
#refreshAuditLogBtn {
  display: none !important;
}
.page-view > .section-header {
  margin-top: -10px !important;
  margin-bottom: 12px !important;
}
#dashboardView > .section-header {
  margin-top: -8px !important;
}
@media (max-width: 760px) {
  .topbar-refresh-btn { height: 38px; min-width: 78px; padding: 0 14px; }
  .topbar { gap: 10px; }
}

/* PATCH 103 - Customer wording + compact page header consistency */
body.app-mode-app .page-view > .section-header:has(> :nth-child(2)) > div:first-child {
  display: none !important;
}
body.app-mode-app .page-view > .section-header {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
  border-bottom: 0 !important;
}
body.app-mode-app .page-view > .section-header .header-actions,
body.app-mode-app .page-view > .section-header > button,
body.app-mode-app .page-view > .section-header .dashboard-header-actions {
  margin-left: auto !important;
}
body.app-mode-app .topbar {
  min-height: 72px !important;
}
body.app-mode-app .page-headline h1 {
  margin-bottom: 4px !important;
}
body.app-mode-app .page-headline p {
  max-width: 880px !important;
}
@media (max-width: 760px) {
  body.app-mode-app .topbar { min-height: 64px !important; }
  body.app-mode-app .page-headline p { max-width: 100% !important; }
}

/* PATCH 108 - final performance micro guards */
.topbar-refresh.is-loading,
#topbarRefreshBtn.is-loading {
  opacity: .68;
  pointer-events: none;
}

.reason-modal-overlay {
  z-index: 10050 !important;
}
.reason-dialog {
  width: min(460px, calc(100vw - 32px)) !important;
  max-width: 460px !important;
  padding: 22px !important;
  position: relative !important;
}
.reason-dialog .modal-x,
.reason-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f3f4f6 !important;
  color: #374151 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}
.reason-content h3 {
  margin: 0 36px 8px 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #111827 !important;
}
.reason-content p {
  margin: 0 0 14px 0 !important;
  color: #667085 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
.reason-textarea {
  width: 100% !important;
  min-height: 108px !important;
  resize: vertical !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  outline: none !important;
}
.reason-textarea:focus {
  border-color: #ECA611 !important;
  box-shadow: 0 0 0 3px rgba(253, 200, 35, .25) !important;
}
.reason-actions {
  margin-top: 16px !important;
  justify-content: flex-end !important;
}

/* PATCH 105 - Non Visit customer searchable dropdown polish */
.activity-stakeholder-field { position: relative; }
.activity-stakeholder-search-wrap { position: relative; }
.activity-stakeholder-search-wrap input[type="text"] { width: 100%; }
.activity-stakeholder-dropdown {
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10080 !important;
  max-height: 280px !important;
  overflow-y: auto !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  padding: 12px 10px !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16) !important;
}
.activity-stakeholder-dropdown-title {
  padding: 0 10px 10px !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}
.activity-stakeholder-dropdown .autocomplete-option {
  width: 100% !important;
  display: block !important;
  border: 0 !important;
  background: transparent !important;
  padding: 10px 10px !important;
  border-radius: 10px !important;
  text-align: left !important;
  cursor: pointer !important;
}
.activity-stakeholder-dropdown .autocomplete-option:hover,
.activity-stakeholder-dropdown .autocomplete-option:focus {
  background: #fff7e0 !important;
  outline: none !important;
}
.activity-stakeholder-option-line {
  display: block !important;
  color: #111827 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  white-space: normal !important;
}
.activity-stakeholder-dropdown .autocomplete-option.disabled {
  opacity: .55 !important;
  cursor: not-allowed !important;
}
.activity-stakeholder-dropdown .autocomplete-empty {
  padding: 12px 10px !important;
  color: #667085 !important;
  font-size: 13px !important;
}
.activity-stakeholder-search-wrap .input-locked,
.activity-stakeholder-search-wrap input:disabled {
  background: #f3f4f6 !important;
  color: #667085 !important;
  cursor: not-allowed !important;
}

/* PATCH 118 - Report sales searchable dropdown fix */
.report-sales-autocomplete-wrap { position: relative !important; }
.report-sales-autocomplete-wrap .autocomplete-dropdown,
#reportSalesDropdown.autocomplete-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 10030 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16) !important;
  padding: 8px !important;
  max-height: 260px !important;
  overflow: auto !important;
}
.report-sales-autocomplete-wrap .autocomplete-item,
#reportSalesDropdown .autocomplete-item,
#reportSalesDropdown .autocomplete-empty {
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  display: block !important;
  cursor: pointer !important;
}
.report-sales-autocomplete-wrap .autocomplete-item:hover,
#reportSalesDropdown .autocomplete-item:hover {
  background: #fff7db !important;
}
#reportSalesDropdown .autocomplete-empty {
  cursor: default !important;
  color: #667085 !important;
  font-weight: 500 !important;
}

/* PATCH 125 - Login mobile & password manager polish
   - font-size 16px mencegah auto-zoom input di mobile
   - ukuran kartu login dibuat aman untuk viewport kecil
   - field login tetap memakai struktur standar browser password manager
*/
body.app-mode-login,
body.app-mode-login .login-page {
  min-height: 100vh !important;
  min-height: 100svh !important;
}

body.app-mode-login .login-page {
  padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
}

body.app-mode-login .login-card {
  width: min(100%, 430px) !important;
}

body.app-mode-login #loginEmail,
body.app-mode-login #loginAccessCode {
  font-size: 16px !important;
  line-height: 1.35 !important;
}

body.app-mode-login #loginButton {
  font-size: 15px !important;
}

@media (max-width: 420px) {
  body.app-mode-login .login-card {
    padding: 24px 18px !important;
    border-radius: 20px !important;
  }

  body.app-mode-login .login-company-logo {
    width: min(280px, 92%) !important;
    margin-bottom: 16px !important;
  }

  body.app-mode-login .login-title h2 {
    font-size: 22px !important;
  }

  body.app-mode-login .login-instruction {
    font-size: 12.8px !important;
  }
}

/* PATCH 127 - Styles include cleanup
   Styles.html dikonsolidasikan menjadi satu tag <style> agar patch CSS tidak dobel/terpisah.
   Tidak mengubah behavior UI; hanya mengurangi risiko CSS kebaca sebagai teks jika copy-paste parsial. */

/* PATCH 126 - Mobile app-shell hardening
   - topbar/header lebih aman di layar kecil dan foldable
   - tabel admin tetap bisa discroll di mobile meskipun belum punya mobile-card renderer
   - mencegah overflow horizontal yang bikin halaman terasa melebar
*/
html,
body,
#app,
.app-shell,
.main,
.content {
  max-width: 100%;
}

html,
body {
  overflow-x: hidden;
}

body.app-mode-app .app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-mobile.app-mode-app .topbar {
  height: auto !important;
  min-height: 64px !important;
  align-items: flex-start !important;
  padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)) !important;
  gap: 10px !important;
}

body.is-mobile.app-mode-app .topbar-left {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  align-items: flex-start !important;
}

body.is-mobile.app-mode-app .page-headline {
  min-width: 0 !important;
}

body.is-mobile.app-mode-app .page-headline h1 {
  font-size: 18px !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere !important;
}

body.is-mobile.app-mode-app .page-headline p {
  font-size: 12px !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

body.is-mobile.app-mode-app .topbar-right {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
}

body.is-mobile.app-mode-app .content {
  padding: 14px max(12px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  overflow-x: hidden !important;
}

body.is-mobile .dashboard-header-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-content: stretch !important;
  gap: 10px !important;
}

body.is-mobile .dashboard-period-control {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) 38px !important;
  gap: 8px !important;
}

body.is-mobile .dashboard-period-text {
  min-width: 0 !important;
  width: 100% !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}

body.is-mobile .dashboard-chart-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

body.is-mobile .dashboard-chart-panel,
body.is-mobile .panel,
body.is-mobile .data-card,
body.is-mobile .toolbar-card {
  min-width: 0 !important;
}

body.is-mobile .panel-header {
  gap: 8px !important;
  flex-wrap: wrap !important;
}

body.is-mobile .dashboard-comparison-chart,
body.is-mobile .dashboard-sales-pipe {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Patch lama menyembunyikan semua .table-wrap di mobile.
   Untuk halaman admin yang belum punya mobile-card-list, tabel harus tetap tampil dan bisa digeser. */
body.is-mobile .user-access-table-wrap,
body.is-mobile .assignment-table-wrap,
body.is-mobile .config-table-wrap,
body.is-mobile .audit-table-wrap {
  display: block !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.is-mobile .user-access-table-wrap table,
body.is-mobile .assignment-table-wrap table,
body.is-mobile .config-table-wrap table,
body.is-mobile .audit-table-wrap table {
  min-width: 760px !important;
}

body.is-mobile input,
body.is-mobile select,
body.is-mobile textarea {
  font-size: 16px !important;
}

/* PATCH 129 - Mobile viewport hardening + prevent cropped page on mobile browser/web app */
html,
body {
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
}

.app-shell,
.main {
  min-height: 100dvh;
}

body.is-mobile .app-shell,
body.is-mobile .main {
  min-height: 100dvh !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.is-mobile .content {
  min-height: calc(100dvh - var(--topbar-height)) !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.is-mobile .view,
body.is-mobile .card,
body.is-mobile .kpi-card,
body.is-mobile .dashboard-card,
body.is-mobile .filter-panel {
  max-width: 100% !important;
}

body.is-mobile .client-detail-modal .modal-actions .btn.hidden,
body.is-mobile .modal-actions .btn.hidden {
  display: none !important;
}

/* PATCH 130 - Mobile full-width guard for Apps Script mobile iframe/webview */
html.is-mobile-root,
html.is-mobile-root body,
html.is-mobile-root #app {
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body.is-mobile #app,
body.is-mobile .app-shell,
body.is-mobile .main,
body.is-mobile .topbar,
body.is-mobile .content {
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0 !important;
}

body.is-mobile .main {
  margin-left: 0 !important;
  flex: 1 1 auto !important;
}

body.is-mobile .view,
body.is-mobile .panel,
body.is-mobile .toolbar-card,
body.is-mobile .data-card,
body.is-mobile .kpi-card,
body.is-mobile .modal-card {
  width: 100% !important;
  max-width: 100% !important;
}

body.is-mobile table {
  max-width: none;
}

body.is-mobile .login-page {
  width: 100vw !important;
  min-height: 100svh !important;
  padding-left: max(14px, env(safe-area-inset-left)) !important;
  padding-right: max(14px, env(safe-area-inset-right)) !important;
}

body.is-mobile .login-card {
  width: 100% !important;
  max-width: 420px !important;
}

/* PATCH 132 - Performance/loading UX + stronger mobile viewport crop guard */
.btn.is-loading,
button.is-loading {
  opacity: 0.72;
  cursor: wait !important;
}

html.is-mobile-root,
html.is-mobile-root body {
  width: var(--jaku-vw, 100vw) !important;
  max-width: var(--jaku-vw, 100vw) !important;
}

html.is-mobile-root body {
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  left: 0 !important;
  right: auto !important;
}

body.is-mobile #app,
body.is-mobile .app-shell,
body.is-mobile .main,
body.is-mobile .topbar,
body.is-mobile .content,
body.is-mobile .login-page {
  width: var(--jaku-vw, 100vw) !important;
  max-width: var(--jaku-vw, 100vw) !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.is-mobile .content {
  box-sizing: border-box !important;
}

@media (max-width: 900px), (pointer: coarse) {
  body.app-mode-app .main {
    margin-left: 0 !important;
  }
  body.app-mode-app #app,
  body.app-mode-app .app-shell,
  body.app-mode-app .main {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* PATCH 135 - User delete action layout cleanup */
.user-access-save-row.split-actions {
  justify-content: space-between;
  gap: 12px;
}
.user-access-save-row .left-actions,
.user-access-save-row .right-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


.filter-locked{opacity:.55}
.reminder-table th:nth-child(2),.reminder-table td:nth-child(2){max-width:160px}
.reminder-table th:nth-child(3),.reminder-table td:nth-child(3){width:80px}
.reminder-table th:nth-child(4),.reminder-table td:nth-child(4){width:78px}
.reminder-table th:nth-child(6),.reminder-table td:nth-child(6){min-width:200px;white-space:normal}
.reminder-table th:nth-child(7),.reminder-table td:nth-child(7){min-width:200px;white-space:normal}

/* Kartu ringkasan sejajar dengan tombol aksi supaya sisi kanan tidak kosong */
.stats-with-action {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}
.stats-with-action .client-stats-grid {
  flex: 1 1 auto;
  margin-bottom: 0;
}
.stats-with-action .stats-action-btn {
  flex: 0 0 auto;
  align-self: flex-start;
  white-space: nowrap;
}
.stats-with-action .stats-action-btn.hidden { display: none; }
@media (max-width: 900px) {
  .stats-with-action { flex-direction: column; }
  .stats-with-action .stats-action-btn { align-self: stretch; }
}


/* Lebar kolom laporan: kolom pendek dikunci supaya Catatan & Hasil kebagian ruang */
.report-table { table-layout: auto; }
.report-table th[data-col="date"], .report-table td[data-col="date"] { width: 88px; }
.report-table th[data-col="kindLabel"], .report-table td[data-col="kindLabel"] { width: 84px; }
.report-table th[data-col="activityType"], .report-table td[data-col="activityType"] { width: 96px; white-space: nowrap; }
.report-table th[data-col="contactPic"], .report-table td[data-col="contactPic"] { width: 90px; }
.report-table th[data-col="nextActionDate"], .report-table td[data-col="nextActionDate"] { width: 96px; }
.report-table th[data-col="salesName"], .report-table td[data-col="salesName"] { width: 120px; }
.report-table td[data-col="activityNote"], .report-table td[data-col="result"] { min-width: 180px; }
.report-table td[data-col="stakeholderLabel"], .report-table td[data-col="projectLabel"] { min-width: 140px; }


/* lebar kolom laporan v2 - dipaksa supaya Catatan & Hasil kebagian ruang */
.report-table { table-layout: fixed; width: 100%; }
.report-table th, .report-table td { word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; }
.report-table th[data-col="date"], .report-table td[data-col="date"] { width: 86px !important; }
.report-table th[data-col="kindLabel"], .report-table td[data-col="kindLabel"] { width: 78px !important; }
.report-table th[data-col="salesName"], .report-table td[data-col="salesName"] { width: 108px !important; }
.report-table th[data-col="activityType"], .report-table td[data-col="activityType"] { width: 92px !important; }
.report-table th[data-col="contactPic"], .report-table td[data-col="contactPic"] { width: 64px !important; }
.report-table th[data-col="nextActionDate"], .report-table td[data-col="nextActionDate"] { width: 92px !important; }
.report-table th[data-col="stakeholderLabel"], .report-table td[data-col="stakeholderLabel"] { width: 150px !important; }
.report-table th[data-col="projectLabel"], .report-table td[data-col="projectLabel"] { width: 120px !important; }
.report-table th[data-col="activityNote"], .report-table td[data-col="activityNote"] { width: auto !important; min-width: 170px; }
.report-table th[data-col="result"], .report-table td[data-col="result"] { width: auto !important; min-width: 150px; }


/* Dropdown filter proyek: dulu tidak punya aturan posisi sendiri seperti
   picker customer dan sales, jadi daftarnya tidak pernah kelihatan. */
#reportProjectFilterWrap { position: relative !important; }
#reportProjectFilterWrap .autocomplete-dropdown,
#reportProjectDropdown.autocomplete-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 10030 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16) !important;
  padding: 8px !important;
  max-height: 260px !important;
  overflow: auto !important;
}
#reportProjectDropdown.hidden { display: none !important; }
#reportProjectFilterWrap .autocomplete-item,
#reportProjectDropdown .autocomplete-item {
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  display: block !important;
  cursor: pointer !important;
}
#reportProjectDropdown .autocomplete-item:hover { background: #f3f4f6 !important; }


/* Titik proyek: bentuk sama dengan customer, warna oranye */
.jaku-map-pin-icon.project .jaku-map-pin {
  background: #f59e0b !important;
  border-color: #ffffff !important;
}
.jaku-map-pin-icon.project .jaku-map-pin span { background: #ffffff !important; }


/* Kotak Search di Map Sales dan Map Customer: posisi dropdown */
#mapSalesSearchWrap { position: relative !important; }
#mapSalesSearchWrap .autocomplete-dropdown,
#mapSalesSearchDropdown.autocomplete-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 10030 !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16) !important;
  padding: 8px !important;
  max-height: 260px !important;
  overflow: auto !important;
}
#mapSalesSearchDropdown.hidden { display: none !important; }
#mapSalesSearchDropdown .autocomplete-item {
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  display: block !important;
  cursor: pointer !important;
}
#mapSalesSearchDropdown .autocomplete-item small { display: block; font-weight: 600; color: #6b7280; }
#mapSalesSearchDropdown .autocomplete-item:hover { background: #f3f4f6 !important; }


/* rebrand penetron */
:root {
  --penetron-blue: #1B3C87;
  --penetron-blue-dark: #14306E;
  --penetron-blue-soft: #E8EDF8;
}

/* Sidebar: logo Penetron + subtitle, teks nama disembunyikan dari JS */
.sidebar-header { flex-direction: column; align-items: flex-start; gap: 10px; }
.brand-logo-img.small, #sidebarLogoImg {
  width: 100% !important;
  max-width: 190px !important;
  height: auto !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  background: transparent !important;
}
.sidebar-brand-text span, #appBrandSubtitle {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--penetron-blue) !important;
}

/* Aksen sidebar & highlight menu jadi biru Penetron (tombol tetap oranye) */
.menu-item:hover, .submenu-item:hover {
  background: var(--penetron-blue-soft) !important;
  color: var(--penetron-blue) !important;
}
.menu-item.active, .submenu-item.active {
  background: var(--penetron-blue-soft) !important;
  color: var(--penetron-blue-dark) !important;
}
.menu-item.active svg, .menu-item.active .menu-icon,
.submenu-item.active svg, .submenu-item.active .menu-icon { color: var(--penetron-blue-dark) !important; }

/* Ikon kartu pilihan laporan & label laporan aktif jadi biru */
.report-choice-icon {
  background: var(--penetron-blue-soft) !important;
  color: var(--penetron-blue) !important;
}
.report-choice-card.active, .report-choice-card:hover {
  border-color: var(--penetron-blue) !important;
  background: #f6f8fd !important;
}
.report-toolbar-left .eyebrow, .laporan-aktif-label { color: var(--penetron-blue) !important; }

/* Halaman login: logo + subtitle */
.login-brand-penetron { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.login-logo-img { width: 260px; max-width: 80%; height: auto; }
.login-brand-subtitle {
  margin: 0;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--penetron-blue);
  font-size: 13px;
}

/* Kop cetak laporan: logo saja */
.report-print-brand img { height: 40px; width: auto; object-fit: contain; }
.report-print-brand span { display: none !important; }


/* rebrand penetron v2 */
/* Logo bersih: tanpa border/bayangan/latar yang membentuk garis kotak */
#sidebarLogoImg, .login-logo-img, .report-print-brand img {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
}
/* Subtitle sidebar: muat penuh, tidak terpotong */
.sidebar-brand-text { width: 100%; min-width: 0; }
.sidebar-brand-text span, #appBrandSubtitle {
  display: block;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  font-size: 11.5px !important;
  letter-spacing: .04em !important;
  line-height: 1.35;
}
/* Panah buka/tutup menu: biru, bukan kuning */
.menu-chevron { background: var(--penetron-blue-soft) !important; color: var(--penetron-blue) !important; }
.menu-chevron::before { color: var(--penetron-blue) !important; border-color: var(--penetron-blue) !important; }
.menu-parent.open .menu-chevron { background: var(--penetron-blue-soft) !important; color: var(--penetron-blue-dark) !important; }
/* Logo kop cetak laporan: sedikit lebih kecil */
.report-print-brand img { height: 30px !important; width: auto !important; }
/* Logo login: sedikit lebih kecil */
.login-logo-img { width: 210px !important; max-width: 70% !important; }
/* Penanda layer peta: bentuk pil seragam untuk customer & proyek */
.map-legend-dot, .map-legend-dot.stakeholder, .map-legend-dot.project {
  display: inline-block !important;
  width: 6px !important;
  height: 16px !important;
  border-radius: 999px !important;
  margin-right: 6px !important;
  vertical-align: middle !important;
}
.map-legend-dot.stakeholder { background: var(--penetron-blue) !important; }
.map-legend-dot.project { background: #f59e0b !important; }


/* rebrand penetron v3 */
/* Ukuran final logo (menimpa aturan sebelumnya) */
#sidebarLogoImg, .brand-logo-img.small {
  width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  margin: 6px 0 4px !important;
}
.sidebar-header { padding: 18px 18px 12px !important; gap: 8px !important; }
.login-logo-img { width: 170px !important; max-width: 60% !important; }
#reportPrintBrand img, .report-print-brand img { height: 24px !important; width: auto !important; }
/* Penanda layer: lebih tebal */
.map-legend-dot, .map-legend-dot.stakeholder, .map-legend-dot.project {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
}


/* rebrand penetron v4 - final */
/* Class sebenarnya: laporan pakai .report-print-logo, login pakai .login-company-logo (dibuat JS) */
.report-print-header .report-print-logo, .report-print-logo {
  width: 130px !important;
  max-height: 26px !important;
  height: auto !important;
  object-fit: contain !important;
}
body.app-mode-login .login-company-logo {
  width: 170px !important;
  max-width: 60% !important;
  max-height: 40px !important;
  margin: 0 auto 16px !important;
}
/* Sidebar rapi: logo & subtitle di tengah, jarak konsisten */
.sidebar-header {
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 6px !important;
  padding: 18px 14px 12px !important;
}
#sidebarLogoImg, .brand-logo-img.small {
  width: 128px !important;
  max-width: 128px !important;
  height: auto !important;
  margin: 0 auto !important;
  display: block !important;
}
.sidebar-brand-text { width: 100%; text-align: center !important; }
.sidebar-brand-text span, #appBrandSubtitle {
  display: block !important;
  text-align: center !important;
  font-size: 10.5px !important;
  letter-spacing: .05em !important;
  white-space: nowrap !important;
}
/* Penanda layer peta: bulat 14px, specificity di atas aturan lama */
.map-layer-toggle .map-legend-dot,
.map-layer-toggle .map-legend-dot.stakeholder,
.map-layer-toggle .map-legend-dot.project {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  margin-right: 6px !important;
  vertical-align: middle !important;
}
.map-layer-toggle .map-legend-dot.stakeholder { background: var(--penetron-blue) !important; }
.map-layer-toggle .map-legend-dot.project { background: #f59e0b !important; }


/* rebrand penetron v5 - login besar, sidebar rata kiri, logo laporan kecil */
/* 1. Logo login diperbesar */
body.app-mode-login .login-company-logo,
.login-logo-img {
  width: 260px !important;
  max-width: 78% !important;
  max-height: 64px !important;
  height: auto !important;
  margin: 0 auto 18px !important;
}
/* 2. Sidebar: logo & teks rata kiri, beri jarak ke garis bawah */
.sidebar-header {
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 8px !important;
  padding: 18px 16px 20px !important;
}
#sidebarLogoImg, .brand-logo-img.small {
  width: 132px !important;
  max-width: 132px !important;
  height: auto !important;
  margin: 0 !important;
  display: block !important;
}
.sidebar-brand-text { width: 100%; text-align: left !important; }
.sidebar-brand-text span, #appBrandSubtitle {
  text-align: left !important;
  margin-bottom: 4px !important;
}
/* 3. Logo kop laporan diperkecil lagi */
.report-print-header .report-print-logo, .report-print-logo {
  width: 92px !important;
  max-height: 18px !important;
}
.report-print-brand img { height: 20px !important; width: auto !important; }


/* rebrand penetron v6 - jarak sidebar */
.sidebar-header {
  padding-bottom: 30px !important;
}
.sidebar-brand-text span, #appBrandSubtitle {
  margin-bottom: 8px !important;
}


/* rebrand penetron v7 - tinggi sidebar-header dilepas (penyebab padding bawah tidak pernah berlaku) */
.sidebar-header {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 18px 16px 22px !important;
  box-sizing: content-box !important;
}


/* rebrand penetron v8 - logo naik, teks ikut naik, jarak ke garis tetap lega */
.sidebar-header {
  padding: 8px 16px 20px !important;
  gap: 2px !important;
}
#sidebarLogoImg, .brand-logo-img.small {
  margin: 0 0 -2px !important;
}
.sidebar-brand-text span, #appBrandSubtitle {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}


/* rebrand penetron v9 - jarak atas & bawah sidebar-header sama (center) */
.sidebar-header {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  gap: 2px !important;
}
#sidebarLogoImg, .brand-logo-img.small {
  margin: 0 !important;
  display: block !important;
}
.sidebar-brand-text, .sidebar-brand-text span, #appBrandSubtitle {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.2 !important;
}


.assignment-bulk-bar{padding:16px;margin-bottom:16px;border:1px solid #dbe2ec;border-radius:12px;background:#fff}.assignment-bulk-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:12px 0}.assignment-bulk-controls label{display:grid;gap:6px;min-width:180px}.assignment-bulk-controls select,.assignment-bulk-controls button{padding:10px 12px;border:1px solid #ccd3df;border-radius:8px}.assignment-bulk-bar small{display:block;margin-top:8px;color:#64748b}.assignment-bulk-check{width:20px!important;height:20px!important;margin:0 10px 0 0!important;vertical-align:middle;cursor:pointer}.assignment-bulk-controls button:disabled{opacity:.5;cursor:default}.assignment-bulk-bar{padding:0;margin-bottom:16px;border:0;background:transparent;display:flex;justify-content:flex-end}.assignment-bulk-bar.is-editing{display:block;padding:16px;border:1px solid #dbe2ec;background:#fff}.assignment-table .assignment-bulk-column{display:none}.assignment-table.assignment-bulk-editing .assignment-bulk-column{display:table-cell;width:48px!important;min-width:48px!important;max-width:48px!important;padding:12px!important;text-align:center;vertical-align:middle}.assignment-bulk-check{display:inline-block!important;margin:0!important}.assignment-bulk-column .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
/* Jaku identity; interaction and visual scale follow Penetron. */
body.is-desktop .sidebar-header {box-sizing:border-box!important;min-height:80px!important;padding:18px 54px 16px 16px!important;}
#sidebarLogoImg {width:174px!important;max-width:100%!important;height:auto!important;margin:0!important;}
#appBrandSubtitle {font-size:10px!important;white-space:normal!important;letter-spacing:.6px!important;line-height:1.5!important;}
.login-logo-img {width:300px!important;max-width:100%!important;height:auto!important;max-height:80px!important;object-fit:contain;}
body.is-desktop.sidebar-compact .sidebar-header {min-height:80px!important;}

/* Subtitle sits midway between the logo baseline and the header divider. */
body .sidebar .sidebar-header { height:104px!important;min-height:104px!important;box-sizing:border-box!important;flex-direction:column!important;align-items:flex-start!important;padding:18px 16px 0!important;gap:0!important; }
.sidebar .sidebar-header #sidebarLogoImg { flex:0 0 auto;width:174px!important;max-width:calc(100% - 32px)!important; }
.sidebar .sidebar-brand-text { flex:1!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:none!important;text-align:center!important; }
.sidebar .sidebar-brand-text strong { display:none!important; }
.sidebar .sidebar-brand-text #appBrandSubtitle { font-family:inherit!important;font-size:10.5px!important;font-weight:600!important;letter-spacing:.65px!important;line-height:1.5!important;white-space:nowrap!important;margin:0!important; }
body.is-desktop .sidebar .sidebar-fold-toggle { right:8px;top:13px; }
body.is-desktop.sidebar-compact .sidebar .sidebar-header { height:80px!important;min-height:80px!important;padding:16px 12px!important;justify-content:center!important;align-items:center!important; }
body.is-desktop.sidebar-compact .sidebar .sidebar-brand-text { display:none!important; }
body.is-mobile .sidebar #closeSidebarBtn { position:absolute;right:8px;top:13px; }
.sidebar-header { position:relative; }
#pageDescription,.table-hint,#activityModalSubtitle,#configSettingsHint { display:none!important; }
p:empty,.table-hint:empty { display:none; }
.report-choice-icon svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }

#reportStatsGrid { display:flex!important;flex-wrap:nowrap!important;gap:10px!important;overflow-x:auto;padding:16px!important; }
#reportStatsGrid .report-summary-card { flex:1 0 118px!important;min-width:118px!important;padding:12px 14px!important;border-radius:12px!important; }
#reportStatsGrid .report-summary-card span { font-size:11px!important;line-height:1.35; }
#reportStatsGrid .report-summary-card strong { font-size:25px!important;margin-top:7px!important; }
#reportStatsGrid .report-summary-card p:empty { display:none; }
#reportAppliedFilters { margin:6px 0 0;color:var(--text-muted);font-size:12px;line-height:1.6;font-weight:400; }
.report-toolbar-left { margin-right:auto; }
.report-modify-wrap { position:relative; }
.report-modify-menu { position:absolute;right:0;top:calc(100% + 8px);min-width:260px;max-height:340px;overflow:auto;z-index:40;border:1px solid var(--border-soft);border-radius:12px;padding:8px;background:#fff;box-shadow:0 8px 28px #18386b24; }
.report-modify-menu[hidden] { display:none!important; }
.report-modify-menu label { display:flex;align-items:center;gap:10px;padding:9px;font-size:13px;cursor:pointer; }
.report-modify-menu input { width:16px;height:16px;accent-color:var(--primary); }
#reportTableElement { table-layout:auto!important;width:max-content!important;min-width:100%!important; }
#reportTableElement th,#reportTableElement td { min-width:125px!important;max-width:340px!important;width:auto!important;word-break:normal!important;overflow-wrap:normal!important;white-space:normal!important; }
#reportTableElement th { white-space:nowrap!important; }
.report-table-wrap { overflow-x:auto!important; }
@media print { #reportModifyWrap { display:none; } }

/* Keep report headings visible inside the vertically and horizontally scrollable result. */
.report-table-wrap { max-height:min(65vh,640px)!important;overflow:auto!important;position:relative;isolation:isolate; }
#reportTableElement { border-collapse:separate!important;border-spacing:0; }
#reportTableElement thead th { position:sticky;top:0;z-index:2;background:#f8f9fb;box-shadow:inset 0 -1px 0 var(--border-soft,#e5e7eb); }
@media print {
  .report-table-wrap { max-height:none!important;overflow:visible!important; }
  #reportTableElement thead th { position:static!important;box-shadow:none; }
  #reportTableElement thead { display:table-header-group; }
}

#appBrandName{display:none!important} #sidebarLogoImg{width:174px!important} .sidebar-brand-text{max-width:180px!important} #appBrandSubtitle{white-space:normal!important} 