/* Care Admin — uses Harmony tokens from care-theme.css :root */

.care-admin {
  --ca-primary: var(--lc-green-mid);
  --ca-primary-light: var(--lc-green-light);
  --ca-accent: var(--lc-mint);
  --ca-surface: var(--lc-surface);
  --ca-surface-2: var(--lc-surface-2);
  --ca-border: rgba(105, 129, 197, 0.16);
  --ca-text: var(--lc-text);
  --ca-muted: var(--lc-muted);
  --ca-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --ca-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.09);
  --ca-radius: var(--lc-radius, 16px);
  --ca-radius-sm: 12px;
  font-family: "Outfit", "Noto Sans", system-ui, sans-serif;
  color: var(--ca-text);
  animation: ca-fade-in 0.45s ease-out;
}

@keyframes ca-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.care-admin .ca-hero {
  position: relative;
  border-radius: var(--ca-radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #eef2fa 0%, #ffffff 48%, #e8eef8 100%);
  border: 1px solid var(--ca-border);
  box-shadow: var(--ca-shadow);
  overflow: hidden;
}

.care-admin .ca-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 45%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(155, 180, 229, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.care-admin .ca-hero-inner {
  position: relative;
  z-index: 1;
}

.care-admin .ca-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ca-primary);
  margin-bottom: 0.35rem;
}

.care-admin .ca-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--ca-text);
}

.care-admin .ca-sub {
  font-size: 0.9rem;
  color: var(--ca-muted);
  margin: 0;
  max-width: 42rem;
}

.care-admin .ca-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.care-admin .ca-nav .btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--ca-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.care-admin .ca-nav .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(105, 129, 197, 0.12);
}

.care-admin .ca-nav .btn-primary {
  background: linear-gradient(135deg, var(--ca-primary) 0%, var(--ca-primary-light) 100%);
  border-color: transparent;
}

.care-admin .ca-card {
  background: var(--ca-surface);
  border-radius: var(--ca-radius);
  border: 1px solid var(--ca-border);
  box-shadow: var(--ca-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.care-admin .ca-card:hover {
  box-shadow: var(--ca-shadow-hover);
}

.care-admin .ca-card-header {
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--ca-border);
  background: linear-gradient(180deg, var(--ca-surface-2) 0%, var(--ca-surface) 100%);
}

.care-admin .ca-card-header h5,
.care-admin .ca-card-header .ca-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--ca-text);
}

.care-admin .ca-card-header p {
  font-size: 0.82rem;
  color: var(--ca-muted);
  margin: 0;
}

.care-admin .ca-card-header a {
  color: var(--ca-primary);
  font-weight: 600;
  text-decoration: none;
}

.care-admin .ca-card-header a:hover {
  text-decoration: underline;
}

.care-admin .ca-card-body {
  padding: 1.25rem;
}

.care-admin .ca-stat-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .care-admin .ca-stat-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .care-admin .ca-stat-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.care-admin .ca-stat {
  position: relative;
  border-radius: var(--ca-radius-sm);
  padding: 1.15rem 1.2rem;
  background: var(--ca-surface);
  border: 1px solid var(--ca-border);
  box-shadow: var(--ca-shadow);
  height: 100%;
  overflow: hidden;
}

.care-admin .ca-stat::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ca-primary), var(--ca-accent));
  opacity: 0.85;
}

.care-admin .ca-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(105, 129, 197, 0.12), rgba(155, 180, 229, 0.22));
  color: var(--ca-primary);
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

.care-admin .ca-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ca-muted);
  margin-bottom: 0.2rem;
}

.care-admin .ca-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ca-text);
  line-height: 1.15;
}

