/* ---------- Global Sidebar Variables ---------- */
:root {
  --app-sidebar-collapsed-width: 64px;
  --app-sidebar-expanded-width: 280px;
  --app-sidebar-z: 2000;
  --app-sidebar-backdrop-z: 1990;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  margin: 0;
}

.bg-app {
  background-color: #8fb3a3;
}

.dashboard-wrapper {
  display: flex;
  padding-left: var(--app-sidebar-collapsed-width);
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.dashboard-content {
  flex: 1 1 auto;
  min-width: 0;
  background-color: #ffffff;
  width: -webkit-fill-available;
  max-width: 100%;
  box-sizing: border-box;
}

.card {
  border: solid 1px #d3d3d3;
  /* box-shadow: 0 0 15px rgba(0,0,0,0.05); */
  border-radius: 12px;
}

.card h4 {
  font-weight: 600;
}

.card-title {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

.card-content {
  display: flex;
  justify-content: space-between;
}

.material-icons {
  font-size: 26px;
}

.chart {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.chart-body {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  flex: 2 1 420px;
  min-width: 0;
  max-width: 100%;
}

.chart-body-market {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  flex: 3 1 480px;
  min-width: 0;
  max-width: 100%;
}

.chart > .data {
  flex: 1 1 300px;
  min-width: 0;
  max-width: 100%;
}

.data {
  width: -webkit-fill-available;
  min-width: 0;
}

.data-body {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
}

.data-body-user {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  flex: 1 1 280px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

@media (max-width: 991.98px) {
  .chart {
    flex-direction: column;
  }

  .chart-body,
  .chart-body-market,
  .chart > .data,
  .data-body-user {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
}

.user-img {
  width: 45px;
  height: 45px;
  background-color: #a5c5bb;
  border-radius: 30%;
}

.progress-bar.custom {
  border-radius: 6px;
}

.badge-status {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
}

.role {
  color: lightgray;
}

.card-box {
  border-radius: 15px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.event-item,
.activity-item {
  font-size: 14px;
  margin-bottom: 15px;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  color: gray;
  font-size: 13px;
}

.timeline {
  position: relative;
  padding-left: 4px;
  border-left: 2px solid #ccc;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-left: 10px;
  display: flex;
  align-items: flex-start;
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 4px;
  width: 10px;
  height: 10px;
  background-color: #1976d2;
  border-radius: 50%;
  z-index: 1;
}

.timeline-time {
  font-size: 12px;
  color: #888;
  margin-left: auto;
}

.timeline-text {
  font-size: 14px;
}

.chart-box {
  height: 200px;
}

.show-all {
  font-size: 14px;
  font-weight: 500;
}

.user-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #8fb3a3 !important;
  color: #fff;
}

.therapist-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #DBEAFE !important;
  color: #1D4ED8;
  text-align: center;
}

.therapist-badge-profile {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.listener-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #F3E8FF !important;
  color: #7E22CE;
  text-align: center;
}

.active-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #15803D !important;
  color: #fff;
}

.inactive-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #ee2828 !important;
  color: #fff;
}

.queued-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color:yellow !important;
  color: #4B5563;
}

.completed-badge {
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 12px;
  background-color: #F3F4F6 !important;
  color: #4B5563;
}

.activity-card {
  max-width: 600px;
  /* margin-top: 20px; */
  background-color: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  font-family: Arial, sans-serif;
}

.activity-title {
  font-size: 16px;
  margin-bottom: 20px;
  color: #333;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 15px;
}

.activity-icon {
  width: 45px;
  background: #e6f4ea;
  color: #8fb3a3;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 30px;
}

.activity-text p {
  margin: 0;
  font-size: 14px;
  color: #444;
}

.activity-text span {
  font-size: 12px;
  color: #999;
}

/* Layout */
.dashboard {
  display: flex;
  gap: 20px;
  padding: 20px;
  font-family: 'Segoe UI', sans-serif;
}

/* Card Styles */
.card-session {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* Table Card */
.sessions-card {
  flex: 2;
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.session-table th {
  background: #f5f5f5;
  text-align: left;
  padding: 10px;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
  border-radius: 6px 6px 0 0;
}

.session-table td {
  padding: 10px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.badge.success {
  background-color: #00cc44;
}

.badge.danger {
  background-color: #cc3300;
}

/* Actions Card */
.actions-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease-in-out;
}

.btn span {
  font-size: 16px;
}

.btn.danger {
  background-color: #b1321c;
  color: white;
}

.btn.warning {
  background-color: #f7d447;
  color: #333;
}

.btn.outline {
  border: 2px solid #333;
  background: white;
  color: #333;
}

.btn.neutral {
  background-color: #8fb3a3;
  color: #333;
}

body {
  font-family: 'Inter', sans-serif;
}

.dashboard-activity {
  padding: 20px;
  margin: auto;
}

.card-activity {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-activity h5 {
  margin-bottom: 16px;
}

.activity-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.activity-list li {
  padding: 20px;
  border-radius: 20px;
  background-color: #F5F5F5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-list li small {
  margin-left: auto;
  color: #888;
}

.grid {
  display: flex;
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  background: #e0f2f1;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

.stat strong {
  font-size: 18px;
  display: block;
  margin-top: 5px;
}

.graph-placeholder {
  height: 80px;
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
  border-radius: 8px;
  margin-top: 10px;
}

.status.success {
  color: #2e7d32;
  font-weight: bold;
}

.status.valid {
  color: #388e3c;
  font-weight: bold;
}

/* ---------- Layout: Header & Sidebar ---------- */
#header {
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 1000;
  padding: 10px 20px;
}

/* Header should start after collapsed sidebar */
#header {
  /* padding-left: calc(var(--app-sidebar-collapsed-width) + 1rem) !important; */
  padding-left: 2.6rem !important;
  padding-right: 1rem !important;
}

@media (max-width: 767.98px) {
  #header {
    /* padding-left: calc(var(--app-sidebar-collapsed-width) + 1rem) !important; */
    padding-left: 2.6rem !important;
  }
}

/* Sidebar: collapsed strip + overlay expand (does not push content) */
.app-sidebar.sidebar {
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--app-sidebar-collapsed-width);
  z-index: var(--app-sidebar-z);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  transition:
    width 0.18s ease,
    transform 0.18s ease;
}

.app-sidebar.sidebar.sidebar--expanded {
  width: var(--app-sidebar-expanded-width);
}

/* Sidebar top: logo + toggle */
.app-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-sidebar-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.app-sidebar-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0px solid rgba(148, 163, 184, 0.6);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.app-sidebar-toggle .material-icons {
  font-size: 22px;
}

/* Collapsed: icons only (tooltip comes from title attr on links) */
.app-sidebar.sidebar.sidebar--collapsed .nav-text {
  display: none;
}

.app-sidebar.sidebar.sidebar--collapsed .app-sidebar-logo {
  display: none;
}

.app-sidebar.sidebar.sidebar--collapsed .app-sidebar-top {
  justify-content: center;
}

/* Keep navigation icons visible when collapsed */
.app-sidebar.sidebar.sidebar--collapsed .scroll {
  display: block;
}

.app-sidebar.sidebar.sidebar--collapsed .nav-item {
  padding-left: 0;
  justify-content: center;
}

.app-sidebar.sidebar.sidebar--collapsed .nav-link {
  justify-content: center;
  width: 100%;
}

.app-sidebar.sidebar.sidebar--collapsed .material-icons {
  margin-right: 0 !important;
}

.app-sidebar.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Backdrop for overlay mode */
.app-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: var(--app-sidebar-backdrop-z);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.app-sidebar-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile: sidebar hidden unless expanded */
@media (max-width: 767.98px) {
  .dashboard-wrapper {
    padding-left: var(--app-sidebar-collapsed-width);
  }

  .app-sidebar.sidebar {
    width: var(--app-sidebar-collapsed-width);
    transform: none;
  }

  .app-sidebar.sidebar.sidebar--expanded {
    width: var(--app-sidebar-expanded-width);
  }
}

.sidebar .scroll {
  overflow-y: auto;
  height: calc(100vh - 69px);
  scrollbar-width: none;
}

.sidebar .nav-link {
  color: #333;
}

.sidebar li {
  display: flex;
  align-content: center;
  justify-content: flex-start;
}

.sidebar .nav-link:hover {
  color: #8fb3a3;
}

.sidebar .active {
  background-color: #8fb3a3;
  width: 100%;
  border-radius: 0 20px 20px 0;
}

.sidebar .active .nav-link:hover {
  color: #333;
}

.sidebar .nav-item {
  padding-left: 10px;
}

/* ---------- Shared Cards & Metrics ---------- */
.metric-card {
  border: none;
  border-radius: 18px;
  background: radial-gradient(circle at top left, #ecfeff, #ffffff);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.09);
}

.metric-card h6 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.metric-card h4 {
  font-size: 1.4rem;
  font-weight: 700;
}

.filter-bar-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  background: #ffffff;
}

.filter-bar-card select,
.filter-bar-card input[type="date"] {
  font-size: 0.85rem;
}

/* ---------- Shared Tables ---------- */
.custom-table {
  border-radius: 18px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.custom-table thead th {
  background-color: #8fb3a3 !important;
  color: #f9fafb !important;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none !important;
}

/* ---------- Shared Copy ID / Toast ---------- */
.copy-id-cell {
  white-space: nowrap;
  cursor: pointer;
  font-family: monospace;
  font-size: 0.8rem;
  position: relative;
  padding-right: 1.4rem !important;
}

.copy-id-cell:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.copy-id-cell::after {
  content: "content_copy";
  font-family: "Material Icons";
  font-size: 0.95rem;
  line-height: 1;
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: #6b7280;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.copy-id-cell:hover::after {
  opacity: 1;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #020617;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  z-index: 9999;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast .toast-icon {
  font-size: 1.1rem;
  color: #4ade80;
}

.copy-toast .toast-label {
  color: #9ca3af;
  font-size: 0.8rem;
}

.copy-toast .toast-value {
  font-family: monospace;
  color: #fff;
  font-weight: 600;
}

/* Revenue transactions table: widen Transaction ID column */
#userTable th:first-child,
#userTable td:first-child {
  min-width: 260px;
}

/* Prevent wrapping in revenue table; use horizontal scroll instead */
#userTable th,
#userTable td {
  white-space: nowrap;
}

