body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f8fafc;
}

/* Keep office navigation hidden until the authenticated role is applied. */
html {
  background: #f8fafc;
}

body.auth-pending .sidebar .menu {
  visibility: hidden;
}

.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 48%, #f8fafc 100%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 40px 34px;
  text-align: center;
}

.login-card .logo {
  margin: 0 auto 28px;
  font-size: 24px;
  line-height: 1.2;
  color: #0f172a;
}

.login-card .logo small {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: #64748b;
  margin-top: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 22px;
}

.back-link i {
  font-size: 0.95rem;
}

.login-card h1 {
  font-size: 1.48rem;
  margin: 0 0 10px;
  color: #0f172a;
  line-height: 1.25;
}

.login-subtitle {
  color: #64748b;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.login-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-card .btn:hover {
  transform: translateY(-1px);
}

.google-btn {
  background: white;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.submit-btn {
  background: #0f172a;
  color: white;
  border: none;
  margin-top: 10px;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.login-divider span {
  padding: 0 14px;
}

.login-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.login-form label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
}

.input-wrap i {
  color: #64748b;
  min-width: 20px;
}

.input-wrap input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 1rem;
  color: #0f172a;
  outline: none;
}

.login-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: #64748b;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.login-help a {
  color: #2563eb;
  text-decoration: none;
}

.login-help a:hover {
  text-decoration: underline;
}