.care-admin .ca-badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.care-admin .ca-badge-none { background: #eef1f4; color: #4a5568; }
.care-admin .ca-badge-pending { background: #fff8e6; color: #9a6b03; }
.care-admin .ca-badge-approved { background: #e8f5ee; color: #1d6f42; }
.care-admin .ca-badge-declined { background: #fdecef; color: #b4233c; }

.care-admin .ca-role-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0.15rem 0.25rem 0.15rem 0;
  background: rgba(105, 129, 197, 0.08);
  color: var(--ca-primary);
  border: 1px solid rgba(105, 129, 197, 0.16);
}

.care-admin .ca-table-wrap {
  border-radius: var(--ca-radius-sm);
  overflow: hidden;
  border: 1px solid var(--ca-border);
}

.care-admin .ca-table {
  margin: 0;
  font-size: 0.875rem;
}

.care-admin .ca-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ca-text);
  background: linear-gradient(180deg, #f4f8f6 0%, #e8f0ec 100%);
  border: none;
  border-bottom: 2px solid var(--ca-primary);
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

/* DataTables clones thead — keep header text visible */
.care-admin table.dataTable > thead > tr > th,
.care-admin table.DTFC_Cloned thead th {
  color: var(--ca-text) !important;
  background: linear-gradient(180deg, #f4f8f6 0%, #e8f0ec 100%) !important;
  border-bottom: 2px solid var(--ca-primary) !important;
}

.care-admin .ca-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: var(--ca-border);
}

.care-admin .ca-table tbody tr {
  transition: background 0.15s ease;
}

.care-admin .ca-table.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(248, 250, 248, 0.85);
}

.care-admin .ca-table tbody tr:hover td {
  background-color: rgba(155, 180, 229, 0.16) !important;
}

.care-admin .ca-table-sm thead th,
.care-admin .ca-table-sm tbody td {
  padding: 0.65rem 0.85rem;
}

.care-admin .ca-filters {
  background: var(--ca-surface-2);
  border: 1px solid var(--ca-border);
  border-radius: var(--ca-radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.care-admin .ca-filters .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ca-muted);
}

.care-admin .ca-filters .form-select,
.care-admin .ca-filters .form-control {
  border-radius: 10px;
  border: 1px solid var(--ca-border);
}

.care-admin .ca-job-card {
  border-radius: var(--ca-radius-sm);
  border: 1px solid var(--ca-border);
  background: linear-gradient(180deg, #ffffff 0%, var(--ca-surface-2) 100%);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(27, 38, 52, 0.04);
}

.care-admin .ca-job-card:last-child {
  margin-bottom: 0;
}

.care-admin .ca-job-card .form-control,
.care-admin .ca-job-card .input-group-text {
  border-radius: 10px;
}

.care-admin .ca-footnote {
  font-size: 0.8rem;
  color: var(--ca-muted);
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ca-surface-2);
  border-radius: 10px;
  border: 1px dashed var(--ca-border);
}

.care-admin .ca-kpi-mini {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.care-admin .ca-kpi-mini .ca-stat-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.care-admin .ca-rank-list .list-group-item {
  border-color: var(--ca-border);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}

.care-admin .ca-rank-list .ca-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ca-primary), var(--ca-primary-light));
  color: #fff;
  margin-right: 0.5rem;
}

.care-admin .ca-chart-card .card-body {
  min-height: 300px;
}

.care-admin .btn-ca-success {
  background: linear-gradient(135deg, var(--lc-green), var(--lc-green-light));
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
}

.care-admin .btn-ca-success:hover {
  color: #fff;
  filter: brightness(1.05);
}

.care-admin .badge.ca-pill {
  padding: 0.4em 0.65em;
  border-radius: 8px;
  font-weight: 600;
}

/* DataTables inside admin cards */
.care-admin .dataTables_wrapper {
  padding: 1rem 1.25rem 1.5rem;
}

.care-admin .dataTables_wrapper .dataTables_length,
.care-admin .dataTables_wrapper .dataTables_filter {
  margin-bottom: 0.75rem;
}

.care-admin .dataTables_wrapper .dataTables_filter input {
  border-radius: 10px;
  border: 1px solid var(--ca-border);
  padding: 0.35rem 0.75rem;
}

.care-admin .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, var(--ca-primary), var(--ca-primary-light)) !important;
  border-color: transparent !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* Users/Actions dropdown (modern look) */
.care-admin .dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--ca-border);
  padding: 0.35rem;
  background: var(--lc-surface, #fff);
}

.care-admin .dropdown-item {
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ca-text);
}

.care-admin .dropdown-item:hover,
.care-admin .dropdown-item:focus {
  background: rgba(105, 129, 197, 0.08);
  color: var(--lc-green-mid);
}

.care-admin .dropdown-item.text-danger {
  color: #b4233c;
}

.care-admin .dropdown-item.text-danger:hover,
.care-admin .dropdown-item.text-danger:focus {
  background: rgba(180, 35, 60, 0.08);
  color: #b4233c;
}

.care-admin .dropdown-toggle.btn-light {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(105, 129, 197, 0.22) !important;
  border-radius: 999px !important;
}

.care-admin .dropdown-toggle.btn-light:hover,
.care-admin .dropdown-toggle.btn-light:focus {
  border-color: rgba(105, 129, 197, 0.4) !important;
  box-shadow: 0 6px 18px rgba(105, 129, 197, 0.14);
}

/* —— Client jobs board (overview) —— */
.care-admin .ca-jobs-board__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem 1.5rem;
}

.care-admin .ca-jobs-summary .ca-jobs-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(105, 129, 197, 0.08);
  color: var(--ca-primary);
  border: 1px solid rgba(105, 129, 197, 0.16);
}

.care-admin .ca-jobs-pill--open {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.2);
}

.care-admin .ca-jobs-pill--filled {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
}

.care-admin .ca-jobs-pill--review {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.25);
}

.care-admin .ca-jobs-pill--paused {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.2);
}

.care-admin .ca-job-card-v2 {
  position: relative;
  display: flex;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ca-border);
  background: linear-gradient(145deg, #ffffff 0%, var(--ca-surface-2) 55%, #eef2fa 100%);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 12px 28px rgba(105, 129, 197, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.care-admin .ca-job-card-v2:hover {
  box-shadow:
    0 8px 12px rgba(15, 23, 42, 0.06),
    0 20px 40px rgba(105, 129, 197, 0.1);
  transform: translateY(-2px);
}