.table-responsive {
  overflow-x: auto;
}

/* ---------- Revenue & Analytics Components ---------- */
.card-rm {
  width: 60%;
  background: radial-gradient(circle at top left, #e3f2fd, #ffffff);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.dot {
  height: 12px;
  width: 12px;
  border-radius: 999px;
  display: inline-block;
}

.label-text {
  font-size: 0.9rem;
  color: #111827;
  font-weight: 500;
}

.percentage {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
}

.chart-legend {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.chartdot {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  color: #6b7280;
  font-size: 0.95rem;
}

/* ---------- User Management: Recent Activities Scroll ---------- */
#recentActivitiesContainer {
  scrollbar-width: thin;
  scrollbar-color: #ccc #f8f9fa;
  scroll-behavior: smooth;
}

#recentActivitiesContainer::-webkit-scrollbar {
  width: 8px;
}

#recentActivitiesContainer::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

#recentActivitiesContainer::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  transition: background 0.3s ease;
}

#recentActivitiesContainer::-webkit-scrollbar-thumb:hover {
  background: #999;
}

#recentActivitiesContainer .activity-item:last-child {
  margin-bottom: 0;
}

/* ---------- User Management: DataTables Search Input ---------- */
.dataTables_filter input[type="search"],
input.admin-user-search-input[type="search"] {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  outline: none;
  min-width: 260px;
}

.dataTables_filter input[type="search"]:focus,
input.admin-user-search-input[type="search"]:focus {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}