.container {
  display: block;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 240px;
  height: 100vh;
  min-height: 100vh;
  background: linear-gradient(180deg, #0b1b3a, #0d2a5c);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar .menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 5px;
}

.logo {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 30px;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 8px;
}

.menu a:last-child {
  margin-bottom: 8px;
}

.menu {
  display: flex;
  flex-direction: column;
}

.menu a.active, .menu a:hover {
  background: #2563eb;
  color: white;
}

.logout {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
  border-top: 1px solid #0f3a66;
  padding-top: 15px;
  margin-top: auto;
}


/* Main */
.main {
  width: calc(100% - 240px);
  box-sizing: border-box;
  padding: 20px;
  margin-left: 240px;
  min-height: 100vh;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card i {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 18px;
}

.card h3 {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.card .value {
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0;
}

.section {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.box {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.box-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.box-header a {
  color: #2563eb;
  text-decoration: none;
}

.empty {
  text-align: center;
  color: #94a3b8;
  margin-top: 30px;
}

.case-item, .assistance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background: #fff;
  margin-bottom: 7px;
}

.case-item:last-child, .assistance-item:last-child {
  border-bottom: none;
}

.case-item:hover, .assistance-item:hover {
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(13, 71, 161, 0.08);
  cursor: pointer;
}


.case-info, .assistance-info {
  flex: 1;
}

.case-name, .assistance-name {
  font-weight: normal;
  color: #1e293b;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.case-name:hover, .assistance-name:hover {
  color: #2563eb;
  cursor: pointer;
}

.case-details, .assistance-details {
  font-size: 13px;
  color: #94a3b8;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-ongoing {
  background: #ede9fe;
  color: #7c3aed;
}

.badge-resolved, .badge-released {
  background: #dcfce7;
  color: #16a34a;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #edf2ff;
  border-radius: 999px;
  padding: 8px 12px;
}

.user-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #dbeafe;
  border-radius: 50%;
  color: #0284c7;
  font-size: 18px;
}

.user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}

.user-role {
  font-size: 12px;
  color: #94a3b8;
}

/* Beneficiaries Page */
.beneficiaries-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.count-info {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.view-buttons {
  display: flex;
  gap: 10px;
}

.view-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.view-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.view-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.beneficiaries-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex: 1;
  min-width: 250px;
}

.search-container i {
  color: #94a3b8;
}

.search-container input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.search-container input::placeholder {
  color: #cbd5e1;
}

.filter-group {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 300px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-select:hover {
  border-color: #cbd5e1;
}

.filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-add-beneficiary {
  padding: 10px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-add-beneficiary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.beneficiaries-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.beneficiaries-table,
.cases-table,
.assistance-table,
.report-table,
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.beneficiaries-table thead,
.cases-table thead,
.assistance-table thead,
.report-table thead,
.users-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.beneficiaries-table th,
.cases-table th,
.assistance-table th,
.report-table th,
.users-table th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
}

.beneficiaries-table td,
.cases-table td,
.assistance-table td,
.report-table td,
.users-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
}

.beneficiaries-table tbody tr {
  transition: background-color 0.2s ease;
}

.beneficiaries-table tbody tr:hover {
  background: #f8fafc;
}

.beneficiaries-table tbody tr:last-child td {
  border-bottom: none;
}

.action-btn {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 5px;
  color: #2563eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.action-btn:hover {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.badge-active {
  background: #dcfce7;
  color: #16a34a;
}

.badge-inactive {
  background: #fee2e2;
  color: #dc2626;
}

/* Cases Page */
.cases-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.btn-new-case {
  padding: 10px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-new-case:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.cases-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.cases-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.cases-table {
  width: 100%;
  border-collapse: collapse;
}

.cases-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.cases-table th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
}

.cases-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
}

.cases-table tbody tr {
  transition: background-color 0.2s ease;
}

.cases-table tbody tr:hover {
  background: #f8fafc;
}

.cases-table tbody tr:last-child td {
  border-bottom: none;
}

.case-number {
  color: #2563eb;
  font-weight: 500;
}

.badge-priority-high {
  background: #fee2e2;
  color: #dc2626;
}

.badge-priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.badge-priority-low {
  background: #dbeafe;
  color: #0284c7;
}

/* Assistance Page */
.assistance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.btn-new-assistance {
  padding: 10px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-new-assistance:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.assistance-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.assistance-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow-x: auto;
  overflow-y: hidden;
}

.assistance-table {
  width: 100%;
  min-width: 1180px;
  table-layout: fixed;
  border-collapse: collapse;
}

.assistance-col-beneficiary { width: 18%; }
.assistance-col-type { width: 16%; }
.assistance-col-amount { width: 8%; }
.assistance-col-office { width: 13%; }
.assistance-col-status { width: 13%; }
.assistance-col-cheque { width: 16%; }
.assistance-col-update { width: 16%; }

.assistance-table th,
.assistance-table td {
  padding: 13px 12px;
}

.assistance-table td:nth-child(3) {
  white-space: nowrap;
}

.assistance-beneficiary-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.assistance-beneficiary-cell .view-beneficiary-details {
  flex: 0 0 auto;
  white-space: nowrap;
}

.assistance-beneficiary-cell > span {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assistance-type-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assistance-type-cell .priority-badge {
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.assistance-table td:nth-child(4) .badge-office {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-cheque-number {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.cheque-number-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.2;
}

.cheque-number-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  white-space: nowrap;
}

.cheque-number-label i { color: #2563eb; }
.cheque-number-badge strong {
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.cheque-number-empty {
  color: #94a3b8;
  font-size: 12px;
}

.cheque-number-text {
  display: block;
  max-width: 100%;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.assistance-actions-cell .action-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.assistance-actions-cell .compact-return-remarks {
  margin-top: 7px;
}

.edit-assistance-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 5px;
  padding: 0;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color .15s ease, border-color .15s ease;
}

.edit-assistance-amount:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.edit-assistance-amount:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.assistance-table .status-badge-cell .badge {
  white-space: nowrap;
  max-width: 100%;
}

.assistance-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.assistance-table th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
}

.assistance-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
  overflow-wrap: anywhere;
}

.assistance-table tbody tr {
  transition: background-color 0.2s ease;
}

.assistance-table tbody tr:hover {
  background: #f8fafc;
}

.assistance-table tbody tr:last-child td {
  border-bottom: none;
}

.assistance-table .priority-badge {
  padding: 3px 7px;
  font-size: 10px;
}

.compact-return-remarks {
  white-space: nowrap;
  padding: 6px 9px;
  font-size: 12px;
}

.assistance-table td.empty-return-remarks {
  text-align: center;
}

.action-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 120px;
}

.action-select:hover {
  border-color: #cbd5e1;
}

.action-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.badge-approved {
  background: #dbeafe;
  color: #0284c7;
}

.badge-released {
  background: #dcfce7;
  color: #16a34a;
}

.badge-office {
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-rejected {
  background: #fee2e2;
  color: #dc2626;
}

/* Analytics Page */
.analytics-filter-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  padding: 20px 22px 16px;
  margin-bottom: 22px;
}

.analytics-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-filter-heading h3 {
  margin: 0 0 5px;
  color: #1e293b;
  font-size: 16px;
}

.analytics-filter-heading p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.analytics-reset-button {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 8px;
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.analytics-reset-button:hover {
  background: #f8fafc;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.analytics-filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.analytics-filter-field input,
.analytics-filter-field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 41px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 8px 11px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
}

.analytics-filter-field input:focus,
.analytics-filter-field select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

.analytics-filter-summary {
  min-height: 17px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.analytics-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.analytics-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-content {
  flex: 1;
}

.card-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.card-value {
  font-size: 28px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 12px;
}

.analytics-card i {
  font-size: 28px;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  padding: 14px;
  border-radius: 50%;
  opacity: 1;
  align-self: flex-end;
}

.analytics-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-box {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.chart-box h3 {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container canvas {
  max-height: 300px;
}

@media (max-width: 1024px) {
  .analytics-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 768px) {
  .analytics-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .analytics-filter-panel { padding: 16px; }
  .analytics-filter-heading { align-items: flex-start; }
  .analytics-filter-heading p { line-height: 1.4; }
  .analytics-filter-grid { grid-template-columns: 1fr; }
}

/* Reports Page */
/* Reports Page */
.report-generator {
  position: relative;
  z-index: 10;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 18px;
  overflow: visible;
}

.report-header {
  background: #f8fafc;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-form {
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.form-select,
.form-input {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:hover,
.form-input:hover {
  border-color: #cbd5e1;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-print-report {
  padding: 8px 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  height: fit-content;
}

.btn-print-report:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.report-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 18px;
}

.report-title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.report-title h3 {
  margin: 0 0 3px 0;
  font-size: 18px;
  color: #1e293b;
}

.report-date {
  font-size: 13px;
  color: #94a3b8;
}

.report-table-container {
  overflow-x: auto;
  margin-bottom: 12px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.report-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.report-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
}

.report-table tbody tr:hover {
  background: #f8fafc;
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

.report-footer {
  text-align: right;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

/* Users Page */
.users-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.btn-invite-user {
  padding: 10px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-invite-user:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.users-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.users-table th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
}

.users-table td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #1e293b;
}

.users-table tbody tr {
  transition: background-color 0.2s ease;
}

.users-table tbody tr:hover {
  background: #f8fafc;
}

.users-table tbody tr:last-child td {
  border-bottom: none;
}

.role-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 140px;
}

.role-select:hover {
  border-color: #cbd5e1;
}

.role-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.badge-role-admin {
  background: #fee2e2;
  color: #dc2626;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-role-manager {
  background: #fef3c7;
  color: #92400e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-role-staff {
  background: #dbeafe;
  color: #0284c7;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-role-viewer {
  background: #e0e7ff;
  color: #4f46e5;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

/* Settings Page */
.settings-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  max-width: 1200px;
}

.settings-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

.settings-header {
  background: #f8fafc;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-header i {
  color: #2563eb;
}

.settings-content {
  padding: 25px;
}

.info-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.info-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.info-group label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.info-group p {
  font-size: 15px;
  color: #1e293b;
  margin: 0;
  font-weight: 500;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.role-option input[type="radio"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.role-option label {
  margin: 0;
  padding: 8px 12px;
  background: #dbeafe;
  color: #0284c7;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-of-type {
  margin-bottom: 25px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  display: block;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #1e293b;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-page-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Base form layout is shared by beneficiary and assistance forms. */
.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.form-header h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.beneficiary-form {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.form-section {
  margin-bottom: 22px;
}

.form-section h4 {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.field-row {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.application-page .form-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.application-page .form-header h3 {
  margin: 0;
  color: #10264a;
  font-size: 25px;
  font-weight: 700;
}

.application-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: #eff6ff;
  color: #526984;
  font-size: 13px;
  line-height: 1.5;
}

.application-intro i {
  margin-top: 2px;
  color: #2563eb;
}

.application-intro p { margin: 0; }

.btn-back {
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 14px;
}

.detail-assistance-back {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 14px;
  white-space: nowrap;
}

.application-page .beneficiary-form {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
  border: 1px solid #e5ebf3;
}

.application-page .form-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf1f6;
}

.application-page .form-section h4 {
  margin: 0 0 17px;
  font-size: 18px;
  font-weight: 700;
  color: #10264a;
}

.application-page .form-hint,
.application-page .case-type-input-row + .form-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.application-page .form-hint {
  margin: 8px 0 0;
}

.application-page .case-type-input-row + .form-hint {
  display: block;
  margin-top: 7px;
}

.application-page .field-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .application-page .beneficiary-form { padding: 18px 16px; }
  .application-page .form-header { align-items: flex-start; gap: 12px; }
  .application-page .form-header h3 { font-size: 21px; }
}

#existing-case-section[hidden] {
  display: none !important;
}

#existing-case-choice[hidden] {
  display: none !important;
}

.existing-case-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 9px;
}

.existing-case-options .existing-case-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  color: #173b70;
  cursor: pointer;
  margin: 0;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.existing-case-option:hover {
  border-color: #93b4ff;
  background: #f8fbff;
}

.existing-case-option:has(input:checked),
.existing-case-option.selected {
  border-color: #7ca5ff;
  background: linear-gradient(105deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: inset 3px 0 #2563eb;
}

.existing-case-options .existing-case-option input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid #64748b;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: #2563eb;
}

.existing-case-option-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.existing-case-option-copy strong {
  color: #173b70;
  font-size: 15px;
  line-height: 1.35;
}

.existing-case-option-copy small {
  color: #647b9b;
  font-size: 13px;
  line-height: 1.4;
}

.existing-case-option-check {
  margin-left: auto;
  color: #2563eb;
  font-size: 18px;
  font-weight: 800;
  opacity: 0;
}

.existing-case-option:has(input:checked) .existing-case-option-check,
.existing-case-option.selected .existing-case-option-check {
  opacity: 1;
}

.existing-case-options.field-error .existing-case-option {
  border-color: #dc2626;
}

.linked-case-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px 14px 48px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: linear-gradient(105deg, #eff6ff 0%, #f8fbff 100%);
  color: #173b70;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.linked-case-card[hidden] {
  display: none !important;
}

.linked-case-card::before {
  display: block;
  margin-bottom: 4px;
  color: #526987;
  content: 'Linked to existing case';
  font-size: 12px;
  font-weight: 700;
}

.linked-case-card::after {
  position: absolute;
  top: 16px;
  left: 15px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  content: '✓';
  font-size: 15px;
  font-weight: 800;
}

.active-assistance-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #f4cf8a;
  border-left: 4px solid #d97706;
  border-radius: 12px;
  background: #fffbeb;
  color: #78350f;
  font-size: 14px;
  line-height: 1.55;
}

.active-assistance-notice::before {
  flex: 0 0 auto;
  content: '⚠';
  color: #b45309;
  font-size: 17px;
}

.active-assistance-notice[hidden] {
  display: none !important;
}

#case-assessment-section[hidden] {
  display: none !important;
}

#active-case-summary-section[hidden] {
  display: none !important;
}

.active-assistance-blocked .case-only-field,
.active-assistance-blocked #case-assessment-section {
  display: none !important;
}

.active-case-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.active-case-summary-card {
  display: grid;
  gap: 5px;
  padding: 15px 16px 15px 18px;
  border: 1px solid #dbe4f0;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  background: linear-gradient(105deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.active-case-summary-card strong {
  color: #173b70;
  font-size: 15px;
  line-height: 1.35;
}

.active-case-summary-card span {
  color: #647b9b;
  font-size: 13px;
  line-height: 1.4;
}

.existing-case-mode .case-only-field {
  display: none !important;
}

.case-choice-pending .case-only-field {
  display: none !important;
}

.field-item {
  flex: 1 1 260px;
  min-width: 220px;
}

.field-item input,
.field-item select {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beneficiary-autocomplete {
  position: relative;
}

.beneficiary-autocomplete input {
  padding-right: 42px;
}

.beneficiary-dropdown-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  height: calc(100% - 2px);
  width: 38px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.beneficiary-dropdown-toggle:hover {
  color: #1e293b;
  background: #f8fafc;
}

.beneficiary-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.beneficiary-options[hidden] {
  display: none;
}

.beneficiary-option,
.beneficiary-option-empty {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  color: #1e293b;
  text-align: left;
  font: inherit;
}

.beneficiary-option {
  cursor: pointer;
}

.beneficiary-option:hover,
.beneficiary-option:focus {
  background: #eff6ff;
  outline: none;
}

.beneficiary-option-empty {
  color: #64748b;
}

.field-item.full-width {
  flex: 1 1 100%;
}

.field-item label {
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.field-item input,
.field-item select,
.field-item textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-item textarea {
  white-space: normal;
  overflow: auto;
  text-overflow: clip;
  min-height: 90px;
  resize: vertical;
}

.case-type-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.case-type-input-row select {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
}

.case-type-add-button {
  display: inline-flex;
  flex: 0 0 46px;
  width: 46px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbdaf7;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.case-type-add-button:hover {
  transform: translateY(-1px);
  border-color: #93b4f5;
  background: #dbeafe;
}

.case-type-add-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.case-type-add-button[hidden] {
  display: none;
}

.field-item input:hover,
.field-item select:hover,
.field-item textarea:hover,
.field-item input:focus,
.field-item select:focus,
.field-item textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-actions .btn-save[hidden] {
  display: none !important;
}

.btn-cancel,
.btn-save {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-width: 140px;
  padding: 12px 18px;
}

.btn-cancel {
  background: #e2e8f0;
  color: #334155;
}

.btn-save {
  background: #2563eb;
  color: #ffffff;
}

.btn-cancel:hover {
  background: #cbd5e1;
}

.btn-save:hover {
  background: #1d4ed8;
}

.form-input::placeholder {
  color: #cbd5e1;
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-save-changes {
  padding: 12px 24px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-save-changes:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  width: min(1040px, 95vw);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#invite-modal {
  padding: 20px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
}

#invite-modal .modal-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  animation: roleModalEnter 160ms ease-out;
}

#invite-modal .modal-header {
  margin: 0;
  padding: 22px 26px;
  border-bottom: 1px solid #e8edf5;
  background: #f8fafc;
}

.invite-modal-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.invite-modal-icon {
  display: inline-flex;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 17px;
}

#invite-modal .invite-modal-heading h3 {
  margin: 0;
  color: #10264a;
  font-size: 20px;
  font-weight: 700;
}

.invite-modal-heading p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

#invite-modal .modal-close {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
}

#invite-modal .modal-close:hover {
  background: #e9eef6;
  color: #1e293b;
}

#invite-modal .modal-body {
  padding: 24px 26px 26px;
}

#invite-modal .modal-body .field-row {
  margin-bottom: 16px;
}