.care-admin .ca-job-card-v2__accent {
  width: 6px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 100%;
}

.care-admin .ca-job-card-v2__accent--open {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.care-admin .ca-job-card-v2__accent--filled {
  background: linear-gradient(180deg, var(--lc-green-light), var(--lc-green-mid));
}

.care-admin .ca-job-card-v2__accent--review {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.care-admin .ca-job-card-v2__accent--paused {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.care-admin .ca-job-card-v2__inner {
  flex: 1;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.2rem 1rem;
}

.care-admin .ca-job-card-v2__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(26, 102, 79, 0.1);
}

.care-admin .ca-job-card-v2__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  color: var(--lc-green-mid);
  background: linear-gradient(135deg, rgba(155, 180, 229, 0.4), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(105, 129, 197, 0.16);
  box-shadow: 0 2px 8px rgba(105, 129, 197, 0.1);
}

.care-admin .ca-job-card-v2__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ca-text);
  line-height: 1.35;
}

.care-admin .ca-job-status {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.care-admin .ca-job-status--open {
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
}

.care-admin .ca-job-status--filled {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
}

.care-admin .ca-job-status--review {
  background: rgba(245, 158, 11, 0.2);
  color: #92400e;
}

.care-admin .ca-job-status--paused {
  background: rgba(100, 116, 139, 0.18);
  color: #334155;
}

.care-admin .ca-job-meta__item {
  color: var(--ca-muted);
  font-weight: 500;
}

.care-admin .ca-job-card-v2__editor {
  margin-bottom: 1rem;
}

.care-admin .ca-job-textarea {
  border-radius: 14px !important;
  border: 1px solid var(--ca-border);
  background: rgba(255, 255, 255, 0.85);
  resize: vertical;
}

.care-admin .ca-job-card-v2__actions .input-group-text {
  font-weight: 600;
  color: var(--ca-text);
}

@media (max-width: 575.98px) {
  .care-admin .ca-jobs-board .ca-card-header {
    align-items: flex-start !important;
  }
}

/* Document verification — open real file in new tab */
.care-admin .ca-doc-preview-link {
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 11rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Overview doc-state filter pills */
.care-admin .ca-doc-filter {
  border: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.care-admin .ca-doc-filter:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.care-admin .ca-doc-filter--active {
  outline: 3px solid rgba(155, 180, 229, 0.45);
  outline-offset: 2px;
  filter: saturate(1.1);
}

/* Overview role filter chips (make them button-friendly) */
.care-admin .ca-role-chip.ca-role-filter {
  cursor: pointer;
}

.care-admin .ca-role-filter--active {
  outline: 3px solid rgba(155, 180, 229, 0.45);
  outline-offset: 2px;
  filter: saturate(1.1);
}

/* Teen Up dashboard */
.care-admin .tu-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .care-admin .tu-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .care-admin .tu-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
  .care-admin .tu-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.care-admin .tu-kpi-card {
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.care-admin .tu-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ca-shadow-hover);
  color: inherit;
}
.care-admin .tu-kpi-card .ca-stat-value {
  font-size: 1.35rem;
}
.care-admin .tu-chart-wrap {
  height: 260px;
  position: relative;
}
.care-admin .tu-chart-wrap--wide {
  height: 280px;
}
.care-admin .tu-empty {
  text-align: center;
  padding: 2.25rem 1.25rem;
  color: var(--ca-muted);
}
.care-admin .tu-empty i {
  font-size: 1.75rem;
  color: var(--ca-primary);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.65rem;
}
.care-admin .tu-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(105, 129, 197, 0.12);
}
.care-admin .tu-avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.care-admin .tu-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #4e64a8;
  border: 1px solid rgba(105, 129, 197, 0.28);
}
.care-admin .tu-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(105, 129, 197, 0.1);
}
.care-admin .tu-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ca-muted);
}
.care-admin .ca-status {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.care-admin .ca-status--active { background: rgba(22, 163, 74, 0.12); color: #166534; }
.care-admin .ca-status--pending { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.care-admin .ca-status--suspended { background: rgba(217, 119, 6, 0.16); color: #92400e; }
.care-admin .ca-status--danger { background: rgba(180, 35, 60, 0.12); color: #b4233c; }
.care-admin .ca-status--muted { background: #eef1f4; color: #475569; }
.care-admin .ca-alert { border-radius: 14px; }
.care-admin .pagination .page-link {
  border-radius: 8px;
  margin: 0 2px;
  color: var(--ca-primary);
}
.care-admin .pagination .page-item.active .page-link {
  background: var(--ca-primary);
  border-color: var(--ca-primary);
}
@media (max-width: 767.98px) {
  .care-admin .tu-chart-wrap { height: 220px; }
  .care-admin .ca-hero { padding: 1.15rem 1.2rem; }
}