#invite-modal .field-item label {
  display: block;
  margin-bottom: 7px;
  color: #24364f;
  font-size: 13px;
  font-weight: 650;
}

#invite-modal .field-item input,
#invite-modal .field-item select {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d7e0ed;
  border-radius: 10px;
  background-color: #fff;
  color: #1e293b;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#invite-modal .field-item input:focus,
#invite-modal .field-item select:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

#invite-modal #send-invite {
  min-height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.18);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

#invite-modal #send-invite:hover {
  background: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  #invite-modal { padding: 14px; }
  #invite-modal .modal-header { padding: 18px; }
  #invite-modal .modal-body { padding: 20px 18px; }
  #invite-modal .invite-modal-heading h3 { font-size: 18px; }
  .invite-modal-heading p { max-width: 240px; }
}

.detail-readonly .field-item span {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.4;
}

.detail-block-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.beneficiary-documents-help {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
}

.beneficiary-document-upload-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.beneficiary-document-input {
  max-width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.beneficiary-document-message {
  min-height: 20px;
  margin: 6px 0 10px;
  font-size: 13px;
}

.beneficiary-documents-list {
  display: grid;
  gap: 8px;
}

.beneficiary-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.beneficiary-document-info {
  min-width: 0;
}

.beneficiary-document-name {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-weight: 600;
}

.beneficiary-document-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* User management actions and office role dialog */
.users-top {
  gap: 16px;
}

.users-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.users-top-actions .btn-invite-user {
  min-height: 44px;
  padding: 10px 18px;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.16);
}

.users-top-actions .btn-invite-user:hover {
  transform: translateY(-1px);
}

.users-top-actions .btn-role-manage {
  background: #fff;
  color: #2563eb;
  border: 1px solid #cbdaf7;
  box-shadow: none;
}

.users-top-actions .btn-role-manage:hover {
  background: #eff6ff;
  border-color: #93b4f5;
}

#role-modal {
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
  overscroll-behavior: contain;
}

#role-modal .modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  max-height: min(90dvh, 820px);
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  animation: roleModalEnter 160ms ease-out;
}

#role-modal .modal-header {
  flex: 0 0 auto;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e8edf5;
  background: #f8fafc;
}

#role-modal .modal-header h3 {
  margin: 0;
  color: #10264a;
  font-size: 20px;
  font-weight: 700;
}

#role-modal .modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 17px;
  cursor: pointer;
}

#role-modal .modal-close:hover {
  background: #e9eef6;
  color: #1e293b;
}

#role-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px 24px 24px;
}

/* .field-row uses display:flex, so explicitly honor conditional controls. */
#role-modal [hidden] {
  display: none !important;
}

.role-modal-intro {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

#role-modal .field-row {
  margin-bottom: 16px;
}

#role-modal .field-item label {
  display: block;
  margin-bottom: 7px;
  color: #24364f;
  font-size: 13px;
  font-weight: 650;
}

#role-modal .field-item input,
#role-modal .field-item select {
  min-height: 44px;
  border-color: #d7e0ed;
  border-radius: 9px;
  background-color: #fff;
}

#office-assistance-types {
  width: 100%;
  min-height: 120px;
  padding: 8px 10px;
}

.office-module-permissions {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #d7e0ed;
  border-radius: 10px;
  color: #24364f;
}

.office-module-permissions legend {
  padding: 0 6px;
  font-weight: 700;
}

.office-module-permissions label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.office-module-permissions input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.office-module-permissions .form-hint {
  grid-column: 1 / -1;
}

.role-template-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 22px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f5f9ff;
  color: #526984;
  font-size: 12px;
  line-height: 1.5;
}

.role-template-note i {
  margin-top: 2px;
  color: #2563eb;
}

.office-management-tools {
  margin: 4px 0 20px;
  padding-top: 14px;
  border-top: 1px solid #e7edf5;
  color: #334155;
  font-size: 13px;
}

.office-management-tools summary {
  color: #31527b;
  font-weight: 650;
  cursor: pointer;
}

.office-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0;
}

.office-management-back {
  margin-bottom: 14px;
}

.role-modal-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -4px 0 16px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #b42318;
  font-size: 13px;
  line-height: 1.5;
}

.role-modal-message[hidden] {
  display: none;
}

.role-modal-message::before {
  content: "!";
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fee2e2;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

#role-modal .field-item input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.role-modal-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid #e8edf5;
  background: #fff;
}

.role-modal-actions .btn-save,
.role-cancel-button {
  display: inline-flex;
  width: auto;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.role-modal-actions .btn-save {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.role-modal-actions .btn-save:hover {
  background: #1d4ed8;
}

.role-modal-actions .btn-save:disabled {
  cursor: wait;
  opacity: 0.7;
}

.role-cancel-button {
  border: 1px solid #d7e0ed;
  background: #fff;
  color: #334155;
}

.role-cancel-button:hover {
  background: #f8fafc;
}

@keyframes roleModalEnter {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .users-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .users-top-actions {
    width: 100%;
    margin-left: 0;
  }

  .users-top-actions .btn-invite-user {
    flex: 1;
    justify-content: center;
    padding-inline: 10px;
  }

  #role-modal {
    padding: 14px;
  }

  #role-modal .modal-dialog {
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
  }

  #role-modal .modal-header {
    padding: 17px 18px;
  }

  #role-modal .modal-body {
    padding: 18px;
  }

  .role-modal-actions {
    padding: 12px 18px 16px;
  }

  .office-management-actions {
    flex-direction: column;
  }

  .office-management-actions .role-cancel-button {
    width: 100%;
  }
}

.beneficiary-document-download {
  flex: 0 0 auto;
}

.beneficiary-document-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .72);
}

.beneficiary-document-modal.is-open { display: flex; }

.beneficiary-document-modal-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(840px, 92vw);
  height: min(940px, 92vh);
  min-width: 0;
  min-height: 0;
  padding: 48px 0 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .16);
}

.beneficiary-document-modal-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 18px;
  cursor: pointer;
}

#beneficiary-document-modal-frame { flex: 1; width: 100%; border: 0; }
#beneficiary-document-docx-content { flex: 1; min-height: 0; overflow: auto; background: #fff; }
#beneficiary-document-docx-content .docx-wrapper {
  padding: 0 !important;
  background: #fff !important;
}
#beneficiary-document-docx-content .docx {
  margin: 0 auto !important;
  box-shadow: none !important;
}
#beneficiary-document-docx-content .docx:not(:last-child) {
  margin-bottom: 18px !important;
  border-bottom: 1px solid #d1d5db;
}
#beneficiary-document-modal-message { margin: auto; padding: 24px; color: #475569; }
#beneficiary-document-modal-message:empty { display: none; }
#beneficiary-document-modal-download {
  position: absolute;
  top: 17px;
  right: 58px;
  color: #334155;
  font-size: 18px;
  text-decoration: none;
}

@media (max-width: 600px) {
  .beneficiary-document-modal { padding: 8px; }
  .beneficiary-document-modal-window { width: 92vw; height: 88vh; }
}

@media (max-width: 600px) {
  .beneficiary-document-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.detail-block-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.detail-block-meta {
  font-size: 13px;
  color: #64748b;
}

.detail-block-badge {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.detail-header-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-cards-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.detail-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-card h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-field-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.detail-field-group:last-child {
  margin-bottom: 0;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-field.full-width {
  grid-column: 1 / -1;
}

.detail-field label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.detail-field span {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
  width: fit-content;
}

.detail-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.detail-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.detail-section-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-new-case,
.btn-new-assistance {
  border: none;
  background: #2563eb;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.detail-case-card,
.detail-assistance-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-case-info,
.detail-assistance-info {
  flex: 1;
}

.detail-case-title,
.detail-assistance-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.detail-case-meta,
.detail-assistance-meta {
  font-size: 12px;
  color: #64748b;
}

.detail-badge-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  margin-left: 12px;
}

@media (max-width: 920px) {
  .detail-cards-grid {
    grid-template-columns: 1fr;
  }
  .detail-field-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .detail-header-page {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .detail-cards-grid {
    grid-template-columns: 1fr;
  }
  .detail-field-group {
    grid-template-columns: 1fr;
  }
  .detail-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Case Detail Page */
.case-info-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.case-info-section h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.case-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.case-info-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-info-field label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.case-info-field span {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
  width: fit-content;
}

.case-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-detail-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.case-detail-card h5 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.case-detail-card p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .case-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .case-info-grid {
    grid-template-columns: 1fr;
  }
  .case-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Case Notes Section */
.case-notes-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin-top: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.case-notes-section h4 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-notes-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-type-select {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.note-type-select:hover,
.note-type-select:focus {
  border-color: #2563eb;
  outline: none;
}

.note-textarea {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  font-family: inherit;
  resize: vertical;
  min-height: 140px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.note-textarea::placeholder {
  color: #94a3b8;
}

.note-textarea:hover,
.note-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}

.btn-add-note {
  min-height: 44px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(180deg, #3478f6 0%, #2563eb 100%);
  color: #fff;
  padding: 0 19px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  box-shadow: 0 3px 7px rgb(37 99 235 / 24%);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn-add-note:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 5px 12px rgb(37 99 235 / 32%);
  transform: translateY(-1px);
}

.btn-add-note:active {
  box-shadow: 0 1px 3px rgb(37 99 235 / 24%);
  transform: translateY(0);
}

.btn-add-note:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: 3px;
}

.btn-add-note:disabled {
  opacity: .65;
  cursor: wait;
}

.case-note-message {
  min-height: 18px;
  margin-top: 8px;
  color: #047857;
  font-size: 13px;
}

.case-note-message.is-error {
  color: #dc2626;
}

.case-notes-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.case-notes-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: 13px;
}

.case-note-card {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.case-note-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-note-type {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.case-note-heading time,
.case-note-author {
  color: #64748b;
  font-size: 12px;
}

.case-note-text {
  margin: 11px 0;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.case-note-author {
  margin-top: 8px;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.modal-body .field-row {
  margin-bottom: 12px;
}

.detail-page {
  width: min(1040px, 95vw);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 18px;
}

.detail-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-back-btn {
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-main-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.detail-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: #64748b;
}

.detail-edit-btn {
  border: none;
  background: #1d4ed8;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.detail-primary-action,
.beneficiary-archive-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 5px rgb(15 23 42 / 10%);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.detail-primary-action {
  background: #2563eb;
  color: #fff;
}

.detail-primary-action:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgb(37 99 235 / 22%);
  transform: translateY(-1px);
}

.beneficiary-archive-action {
  border-color: #fecaca;
  background: #fff;
  color: #b91c1c;
}

.beneficiary-archive-action:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  box-shadow: 0 4px 10px rgb(185 28 28 / 12%);
  transform: translateY(-1px);
}

.detail-primary-action:focus-visible,
.beneficiary-archive-action:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.detail-card-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.detail-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.detail-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 16px;
  color: #111827;
}

.detail-field-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-field-row label {
  color: #94a3b8;
  font-size: 13px;
  min-width: 110px;
}

.detail-field-row span {
  color: #111827;
  font-weight: 700;
}

.detail-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .detail-card-grid {
    grid-template-columns: 1fr;
  }
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .settings-container {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MTAM PAGINATION
   ============================================================ */

.mtam-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: 100%;
    margin-top: 0;
    padding: 18px 20px;

    background: #f8faff;
    border-top: 1px solid #e5eaf2;
    box-sizing: border-box;
}

/* Showing information */

.pagination-info {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Buttons container */

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* All pagination buttons */

.pagination-btn {
    min-width: 42px;
    height: 42px;

    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d5deeb;
    border-radius: 9px;

    background: #ffffff;
    color: #334155;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);

    transition:
        all 0.2s ease;
}

/* Hover */

.pagination-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.15);
}

/* Active page */

.pagination-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;

    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.25);

    transform: translateY(-1px);
}

/* Active page hover */

.pagination-btn.active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

/* Previous and Next */

.pagination-btn:first-child,
.pagination-btn:last-child {
    padding-left: 17px;
    padding-right: 17px;

    min-width: 88px;

    background: #ffffff;
    color: #334155;
}

/* Previous / Next hover */

.pagination-btn:first-child:hover:not(:disabled),
.pagination-btn:last-child:hover:not(:disabled) {
    background: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
}

/* Disabled */

.pagination-btn:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #aeb8c7;

    cursor: not-allowed;

    box-shadow: none;
    transform: none;
}

/* Ellipsis */

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 24px;
    height: 42px;

    color: #64748b;

    font-size: 15px;
    font-weight: 600;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {

    .mtam-pagination {
        padding: 16px 12px;
    }

    .pagination-controls {
        gap: 5px;
        flex-wrap: wrap;
    }

    .pagination-btn {
        min-width: 38px;
        height: 38px;

        padding: 0 10px;

        font-size: 13px;
    }

    .pagination-btn:first-child,
    .pagination-btn:last-child {
        min-width: 76px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .pagination-ellipsis {
        height: 38px;
    }
}

/* ============================================================
   BENEFICIARY FORM VALIDATION
   ============================================================ */

.field-error {
    border-color: #dc2626 !important;
    background-color: #fff7f7 !important;
}

.field-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* ============================================================
   USER MANAGEMENT ACTION BUTTONS
   ============================================================ */

/* Change Role + Save container */
.user-role-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}


/* Role dropdown */
.user-role-actions .role-select {
    min-width: 145px;
    height: 40px;

    padding: 0 12px;

    border: 1px solid #d5deeb;
    border-radius: 8px;

    background: #ffffff;
    color: #334155;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Role dropdown focus */
.user-role-actions .role-select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* SAVE BUTTON */
.btn-save-role {
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 15px;

    border: none;
    border-radius: 8px;

    background: #2563eb;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 2px 5px rgba(37, 99, 235, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Save hover */
.btn-save-role:hover {
    background: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(37, 99, 235, 0.22);
}


/* Save click */
.btn-save-role:active {
    transform: translateY(0);
}


/* DELETE CELL */
.user-delete-cell {
    text-align: center;
    white-space: nowrap;
}


/* DELETE BUTTON */
.btn-delete-user {
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 15px;

    border: 1px solid #fecaca;
    border-radius: 8px;

    background: #fff1f2;
    color: #dc2626;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Delete hover */
.btn-delete-user:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(220, 38, 38, 0.22);
}


/* Delete click */
.btn-delete-user:active {
    transform: translateY(0);
}


/* Protected main administrator */
.protected-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 40px;

    padding: 0 12px;

    border-radius: 8px;

    background: #f1f5f9;
    color: #64748b;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
}


/* Mobile */
@media (max-width: 900px) {

    .user-role-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .user-role-actions .role-select,
    .btn-save-role,
    .btn-delete-user {
        width: 100%;
    }

}

/* ============================================================
   LOGIN PASSWORD SHOW / HIDE
   ============================================================ */

.password-wrap {
    position: relative;
}


/* Make room for the eye button */
.password-wrap input {
    padding-right: 48px;
}


/* Eye button */
.password-toggle {
    position: absolute;

    right: 12px;
    top: 50%;

    transform: translateY(-50%);

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;

    color: #64748b;

    cursor: pointer;

    border-radius: 6px;

    font-size: 16px;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}


/* Hover */
.password-toggle:hover {
    color: #2563eb;
    background: #eff6ff;
}


/* Click */
.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}


/* Keyboard focus */
.password-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ================================
   ANALYTICS PRINT SELECTION MODAL
   ================================ */

.print-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.print-modal {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.print-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid #e5eaf2;
}

.print-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a8a;
}

.print-modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.print-modal-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.print-modal-body {
    padding: 20px 22px;
}

.print-modal-description {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.print-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.print-option:hover {
    background: #f8faff;
}

.print-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.print-option-main {
    margin-bottom: 10px;
    border: 1px solid #dbe3ef;
    background: #f8faff;
    font-weight: 600;
}

.print-options-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.print-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #e5eaf2;
    background: #f8faff;
}

.print-cancel-btn,
.print-confirm-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.print-cancel-btn {
    border: 1px solid #d5deeb;
    background: #ffffff;
    color: #475569;
}

.print-cancel-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.print-confirm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.print-confirm-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .print-modal-overlay {
        padding: 12px;
    }

    .print-modal-header,
    .print-modal-body,
    .print-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .print-modal-footer {
        flex-direction: column-reverse;
    }

    .print-cancel-btn,
    .print-confirm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   PREVIOUS ASSISTANCE REMINDER MODAL
   ============================================================ */

.assistance-warning-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0.60);
    backdrop-filter: blur(4px);
}

.assistance-warning-overlay.show {
    display: flex;
}


/* ============================================================
   MODAL CARD
   ============================================================ */

.assistance-warning-modal {
    width: min(460px, 100%);
    max-height: 90vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.25);

    overflow: hidden;

    animation: assistanceWarningAppear 0.2s ease-out;
}

@keyframes assistanceWarningAppear {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ============================================================
   HEADER
   ============================================================ */

.assistance-warning-modal > h3 {
    margin: 0;

    padding: 22px 24px 8px;

    color: #1e293b;

    font-size: 20px;
    font-weight: 700;

    text-align: center;
}


/* ============================================================
   WARNING ICON
   ============================================================ */

.assistance-warning-icon {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 22px auto 0;

    border-radius: 50%;

    background: #fff7ed;
    color: #ea580c;

    font-size: 24px;
}

.assistance-warning-icon i {
    line-height: 1;
}


/* ============================================================
   MESSAGE
   ============================================================ */

.assistance-warning-message {
    margin: 0 24px;
    padding: 16px;

    color: #475569;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    font-size: 14px;
    line-height: 1.7;

    white-space: pre-line;

    max-height: 260px;
    overflow-y: auto;
}


/* ============================================================
   BUTTON AREA
   ============================================================ */

.assistance-warning-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 20px 24px;

    margin-top: 4px;

    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.assistance-warning-btn {
    min-width: 100px;

    height: 40px;

    padding: 0 18px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


/* Cancel */

.warning-cancel {
    background: #ffffff;

    color: #475569;

    border: 1px solid #cbd5e1;
}

.warning-cancel:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}


/* Continue */

.warning-continue {
    background: #2563eb;

    color: #ffffff;

    border: 1px solid #2563eb;
}

.warning-continue:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;

    transform: translateY(-1px);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .assistance-warning-overlay {
        padding: 16px;
    }

    .assistance-warning-modal {
        width: 100%;
        border-radius: 14px;
    }

    .assistance-warning-modal > h3 {
        font-size: 18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .assistance-warning-message {
        margin-left: 18px;
        margin-right: 18px;
        padding: 14px;
    }

    .assistance-warning-actions {
        padding: 16px 18px;
    }

    .assistance-warning-btn {
        min-width: 90px;
    }
}

/* ============================================================
   LOGOUT CONFIRMATION MODAL
   ============================================================ */

.logout-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.logout-modal.show {
  display: flex;
}

.logout-modal-box {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  animation: logoutModalIn 0.2s ease;
}

.logout-modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #052b7d;
  font-size: 24px;
}

.logout-modal-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #1e293b;
}

.logout-modal-box p {
  margin: 0 0 24px;
  color: #64748b;
  font-size: 15px;
}

.logout-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.logout-modal-actions button {
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.logout-cancel-btn {
  background: #e2e8f0;
  color: #334155;
}

.logout-cancel-btn:hover {
  background: #cbd5e1;
}

.logout-confirm-btn {
  background: #dc2626;
  color: #ffffff;
}

.logout-confirm-btn:hover {
  background: #b91c1c;
}

@keyframes logoutModalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   USER ACTION CONFIRMATION MODAL
   ============================================================ */

.user-action-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.user-action-modal.show {
  display: flex;
}

.user-action-modal-box {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  animation: userActionModalIn 0.2s ease;
}

.user-action-modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #052b7d;
  font-size: 24px;
}

.user-action-modal-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #1e293b;
}

.user-action-modal-box p {
  margin: 0 0 24px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

.user-action-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.user-action-modal-actions button {
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.user-action-cancel-btn {
  background: #e2e8f0;
  color: #334155;
}

.user-action-cancel-btn:hover {
  background: #cbd5e1;
}

.user-action-confirm-btn {
  background: #2563eb;
  color: #ffffff;
}

.user-action-confirm-btn:hover {
  background: #1d4ed8;
}

.user-action-confirm-btn.delete-mode {
  background: #dc2626;
}

.user-action-confirm-btn.delete-mode:hover {
  background: #b91c1c;
}

@keyframes userActionModalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================================
   ARCHIVE / RESTORE MODAL
   ========================================================= */

.archive-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.archive-modal.show {
  display: flex;
}

.archive-modal-content {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
  animation: archiveModalIn 0.2s ease-out;
}

.archive-modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eef4ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.archive-modal-content h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #1f2937;
}

.archive-modal-content p {
  margin: 0 0 24px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.archive-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.archive-modal-actions button {
  min-width: 110px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.archive-modal-cancel {
  background: #f1f5f9;
  color: #475569;
}

.archive-modal-cancel:hover {
  background: #e2e8f0;
}

.archive-modal-confirm {
  background: #2563eb;
  color: #ffffff;
}

.archive-modal-confirm:hover {
  background: #1d4ed8;
}

/* =========================================================
   ARCHIVE / RESTORE RESULT NOTIFICATION
   ========================================================= */

.archive-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 12px;
  width: min(380px, calc(100% - 48px));
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #2563eb;
}

.archive-notification.show {
  display: flex;
  animation: archiveNotificationIn 0.25s ease-out;
}

.archive-notification-icon {
  font-size: 22px;
  color: #16a34a;
  flex-shrink: 0;
}

.archive-notification strong {
  display: block;
  margin-bottom: 2px;
  color: #1f2937;
  font-size: 14px;
}

.archive-notification p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

/* Animations */

@keyframes archiveModalIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes archiveNotificationIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================================
   MTAM NOTIFICATIONS
   ========================================================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.user-profile {
  flex-shrink: 0;
}

/* Notification bell */
.notification-wrapper {
  position: relative;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.notification-button:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* Red notification count */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notification-badge:empty {
  display: none;
}

/* Notification dropdown */
.notification-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 30px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.notification-dropdown.show {
  display: block;
}

/* Dropdown header */
.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.notification-header strong {
  font-size: 15px;
  color: #111827;
}

.notification-header button {
  border: none;
  background: none;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.notification-header button:hover {
  text-decoration: underline;
}

/* Notification list */
.notification-list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

/* Individual notification */
.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s ease;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.notification-item-content {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  margin: 0 0 4px;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.notification-item-message {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.notification-item-time {
  margin-top: 5px;
  color: #9ca3af;
  font-size: 11px;
}

/* Unread notification */
.notification-item.unread {
  background: #f8fbff;
}

.notification-item.unread .notification-item-title {
  color: #1d4ed8;
}

/* ============================================================
   NOTIFICATION ASSISTANCE HIGHLIGHT
   ============================================================ */

.assistance-notification-highlight {
  background: #eff6ff !important;
  outline: 3px solid #2563eb;
  outline-offset: -3px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.assistance-notification-highlight td {
  background: transparent !important;
}

.return-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.return-modal.show {
  display: flex;
}

.return-modal-card {
  width: min(100%, 510px);
  padding: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  animation: returnModalIn 160ms ease-out;
}

@keyframes returnModalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.return-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.return-modal-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 19px;
}

.return-modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.return-modal-close:hover { background: #f1f5f9; color: #0f172a; }

.return-modal-card h3 {
  margin: 0 0 7px;
  color: #0f172a;
  font-size: 22px;
}

.return-modal-description {
  margin: 0 0 22px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.return-modal-card label {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 650;
}

.return-modal-card label span { color: #dc2626; }

.return-modal-card textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 132px;
  min-height: 132px;
  resize: none;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  color: #0f172a;
  font: inherit;
  line-height: 1.5;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.return-modal-card input[type="text"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  color: #0f172a;
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.return-modal-card input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.return-modal-card input[type="text"]::placeholder { color: #94a3b8; }

.return-modal-card textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.return-modal-card textarea::placeholder { color: #94a3b8; }

.return-modal-error {
  min-height: 20px;
  margin-top: 6px;
  color: #dc2626;
  font-size: 13px;
}

.return-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.return-modal-actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.return-modal-actions button:active { transform: translateY(1px); }

.return-modal-cancel {
  border-color: #cbd5e1 !important;
  background: #fff;
  color: #334155;
}

.return-modal-cancel:hover { background: #f8fafc; }

.return-modal-submit {
  background: #2563eb;
  color: #fff;
}

.return-modal-submit:hover { background: #1d4ed8; }

.view-return-remarks {
  padding: 6px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.view-return-remarks:hover { background: #dbeafe; }

.view-beneficiary-details,
.view-custom-assistance-details {
  margin-right: 8px;
  padding: 6px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.view-beneficiary-details:hover,
.view-custom-assistance-details:hover { background: #dbeafe; }
.view-beneficiary-details:disabled,
.view-custom-assistance-details:disabled { opacity: .5; cursor: not-allowed; }

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.priority-high {
  background: #fee2e2;
  color: #b91c1c;
}

.priority-high::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.priority-low {
  background: #dcfce7;
  color: #166534;
}

.remarks-history-card {
  max-height: min(82vh, 760px);
  overflow: hidden;
}


.return-remarks-history-list {
  display: grid;
  max-height: 48vh;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 5px 2px 0;
}

.return-remark-entry {
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.return-remark-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #1e293b;
  font-size: 13px;
}

.return-remark-meta time {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.return-remark-route {
  margin-top: 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}


.return-remark-entry p {
  margin: 9px 0 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.return-remarks-loading {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  text-align: center;
}

/* Keep report filters compact and consistent when one wraps to a new row. */
.report-form > .form-group {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 240px;
  margin: 0;
}

.report-form > .form-group label {
  min-height: 18px;
}

.report-form .form-select,
.report-form .form-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
}

.report-form .report-actions {
  margin-left: auto;
  align-self: flex-end;
  padding-bottom: 0;
}

.report-picker {
  position: relative;
}

.report-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  background: #fff;
}

.report-picker-trigger i {
  font-size: 12px;
  color: #334155;
}

.report-type-storage {
  display: none !important;
}

.report-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 290px);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(15 23 42 / 16%);
}

.report-picker-menu[hidden] {
  display: none;
}

.report-picker-heading {
  padding: 9px 10px 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.report-picker-option,
.report-picker-back {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-picker-option:hover,
.report-picker-back:hover,
.report-picker-option:focus-visible,
.report-picker-back:focus-visible {
  outline: none;
  background: #eff6ff;
  color: #1d4ed8;
}

.report-picker-back {
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
}

/* Shared administration table system */
.beneficiaries-table,
.cases-table,
.assistance-table,
.report-table,
.users-table {
  color: #1e293b;
}

.beneficiaries-table thead,
.cases-table thead,
.assistance-table thead,
.report-table thead,
.users-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.beneficiaries-table th,
.cases-table th,
.assistance-table th,
.report-table th,
.users-table th {
  padding: 12px 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.beneficiaries-table td,
.cases-table td,
.assistance-table td,
.report-table td,
.users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.4;
}

.beneficiaries-table tbody tr:hover td,
.cases-table tbody tr:hover td,
.assistance-table tbody tr:hover td,
.report-table tbody tr:hover td,
.users-table tbody tr:hover td {
  background: #f8fafc;
}

.badge {
  border-radius: 999px;
  font-weight: 600;
}

.badge-pending {
  background: #fef3c7;
  color: #b45309;
}

.badge-approved {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-released,
.badge-resolved {
  background: #dcfce7;
  color: #15803d;
}

.badge-rejected,
.badge-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.view-beneficiary-details,
.view-custom-assistance-details,
.compact-return-remarks,
.manage-cheque-number {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #fff;
  color: #1d4ed8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.view-beneficiary-details:hover,
.view-custom-assistance-details:hover,
.compact-return-remarks:hover,
.manage-cheque-number:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.assistance-table th:nth-child(3) {
  text-align: right;
}

.assistance-table td:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.assistance-table th:nth-child(5),
.assistance-table td.status-badge-cell {
  text-align: center;
}

.assistance-table td.status-badge-cell .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistance-table .workflow-stage-meta,
.assistance-table .workflow-destination {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assistance-table .workflow-destination {
  text-align: center;
}

.cheque-number-cell {
  white-space: nowrap;
}

.cheque-number-badge {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #142b4a;
}

.cheque-number-badge strong {
  max-width: 100%;
  letter-spacing: .02em;
}

.report-cheque-number {
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.report-cheque-empty {
  color: #64748b;
}

.assistance-actions-cell .action-select {
  min-height: 36px;
  border-color: #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
}

/* Keep workflow rows compact; the status and action already show the next step. */
.assistance-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.assistance-table .workflow-stage-meta {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistance-table .workflow-destination {
  display: none;
}

.assistance-actions-cell .compact-return-remarks {
  margin-top: 5px;
}

/* Shared small-screen layout for the fixed application sidebar. */
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 12px 16px;
  }

  .sidebar > div {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
  }

  .sidebar .logo {
    flex: 0 0 auto;
    margin: 0;
  }

  .sidebar .menu {
    flex: 1 1 auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    min-width: 0;
  }

  .menu a,
  .menu a:last-child {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px;
  }

  .logout {
    flex: 0 0 auto;
    margin: 8px 0 0;
    padding: 8px 10px;
    border-top: 0;
  }

  .main {
    width: 100%;
    margin-left: 0;
    min-height: 0;
    overflow: visible;
  }

  .beneficiaries-table-container,
  .cases-table-container,
  .assistance-table-container,
  .users-table-container {
    overflow-x: auto;
  }

  .beneficiaries-table,
  .cases-table,
  .assistance-table,
  .users-table {
    min-width: 680px;
  }
}

@media (max-width: 600px) {
  .main { padding: 14px; }
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar h2 { font-size: 20px; }
  .user-profile { min-width: 0; }
  .section { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases-top,
  .assistance-top,
  .beneficiaries-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .cases-header,
  .assistance-header,
  .beneficiaries-header { align-items: stretch; }
  .search-container,
  .filter-group,
  .filter-select { width: 100%; }
  .filter-group { flex-wrap: wrap; }
  .beneficiary-form { padding: 18px 14px; }
  .field-item { flex-basis: 100%; min-width: 0; }
}

@media (max-width: 380px) {
  .sidebar > div { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sidebar .menu { width: 100%; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .return-modal-card { padding: 22px 18px; }
  .return-modal-actions { flex-direction: column-reverse; }
  .return-modal-actions button { width: 100%; }
}

/* Analytics page visual system */
.analytics-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.analytics-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #2563eb;
  font-size: 16px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.analytics-icon-button:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.analytics-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
}

.app-error-toast {
  position: fixed;
  z-index: 100000;
  top: 20px;
  right: 24px;
  display: flex;
  width: min(420px, calc(100vw - 32px));
  box-sizing: border-box;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.2);
  color: #334155;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-error-toast[hidden] { display: none; }
.app-error-toast.is-visible { opacity: 1; transform: translateY(0); }

.app-error-toast-icon {
  display: inline-flex;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
}

.app-error-toast-content { flex: 1; min-width: 0; }
.app-error-toast-content strong { display: block; margin: 1px 0 4px; color: #991b1b; font-size: 14px; }
.app-error-toast-content p { margin: 0; color: #475569; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

.app-error-toast-close {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.app-error-toast-close:hover { background: #f1f5f9; color: #1e293b; }

@media (max-width: 520px) {
  .app-error-toast { top: 12px; right: 12px; width: calc(100vw - 24px); }
}

.analytics-filter-panel {
  border-color: #e3eaf4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.analytics-filter-heading h3 {
  color: #10264a;
  font-size: 17px;
}

.analytics-filter-summary {
  color: #526984;
}

.analytics-cards {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.analytics-card {
  --metric-accent: #2563eb;
  min-width: 0;
  min-height: 112px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
}

.analytics-card:nth-child(2) { --metric-accent: #7c3aed; }
.analytics-card:nth-child(3) { --metric-accent: #0f766e; }
.analytics-card:nth-child(4) { --metric-accent: #d97706; }
.analytics-card:nth-child(5) { --metric-accent: #0891b2; }
.analytics-card:nth-child(6) { --metric-accent: #2563eb; }

.analytics-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-accent);
  content: "";
}

.analytics-card:hover {
  transform: translateY(-2px);
  border-color: #dbeafe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.analytics-card .card-content {
  padding-right: 52px;
}

.analytics-card .card-label {
  min-height: 34px;
  max-width: 100%;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
}

.analytics-card:nth-child(6) .card-label {
  max-width: calc(100% - 48px);
}

.analytics-card .card-value {
  margin: 0;
  color: #10264a;
  font-size: clamp(23px, 2vw, 29px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.analytics-card:nth-child(6) .card-content {
  padding-right: 0;
}

.analytics-card:nth-child(6) .card-value {
  font-size: clamp(18px, 1.65vw, 25px);
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow-wrap: normal;
}

.analytics-card i {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  border-radius: 13px;
  background: color-mix(in srgb, var(--metric-accent) 12%, white);
  color: var(--metric-accent);
  font-size: 17px;
}

.analytics-section {
  gap: 18px;
  margin-bottom: 18px;
}

.chart-box {
  min-width: 0;
  box-sizing: border-box;
  padding: 22px 24px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
}

.chart-box h3 {
  margin-bottom: 15px;
  color: #10264a;
  font-size: 16px;
}

.chart-container {
  height: clamp(260px, 24vw, 320px);
  min-width: 0;
}

@media (max-width: 768px) {
  .analytics-top-actions { gap: 8px; }
  .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-section { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .analytics-top-actions { align-items: flex-end; flex-direction: column-reverse; }
  .analytics-top-actions .user-profile { max-width: 100%; }
  .analytics-cards { grid-template-columns: 1fr; }
  .analytics-filter-panel { padding: 16px; }
  .chart-box { padding: 18px 14px; }
  .chart-container { height: 270px; }
}

/* Primary create actions */
.btn-add-beneficiary,
.btn-new-case,
.btn-new-assistance {
  min-height: 44px;
  box-sizing: border-box;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  background: linear-gradient(180deg, #3478f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 2px 5px rgb(37 99 235 / 18%);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn-add-beneficiary i,
.btn-new-case i,
.btn-new-assistance i {
  font-size: 13px;
  opacity: .95;
}

.btn-add-beneficiary:hover,
.btn-new-case:hover,
.btn-new-assistance:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 5px 12px rgb(37 99 235 / 24%);
  transform: translateY(-1px);
}

.btn-add-beneficiary:active,
.btn-new-case:active,
.btn-new-assistance:active {
  box-shadow: 0 1px 3px rgb(37 99 235 / 18%);
  transform: translateY(0);
}

.btn-add-beneficiary:focus-visible,
.btn-new-case:focus-visible,
.btn-new-assistance:focus-visible {
  outline: 3px solid #bfdbfe;
  outline-offset: 2px;
}

